@theoplayer/theoads 8.8.2 → 8.8.3
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 +3 -3
package/theoplayer.sw.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
THEOplayer is based on patented technology developed by
|
|
25
25
|
THEO Technologies (https://www.theoplayer.com).
|
|
26
26
|
|
|
27
|
-
Version: 8.8.
|
|
28
|
-
Created: 2025-01-
|
|
27
|
+
Version: 8.8.3
|
|
28
|
+
Created: 2025-01-08T13:49:33.594Z
|
|
29
29
|
*/
|
|
30
|
-
!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,E=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function k(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,i=function(t){return"ul"+t},e=(n=function(t){return"ul"+t+"_"+ ++h}).for("Symbol.iterator"),r=n.for("Symbol.dispose"),o=n.for("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o);var R=d;function O(t){return Boolean(t&&void 0!==t.length)}function N(){}function P(t){if(!(this instanceof P))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.wa=0,this.ttn=!1,this.lTt=void 0,this.ntn=[],M(t,this)}function A(t,n){for(;3===t.wa;)t=t.lTt;0!==t.wa?(t.ttn=!0,P.itn((function(){var i=1===t.wa?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.lTt)}catch(t){return void C(n.promise,t)}D(n.promise,e)}else(1===t.wa?D:C)(n.promise,t.lTt)}))):t.ntn.push(n)}function D(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":k(n))||"function"==typeof n)){var i=n.then;if(n instanceof P)return t.wa=3,t.lTt=n,void x(t);if("function"==typeof i)return void M(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.wa=1,t.lTt=n,x(t)}catch(n){C(t,n)}}function C(t,n){t.wa=2,t.lTt=n,x(t)}function x(t){2===t.wa&&0===t.ntn.length&&P.itn((function(){t.ttn||P.rtn(t.lTt)}));for(var n=0,i=t.ntn.length;n<i;n++)A(t,t.ntn[n]);t.ntn=null}function B(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function M(t,n){var i=!1;try{t((function(t){i||(i=!0,D(n,t))}),(function(t){i||(i=!0,C(n,t))}))}catch(t){if(i)return;i=!0,C(n,t)}}P.prototype.catch=function(t){return this.then(null,t)},P.prototype.then=function(t,n){var i=new this.constructor(N);return A(this,new B(t,n,i)),i},P.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)}))}))},P.all=function(t){return new P((function(n,i){if(!O(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":k(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])}))},P.allSettled=function(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":k(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":k(i))||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,(function(n){o(t,n)}),(function(i){e[t]={status:"rejected",reason:i},0==--r&&n(e)}))}e[t]={status:"fulfilled",value:i},0==--r&&n(e)}for(var u=0;u<e.length;u++)o(u,e[u])}))},P.resolve=function(t){return t&&"object"===(void 0===t?"undefined":k(t))&&t.constructor===P?t:new P((function(n){n(t)}))},P.reject=function(t){return new P((function(n,i){i(t)}))},P.race=function(t){return new P((function(n,i){if(!O(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)P.resolve(t[e]).then(n,i)}))},P.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){R(t,0)},P.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var U=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),L=v?v.userAgent:"",F=L.match(/Firefox\/([0-9]+)/i),z=null!=F,W=F?Number(F[1]):0,q=L.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),H=null!=q,V=q?Number(q[3]):0,X=function(){function t(t){this.Px=0,this.YV=0,this.TC=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.YV+n&this.etn-1;this.TC[i]=t,this.Px=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.YV+n-1,e=this.etn-1;this.TC[i&e]=t,this.Px=n}},t.prototype.shift=function(){var t=this.YV,n=this.TC[t];return this.TC[t]=void 0,this.YV=t+1&this.etn-1,this.Px--,n},t.prototype.length=function(){return this.Px},t.prototype.stn=function(t){this.etn<t&&this.otn(this.etn<<1)},t.prototype.otn=function(t){var n=this.etn;this.etn=t;var i=this.YV+this.Px&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.TC,0,n,i)},t}();var j="unhandledrejection",Y=self.PromiseRejectionEvent,K=self.CustomEvent;function G(t){return new Y(j,{reason:t,promise:U.reject(t).catch((function(){})),cancelable:!0})}function $(t){var n=new K(j,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function Z(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(j,!1,!0,{reason:t}),n}var J,Q,tt,nt,it,et,rt,ot,ut=function(t){return ut=function(){try{var t=U.resolve(),n="error",i=new Y(j,{reason:n,promise:t});return j===i.type&&n===i.reason}catch(t){}return!1}()?G:function(){try{var t="error",n=new K(j,{detail:{reason:t}});return j===n.type&&t===n.detail.reason}catch(t){}return!1}()?$:Z,ut(t)};function st(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):Q.resolve(f).then(e,r)}function ft(t){return function(){var n=this,i=arguments;return new Q((function(e,r){var o=t.apply(n,i);function u(t){st(o,e,r,u,s,"next",t)}function s(t){st(o,e,r,u,s,"throw",t)}u(void 0)}))}}function ht(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}U&&!(z&&W<60||H&&V<15)?Q=U:(Q=P,rt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=U;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:P.itn,tt=rt,nt=new X(16),it=!1,(ot={X4:function(t){nt.push(t),it||(it=!0,tt(et))},DG:et=function(){for(;nt.length()>0;)nt.shift()();it=!1}}).DG,P.itn=ot.X4,P.rtn=function(t){try{var n=ut(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d((function(){throw new g("Unhandled promise rejection: ".concat(t))}),0)});var ct="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};function at(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 vt(t,n){if(t){if("string"==typeof t)return at(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?at(t,n):void 0}}function dt(t){return function(t){if(Array.isArray(t))return at(t)}(t)||function(t){if(void 0!==n&&null!=t[e]||null!=t["@@iterator"])return Array.from(t)}(t)||vt(t)||function(){throw new m("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var lt={}.toString;function wt(t){return null!=t}var bt=Array.isArray||function(t){return"[object Array]"===lt.call(t)};function gt(t){return"object"===(void 0===t?"undefined":k(t))&&null!==t}function mt(t){return"function"==typeof t}function pt(t){return mt(t)||gt(t)}var yt=9007199254740991,_t=(y.pow(2,-52),Array.prototype.find,Array.prototype.findLast,"function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1}),St="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 Tt(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 Et(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 It(t,n){return-1!==t.indexOf(n)}function kt(t){t.length=0}var Rt;Array.prototype.flat,Array.prototype.flatMap;function Ot(t){Rt=t}var Nt=function(){};function Pt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function At(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Dt(t,n,i){return n&&At(t.prototype,n),i&&At(t,i),t}var Ct=function(t){return t.qM="audio",t.KM="video",t.HD="metadata",t}({});function xt(t,n){return xt=p.setPrototypeOf||function(t,n){return t.__proto__=n,t},xt(t,n)}function Bt(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&xt(t,n)}function Mt(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var r=null==t?null:void 0!==n&&t[e]||t["@@iterator"];if(null!=r){var o,u,s=[],f=!0,h=!1;try{for(r=r.call(t);!(f=(o=r.next()).done)&&(s.push(o.value),!i||s.length!==i);f=!0);}catch(t){h=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(h)throw u}}return s}}(t,i)||vt(t,i)||function(){throw new m("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ut(){var t=p.create(null);return t.Uf=void 0,delete t.Uf,t}function Lt(){return new zt}var Ft="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,zt=Ft||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=Ut(),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=Ut(),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}()}();Ft||function(){var t=function(){function t(t,n){this.Qf=t,this.Ff=n}return t.prototype.next=function(){var t=this.Qf.next();return t.done?t:{value:this.Ff(t.value),done:!1}},t}();(function(){function n(){this.$d=Lt()}var i=n.prototype;i.get=function(t){return this.$d.get(""+t)},i.set=function(t,n){return this.$d.set(""+t,n),this},i.has=function(t){return this.$d.has(""+t)},i.delete=function(t){return this.$d.delete(""+t)},i.clear=function(){this.$d.clear()},i.keys=function(){return new t(this.$d.keys(),(function(t){return Number(t)}))},i.values=function(){return this.$d.values()},i.entries=function(){return new t(this.$d.entries(),(function(t){var n=Mt(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.$d.forEach((function(n,i){t(n,Number(i))}))},Dt(n,[{key:"size",get:function(){return this.$d.size}}])})()}();var Wt=function(t){return t.mE="#EXTINF",t.TRt="#EXT-X-MAP",t.i="#EXTM3U",t.p="#EXT-X-VERSION",t.en="#EXT-X-TARGETDURATION",t.Pbt="#EXT-X-START",t.ui="#EXT-X-INDEPENDENT-SEGMENTS",t.fE="#EXT-X-STREAM-INF",t.li="#EXT-X-MEDIA-SEQUENCE",t.vr="#EXT-X-ENDLIST",t.if="#EXT-X-MEDIA",t.sf="#EXT-X-DISCONTINUITY",t.ff="#EXT-X-DISCONTINUITY-SEQUENCE",t.af="#EXT-X-PLAYLIST-TYPE",t.tv="#EXT-X-KEY",t}({}),qt=function(){function t(t,n){this.hw="#EXTINF",this.nv=t,this.ev=n}return t.prototype.Gw=function(){return this.hw+":"+this.nv+",\n"+this.ev},t}(),Ht=function(){function t(t){this.hw="#EXT-X-MAP",this.ev=t}return t.prototype.Gw=function(){return this.hw+':URI="'+this.ev+'"'},t}(),Vt=function(){function t(){this.hw="#EXTM3U"}return t.prototype.Gw=function(){return this.hw},t}(),Xt=function(){function t(t){this.hw="#EXT-X-VERSION",this.Zp=t}return t.prototype.Gw=function(){return this.hw+":"+this.Zp},t}(),jt=function(){function t(t){this.hw="#EXT-X-TARGETDURATION",this.gRt=t}return t.prototype.Gw=function(){return this.hw+":"+this.gRt},t}(),Yt=function(){function t(t){this.hw="#EXT-X-START",this.vPt=t}return t.prototype.Gw=function(){return this.hw+":TIME-OFFSET="+this.vPt},t}(),Kt=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.hw="#EXT-X-KEY"}return t.prototype.Gw=function(){return this.hw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Gt=function(){function t(t){this.hw="#EXT-X-STREAM-INF",this.Ez=1,this.ev=t}return t.prototype.Gw=function(){return this.hw+":BANDWIDTH="+this.Ez+',AUDIO="audio"\n'+this.ev},t}(),$t=function(){function t(t){this.hw="#EXT-X-MEDIA-SEQUENCE",this.dM=t}return t.prototype.Gw=function(){return this.hw+":"+this.dM},t}(),Zt=function(){function t(t){this.hw="#EXT-X-MEDIA",this.ev=t}return t.prototype.Gw=function(){var t=Lt();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.hw+":"+n.join(",")},t}(),Jt=function(){function t(t){this.rC=[],this.rC=t}var n=t.prototype;return n.BA=function(){return this.rC},n.sv=function(t){this.rC.push(t)},n.YBt=function(){for(var t="",n=0,i=this.BA();n<i.length;n++){t+=i[n].Gw()+"\n"}return t},n.$f=function(){this.rC.length=0},t}(),Qt=function(t){function n(n,i){var e;return e=t.call(this,[new Vt,new Xt(8)])||this,i&&e.sv(new Gt("video/index.m3u8")),n&&e.sv(new Zt("audio/index.m3u8")),e}return Bt(n,t),n}(Jt),tn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(tn.prototype=p.create(g.prototype)).constructor=tn;var nn=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(tn),en=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(nn);function rn(t){return t instanceof g&&"AbortError"===t.name}function on(t,n){return n?new Q((function(i,e){if(n.Wf)return t.catch(Nt),e(new en);var r=function(){n.Hf(r),e(new en)};n.Xf(r),t.then((function(t){n.Hf(r),i(t)}),(function(t){n.Hf(r),e(t)}))})):t}function un(t,n){return sn.apply(this,arguments)}function sn(){return sn=ft((function(t,n){var i,e;return ht(this,(function(u){switch(u.label){case 0:i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),function(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new m("Object expected.");var e,u;if(i){if(!o)throw new m("Symbol.asyncDispose is not defined.");e=n[o]}if(void 0===e){if(!r)throw new m("Symbol.dispose is not defined.");e=n[r],i&&(u=e)}if("function"!=typeof e)throw new m("Object not disposable.");u&&(e=function(){try{u.call(this)}catch(t){return Q.reject(t)}}),t.stack.push({value:n,dispose:e,async:i})}else i&&t.stack.push({async:!0});return n}(i,n,!1),[4,t];case 2:return[2,u.sent()];case 3:return e=u.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return function(t){function n(n){t.error=t.hasError?new ct(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,e=0;(function r(){for(;i=t.stack.pop();)try{if(!i.async&&1===e)return e=0,t.stack.push(i),Q.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,Q.resolve(o).then(r,(function(t){return n(t),r()}))}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?Q.reject(t.error):Q.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}}))})),sn.apply(this,arguments)}var fn=function(){function t(){this.Wf=!1,this.Kf=!1,this.Jf=[],this.t_=[]}var n=t.prototype;return n.qf=function(){if(!this.Wf&&!this.Kf){this.Wf=!0;for(var t=0,n=this.Jf.slice();t<n.length;t++){(0,n[t])()}this.$f()}},n.$f=function(){if(!this.Kf){this.Kf=!0;for(var t=0,n=this.t_.slice();t<n.length;t++){(0,n[t])()}kt(this.Jf),kt(this.t_)}},n.Xf=function(t){this.Kf||this.Jf.push(t)},n.Hf=function(t){this.Kf||Tt(this.Jf,t)},n.i_=function(t){this.Kf||this.t_.push(t)},n.e_=function(t){this.Kf||Tt(this.t_,t)},t}(),hn=function(){function t(){this.s_=new fn}var n=t.prototype;return n.n_=function(){this.s_.qf()},n.$f=function(){this.s_.$f()},n.r_=function(t){var n=this.s_;if(!n.Wf)if(t.Wf)n.qf();else if(!n.Kf&&!t.Kf){var i=function(){e(),n.qf()},e=function(){t.Hf(i),t.e_(e),n.Hf(i),n.e_(e)};t.Xf(i),t.i_(e),n.Xf(i),n.i_(e)}},n.o_=function(){var n=new t,i=new t,e=n.Zf,r=i.Zf,o=this.s_,u=function(){e.Wf&&r.Kf||r.Wf&&e.Kf?o.qf():e.Kf&&r.Kf&&o.$f()};e.Xf(u),r.Xf(u),e.i_(u),r.i_(u),n.r_(o),i.r_(o);return o.i_((function(){e.Hf(u),r.Hf(u),e.e_(u),r.e_(u)})),[n,i]},n[r]=function(){this.n_()},t.h_=function(n){for(var i=new t,e=0;e<n.length;e++){var r=n[e];void 0!==r&&i.r_(r)}return i},Dt(t,[{key:"Zf",get:function(){return this.s_}}]),t}();Q.resolve();function cn(t,n){return new Q((function(i,e){if(void 0!==n&&n.Wf)e(new en);else{var r=Rt.Vf((function(){void 0!==n&&n.Hf(o),i()}),t),o=function(){Rt.Gf(r),e(new en)};void 0!==n&&n.Xf(o)}}))}var an=function(){function t(t){var n=this;this.zO=[],this.BO=void 0,this.PO=new hn,this.UO=function(){return 0===n.zO.length?n.FO?vn(n.FO,n.PO.Zf).then(n.YO,n.YO):n.YO():n.zO.shift()().then(n.UO)},this.YO=function(){if(0!==n.zO.length)return n.UO();n.BO=void 0},this.FO=t}var n=t.prototype;return n.RO=function(t,n){var i=this;return new Q((function(e){var r=hn.h_([i.PO.Zf,n]),o=function(){r.$f()};i.zO.push((function(){var n=vn(t,r.Zf);return e(n),n.then(o,o)})),i.BO||(i.BO=i.UO())}))},n.n_=function(){return this.QO(!0)},n.gn=function(){return this.FO=void 0,this.QO(!1)},n.QO=function(t){var n=this.BO;return this.PO.n_(),t&&(this.PO=new hn),Q.resolve(n)},t}();function vn(t,n){return new Q((function(i){return i(t(n))}))}var dn=function(t){return t.k7="HELLO",t.L7="HI_THERE",t.x7="INITIALIZE",t.C7="APPEND_INIT",t.j7="APPEND_DATA",t.O7="ACK",t.R7="REMOVE",t.P7="DESTROY_SESSION",t}({}),ln=null;try{ln=new WebAssembly.Instance(new WebAssembly.Module(new E([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(tt){}function wn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function bn(t){return!0===(t&&t.vp)}function gn(t){var n=y.clz32(t&-t);return t?31-n:n}wn.prototype.vp,p.defineProperty(wn.prototype,"vp",{value:!0}),wn.isLong=bn;var mn={},pn={};function yn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=pn[t])?e:(i=Sn(t,0,!0),r&&(pn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=mn[t])?e:(i=Sn(t,t<0?-1:0,!1),r&&(mn[t]=i),i)}function _n(t,n){if(T(t))return n?An:Pn;if(n){if(t<0)return An;if(t>=Rn)return Mn}else{if(t<=-On)return Un;if(t+1>=On)return Bn}return t<0?_n(-t,n).neg():Sn(t%kn|0,t/kn|0,n)}function Sn(t,n,i){return new wn(t,n,i)}wn.fromInt=yn,wn.fromNumber=_n,wn.fromBits=Sn;var Tn=y.pow;function En(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?An:Pn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw g("interior hyphen");if(0===e)return En(t.substring(1),n,i).neg();for(var r=_n(Tn(i,8)),o=Pn,u=0;u<t.length;u+=8){var s=y.min(8,t.length-u),f=_(t.substring(u,u+s),i);if(s<8){var h=_n(Tn(i,s));o=o.mul(h).add(_n(f))}else o=(o=o.mul(r)).add(_n(f))}return o.unsigned=n,o}function In(t,n){return"number"==typeof t?_n(t,n):"string"==typeof t?En(t,n):Sn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}wn.fromString=En,wn.fromValue=In;var kn=4294967296,Rn=kn*kn,On=Rn/2,Nn=yn(1<<24),Pn=yn(0);wn.ZERO=Pn;var An=yn(0,!0);wn.UZERO=An;var Dn=yn(1);wn.ONE=Dn;var Cn=yn(1,!0);wn.UONE=Cn;var xn=yn(-1);wn.NEG_ONE=xn;var Bn=Sn(-1,2147483647,!1);wn.MAX_VALUE=Bn;var Mn=Sn(-1,-1,!0);wn.MAX_UNSIGNED_VALUE=Mn;var Un=Sn(0,-2147483648,!1);wn.MIN_VALUE=Un;var Ln=wn.prototype;Ln.toInt=function(){return this.unsigned?this.low>>>0:this.low},Ln.toNumber=function(){return this.unsigned?(this.high>>>0)*kn+(this.low>>>0):this.high*kn+(this.low>>>0)},Ln.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Un)){var n=_n(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=_n(Tn(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}},Ln.getHighBits=function(){return this.high},Ln.getHighBitsUnsigned=function(){return this.high>>>0},Ln.getLowBits=function(){return this.low},Ln.getLowBitsUnsigned=function(){return this.low>>>0},Ln.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Un)?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},Ln.isZero=function(){return 0===this.high&&0===this.low},Ln.eqz=Ln.isZero,Ln.isNegative=function(){return!this.unsigned&&this.high<0},Ln.isPositive=function(){return this.unsigned||this.high>=0},Ln.isOdd=function(){return 1==(1&this.low)},Ln.isEven=function(){return 0==(1&this.low)},Ln.equals=function(t){return bn(t)||(t=In(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Ln.eq=Ln.equals,Ln.notEquals=function(t){return!this.eq(t)},Ln.neq=Ln.notEquals,Ln.ne=Ln.notEquals,Ln.lessThan=function(t){return this.comp(t)<0},Ln.lt=Ln.lessThan,Ln.lessThanOrEqual=function(t){return this.comp(t)<=0},Ln.lte=Ln.lessThanOrEqual,Ln.le=Ln.lessThanOrEqual,Ln.greaterThan=function(t){return this.comp(t)>0},Ln.gt=Ln.greaterThan,Ln.greaterThanOrEqual=function(t){return this.comp(t)>=0},Ln.gte=Ln.greaterThanOrEqual,Ln.ge=Ln.greaterThanOrEqual,Ln.compare=function(t){if(bn(t)||(t=In(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},Ln.comp=Ln.compare,Ln.negate=function(){return!this.unsigned&&this.eq(Un)?Un:this.not().add(Dn)},Ln.neg=Ln.negate,Ln.add=function(t){bn(t)||(t=In(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,Sn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},Ln.subtract=function(t){return bn(t)||(t=In(t)),this.add(t.neg())},Ln.sub=Ln.subtract,Ln.multiply=function(t){if(this.isZero())return this;if(bn(t)||(t=In(t)),ln)return Sn(ln.mul(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned);if(t.isZero())return this.unsigned?An:Pn;if(this.eq(Un))return t.isOdd()?Un:Pn;if(t.eq(Un))return this.isOdd()?Un:Pn;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(Nn)&&t.lt(Nn))return _n(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,Sn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},Ln.mul=Ln.multiply,Ln.divide=function(t){if(bn(t)||(t=In(t)),t.isZero())throw g("division by zero");var n,i,e;if(ln)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Sn((this.unsigned?ln.div_u:ln.div_s)(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?An:Pn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return An;if(t.gt(this.shru(1)))return Cn;e=An}else{if(this.eq(Un))return t.eq(Dn)||t.eq(xn)?Un:t.eq(Un)?Dn:(n=this.shr(1).div(t).shl(1)).eq(Pn)?t.isNegative()?Dn:xn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Un))return this.unsigned?An:Pn;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=Pn}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:Tn(2,r-48),u=_n(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=_n(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=Dn),e=e.add(u),i=i.sub(s)}return e},Ln.div=Ln.divide,Ln.modulo=function(t){return bn(t)||(t=In(t)),ln?Sn((this.unsigned?ln.rem_u:ln.rem_s)(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Ln.mod=Ln.modulo,Ln.rem=Ln.modulo,Ln.not=function(){return Sn(~this.low,~this.high,this.unsigned)},Ln.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Ln.clz=Ln.countLeadingZeros,Ln.countTrailingZeros=function(){return this.low?gn(this.low):gn(this.high)+32},Ln.ctz=Ln.countTrailingZeros,Ln.and=function(t){return bn(t)||(t=In(t)),Sn(this.low&t.low,this.high&t.high,this.unsigned)},Ln.or=function(t){return bn(t)||(t=In(t)),Sn(this.low|t.low,this.high|t.high,this.unsigned)},Ln.xor=function(t){return bn(t)||(t=In(t)),Sn(this.low^t.low,this.high^t.high,this.unsigned)},Ln.shiftLeft=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Sn(0,this.low<<t-32,this.unsigned)},Ln.shl=Ln.shiftLeft,Ln.shiftRight=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Sn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Ln.shr=Ln.shiftRight,Ln.shiftRightUnsigned=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Sn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Ln.shru=Ln.shiftRightUnsigned,Ln.shr_u=Ln.shiftRightUnsigned,Ln.rotateLeft=function(t){var n;return bn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Sn(this.high,this.low,this.unsigned):t<32?(n=32-t,Sn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Sn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},Ln.rotl=Ln.rotateLeft,Ln.rotateRight=function(t){var n;return bn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Sn(this.high,this.low,this.unsigned):t<32?(n=32-t,Sn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Sn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},Ln.rotr=Ln.rotateRight,Ln.toSigned=function(){return this.unsigned?Sn(this.low,this.high,!1):this},Ln.toUnsigned=function(){return this.unsigned?this:Sn(this.low,this.high,!0)},Ln.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Ln.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]},Ln.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]},wn.fromBytes=function(t,n,i){return i?wn.fromBytesLE(t,n):wn.fromBytesBE(t,n)},wn.fromBytesLE=function(t,n){return new wn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},wn.fromBytesBE=function(t,n){return new wn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Fn=wn;function zn(){return Date.now()||(new Date).getTime()}Fn.fromNumber(yt);var Wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),qn=16383;function Hn(t,n,i){return Wn[t>>2]+Wn[(3&t)<<4|n>>4]+Wn[(15&n)<<2|i>>6]+Wn[63&i]}function Vn(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Hn(t[r],t[r+1],t[r+2]));return e.join("")}var Xn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],jn=ArrayBuffer.isView||function(t){return t&&It(Xn,lt.call(t))};function Yn(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(mi(t),mi(n))}function Kn(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new E(n),e=0,r=0;r<t.length;r++){var o=t[r];i.set(o,e),e+=o.byteLength}return i}(t,n)}function Gn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=qn)e.push(Vn(t,o,y.min(r,o+qn)));if(1===i){var u=t[n-1];e.push(Wn[u>>2]+Wn[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Wn[s>>2]+Wn[(3&s)<<4|f>>4]+Wn[(15&f)<<2]+"=")}return e.join("")}(new E(t))}var $n=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.fp=function(t){this.Hu+=t},n._p=function(t){this.Hu=t},n.gp=function(){return new t(this.Lu)},Dt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}();String.prototype.replaceAll;var Zn="function"==typeof String.prototype.startsWith?function(t,n){return wt(t)&&t.startsWith(n)}:function(t,n){return wt(t)&&t.substr(0,n.length)===n},Jn=(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}),Qn=(String.prototype.padStart,String.prototype.padEnd,16384),ti="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Qn?(n=String).fromCodePoint.apply(n,dt(t)):ii(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 ni(n)};function ni(t){var n;return t.length<=Qn?(n=String).fromCharCode.apply(n,dt(t)):ii(t,String.fromCharCode)}function ii(t,n){for(var i=[],e=0;e<t.length;e+=Qn)i.push(n.apply(void 0,dt(t.slice(e,e+Qn))));return i.join("")}function ei(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ri(t,n){return t>>n&63|128}function oi(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(ei(t),n.push(t>>12&15|224),n.push(ri(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ri(t,12)),n.push(ri(t,6))),n.push(63&t|128)):n.push(t)}function ui(t,n){if(n.Lu>=t.length)throw new g("Invalid byte index");var i=255&t[n.Lu];if(n.fp(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function si(t,n){var i=n.Lu;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.fp(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|ui(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|ui(t,n)<<6|ui(t,n);if(o>=2048)return ei(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|ui(t,n)<<12|ui(t,n)<<6|ui(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}var fi=65279;function hi(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Lu,i);return n.fp(2),e}function ci(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Lu,i,e),n.fp(2)}function ai(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Lu,i,e),n.fp(4)}function vi(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){ci(t,n,i.charCodeAt(o),e)}}function di(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Lu+2<=t.byteLength;){var o=hi(t,n,i);if(e&&!o)break;r.push(o)}return ni(r)}(bi(t),new _i,n,!1)}function li(t){return function(t){return ti(t)}(function(t,n){var i,e=[],r=new _i;if(!n){if(!1===(i=si(t,r)))return e;i===fi||e.push(i)}for(;!1!==(i=si(t,r));)e.push(i);return e}(gi(t)))}function wi(t){return new E(function(t){for(var n=[],i=0;i<t.length;i++)oi(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 bi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function gi(t){return new E(t.buffer,t.byteOffset,t.byteLength)}function mi(t){return t instanceof ArrayBuffer?new E(t):gi(t)}function pi(t){if(t.slice)return t.slice(0);var n=new E(t.byteLength);return n.set(t,0),n}var yi,_i=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.fp=function(t){this.Hu+=t},n._p=function(t){this.Hu=t},n.gp=function(){return new t(this.Lu)},n.pp=function(){return new $n(this.Lu<<3)},Dt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}(),Si=new Array(256);for(yi=0;yi<256;yi+=1)Si[yi]=(yi<16?"0":"")+yi.toString(16);function Ti(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*y.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function Ei(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 Ii=function(){function t(t){var n=this;this.u_=Ut(),this.d_=void 0,this.c_=0,this.Ds=function(t){n.yo(t)},this.f_=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.a_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.a_(e,n)}},n.a_=function(t,n){var i=this.u_[t];void 0===i?this.u_[t]=n:"function"==typeof i?this.u_[t]=[i,n]:0===this.c_?i.push(n):this.u_[t]=i.concat(n)},n.l_=function(t){if("function"==typeof t){var n=this.d_;void 0===n?this.d_=t:"function"==typeof n?this.d_=[n,t]:0===this.c_?n.push(t):this.d_=n.concat(t)}},n.Bo=function(){this.u_=Ut(),this.d_=void 0},n.yo=function(t){this.c_++;var n=this.u_[t.type],i=this.d_;void 0!==n&&Ei(this.f_,t,n),void 0!==i&&Ei(this.f_,t,i),this.c_--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.__(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.__(e,n)}},n.__=function(t,n){var i=this.u_[t];void 0!==i&&("function"==typeof i?i===n&&(this.u_[t]=void 0):0===this.c_?Tt(i,n):this.u_[t]=Et(i,n))},n.g_=function(t){if("string"==typeof t)this.u_[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.u_[i]=void 0}},n.v_=function(t){var n=this.d_;void 0!==n&&("function"==typeof n?n===t&&(this.d_=void 0):0===this.c_?Tt(n,t):this.d_=Et(n,t))},n.w_=function(t,n){var i=this;return new Q((function(e,r){if(n&&n.Wf)return r(new en);var o=function(t){s(),e(t)},u=function(){s(),r(new en)},s=function(){i.fn(t,o),n&&n.Hf(u)};i.yn(t,o),n&&n.Xf(u)}))},t}(),ki=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},Ri=function(t){function n(n){var i;return(i=t.call(this,"append")||this).yp=n,i}return Bt(n,t),n}(ki),Oi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).tIt=0,n.TC=new E(0),n.Bx=!1,n.cv=!1,n}Bt(n,t);var i=n.prototype;return i.X$=function(t,n){this.tIt+=n,this.TC=Kn([this.TC,t]),this.yo(new Ri(t))},i.Ws=function(){this.Pj||(this.yo(new ki("close")),this.Bx=!0)},Dt(n,[{key:"y_",get:function(){return this.tIt}},{key:"yp",get:function(){return this.TC}},{key:"Pj",get:function(){return this.Bx}},{key:"av",get:function(){return this.cv},set:function(t){this.cv=t}}]),n}(Ii),Ni="sync-seg-",Pi=function(){function t(t,n){this.dv=!1,this.lv=!1,this.o=Ni+Ti(),this.wv=n?new Oi:void 0,this.gv=t?new Oi:void 0}return t.prototype.Ws=function(){this.wv&&this.wv.Ws(),this.gv&&this.gv.Ws()},Dt(t,[{key:"kv",get:function(){return this.dv},set:function(t){this.dv=t}},{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}}]),t}(),Ai=1.1,Di=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Vt,new Xt(8),new jt(1),new Yt(0)])||this).gd=[],r.dyt=Lt(),r.Ad=0,r.tw=function(t){if(t.cN>=yt)for(;r.gd.length>0;)r.rw()},e&&r.sv(new Kt(e,"com.apple.streamingkeydelivery","1")),r.Fat=n,r.Yrt=i,r.Yrt.yn("remove",r.tw),r.sw=new $t(0),r.sv(r.sw),r}Bt(n,t);var i=n.prototype;return i.VEt=function(){return this.Fat===Ct.KM?this.Yrt.bw:this.Fat===Ct.qM?this.Yrt.kw:void 0},i.zat=function(t){return this.dyt.get(t)},i.$f=function(){this.gd.length=0,this.sw.dM=0,this.dyt.clear(),this.Ad=0},i.BA=function(){return this.tb(),dt(t.prototype.BA.call(this)).concat(dt(this.gd))},i.tb=function(){for(var t=this.Yrt.nb(),n=0;n<t.length;n++){var i=t[n];if(!this.dyt.has(i.o)){var e=void 0;if(this.Fat===Ct.KM?(e=i.wv,i.jv=!0):(e=i.gv,i.kv=!0),!e)return;this.dyt.set(i.o,e),e.av&&this.gd.push(new Ht(i.o+"-init")),this.gd.push(new qt(Ai,i.o)),this.Ad+=Ai}}this.cb()},i.cb=function(){for(;this.Ad>60;)this.rw()},i.rw=function(){var t=this.gd.shift();void 0!==t&&function(t){return t.hw===Wt.mE}(t)&&(this.dyt.delete(t.ev),this.Ad-=t.nv,this.sw.dM++)},n}(Jt);var Ci=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).cN=n,i}return Bt(n,t),n}(ki),xi=function(t){function n(n,i){var e;return(e=t.call(this)||this).ab=n,e.lb=i,e.tg=[],e.ng=[],e.ig=Lt(),e.ug=Lt(),e.sg=Lt(),e.lg=0,e}Bt(n,t);var i=n.prototype;return i.nb=function(){return this.bg?(this.tg=this.tg.filter((function(t){return!(t.jv&&t.kv)})),dt(this.tg).concat([this.bg],dt(this.ng))):[]},i.K$=function(t){this.mg(t)},i.X$=function(t){this.mg(t),this.kg(t),this.tm(t)},i.WS=function(t){this.mg(t),this.tm(t)},i.$f=function(){var t;null==(t=this.bg)||t.Ws(),this.bg=void 0,this.ng.forEach((function(t){return t.Ws()})),this.ng.length=0,this.tg.length=0,this.sg=Lt(),this.lg=0},i.kg=function(t){var n=t.startPts,i=t.totalDuration;this.ug.set(t.mediaType,n+i)},i.rm=function(){if(this.bg){this.bg.Ws(),this.tg.push(this.bg);var t=this.ng.shift(),n=new Pi(this.ab,this.lb);t?(this.bg=t,this.ng.push(n)):this.bg=n}},i.om=function(t){if(this.bg){var n=!this.bg.gv||0===this.bg.gv.y_,i=!this.bg.wv||0===this.bg.wv.y_,e=this.bg.gv&&this.bg.gv.av,r=this.bg.wv&&this.bg.wv.av,o=i&&(n&&!(this.bg.kv||this.bg.jv)||e),u=n&&(i&&!(this.bg.kv||this.bg.jv)||r);(t===Ct.qM&&!u||t===Ct.KM&&!o)&&(this.rm(),this.rm())}},i.mg=function(t){var n=t.mediaType,i=t.kind,e=this.ig.get(n);if(void 0===e){if(i===dn.C7||i===dn.j7){var r=[t];this.ig.set(n,r)}}else e.push(t)},i.tm=function(t){var n=this.sm(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case dn.C7:this.am(e),this.sg=Lt(),this.lg=0;break;case dn.R7:this.bm(e);break;case dn.j7:this.km(e)}}},i.am=function(t){var n=t.mediaType;void 0===this.bg?(this.bg=new Pi(this.ab,this.lb),this.ng.push(new Pi(this.ab,this.lb))):this.om(n),n===Ct.KM?(this.ip=t.segment,this.bg.wv.av=!0):n===Ct.qM&&(this.up=t.segment,this.bg.gv.av=!0)},i.km=function(t){var n,i,e=t.mediaType===Ct.qM,r=t.totalDuration,o=null!=(n=this.sg.get(t.mediaType))?n:0;e?(this.bg.gv.X$(t.segment,r),i=o+this.bg.gv.y_):(this.bg.wv.X$(t.segment,r),i=o+this.bg.wv.y_),i>=this.lg+Ai&&(this.sg.set(t.mediaType,i),this.lg+=Ai,this.rm())},i.bm=function(t){this.ug.set(t.mediaType,void 0),this.om(t.mediaType),this.tg.length=0,this.yo(new Ci(t.endTime))},i.sm=function(t){var n=this;if(t.kind===dn.R7)return this.ty(t);var i=[];return this.ig.forEach((function(t){if(t&&t.length>0){var e=_t(t,(function(t){return t.kind===dn.R7}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!It(i,u)){var s,f=n.ty(u);if(f.length>0)(s=i).push.apply(s,dt(f));else if(u.kind===dn.j7)break}}}})),i},i.ty=function(t){var n=this.ig.get(t.mediaType),i=function(t){return t===Ct.KM?Ct.qM:Ct.KM}(t.mediaType);if(!(i===Ct.KM?this.lb:this.ab))return n.splice(0,n.indexOf(t)+1);if(t.kind===dn.C7)return[];var e=this.ug.get(i);if(void 0===e)return[];if(t.kind===dn.R7){var r=this.ny(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),dt(o).concat(dt(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.hy(t,u,i);return dt(u).concat(dt(s),[t])}return[]},i.hy=function(t,n,i){var e=this.ig.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=_t(e,(function(t){return t.kind===dn.R7})),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===dn.j7&&h.startPts>r&&(s=f)}var c=-1;return-1!==_t(n,(function(t){return t.kind===dn.C7}))&&(c=_t(e,(function(t){return t.kind===dn.C7}))),c>s&&(s=c+1),s>0?(e[s-1].kind===dn.C7&&(s-=1),e.splice(0,s)):[]},i.ny=function(t){var n=this.ig.get(t);if(n){var i=_t(n,(function(t){return t.kind===dn.R7}));if(i>=0)return n.splice(0,i+1)}return[]},i.by=function(){var t="[MEDIABUFFER] endPTS: ";this.ug.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),Rt.rst(t)},i.my=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),Rt.rst(i)},Dt(n,[{key:"kw",get:function(){var t;return null==(t=this.up)?void 0:t.slice()}},{key:"bw",get:function(){var t;return null==(t=this.ip)?void 0:t.slice()}}]),n}(Ii);var Bi=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.ky=new xi(i,e),this.OS=new Qt(i,e),i&&(this.AS=new Di(Ct.qM,this.ky,n)),e&&(this.BS=new Di(Ct.KM,this.ky,n))}var n=t.prototype;return n.RT=function(t){var n,i,e=Mi(t);return e===Ct.KM?null==(n=this.BS)?void 0:n.VEt():e===Ct.qM?null==(i=this.AS)?void 0:i.VEt():void 0},n.zat=function(t){var n,i,e=t.split("/")[1],r=Mi(t);return r===Ct.KM?null==(n=this.BS)?void 0:n.zat(e):r===Ct.qM?null==(i=this.AS)?void 0:i.zat(e):void 0},n.K$=function(t){this.ky.K$(t)},n.X$=function(t){this.ky.X$(t)},n.glt=function(t){this.ky.WS(t)},n.$f=function(){var t,n;this.ky.$f(),this.OS.$f(),null==(t=this.AS)||t.$f(),null==(n=this.BS)||n.$f()},Dt(t,[{key:"IE",get:function(){return this.OS}},{key:"ME",get:function(){return this.AS}},{key:"tk",get:function(){return this.BS}}]),t}();function Mi(t){return t.match(/video/)?Ct.KM:Ct.qM}var Ui=function(){function t(t,n){var i=this;this.ik=t,this.uk=n,this._ut=void 0,this.tHt=ft((function(t){var n,e;return ht(this,(function(r){switch((n=t.data).kind){case dn.x7:i._ut=new Bi(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case dn.C7:i._ut.K$(n);break;case dn.j7:i._ut.X$(n);break;case dn.R7:i._ut.glt(n)}return e={kind:dn.O7},i.ik.postMessage(e),[2]}))})),this.ik.onmessage=this.tHt}var n=t.prototype;return n.YBt=function(t){return"master.m3u8"===t?this._ut.IE:"video/index.m3u8"===t?this._ut.tk:"audio/index.m3u8"===t?this._ut.ME:void 0},n.sk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.YBt(t))?void 0:n.YBt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Ni)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this._ut)?void 0:r.RT(t);return new Response(o,{headers:e})}var u=this.Rat(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.yp)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.yp),t.Pj?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.Rat=function(t){return this._ut.zat(t)},n.close=function(){var t;this.ik.close(),null==(t=this._ut)||t.$f()},t}(),Li=function(){function t(){var t=this;this.E3=Lt(),this.tHt=function(n){var i=n.data;if(i.kind===dn.k7){t.ak().catch(Nt);var e=i.port,r=Ti(),o=new Ui(e,n.source.id);t.E3.set(r,o);var u=function(n){n.data.kind===dn.P7&&(t.mk(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:dn.L7,sessionId:r};e.postMessage(s)}},this.kk=function(n){if(Zn(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.E3.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.sk(r);n.respondWith(f)}}}var n=t.prototype;return n.ur=function(t){this.LWt=t,t.addEventListener("message",this.tHt),t.addEventListener("fetch",this.kk)},n.mk=function(t){var n=this.E3.get(t);n&&n.close(),this.E3.delete(t)},n.ak=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:return[4,t.LWt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.E3.forEach((function(n,e){It(i,n.uk)||t.mk(e)})),[2]}}))}))()},t}();Li.TR=new Li;var Fi=function(t){return t.nk="web",t.rk="android",t.hk="android-tv",t.ck="ios",t.lk="tvos",t.dk="chromecast",t.fk="theoliveweb",t}({});var zi=v?v.userAgent:"",Wi=zi.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),qi=zi.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Hi=zi.match(/Android ([0-9\.]+)/i),Vi=zi.match(/Windows NT ([0-9\.]+)/i),Xi=zi.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),ji=zi.match(/Firefox\/([0-9\.]+)/i),Yi=zi.match(/OPR\/(\d+\.\d+)/i),Ki=zi.match(/Tizen ([0-9\.]+)/i),Gi=zi.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),$i=function(){function t(){this._k=Boolean("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch||v&&v.msMaxTouchPoints),this.vk=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(zi)||/(macintosh|mac(?=_powerpc)\s)/i.test(zi),this.pk=/Windows NT/i.test(zi),this.yk=Vi?S(Vi[1]):0,this.bk=/Android/i.test(zi),this.Sk=Hi?S(Hi[1]):0,this.Ik=/windows phone (8|8\.1)/i.test(zi),this.Ek=/iPhone/i.test(zi),this.xk=/iPad/i.test(zi),this.jk=this.vk&&this._k&&!this.xk,this.Rk=/iPod/i.test(zi),this.Yk=/Mobile Safari/i.test(zi),this.Qk=/EOS\d*STB/i.test(zi),this.Fk=/APP\d*STB/i.test(zi),this.Pk=(this.Ek||this.xk||this.jk||this.Rk)&&!this.Ik,this.Bk=Gi?S(Gi[2]):0,this.Gk=this.Ik||this.Pk||this.bk||this.Yk,this.Wk=/CriOS/i.test(zi),this.Xk=Boolean(self.chrome&&/google/i.test(v.vendor))||this.Wk,this.$k=this.Xk&&/Edg\//i.test(v.userAgent),this.iL=qi?_(qi[1],10):0,this.qL=Boolean(/CriOS/i.test(zi)),this.ZL=Boolean(self.chrome||/Chrome/i.test(zi)||this.qL),this.Kk=Wi?_(Wi[1],10):0,this.nL=/SMART-TV.*Tizen/i.test(zi),this.oL=Ki?S(Ki[1]):0,this.qk=this.oL>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.oL):void 0,this.aL=/webos|web0s/i.test(zi),this.cL=/VIZIO/i.test(zi),this.dL=/Edge\/\d+/i.test(zi),this._L=/Trident/i.test(zi),this.vL=this._L&&!self.ActiveXObject&&"ActiveXObject"in self,this.mL=/Vivaldi/i.test(zi),this.AL=/Firefox/i.test(zi)&&!/Seamonkey/i.test(zi),this.ML=ji?S(ji[1]):0,this.TL=/Safari/i.test(zi)&&!/Chrome/i.test(zi)&&!this.Ik&&!this.nL,this.NL=Xi?S(Xi[2]):0,this.DL=Boolean(Yi),this.kL=Yi?S(Yi[1]):0,this.xL=/CrKey/.test(zi),this.jL=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(zi),this.PL="web"===Fi.hk,this.BL="web"===Fi.rk,this.QL=this.BL||this.PL,this.YL="web"===Fi.ck,this.VL="web"===Fi.lk,this.HL="web"===Fi.dk}return Dt(t,[{key:"Je",get:function(){return this._k}},{key:"gk",get:function(){return this.vk}},{key:"wk",get:function(){return this.pk}},{key:"Ak",get:function(){return this.yk}},{key:"Mk",get:function(){return this.bk}},{key:"Tk",get:function(){return this.Sk}},{key:"Nk",get:function(){return this.Ik}},{key:"Dk",get:function(){return this.Ek}},{key:"Lk",get:function(){return this.xk}},{key:"Ck",get:function(){return this.jk}},{key:"Ok",get:function(){return this.Rk}},{key:"Ua",get:function(){return this.Pk}},{key:"zk",get:function(){return this.Bk}},{key:"Uk",get:function(){return this.Qk||this.Fk}},{key:"ql",get:function(){return this.Yk}},{key:"Qs",get:function(){return this.Gk}},{key:"Vk",get:function(){return this.Wk}},{key:"Hk",get:function(){return this.Xk}},{key:"Zk",get:function(){var t;return null!=(t=this.qk)?t:this.Kk}},{key:"Jk",get:function(){return this.$k}},{key:"tL",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.iL>0}},{key:"eL",get:function(){return this.iL}},{key:"sL",get:function(){return this.nL}},{key:"rL",get:function(){return this.oL}},{key:"hL",get:function(){return this.aL}},{key:"uL",get:function(){return this.cL}},{key:"lL",get:function(){return this.dL}},{key:"fL",get:function(){return this._L}},{key:"gL",get:function(){return this.vL}},{key:"wL",get:function(){return this.mL}},{key:"pL",get:function(){return this.AL}},{key:"yL",get:function(){return this.ML}},{key:"bL",get:function(){return this.TL}},{key:"SL",get:function(){return this.NL}},{key:"IL",get:function(){return this.DL}},{key:"EL",get:function(){return this.kL}},{key:"LL",get:function(){return this.xL}},{key:"CL",get:function(){return this.jL}},{key:"OL",get:function(){return!(!this.hL&&!this.sL)&&this.Zk<=56}},{key:"RL",get:function(){return this.PL}},{key:"zL",get:function(){return this.BL}},{key:"UL",get:function(){return this.QL}},{key:"FL",get:function(){return this.YL}},{key:"GL",get:function(){return this.VL}},{key:"WL",get:function(){return this.HL}},{key:"XL",get:function(){return this.ZL}},{key:"IS_IOS_CHROME",get:function(){return this.qL}}]),t}();$i.KL=new $i;var Zi=$i.KL,Ji=!(Zi.fL&&!Zi.gL),Qi=self.console;function te(t){if(gt(t))try{return JSON.stringify(t)}catch(t){}return t}function ne(t){return t.map(te).join(" ")}function ie(t){var n=Qi&&Qi[t];return n?n.bind&&Ji?n.bind(Qi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Qi[t](ne(i))}:void 0}var ee=ie("log")||Nt,re=ie("warn")||ee.bind(void 0,"WARNING:"),oe=ie("error")||ee.bind(void 0,"ERROR:"),ue=function(){var t=Qi&&Qi.assert;return t?t.bind&&Ji?t.bind(Qi):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];Qi.assert(t,ne(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||oe.apply(void 0,["Assertion failed:"].concat(dt(i)))}}();function se(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function fe(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){he(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&he(i,null,t.length,t),t}function he(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 ce=/[a-zA-Z]/,ae=/[0-9]/,ve=/[0-9a-fA-F]/,de=/^0x/i,le=/^[0-9]+$/,we=/^[0-9a-fA-F]+$/,be=/^[0-7]+$/,ge=p.prototype.toString,me=Array.isArray||function(t){return"[object Array]"===ge.call(t)},pe=void 0!==n&&"symbol"==typeof e;function ye(t){return me(t)?t:Array.from(t)}function _e(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function Se(t){return t>=65&&t<=90}function Te(t){return Se(t)||function(t){return t>=97&&t<=122}(t)}function Ee(t){return t>=48&&t<=57}function Ie(t){return Ee(t)||Te(t)}function ke(t){return Ee(t)||t>=65&&t<=70||t>=97&&t<=102}function Re(t){return Se(t)?t+32:t}function Oe(t){return Ee(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ne(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Pe=y.min,Ae=String.fromCharCode,De=16384;function Ce(t){for(var n=t.length,i=[],e=0;e<n;e+=De){var r=Pe(e+De,n);i.push(Ae.apply(null,t.slice(e,r)))}return i.join("")}var xe=2147483647,Be=/[^\0-\x7E]/,Me=/[\x2E\u3002\uFF0E\uFF61]/g,Ue={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Le=y.floor,Fe=String.fromCharCode;function ze(t){throw new RangeError(Ue[t])}function We(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 qe,He,Ve,Xe=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},je=function(t,n,i){var e=0;for(t=i?Le(t/700):t>>1,t+=Le(t/n);t>455;e+=36)t=Le(t/35);return Le(e+36*t/(t+38))},Ye=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(Me,".")).split("."),n).join(".");return e+r}(t,(function(t){return Be.test(t)?"xn--"+function(t){for(var n=[],i=(t=We(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(Fe(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=xe,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>Le((xe-r)/w)&&ze("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>xe&&ze("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(Fe(Xe(_+S%T,0))),p=Le(S/T)}n.push(Fe(Xe(p,0))),o=je(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t}))};function Ke(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 Ce(n)}function Ge(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function $e(t,n){return t>>n&63|128}function Ze(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Ge(t),n.push(t>>12&15|224),n.push($e(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push($e(t,12)),n.push($e(t,6))),n.push(63&t|128)):n.push(t)}function Je(t){for(var n=[],i=0;i<t.length;i++){Ze(t[i],n)}return n}function Qe(){if(Ve>=He)throw new g("Invalid byte index");var t=255&qe[Ve];if(Ve++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function tr(){var t,n;if(Ve>He)throw new g("Invalid byte index");if(Ve===He)return!1;if(t=255&qe[Ve],Ve++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Qe())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Qe()<<6|Qe())>=2048)return Ge(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Qe()<<12|Qe()<<6|Qe())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function nr(t){return[37,Ne(t>>4),Ne(15&t)]}function ir(t){return function(t){return t>=0&&t<=31}(t)||t>126}function er(t){return ir(t)||32===t||34===t||60===t||62===t||96===t}function rr(t){return er(t)||35===t||63===t||123===t||125===t}function or(t){return rr(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function ur(t){return t<33||t>126||34===t||35===t||60===t||62===t}function sr(t){return ur(t)||39===t}function fr(t,n){if(!n(t))return[t];for(var i=Je([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,nr(o))}return e}function hr(t,n){for(var i=[],e=0,r=We(t);e<r.length;e++){var o=r[e];i.push.apply(i,fr(o,n))}return Ke(i)}function cr(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&&ke(t[e+1])&&ke(t[e+2])){var o=Oe(t[e+1])<<4|Oe(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Je(t))}function ar(t){return Ke(function(t){qe=t.slice(),He=qe.length,Ve=0;for(var n,i=[];!1!==(n=tr());)i.push(n);return i}(cr(We(t))))}function vr(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new m;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new m("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&ve.test(t[o]);)u=u<<4|_(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new m;if(o-=s,e>6)throw new m;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!ae.test(t[o]))throw new m;for(;o<n&&ae.test(t[o]);){var c=_(t[o],10);if(null===h)h=c;else{if(0===h)throw new m;if((h=10*h+c)>255)throw new m}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o<n)throw new m;i[e]=u,e+=1}else{if(null!==r)throw new m("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)_e(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function dr(t){var n=10,i=le;return de.test(t)?(t=t.slice(2),n=16,i=we):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=be),""===t?0:i.test(t)?_(t,n):void 0}var lr={B2:4},wr=/[\0\t\n\r #%/:?@\[\\\]]/,br=/[\0\t\n\r #/:?@\[\\\]]/;function gr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{B2:2,Eet:vr(t.slice(1,-1))}}if(!n)return function(t){if(br.test(t))throw new m("Invalid code point in opaque host");var n=hr(t,ir);return""===n?lr:{B2:3,TC:n}}(t);var i=function(t){var n=function(t){return Ye(t.toLowerCase())}(t);return n}(ar(t));if(wr.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e<n.length;e++){var r=n[e];if(""===r)return;var o=dr(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*y.pow(256,3-f);return s}}(i);return void 0!==e?{B2:1,Eet:e}:""===i?lr:{B2:0,ket:i}}function mr(t){switch(t.B2){case 0:return t.ket;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.Eet);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.Eet)+"]";case 3:return t.TC;case 4:return""}}var pr=/\+/g;function yr(t){return 42===t||45===t||46===t||95===t||Ie(t)}function _r(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(pr," "),s=s.replace(pr," ");var f=ar(u),h=ar(s);i.push([f,h])}}return i}function Sr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=Tr(Je(We(e[0])))+"="+Tr(Je(We(e[1])))}return n}function Tr(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):yr(e)?n.push(e):n.push.apply(n,nr(e))}return Ce(n)}var Er=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function Ir(t){var n=""+t,i=Er.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Rr(o))if(Or(o)||r===i-1)e.push(kr);else{var u=t.charCodeAt(r+1);Or(u)?(e.push(o,u),r++):e.push(kr)}else e.push(o)}return t.slice(0,n)+Ce(e)}(n,i.index):n}var kr=65533,Rr=function(t){return 55296==(63488&t)},Or=function(t){return 0!=(1024&t)};function Nr(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Pr(t){t.tf.length=0}function Ar(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.tf,_r(n))}function Dr(t){if(t.Vu){var n=Sr(t.tf);""===n&&(n=null),t.Vu.Vu.Let=n}}var Cr=function(){function t(t){if(void 0===t&&(t=void 0),this.Vu=null,null==t)this.tf=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Cr&&!!me(t.tf)&&(!pe||t[e]===xr)}(t))this.tf=t.tf.slice();else if(function(t){return null!=t&&(!!me(t)||!!pe&&"function"==typeof t[e])}(t)){this.tf=[];for(var n=0,i=ye(t);n<i.length;n++){var r=ye(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.tf.push([Ir(r[0]),Ir(r[1])])}}else for(var o in this.tf=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.tf.push([Ir(o),Ir(t[o])]);else(t=Ir(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.tf=_r(t)}var n=t.prototype;return n.append=function(t,n){t=Ir(t),n=Ir(n),this.tf.push([t,n]),Dr(this)},n.delete=function(t){t=Ir(t);for(var n=this.tf,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Dr(this)},n.get=function(t){t=Ir(t);for(var n=this.tf,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=Ir(t);for(var n=this.tf,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=Ir(t);for(var n=this.tf,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=Ir(t),n=Ir(n);for(var i=this.tf,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]),Dr(this)},n.sort=function(){fe(this.tf,Nr),Dr(this)},n.toString=function(){return Sr(this.tf)},n.entries=function(){return new Lr(this.tf,Br)},n.keys=function(){return new Lr(this.tf,Mr)},n.values=function(){return new Lr(this.tf,Ur)},n.forEach=function(t){var n=this;this.tf.forEach((function(i){return t(i[1],i[0],n)}))},t}(),xr=Cr.prototype.entries;pe&&(Cr.prototype[e]=xr);var Br=function(t){return[t[0],t[1]]},Mr=function(t){return t[0]},Ur=function(t){return t[1]},Lr=function(){function t(t,n){this.xet=0,this.tf=t,this.Cet=n}return t.prototype.next=function(){return this.xet<this.tf.length?{done:!1,value:this.Cet(this.tf[this.xet++])}:{done:!0,value:void 0}},t}(),Fr="null";var zr=p.create(null);zr.ftp=21,zr.file=0,zr.gopher=70,zr.http=80,zr.https=443,zr.ws=80,zr.wss=443;var Wr=/^(?:\.|%2e)$/i,qr=/^(?:\.|%2e){2}$/i;function Hr(t){return Wr.test(t)}function Vr(t){return qr.test(t)}function Xr(t){return void 0!==zr[t]}function jr(t){return Xr(t.HP)}function Yr(t){return""!==t.jet||""!==t.Oet}function Kr(t){var n=t.length;if(!(n>=2))return!1;if(!$r(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 Gr(t){return 2===t.length&&ce.test(t[0])&&(":"===t[1]||"|"===t[1])}function $r(t){return 2===t.length&&Gr(Ce(t))}function Zr(t){return Gr(t)&&":"===t[1]}function Jr(t){var n=t.Ret;0!==n.length&&("file"===t.HP&&1===n.length&&Zr(n[0])||n.pop())}function Qr(t){return null===t.Pet||lr===t.Pet||t.zet||"file"===t.HP}var to=-1,no=/\t|\n|\r/g,io=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function eo(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new oo,t=t.replace(io,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=We(t=t.replace(no,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:to;switch(r){case 0:if(!Te(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(Re(v)),r=1;break;case 1:if(Ie(v)||43===v||45===v||46===v)o.push(Re(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=Ke(o);if(null!==e){if(Xr(i.HP)&&!Xr(d))return;if(!Xr(i.HP)&&Xr(d))return;if((Yr(i)||null!==i.B7)&&"file"===d)return;if("file"===i.HP&&(i.Pet===lr||null===i.Pet))return}if(i.HP=d,null!==e)return void(jr(i)&&i.B7===zr[i.HP]&&(i.B7=null));o.length=0,"file"===i.HP?r=13:jr(i)&&n&&n.HP===i.HP?r=3:jr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.zet=!0,i.Ret.push(""),r=18)}break;case 2:if(!n||n.zet&&35!==v)throw new m("Invalid scheme");n.zet&&35===v?(i.HP=n.HP,i.Ret=n.Ret.slice(),i.Let=n.Let,i.Bet="",i.zet=!0,r=20):"file"!==n.HP?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===h[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.HP=n.HP,to===v?(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,i.Ret=n.Ret.slice(),i.Let=n.Let):47===v?r=6:63===v?(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,i.Ret=n.Ret.slice(),i.Let="",r=19):35===v?(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,i.Ret=n.Ret.slice(),i.Let=n.Let,i.Bet="",r=20):92===v&&jr(i)?r=6:(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,i.Ret=n.Ret.slice(),i.Ret.pop(),r=17,a-=1);break;case 6:!jr(i)||47!==v&&92!==v?47===v?r=9:(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var b=Ke(fr(w,or));f?i.Oet+=b:i.jet+=b}else f=!0}o.length=0}else if(to===v||47===v||63===v||35===v||jr(i)&&92===v){if(u&&0===o.length)throw new m("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.HP)a-=1,r=15;else if(58!==v||s)if(to===v||47===v||63===v||35===v||jr(i)&&92===v){if(a-=1,jr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(Yr(i)||null!==i.B7))return;var g=gr(Ke(o),jr(i));if(i.Pet=g,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new m("Invalid host");var p=gr(Ke(o),jr(i));if(i.Pet=p,o.length=0,r=12,11===e)return}break;case 12:if(Ee(v))o.push(v);else{if(!(to===v||47===v||63===v||35===v||jr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(Ke(o),10);if(y>65535)throw new m("Invalid port");i.B7=y===zr[i.HP]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.HP="file",47===v||92===v?r=14:n&&"file"===n.HP?to===v?(i.Pet=n.Pet,i.Ret=n.Ret.slice(),i.Let=n.Let):63===v?(i.Pet=n.Pet,i.Ret=n.Ret.slice(),i.Let="",r=19):35===v?(i.Pet=n.Pet,i.Ret=n.Ret.slice(),i.Let=n.Let,i.Bet="",r=20):(Kr(h.slice(a))||(i.Pet=n.Pet,i.Ret=n.Ret.slice(),Jr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.HP&&!Kr(h.slice(a))&&(Zr(n.Ret[0])?i.Ret.push(n.Ret[0]):i.Pet=n.Pet),r=17,a-=1);break;case 15:if(to===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&$r(o))r=17;else if(0===o.length){if(i.Pet=lr,null!==e)return;r=16}else{var S=gr(Ke(o),jr(i));if(0===S.B2&&"localhost"===S.ket&&(S=lr),i.Pet=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:jr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Let="",r=19):null===e&&35===v?(i.Bet="",r=20):to!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(to===v||47===v||jr(i)&&92===v||null===e&&(63===v||35===v)){var T=Ke(o);if(Vr(T)?(Jr(i),47===v||jr(i)&&92===v||i.Ret.push("")):!Hr(T)||47===v||jr(i)&&92===v?Hr(T)||("file"===i.HP&&0===i.Ret.length&&$r(o)&&(lr!==i.Pet&&null!==i.Pet&&(i.Pet=lr),o[1]=58,T=Ke(o)),i.Ret.push(T)):i.Ret.push(""),o.length=0,"file"===i.HP&&(to===v||63===v||35===v))for(;i.Ret.length>1&&""===i.Ret[0];)i.Ret.shift();63===v?(i.Let="",r=19):35===v&&(i.Bet="",r=20)}else o.push.apply(o,fr(v,rr));break;case 18:63===v?(i.Let="",r=19):35===v?(i.Bet="",r=20):to!==v&&(i.Ret[0]+=Ke(fr(v,ir)));break;case 19:null===e&&35===v?(i.Bet="",r=20):to!==v&&(i.Let+=Ke(fr(v,jr(i)?sr:ur)));break;case 20:to===v||0===v||(i.Bet+=Ke(fr(v,er)))}a++}return i}function ro(t,n,i,e){try{eo(t,n,i,e)}catch(t){}}var oo=function(){this.HP="",this.jet="",this.Oet="",this.Pet=null,this.B7=null,this.Ret=[],this.Let=null,this.Bet=null,this.zet=!1};function uo(t){switch(t.HP){case"blob":var n;try{n=eo(t.Ret[0],null)}catch(t){return Fr}return uo(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+mr(n)+(null===i?"":":"+i)}(t.HP,t.Pet,t.B7);default:return Fr}}var so,fo,ho=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof ho&&"object"==typeof t.Vu}(n))e=n.Vu;else try{e=eo(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=eo(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Let;this.Vu=i,this.Let=function(t){var n=new Cr;return null!==t&&Ar(n,t),n}(r),this.Let.Vu=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&se(t.prototype,n),i&&se(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.HP+":";if(null!==t.Pet?(i+="//",Yr(t)&&(i+=t.jet,""!==t.Oet&&(i+=":"+t.Oet),i+="@"),i+=mr(t.Pet),null!==t.B7&&(i+=":"+t.B7)):null===t.Pet&&"file"===t.HP&&(i+="//"),t.zet)i+=t.Ret[0];else for(var e=0,r=t.Ret;e<r.length;e++)i+="/"+r[e];return null!==t.Let&&(i+="?"+t.Let),n||null===t.Bet||(i+="#"+t.Bet),i}(this.Vu)},set:function(t){var n;try{n=eo(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.Vu=n,Pr(this.Let);var i=this.Vu.Let;null!==i&&Ar(this.Let,i)}},{key:"origin",get:function(){return uo(this.Vu)}},{key:"protocol",get:function(){return this.Vu.HP+":"},set:function(t){ro(t+":",null,this.Vu,0)}},{key:"username",get:function(){return this.Vu.jet},set:function(t){Qr(this.Vu)||(this.Vu.jet=hr(t,or))}},{key:"password",get:function(){return this.Vu.Oet},set:function(t){Qr(this.Vu)||(this.Vu.Oet=hr(t,or))}},{key:"host",get:function(){var t=this.Vu,n=t.Pet;if(null===n)return"";var i=t.B7,e=mr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Vu.zet||ro(t,null,this.Vu,10)}},{key:"hostname",get:function(){var t=this.Vu.Pet;return null===t?"":mr(t)},set:function(t){this.Vu.zet||ro(t,null,this.Vu,11)}},{key:"port",get:function(){var t=this.Vu.B7;return null===t?"":""+t},set:function(t){Qr(this.Vu)||(""===t?this.Vu.B7=null:ro(t,null,this.Vu,12))}},{key:"pathname",get:function(){var t=this.Vu.Ret;return this.Vu.zet?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Vu.zet||(this.Vu.Ret.length=0,ro(t,null,this.Vu,16))}},{key:"search",get:function(){var t=this.Vu.Let;return null===t||""===t?"":"?"+t},set:function(t){t=Ir(t);var n=this.Vu;if(""===t)return n.Let=null,void Pr(this.Let);"?"===t[0]&&(t=t.slice(1)),n.Let="",ro(t,null,n,19),Ar(this.Let,t)}},{key:"searchParams",get:function(){return this.Let}},{key:"hash",get:function(){var t=this.Vu.Bet;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Vu.Bet="",ro(t,null,this.Vu,20)):this.Vu.Bet=null}}]),t}();function co(t){return t.document&&t.document.baseURI||t.location.href||""}function ao(){return void 0!==a?a.createElement("video"):void 0}function vo(){return fo||(fo=ao()),fo}var lo=!!("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch)||!(!v||!v.msMaxTouchPoints),wo=vo(),bo=!(!wo||!wo.webkitShowPlaybackTargetPicker),go=function(){function t(){this.Qet=void 0,this.tst=!1,this.Je=lo,this.Qs=!1,this.xtt=!0}var n=t.prototype;return n.Fet=function(){return 0},n.Jet=function(t,n){return!0},n.$et=function(t){return t>=.3333333333333333},Dt(t,[{key:"Uet",get:function(){return void 0===this.Qet&&(this.Qet=this.Fet()),this.Qet}},{key:"Yet",get:function(){return!Zi.CL}},{key:"Get",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"M5",get:function(){return c.devicePixelRatio||1}},{key:"Vet",get:function(){return bo}},{key:"i5",get:function(){return!1}},{key:"X3",get:function(){return!0}},{key:"mS",get:function(){return!(!Zi.bL&&!Zi.Ua)||!!Zi.uL}},{key:"pS",get:function(){return Zi.uL}},{key:"Wet",get:function(){return!Zi.Ua}},{key:"dP",get:function(){return!0}},{key:"Het",get:function(){return!0}},{key:"Xet",get:function(){return!1}},{key:"Zet",get:function(){}},{key:"qet",get:function(){return!0}},{key:"L0",get:function(){return!1}},{key:"Ket",get:function(){return Zi.uL}}]),t}(),mo=function(){var t=ao();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Zi.Ck)return!1;var t=ao();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var po=function(t){function n(n){var i;return(i=t.call(this)||this).ist=n,i.ist&&(i.tst=i.ist.tst,i.Je=i.ist.Je,i.xtt=mo&&i.ist.xtt),i}Bt(n,t);var i=n.prototype;return i.Fet=function(){return this.ist?this.ist.Uet:t.prototype.Fet.call(this)},i.Jet=function(n,i){return this.ist?this.ist.Jet(n,i):t.prototype.Jet.call(this,n,i)},i.$et=function(n){return this.ist?this.ist.$et(n):t.prototype.$et.call(this,n)},Dt(n,[{key:"Zet",get:function(){var t;return null==(t=this.ist)?void 0:t.Zet}},{key:"qet",get:function(){var t,n;return null==(n=null==(t=this.ist)?void 0:t.qet)||n}}]),n}(go),yo=function(t){function n(n){var i;return(i=t.call(this,n)||this).tst=!0,i.Qs=!0,i}return Bt(n,t),Dt(n,[{key:"Xet",get:function(){return Zi.Ua}}]),n}(po);var _o=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.Fet=function(){return function(t){return t&&pt(so.ManagedMediaSource)?so.ManagedMediaSource:pt(so.MediaSource)?so.MediaSource:void 0}(!0)?t.prototype.Fet.call(this):1},Dt(n,[{key:"Xet",get:function(){return!0}}]),n}(yo),So=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.Jet=function(n,i){return t.prototype.Jet.call(this,n,i)},Dt(n,[{key:"i5",get:function(){return Zi.rL<3}},{key:"X3",get:function(){return Zi.rL>=3}},{key:"Get",get:function(){var t=this;return c.tizen&&!this.sst&&c.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.sst={width:i,height:e})})),this.sst}},{key:"L0",get:function(){return Zi.rL<3}}]),n}(po),To=function(t){function n(){return t.call(this)||this}return Bt(n,t),n}(go),Eo=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.Jet=function(t,n){if(t&&t.nst&&n&&n.nst){var i=Io(t.nst,"mp4a.40.2")&&Io(n.nst,"mp4a.40.5"),e=Io(t.nst,"mp4a.40.5")&&Io(n.nst,"mp4a.40.2"),r=Io(t.nst,"mp4a.40.2")&&Io(n.nst,"mp4a.40.34"),o=Io(t.nst,"mp4a.40.34")&&Io(n.nst,"mp4a.40.2"),u=Io(t.nst,"mp4a.40.5")&&Io(n.nst,"mp4a.40.34"),s=Io(t.nst,"mp4a.40.34")&&Io(n.nst,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Dt(n,[{key:"Zet",get:function(){if(Zi.gk)return 4096}}]),n}(To);function Io(t,n){return t.indexOf(n)>-1}var ko=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.$et=function(t){return t>=2},n}(To),Ro=function(t){function n(){var n;return(n=t.call(this)||this).tst=Zi.SL>=11,n.xtt=Zi.bL&&!(Zi.Ua&&Zi.SL<10),n}return Bt(n,t),n}(To),Oo=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"Get",get:function(){var t=this;return c.webOS&&!this.sst&&c.webOS.deviceInfo((function(n){t.sst={width:n.screenWidth,height:n.screenHeight}})),this.sst}},{key:"dP",get:function(){return!1}}]),n}(po),No=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"qet",get:function(){return!Zi.wk||(Zi.Jk?92!==Zi.eL:Zi.Zk>=100)}}]),n}(To),Po=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"Xet",get:function(){return!0}}]),n}(po),Ao=function(){function t(){this.ust=new Do,this.lst=function(){var t=function(){if(Zi.pL)return new Eo;if(Zi.lL||Zi.fL)return new ko;if(Zi.bL)return new Ro;if(Zi.Hk)return new No;return new To}();return Zi.Ua?new _o(t):Zi.Qs?new yo(t):Zi.sL?new So(t):Zi.hL?new Oo(t):Zi.gk?new Po(t):new po(t)}(),this.cst=Co(),self.performance&&self.performance.now?this.Yf=function(){return self.performance.now()}:this.Yf=zn}var n=t.prototype;return n.rst=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];ee.apply(void 0,dt(n))},n.Iw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];re.apply(void 0,dt(n))},n.ost=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];oe.apply(void 0,dt(n))},n.hst=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];ue.apply(void 0,[t].concat(dt(i)))},n.Vf=function(t,n){return d(t,n)},n.oS=function(t,n){return w(t,n)},n.Gf=function(t){l(t)},n.aS=function(t){b(t)},n.cO=function(){return this.ast.cO()},n.XM=function(){return this.ast.XM()},n.ZM=function(){return this.ast.ZM()},n.HM=function(){return this.ast.HM()},n.WM=function(){return this.ast.WM()},n.hO=function(t,n){return this.ast.hO(t,n)},n.rO=function(t){return this.ast.rO(t)},n.Ah=function(t,n){var i;return void 0===n&&(n=co(so)),i="object"!==(void 0===n?"undefined":k(n))||n instanceof ho?n:n.href,new ho(t,i)},n.fw=function(t,n){if(void 0===n&&(n=co(so)),this.cst){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Ah(t,n).href},Dt(t,[{key:"rP",get:function(){return this.ust}},{key:"Ys",get:function(){return this.lst}},{key:"dst",get:function(){return{fst:v&&v.userAgent.match(/Android /i)?"Android":"other",_st:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"wH",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"gst",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),Do=function(){function t(){}return Dt(t,[{key:"oP",get:function(){return v.oscpu}},{key:"Ys",get:function(){return v.platform}},{key:"hP",get:function(){return v.vendor}},{key:"aP",get:function(){return v.vendorSub}}]),t}();function Co(){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 xo(){return xo=p.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)p.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},xo.apply(this,arguments)}var Bo="9a04f079-9840-4286-ab92-e65be0885f95",Mo="urn:uuid:"+Bo,Uo="com.microsoft.playready",Lo="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Fo="urn:uuid:"+Lo,zo="com.widevine.alpha",Wo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",qo="urn:uuid:"+Wo,Ho="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",Vo="urn:uuid:"+Ho,Xo="com.apple.fps.1_0",jo=function(t){return t.Dw="playready",t.Ew="widevine",t.Lw="fairplay",t.xw="clearkey",t.Cw="aes128",t}({}),Yo={hw:jo.Dw,JL:Uo,$L:"cenc",tx:Bo,ix:Mo,sx:"PlayReady"},Ko={hw:jo.Ew,JL:zo,$L:"cenc",tx:Lo,ix:Fo,sx:"Widevine"},Go={hw:jo.Lw,JL:Xo,$L:"skd",tx:Ho,ix:Vo,sx:"FairPlay"},$o=(jo.Lw,{hw:jo.xw,JL:"org.w3.clearkey",$L:"cenc",tx:Wo,ix:qo,sx:"ClearKey"}),Zo=Zi.Hk&&Zi.Zk>=42||Zi.pL&&Zi.yL>=38||Zi.lL||Zi.gL||Zi.IL&&Zi.EL>=29;function Jo(t,n){return function(t,n){return wt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[xo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[xo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var Qo=function(){function t(t){this.oO=Lt(),this.lO=void 0,this.uO=t}var n=t.prototype;return n.WM=function(){return this.rO(Ko)},n.XM=function(){return this.rO($o)},n.HM=function(){return this.rO(Yo)},n.ZM=function(){return this.rO(Go)},n.rO=function(t){var n=t.ix,i=this.oO.get(n);if(i)return i;var e=this.hO(t,'video/mp4; codecs="avc1.42000a"');return this.oO.set(n,e),e},n.hO=function(t,n){var i=this;return ft((function(){return ht(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.uO.aO(t.JL,[Jo(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.uO.aO(t.JL,[Jo(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.cO=function(){return this.lO||(this.lO=this.dO()),this.lO},n.dO=function(){var t=this;return ft((function(){return ht(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:Zo?[4,t.XM()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),tu=function(t){return t.eb="sb",t.ob="hb",t.ub="contentprotectionerror",t.fb="contentprotectionsuccess",t._b="currentsourcechange",t.gb="destroy",t.vb="durationchange",t.wb="emptied",t.mb="encrypted",t.pb="ended",t.Ab="yb",t.Mb="bb",t.Tb="Sb",t.Nb="Ib",t.Db="loadstart",t.Eb="manifestupdate",t.kb="nosupportedrepresentationfound",t.Lb="offline",t.xb="online",t.Cb="pause",t.so="play",t.jb="progress",t.Ob="ratechange",t.Rb="representationchange",t.Pb="resize",t.zb="seeked",t.Bb="seeking",t.Ub="segmentnotfound",t.Qb="Fb",t.Yb="Gb",t.ro="sourcechange",t.Vb="timeupdate",t.Wb="volumechange",t.Hb="Xb",t.Zb="qb",t.Kb="metricschange",t}({}),nu=["cenc"],iu=["cbcs","cbcs-1-9"],eu=function(t){function n(n){var i;return(i=t.call(this,tu.Zb)||this).nx=n,i}return Bt(n,t),n}(ki),ru=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"ox")||this).hx=n,o.ux=i,o.ox=e,o.lx=r,o}return Bt(n,t),n}(ki),ou=function(t){function n(){return t.call(this,"lt")||this}return Bt(n,t),n}(ki),uu=new E([0]).buffer,su=function(){function t(){this.Ou=[]}var n=t.prototype;return n.mx=function(t){for(var n=0,i=this.Ou;n<i.length;n++){if(Yn(i[n][0],t))return!0}return!1},n.Ax=function(t){for(var n=0,i=this.Ou;n<i.length;n++){var e=i[n];if(Yn(e[0],t))return e[1]}},n.yx=function(t,n){for(var i=0,e=this.Ou;i<e.length;i++){var r=e[i];if(Yn(r[0],t))return void(r[1]=n)}this.Ou.push([t,n])},n.Mx=function(t,n){this.Ou.forEach((function(n){return t(n[1],n[0])}),n)},n.bx=function(){kt(this.Ou)},Dt(t,[{key:"Gp",get:function(){return this.Ou.length}}]),t}(),fu=function(){function t(){var t=this;this.Ix=new Q((function(n,i){t.Hd=n,t.Nx=i}))}var n=t.prototype;return n.Tx=function(t){this.Hd&&(this.Hd(t),this.$f())},n.Sx=function(t){this.Nx&&(this.Nx(t),this.$f())},n.n_=function(){this.Ix.catch(Nt),this.Sx(new en)},n.r_=function(t){var n=this;t.then((function(t){return n.Tx(t)}),(function(t){return n.Sx(t)}))},n.$f=function(){this.Hd=void 0,this.Nx=void 0},t}();function hu(t,n){return t===Uo?function(t){if(t.byteLength<2*cu.length)return t;var n=new DataView(t,0,2*cu.length),i=di(n,!0);if(i===cu)return t;return function(t){var n='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',i='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',e=""+n+Gn(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new E(2*t.length);return vi(bi(i),new _i,t,n),i}(e,!0).buffer}(t)}(n):n}var cu="<PlayReady";var au=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Dx=i,o.Ex=e,o}return Bt(n,t),n}(nn),vu=function(t,n){return vu=p.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)p.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},vu(t,n)};function du(t,n){if("function"!=typeof n&&null!==n)throw new m("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}vu(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function lu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.kx=t,this.Lx=n}t.prototype.get=function(t){var n=this.kx.get(t);if(0===this.Lx||void 0===n)return n;var i=this.kx.get(t+1)||0,e=n&(1<<8-this.Lx)-1,r=i>>8-this.Lx;return(e<<this.Lx)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.kx.get(y.floor((t+this.Lx)/8));if(void 0!==n)return(n&1<<7-this.Lx-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.kx.bitLength-this.Lx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.kx.length},enumerable:!1,configurable:!0})})(),y.pow(2,-52);function wu(t,n,i){return y.min(y.max(t,n),i)}function bu(t,n){return t>>8-n}function gu(t,n){return t&(1<<n)-1}var mu=function(){function t(t){this.xx=t,this.Cx=0,this.jx=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Cx+this.jx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.Cx===this.xx.length&&0===this.jx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Cx,bit:this.jx}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.xx);return n.seek(this.Cx,this.jx),n},t.prototype.canReadBits=function(t){return 8*this.Cx+t+this.jx<=8*this.xx.length},t.prototype.canReadBytes=function(t){return 0===this.jx?this.Cx+t<=this.xx.length:this.Cx+t<this.xx.length},t.prototype.incBit=function(){this.jx++,this.jx>7&&(this.Cx++,this.jx=0)},t.prototype.seek=function(t,n){this.Cx=t,this.jx=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.xx.get(this.Cx)>>7-this.jx&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.jx)return this.xx.get(this.Cx++);var t=gu(this.xx.get(this.Cx),8-this.jx),n=bu(this.xx.get(this.Cx+1),this.jx);return this.Cx++,t<<this.jx|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readBit());return n},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.jx&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<<i;else for(i=t-1;i>=0;i--)n|=this.readBit()<<i;return n},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-y.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var n=1<<t;return n+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var n=this.jx+t;this.Cx+=n>>3,this.jx=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}(),pu=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},yu=function(){function t(){this.Ox=[],this.Rx=[],this.Px=0}return t.from=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var e=new t,r=0,o=n;r<o.length;r++){var u=o[r];e.pushRange(u)}return e},t.prototype.pushRange=function(t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),i<0)throw new g("The buffer length must be positive.");if(0!==i){if(0===this.Rx.length)this.Rx.push(0);else{var e=this.Rx[this.Rx.length-1]+this.Ox[this.Ox.length-1].length;this.Rx.push(e)}this.Ox.push(t.subarray(n,n+i)),this.Px+=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.Ox;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.Ox=[],this.Rx=[],this.Px=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.Rx[n];return this.Ox[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.Ox.length<1)return-1;if(this.Ox.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.Ox[0];return"number"==typeof t?lu(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],e=n.length,r=t.length-e,o=0;o<=r&&!((o=lu(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u<s&&t[u]===n[f];u++,f++);if(u===s)return o}return-1}(i,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,n,i){if(0!==t.length){var e=0,r=t.length-1;if(1!==i(t[e],n)){if(1===i(n,t[r]))return r;for(;e!==r;){var o=y.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.Rx,t,pu)},t.prototype.join=function(){if(1===this.Ox.length)return this.Ox[0];var t=new E(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.Px},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,n){if(n<=0||n>4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;e<n;e++)i+=this.get(t+e)*y.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=wu(n,0,this.length),r=wu(i,0,this.length);if(e>r)return new t;if(e===r)return new t;for(var o=new t,u=this.findContainingBufferIndex(e),s=this.Ox[u],f=e,h=f-this.Rx[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.Rx[u],s=this.Ox[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.Ox.length-1,e=this.Ox[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.Ox[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),_u=function(){function t(n){this.zx=n||t.BUFFER_CHUNK_SIZE,this.Bx=!1,this.Ux=new yu,this.xx=new E(this.zx),this.Qx=0,this.Fx=0,this.jx=7}return t.prototype.closeByte=function(){this.xx[this.Qx++]=this.Fx,this.Qx>=this.zx&&this.closeBuffer(),this.Fx=0,this.jx=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.Qx&&(this.Ux.pushRange(this.xx,0,this.Qx),t&&(this.xx=new E(this.zx)),this.Qx=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.jx},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.Bx)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.Bx=!0,this.Ux},t.prototype.writeBit=function(t){if(this.Bx)throw new g("Cannot write to a closed BitWriter.");this.Fx|=t<<this.jx,0===this.jx?this.closeByte():this.jx--},t.prototype.writeByte=function(t){if(this.Bx)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.Fx=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.jx;this.Fx|=bu(t,n+1),this.closeByte(),this.Fx=gu(t,8-n)<<n+1,this.jx=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.Bx)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.Qx+t.length<=this.zx?(this.xx.set(t,this.Qx),this.Qx+=t.length,this.Qx===this.zx&&this.closeBuffer()):(this.closeBuffer(),this.Ux.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.jx;this.Fx|=bu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=gu(t[i-1],8-n),r=bu(t[i],n+1);this.Fx=e<<n+1|r,this.closeByte()}this.Fx=gu(t[t.length-1],8-n)<<n+1,this.jx=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new g("Received a negative number.");if(n>32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<<i)>0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i<n-1;i++)this.writeBit(0);this.writeUInt(t+1,n)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var n=function(t){for(var n=new E(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(t),i=0;i<n.length;i++)this.writeByte(n[i])},t.BUFFER_CHUNK_SIZE=1024,t}(),Su=function(){function t(t){this.rb=new yu,this.Yx=t}return t.prototype.closeWriter=function(){void 0!==this.Yx&&(this.rb=this.rb.concat(this.Yx.close()),this.Yx=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Yx&&(this.Yx=new _u),this.Yx},enumerable:!1,configurable:!0}),t.prototype.concat=function(t){this.closeWriter(),this.rb=this.rb.concat(t)},t.prototype.toRangedBuffer=function(){return this.closeWriter(),this.rb},t}(),Tu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(n){var i=this.getSize(),e=i>=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new Su;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Eu(t,n){return t instanceof Fn?64===n:t<y.pow(2,n)}function Iu(t,n){return y.round(t*y.pow(2,n))}function ku(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Ru(t,n){return t/y.pow(2,n)}var Ou=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return du(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Tu),Nu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return du(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(yu.from(this.data))},n}(Tu),Pu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();var Au=16384;function Du(t){var n=t.length;if(n<=Au)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Au)i.push(String.fromCharCode.apply(String,t.slice(e,e+Au)));return i.join("")}var Cu=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function xu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Bu(t,n,i){var e=qu(Vu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Mu(t,n,i){return n.offset+i<=t.byteLength}function Uu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Lu(t,n,i){void 0===i&&(i=!1);var e=Uu(t,n,i),r=Uu(t,n,i),o=i?r:e,u=i?e:r;return Fn.fromBits(u,o,!0)}function Fu(t,n,i){return Du(function(t){return[].slice.call(t)}(Bu(t,n,i)))}function zu(t,n){var i,e=xu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&xu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&xu(t,n))+(63&xu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&xu(t,n))+64*(63&xu(t,n))+(63&xu(t,n))),i}function Wu(t,n){return function(t,n,i){var e=[],r=function(t,n){return n.offset+3<=t.byteLength&&239===t.getUint8(n.offset)&&187===t.getUint8(n.offset+1)&&191===t.getUint8(n.offset+2)}(t,n);r&&n.shift(3);for(;n.offset<t.byteLength;){var o=zu(t,n);if(void 0===o)break;if(i&&0===o)break;e.push(o)}return function(t){for(var n=[],i=0,e=t;i<e.length;i++){var r=e[i];r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Du(n)}(e)}(t,n,!0)}function qu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new E(t.buffer,t.byteOffset+n,i-n)}function Hu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function Vu(t){return new E(t.buffer,t.byteOffset,t.byteLength)}var Xu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Pu(this.offset<<3)},t}(),ju=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return xu(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Uu(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=Uu(t,n,i),r=Uu(t,n,i),o=i?r:e,u=i?e:r;return Fn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Lu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Bu(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;r<i;r++)e.push(Uu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Fu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Wu(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function Yu(t,n){return t.type===n}var Ku=8;function Gu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=$u(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new g("Data incomplete");return n.boxes}function $u(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Mu(t,n,Ku)){return{complete:!1,neededOffset:o=n.offset+Ku}}var e=Uu(t,n),r=Fu(t,n,4);if(1===e){if(!Mu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Lu(t,n).toNumber()}if("uuid"===r){if(!Mu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Fu(t,n,16)}var u=n.offset,s={type:r,size:e,headerSize:u-i};return{complete:!0,header:s}}(t,n);if(!e.complete)return e;var r=e.header,o=r.size;0===o&&(o=t.byteLength-i);var u=i+o;if(u>t.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new ju(Hu(t,i,u),new Xu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Zu(t){return{version:t>>24,flags:new Cu(16777215&t)}}function Ju(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Qu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function ts(t){var n=t.nextUint32Array(9);return{a:Ru(n[0],16),b:Ru(n[1],16),u:Ru(n[2],30),c:Ru(n[3],16),d:Ru(n[4],16),v:Ru(n[5],30),x:Ru(n[6],16),y:Ru(n[7],16),w:Ru(n[8],30)}}function ns(t){return new Nu(t.type,qu(Vu(t.data.data),t.data.cursor.offset))}var is=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return du(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.Gx},set:function(t){this.Gx=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Ou);function es(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new is(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}du(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(is);var rs=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.Vx},set:function(t){if(!Eu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.Vx=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}(),os=(function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f=t.call(this,4,s.fixed28BitMode)||this;return f.upStream=e,f.decoderSpecificInfo=u,f.objectTypeIndication=n,f.streamType=i,f.bufferSizeDb=r,f.maxBitrate=o.max,f.avgBitrate=o.avg,f}du(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.Wx},set:function(t){if(!Eu(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.Wx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.Hx},set:function(t){if(!Eu(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.Hx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Xx},set:function(t){if(!Eu(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.Xx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.Zx},set:function(t){if(!Eu(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.Zx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.qx},set:function(t){if(!Eu(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.qx=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var n=0,i=this.decoderSpecificInfo;n<i.length;n++){i[n].serialize(t)}}}(rs),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}du(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(yu.from(this.data))}}(rs),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return du(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(rs)),us=(function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,3,r.fixed28BitMode)||this;return o.decoderConfigDescriptor=e,o.esId=n,o.streamPriority=i,o.dependsOnEsId=null==r?void 0:r.dependsOnEsId,o.urlString=null==r?void 0:r.url,o.ocrEsId=null==r?void 0:r.ocrEsId,o.slConfigDescriptor=new os(r.fixed28BitMode),o}du(n,t),p.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"esId",{get:function(){return this.Kx},set:function(t){if(!Eu(t,16))throw new g("Provided esId does not fit in 16 bits.");this.Kx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Jx},set:function(t){if(!Eu(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.Jx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.$x},set:function(t){if(t&&!Eu(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.$x=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.tC},set:function(t){if(t&&!Eu(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.tC=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},n.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(rs),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return du(n,t),n.prototype.getSize=function(){return t.prototype.getSize.call(this)+this.boxes.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serialize=function(){for(var n=t.prototype.serialize.call(this),i=0,e=this.boxes;i<e.length;i++){var r=e[i];n=n.concat(r.serialize())}return n},n}(Tu)),ss=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return du(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(us),fs=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return du(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.iC},set:function(t){if(!Eu(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.iC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){for(var n=0;n<6;n++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},n}(ss),hs=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return du(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.eC},set:function(t){if(!Eu(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.eC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.sC},set:function(t){if(!Eu(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.sC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.nC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.nC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+8+2+2+2+2+(void 0!==this.sampleRate?4:0)+(null!==(i=null===(n=this.extra)||void 0===n?void 0:n.length)&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.channelCount,16),n.writer.writeUInt(this.sampleSize,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(Iu(this.sampleRate,16),32),this.extra&&ku(n.writer,this.extra)},n}(fs),cs=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ou),function(t){function n(n){var i=t.call(this,"clap")||this;return i.cleanApertureWidthN=n.cleanApertureWidthN,i.cleanApertureWidthD=n.cleanApertureWidthD,i.cleanApertureHeightN=n.cleanApertureHeightN,i.cleanApertureHeightD=n.cleanApertureHeightD,i.horizOffN=n.horizOffN,i.horizOffD=n.horizOffD,i.vertOffN=n.vertOffN,i.vertOffD=n.vertOffD,i}du(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.oC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.oC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.hC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.hC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.aC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.uC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.cC},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.cC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.lC},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.lC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.dC},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.dC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.fC},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.fC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 32},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.cleanApertureWidthN,32),t.writer.writeUInt(this.cleanApertureWidthD,32),t.writer.writeUInt(this.cleanApertureHeightN,32),t.writer.writeUInt(this.cleanApertureHeightD,32),t.writer.writeUInt(this.horizOffN,32),t.writer.writeUInt(this.horizOffD,32),t.writer.writeUInt(this.vertOffN,32),t.writer.writeUInt(this.vertOffD,32)}}(Tu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleOffset,32)})))throw new g("Not all entries can be represented in 64 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(Ou),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}du(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this._C},set:function(t){this.flags=void 0===t?1:0,this._C=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ou),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}du(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this._C},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this._C=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ou),function(t){function n(){return t.call(this,"dinf")||this}du(n,t)}(ss),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return du(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(us)),as=(function(t){function n(){return t.call(this,"dref",0,0)||this}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(cs),function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"elst",i,e)||this;return r.entries=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Eu(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(Ou)),vs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration,32),t.writer.writeInt(r.mediaTime,32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(as),ds=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(r.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(r.mediaTime.getHighBits(),32),t.writer.writeInt(r.mediaTime.getLowBits(),32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(as);function ls(t){for(var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=[],s=0;s<o;s++){var f=void 0,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 vs(u,r.raw):new ds(u,r.raw)}var ws=function(t){function n(){return t.call(this,"edts")||this}return du(n,t),n}(ss);function bs(t){for(var n=new ws,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"elst")?n.boxes.push(ls(r)):n.boxes.push(ns(r))}return n}var gs=function(t){function n(n,i,e,r){var o=t.call(this,n)||this;return o.majorBrand=i,o.minorVersion=e,o.compatibleBrands=r,o}return du(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.gC},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.gC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.vC},set:function(t){if(!Eu(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.vC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.wC},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.wC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4*(2+this.compatibleBrands.length)},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.majorBrand),t.writer.writeUInt(this.minorVersion,32);for(var n=0,i=this.compatibleBrands;n<i.length;n++){var e=i[n];t.writer.writeString(e)}},n}(Tu),ms=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}du(n,t)}(gs),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}du(n,t),n.prototype.getBoxContentSize=function(){var t,n;return null!==(n=null===(t=this.data)||void 0===t?void 0:t.length)&&void 0!==n?n:0},n.prototype.serializeBoxContent=function(t){this.data&&t.concat(yu.from(this.data))}}(Tu),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=t.call(this,"mdhd",e,r)||this;return o.creationTime=n.creation,o.modificationTime=n.modification,o.timescale=n.scale,o.duration=n.duration,o.language=i,o}return du(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.mC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.mC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.pC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.pC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.yC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.yC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.MC},set:function(t){if(!Ss(t))throw new g("Expected an ISO-639-2/T language code");this.MC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Ou)),ps=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return du(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(ms),ys=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return du(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(ms);function _s(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=Ju(n,e),u=new mu(yu.from(n.nextUint8Array(2)));u.skipBits(1);for(var s=[],f=0;f<3;f++)s.push(u.readUInt(5));var h=s.map((function(t){return String.fromCharCode(t+96)})).join("");return Ss(h)||(h="und"),n.skip(2),0===e?new ps(o,h,r.raw):new ys(o,h,r.raw)}function Ss(t){return/^[a-z]{3}$/.test(t)}var Ts=function(t){function n(){return t.call(this,"mdia")||this}return du(n,t),n}(ss);function Es(t){for(var n=new Ts,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mdhd")?n.boxes.push(_s(r)):Yu(r,"hdlr")?n.boxes.push(es(r)):n.boxes.push(ns(r))}return n}var Is;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new yu,n}du(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(Tu),function(t){function n(){return t.call(this,"minf")||this}du(n,t)}(ss),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.handler.serialize())}}(cs);!function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(Is||(Is={}));var ks,Rs,Os={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ns(t,n){n.writer.writeUInt(Iu(t.a,16),32),n.writer.writeUInt(Iu(t.b,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.c,16),32),n.writer.writeUInt(Iu(t.d,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.x,16),32),n.writer.writeUInt(Iu(t.y,16),32),n.writer.writeUInt(Iu(1,30),32)}function Ps(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:ks.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Rs.UNKNOWN,2)}function As(t,n){var i,e,r;n.writer.writeUInt(0,4),Ps(t,n),n.writer.writeUInt(null!==(i=t.samplePaddingValue)&&void 0!==i?i:0,3),n.writer.writeBool(null!==(e=t.sampleIsNonSyncSample)&&void 0!==e&&e),n.writer.writeUInt(null!==(r=t.sampleDegradationPriority)&&void 0!==r?r:0,16)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(ks||(ks={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Rs||(Rs={}));var Ds=function(){},Cs=function(t){function n(n,i,e){var r=t.call(this,"pssh",n,0)||this;return r.systemId=i,r.data=e,r}return du(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.bC},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.bC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.TC},set:function(t){if(!Eu(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.TC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+16+4+this.data.length},n.prototype.serializeVersionBoxContent=function(t){},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(yu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(yu.from(this.data))},n}(Ou),xs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return du(n,t),n}(Cs),Bs=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return du(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.SC},set:function(t){if(!Eu(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new g("Not all provided key ids are 16 bytes long.");this.SC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+16*this.kIds.length},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.kIds.length,32);for(var n=0,i=this.kIds;n<i.length;n++){var e=i[n];t.concat(yu.from(e))}},n}(Cs);function Ms(t){var n=t.data.nextUint8();t.data.skip(3);var i=t.data.nextUint8Array(16),e=[];if(1===n)for(var r=t.data.nextUint32(),o=0;o<r;o++)e.push(t.data.nextUint8Array(16));var u=t.data.nextUint32(),s=t.data.nextUint8Array(u);return 1===n?new Bs(i,s,e):new xs(i,s)}var Us=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"mehd",i,e)||this;return r.fragmentDuration=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.NC},set:function(t){if(!Eu(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.NC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),Ls=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Us),Fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),n.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},n}(Us);function zs(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Ls(n.nextUint32(),r.raw):new Fs(n.nextUint64(),r.raw)}var Ws=function(t){function n(n,i,e,r){void 0===i&&(i={}),void 0===e&&(e=0),void 0===r&&(r=0);var o,u,s,f=this;return(f=t.call(this,"trex",e,r)||this).trackId=n,f.defaultSampleDescriptionIndex=null!==(o=null==i?void 0:i.sampleDescriptionIndex)&&void 0!==o?o:0,f.defaultSampleDuration=null!==(u=i.sampleDuration)&&void 0!==u?u:0,f.defaultSampleSize=null!==(s=i.sampleSize)&&void 0!==s?s:0,f.defaultSampleFlags=i.sampleFlags,f}return du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.IC},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.DC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.DC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.EC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.EC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.kC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.kC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.LC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.LC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},n.prototype.serializeBoxContent=function(n){var i;t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),n.writer.writeUInt(this.defaultSampleDescriptionIndex,32),n.writer.writeUInt(this.defaultSampleDuration,32),n.writer.writeUInt(this.defaultSampleSize,32),As(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Ou);function qs(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Qu(new mu(yu.from(n.nextUint8Array(4))));return new Ws(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Hs=function(t){function n(){return t.call(this,"mvex")||this}return du(n,t),n}(ss);function Vs(t){for(var n=new Hs,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mehd")?n.boxes.push(zs(r)):Yu(r,"trex")?n.boxes.push(qs(r)):n.boxes.push(ns(r))}return n}var Xs=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:Os,c.xC=e,c}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.mC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.mC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.pC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.pC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.yC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.yC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.jC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.jC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.OC},set:function(t){if(!Eu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.OC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.RC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.RC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.xC},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!Eu(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.xC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+2+2+8+36+24+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMvhdContent(n),n.writer.writeUInt(Iu(this.rate,16),32),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ns(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(Ou),js=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return du(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(Xs),Ys=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,1,r)||this}return du(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Xs);function Ks(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=Ju(n,e),u=Ru(n.nextUint32(),16),s=Ru(n.nextUint16(),8);n.skip(2),n.skip(8);var f=ts(n);n.skip(24);var h=n.nextUint32();return 0===e?new js(o,h,{rate:u,volume:s,matrix:f},r.raw):new Ys(o,h,{rate:u,volume:s,matrix:f},r.raw)}var Gs=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:Os,a}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.mC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.mC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.pC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.pC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.IC},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!Eu(t,32))throw new g("trackId cannot exceed 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.yC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.yC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.OC},set:function(t){if(!Eu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.OC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.zC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.zC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.BC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.BC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.QC},set:function(t){if(!Eu(t,16))throw new g("Provided layer does not fit in 16 bits.");this.QC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.FC},set:function(t){if(!Eu(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.FC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.RC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.RC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeTkhdContent(n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.layer,16),n.writer.writeUInt(this.alternateGroup,16),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),Ns(this.matrix,n),n.writer.writeUInt(Iu(this.width,16),32),n.writer.writeUInt(Iu(this.height,16),32)},n}(Ou),$s=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},n}(Gs),Zs=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Gs);function Js(t){var n,i,e,r,o=t.data,u=Zu(o.nextUint32()),s=u.version,f=u.flags,h=f.isSet(8),c=f.isSet(4),a=f.isSet(2),v=f.isSet(1);0===s?(n=o.nextUint32(),i=o.nextUint32(),e=o.nextUint32(),o.skip(4),r=o.nextUint32()):(n=o.nextUint64(),i=o.nextUint64(),e=o.nextUint32(),o.skip(4),r=o.nextUint64()),o.skip(8);var d=o.nextInt16(),l=o.nextInt16(),w=Ru(o.nextInt16(),8);o.skip(2);var b=ts(o),g=Ru(o.nextUint32(),16),m=Ru(o.nextUint32(),16);return 0===s?new $s({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a}):new Zs({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var Qs=function(t){function n(){return t.call(this,"trak")||this}return du(n,t),n}(ss);function tf(t){for(var n=new Qs,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"tkhd")?n.boxes.push(Js(r)):Yu(r,"mdia")?n.boxes.push(Es(r)):Yu(r,"edts")?n.boxes.push(bs(r)):n.boxes.push(ns(r))}return n}var nf=function(t){function n(){return t.call(this,"moov")||this}return du(n,t),n}(ss);var ef=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"tfdt",i,e)||this;return r.baseMediaDecodeTime=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.YC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.YC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),rf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(ef),of=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},n}(ef);function uf(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new rf(n.nextUint32(),r.raw):new of(n.nextUint64(),r.raw)}var sf=function(t){function n(n,i){void 0===i&&(i=0);var e=t.call(this,"tfhd",i,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(n))||this;return e.trackId=n.trackId,e.baseDataOffset=n.baseDataOffset,e.sampleDescriptionIndex=n.sampleDescriptionIndex,e.defaultSampleDuration=n.defaultSampleDuration,e.defaultSampleSize=n.defaultSampleSize,e.defaultSampleFlags=n.defaultSampleFlags,e}return du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.IC},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.GC},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!Eu(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.GC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.VC},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!Eu(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.VC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.EC},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.EC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.kC},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.kC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.LC},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.LC=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(n+=8),this.flags.sampleDescriptionIndexPresent&&(n+=4),this.flags.defaultSampleDurationPresent&&(n+=4),this.flags.defaultSampleSizePresent&&(n+=4),this.flags.defaultSampleFlagsPresent&&(n+=4),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(n.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&n.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&n.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&n.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&As(this.defaultSampleFlags,n)},n}(Ou);function ff(t){var n=t.data,i=n.nextUint8(),e=new mu(yu.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var 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?Qu(new mu(yu.from(n.nextUint8Array(4)))):void 0;return new sf({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var hf=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return du(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.WC},set:function(t){if(t&&!Eu(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.WC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.HC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.HC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.XC},set:function(t){var n,i;if(!Eu(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!Eu(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!Eu(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Eu(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Eu(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Eu(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.XC=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(n+=4),this.flags.firstSampleFlagsPresent&&(n+=4),this.flags.sampleDurationPresent&&(n+=4*this.samples.length),this.flags.sampleSizePresent&&(n+=4*this.samples.length),this.flags.sampleFlagsPresent&&(n+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(n+=4*this.samples.length),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&n.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&As(this.firstSampleFlags,n);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];this.flags.sampleDurationPresent&&n.writer.writeUInt(r.duration,32),this.flags.sampleSizePresent&&n.writer.writeUInt(r.size,32),this.flags.sampleFlagsPresent&&As(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Ou);function cf(t){var n=t.data,i=n.nextUint8(),e=new mu(yu.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Qu(new mu(yu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Qu(new mu(yu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new hf(i,a,v)}var af=function(t){function n(){return t.call(this,"traf")||this}return du(n,t),n}(ss);function vf(t){for(var n=new af,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"tfhd")?n.boxes.push(ff(r)):Yu(r,"tfdt")?n.boxes.push(uf(r)):Yu(r,"trun")?n.boxes.push(cf(r)):n.boxes.push(ns(r))}return n}var df=function(t){function n(){return t.call(this,"moof")||this}return du(n,t),n}(ss);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}du(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.ZC},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.ZC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(Ou);var lf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return du(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.qC},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.qC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Tu),wf=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}du(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.KC},set:function(t){if(!Eu(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.KC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.JC},set:function(t){if(!Eu(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.JC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.hSpacing,32),t.writer.writeUInt(this.vSpacing,32)}}(Tu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}du(n,t),n.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},n.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(ss),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new lf(n),r}du(n,t),n.prototype.getBoxContentSize=function(){var t,n,i,e;return this.frma.getSize()+(null!==(n=null===(t=this.schm)||void 0===t?void 0:t.getSize())&&void 0!==n?n:0)+(null!==(e=null===(i=this.schi)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)},n.prototype.serializeBoxContent=function(t){t.concat(this.frma.serialize()),this.schm&&t.concat(this.schm.serialize()),this.schi&&t.concat(this.schi.serialize())}}(Tu),function(t){function n(n,i,e){var r=t.call(this,"saio",n,void 0===e?0:1)||this;return r.entries=i,r.explicitAuxInfoType=e,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){var n=this;if(!Eu(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,n.bitSize)})))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.rC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.$C},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.$C=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(Ou)),bf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}du(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e,32)}}}(wf),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}du(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.getHighBitsUnsigned(),32),t.writer.writeUInt(e.getLowBitsUnsigned(),32)}}}(wf),function(t){function n(n,i,e){var r=t.call(this,"saiz",0,void 0===e?0:1)||this;return r.defaultSampleInfoSize=n,r.sampleInfoSizes=i,r.explicitAuxInfoType=e,r}du(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.tj},set:function(t){if(!Eu(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.tj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.ij},set:function(t){if(!Eu(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,8)})))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.ij=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.$C},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.$C=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},n.prototype.serializeBoxContent=function(n){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Ou),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n);for(var i=0,e=this.samples;i<e.length;i++){Ps(e[i],n)}}}(Ou),function(t){function n(n){return t.call(this,"stsd",n,0)||this}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(cs),function(t){function n(n,i,e){var r=t.call(this,"sgpd",n,0)||this;return r.entries=e,r.groupingType=i,r}return du(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.ej},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.ej=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(Ou)),gf=(function(t){function n(n,i){return t.call(this,0,n,i)||this}du(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(bf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}du(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.sj},set:function(t){if(!Eu(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.sj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},n.prototype.serializeEntryBoxContent=function(t,n){0===this.defaultLength&&t.writer.writeUInt(n.getBoxContentSize(),32),n.serializeBoxContent(t)}}(bf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new g("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}du(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.DC},set:function(t){if(!Eu(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.DC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(bf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}du(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.nj},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all sampleSizes can be represented in 32 bits.");this.nj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ou),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}du(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.kC},set:function(t){if(!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.kC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.XC},set:function(t){if(!Eu(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.XC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(Ou),function(t){function n(){return t.call(this,"stbl")||this}du(n,t)}(ss),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.firstChunk,32)||!Eu(t.sampleDescriptionIndex,32)||!Eu(t.samplesPerChunk,32)})))throw new g("Not all entries can be represented in 96 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(Ou),function(t){function n(){return t.call(this,"schi")||this}du(n,t)}(ss),function(t){function n(n,i,e){var r=t.call(this,"schm",0,void 0===e?0:1)||this;return r.schemeType=n,r.schemeVersion=i,r.schemeUri=e,r}du(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this.rj},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.rj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.hj},set:function(t){if(!Eu(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.hj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.aj},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.aj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(Ou),function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s=0);var f=t.call(this,"sidx",n,s)||this;return f.referenceId=i,f.timescale=e,f.earliestPresentationTime=r,f.firstOffset=o,f.references=u,f}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"referenceId",{get:function(){return this.uj},set:function(t){if(!Eu(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.uj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.cj},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.cj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.lj},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.lj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.dj},set:function(t){if(!Eu(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!Eu(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!Eu(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!Eu(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.dj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(Ou)),mf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,0,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(gf),pf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,1,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},n}(gf);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}du(n,t)})(gs),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}du(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this._j},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Eu(Iu(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this._j=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(Iu(this.balance,8),16),n.writer.writeUInt(0,16)}}(Ou),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ou),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleDelta,32)})))throw new g("Not all entries can be represented in 64 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(Ou),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.IC},set:function(t){if(!Eu(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32)}}(cs),function(t){function n(){return t.call(this,"udta")||this}du(n,t)}(ss);var yf={red:0,green:0,blue:0},_f=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=yf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}du(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.gj},set:function(t){if(!Eu(t.red,16)||!Eu(t.green,16)||!Eu(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.gj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(Ou),function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,h,c,a=this;return(a=t.call(this,n,i)||this).width=e.width,a.height=e.height,a.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,a.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,a.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",a.frameCount=null!==(h=r.frameCount)&&void 0!==h?h:1,a.depth=null!==(c=r.depth)&&void 0!==c?c:24,a.clap=r.clap,a.pasp=r.pasp,a.extra=o,a}return du(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.zC},set:function(t){if(!Eu(t,16))throw new g("Provided width does not fit in 16 bits.");this.zC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.BC},set:function(t){if(!Eu(t,16))throw new g("Provided height does not fit in 16 bits.");this.BC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.vj},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.vj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.wj},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.wj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.mj},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.mj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.pj},set:function(t){if(!Eu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.pj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.Aj},set:function(t){if(!Eu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.Aj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(Iu(this.horizontalResolution,16),32),n.writer.writeUInt(Iu(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&ku(n.writer,this.extra)},n}(fs)),Sf=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof E?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof E?n.concat(yu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ou),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(hs),function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,"mp4v",n,i,r)||this;return o.esDescriptor=e,o}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(_f),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(fs),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Tu),function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.yj},set:function(t){if(!Eu(t,8))throw new g("Provided version does not fit in 8 bits.");this.yj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.Mj},set:function(t){if(!Eu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.Mj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.bj},set:function(t){if(!Eu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.bj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.Tj},set:function(t){if(!Eu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.Tj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.Sj},set:function(t){if(!Eu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.Sj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Nj},set:function(t){if(!Eu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.Nj=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce((function(t,n){return t+n.length}),0)+2*this.ppsSets.length+this.ppsSets.reduce((function(t,n){return t+n.length}),0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.length,16),t.concat(yu.from(e))}t.writer.writeByte(this.ppsSets.length);for(var r=0,o=this.ppsSets;r<o.length;r++){var u=o[r];t.writer.writeUInt(u.length,16),t.concat(yu.from(u))}}}(),function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u=t.call(this,"avc1",n,i,r)||this;return u.configurationBox=e,u.bitrateBox=o,u}du(n,t),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(i=null===(n=this.bitrateBox)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.configurationBox.serialize()),this.bitrateBox&&n.concat(this.bitrateBox.serialize())}}(_f),function(t){function n(n,i,e){var r=t.call(this,"btrt")||this;return r.bufferSizeDb=n,r.max=i,r.avg=e,r}du(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Xx},set:function(t){if(!Eu(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.Xx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.nf},set:function(t){if(!Eu(t,32))throw new g("Provided max does not fit in 32 bits.");this.nf=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.Ij},set:function(t){if(!Eu(t,32))throw new g("Provided avg does not fit in 32 bits.");this.Ij=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 12},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.bufferSizeDb,32),t.writer.writeUInt(this.max,32),t.writer.writeUInt(this.avg,32)}}(Tu),function(t){function n(n,i){var e,r,o,u,s=this;if(s=t.call(this,"tenc",n,0)||this,i.perSampleIvSize>0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new E(0),s}return du(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.Dj},set:function(t){if(!Eu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.Dj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.Ej},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.Ej=t,this.Lj=new E(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.xj},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.xj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.Lj},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.Lj=t,this.Ej=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),ku(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),ku(t.writer,this.constantIv))},n}(Ou)),Tf=(function(t){function n(n){return t.call(this,0,n)||this}du(n,t)}(Sf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return du(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.Cj},set:function(t){if(!Eu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.Cj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.jj},set:function(t){if(!Eu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.jj=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(Sf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new Tf(n),i}du(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ds);function Ef(t){return void 0!==t.iv}function If(t){return void 0!==t.subsamples}(function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}du(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.XC},set:function(t){var n;if(!Eu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(Ef(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=If(r)),!0===n&&!If(r)||!1===n&&If(r))throw new g("Mix of samples with and without subsamples detected.");if(If(r)){if(!Eu(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!Eu(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Eu(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.XC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];Ef(r)&&(n+=r.iv.length),If(r)&&(n+=2+6*r.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];if(Ef(r)&&ku(n.writer,r.iv),If(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}})(Ou),function(t){function n(n,i,e,r,o){var u=t.call(this,"emsg",0,0)||this;return u.schemeIdUri=n,u.value=i,u.data=o,u.id=e,u.timescale=r.timescale,u.presentationTimeDelta=r.presentationTimeDelta,u.eventDuration=r.eventDuration,u}du(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Oj},set:function(t){if(!Eu(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.Oj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.Rj},set:function(t){if(!Eu(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.Rj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.qS},set:function(t){if(!Eu(t,32))throw new g("The provided id does not fit in 32 bits.");this.qS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.schemeIdUri.length+1+this.value.length+1+16+this.data.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeIdUri),n.writer.writeByte(0),n.writer.writeString(this.value),n.writer.writeByte(0),n.writer.writeUInt(this.timescale,32),n.writer.writeUInt(this.presentationTimeDelta,32),n.writer.writeUInt(this.eventDuration,32),n.writer.writeUInt(this.id,32),n.concat(yu.from(this.data))}}(Ou),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new Su,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function kf(t,n){return function(i){var e=new ju(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Xu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=$u(i,e);if(!r.complete)return;if(Yu(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}kf("moov",(function(t){for(var n=new nf,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mvhd")?n.boxes.push(Ks(r)):Yu(r,"trak")?n.boxes.push(tf(r)):Yu(r,"mvex")?n.boxes.push(Vs(r)):Yu(r,"pssh")?n.boxes.push(Ms(r)):n.boxes.push(ns(r))}return n})),kf("sidx",(function(t){var n,i,e=t.data,r=Zu(e.nextUint32()),o=r.version,u=r.flags,s=e.nextUint32(),f=e.nextUint32();0===o?(n=e.nextUint32(),i=e.nextUint32()):(n=e.nextUint64(),i=e.nextUint64()),e.skip(2);for(var h=e.nextUint16(),c=[],a=0;a<h;a++){var v=new mu(yu.from(e.nextUint8Array(12))),d=v.readBit(),l=v.readUInt(31),w=v.readUInt(32),b=Boolean(v.readBit()),g=v.readUInt(3),m=v.readUInt(28);c.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new mf(s,f,n,i,c,u.raw):new pf(s,f,n,i,c,u.raw)})),kf("moof",(function(t){for(var n=new df,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"traf")?n.boxes.push(vf(r)):Yu(r,"pssh")?n.boxes.push(Ms(r)):n.boxes.push(ns(r))}return n}));var Rf=kf("pssh",Ms),Of=function(t){function n(n,i){var e;(e=t.call(this)||this).Uj=n,e.Yw=i,e.Yj=!1,e.Xj=function(){e.Wj()},e.Zj=function(t){e.yo(new ru(e,t.messageType,hu(e.Yw,t.message)))},e.qj=function(){e.Yj=!0,e.Qj.Gp>0&&(e.Qj.bx(),e.yo(new eu(e.Qj))),e.Uj.removeEventListener("keystatuseschange",e.Xj),e.Uj.removeEventListener("message",e.Zj)},e.Uj.addEventListener("keystatuseschange",e.Xj),e.Uj.addEventListener("message",e.Zj),e.Qj=new su;var r=[];return e.Uj.closed&&r.push(Q.resolve(e.Uj.closed)),e.Gj=new fu,r.push(e.Gj.Ix),e.zj=Q.race(r).then(e.qj,e.qj),e.Wj(),e}Bt(n,t);var i=n.prototype;return i.Ws=function(){if(this.Yj)return this.zj;var t=[];return t.push(Q.resolve(this.Uj.close())),t.push(cn(1e3)),this.Gj.r_(Q.race(t).catch(Nf)),this.Yj=!0,this.zj},i.Vj=function(t,n,i){if(Zi.Uk){var e=Rf(mi(n));if(1===e.version)n=new xs(e.systemId,e.data).serialize().join()}return Q.resolve(this.Uj.generateRequest(t,n)).catch(Nf)},i.$n=function(t){return Q.resolve(this.Uj.load(t)).catch(Nf)},i.WS=function(){return Q.resolve(this.Uj.remove()).catch(Nf)},i.Yn=function(t){return Q.resolve(this.Uj.update(t)).catch(Nf)},i.Wj=function(){var t=this;this.Qj.bx(),this.Uj.keyStatuses.forEach((function(n,i){t.Hj(i,n)})),this.yo(new eu(this.Qj))},i.Hj=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=mi(t);if(this.Yw===Uo&&16===e.byteLength){var r=bi(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.Yw===Uo&&"status-pending"===n&&(n="usable"),this.Qj.yx(e,n)},Dt(n,[{key:"Pj",get:function(){return this.zj}},{key:"Bj",get:function(){return this.Uj.expiration}},{key:"nx",get:function(){return this.Qj}},{key:"Fj",get:function(){return this.Uj.sessionId}}]),n}(Ii);function Nf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new au(t.message,void 0,n,t)}var Pf=function(){function t(t,n,i){this.Jj=t,this.Fw=n,this.sd=i}var n=t.prototype;return n.Kj=function(t){var n=this;return ft((function(){return ht(this,(function(i){return[2,new Of(n.Jj.createSession(t),n.Fw)]}))}))()},n.$j=function(t){return Q.resolve(this.Jj.setServerCertificate(t))},n.bn=function(t){return Q.resolve(t.setMediaKeys(this.Jj))},n.tO=function(t){return Q.resolve(t.setMediaKeys(null))},n.tr=function(){return Q.resolve()},t}(),Af=function(){function t(t,n,i){this.iO=t,this.Yw=n,this.sO=i}var n=t.prototype;return n.eO=function(){var t=this;return ft((function(){var n;return ht(this,(function(i){switch(i.label){case 0:return[4,t.iO.createMediaKeys()];case 1:return n=i.sent(),[2,new Pf(n,t.Yw,t.sO)]}}))}))()},n.nO=function(){return this.sO},Dt(t,[{key:"Fw",get:function(){return this.iO.keySystem}}]),t}();function Df(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Cf(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,fO:e.fO},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter((function(t){return Boolean(t.contentType)}));s.length&&(o.audioCapabilities=s.filter((function(e){return xf(t,n,i,e)})),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter((function(t){return Boolean(t.contentType)}));f.length&&(o.videoCapabilities=f.filter((function(e){return xf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function xf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!It(n,e.encryptionScheme))&&(!e.robustness&&t(i,Df(e.contentType))))}function Bf(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Mf(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e.encryptionScheme&&n.push({contentType:e.contentType,robustness:e.robustness})}return t.concat(n)}function Uf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Lf))||!(!t.videoCapabilities||!t.videoCapabilities.some(Lf))}function Lf(t){return!t.robustness}function Ff(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(xo({},r,{robustness:n}))}return i}var zf=function(){function t(){}return t.prototype.aO=function(t,n){return ft((function(){var i,e,r,o,u,s,f;return ht(this,(function(h){switch(h.label){case 0:for(n=n.filter((function(t){return!t.fO})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Mf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Mf(e.videoCapabilities));if(t!==zo||!n.some(Uf))return[3,4];r=n.map((function(t){return function(t,n){return xo({},t,{videoCapabilities:t.videoCapabilities?Ff(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Ff(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,r)];case 2:return o=h.sent(),u=o.getConfiguration(),[2,new Af(o,t,u)];case 3:return h.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return s=h.sent(),f=s.getConfiguration(),[2,new Af(s,t,f)]}}))}))()},t._O=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}(),Wf=function(t){function n(n,i){var e;return(e=t.call(this)||this).yO=n,e.MO=i,e.Yj=!1,e.IO=void 0,e.pO=void 0,e.gO=void 0,e.qj=function(){e.Yj=!0,e.vO.Tx(void 0),e.gO&&(e.gO.removeEventListener("mskeyclose",e.qj),e.gO.removeEventListener("mskeymessage",e.bO),e.gO.removeEventListener("mskeyerror",e.Ss),e.gO.removeEventListener("mskeyadded",e.TO))},e.bO=function(t){e.pO&&(e.pO.Tx(void 0),e.pO=void 0),e.yo(new ru(e,"license-request",pi(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.gO&&e.gO.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);if(e.pO)e.pO.Sx(n),e.pO=void 0;else if(e.IO)e.IO.Sx(n),e.IO=void 0;else switch(n.Dx){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.SO("output-not-allowed");break;default:e.SO("internal-error")}}},e.TO=function(){e.pO&&(e.SO("usable"),e.pO.Tx(void 0),e.pO=void 0),e.IO&&(e.SO("usable"),e.IO.Tx(void 0),e.IO=void 0)},e.vO=new fu,e.wO=new su,e}Bt(n,t);var i=n.prototype;return i.Vj=function(t,n,i){var e=this;return ft((function(){return ht(this,(function(t){switch(t.label){case 0:return e.mO(),e.pO=new fu,e.Kj(mi(n),i),[4,e.pO.Ix];case 1:return t.sent(),[2]}}))}))()},i.Kj=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.AO;return(i=n?this.yO.createSession(this.MO,t,e):this.yO.createSession(this.MO,t)).addEventListener("mskeyclose",this.qj),i.addEventListener("mskeymessage",this.bO),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.TO),this.gO=i,this.SO("status-pending"),i},i.$n=function(t){var n=this;return ft((function(){return ht(this,(function(t){return n.mO(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return ft((function(){var i;return ht(this,(function(e){switch(e.label){case 0:if(n.IO=new fu,n.mO(),!n.gO)return[2,Q.resolve()];if(0===(i=mi(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.gO.update(i),[4,n.IO.Ix];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.Yj&&this.gO&&(this.Yj=!0,this.gO.close()),this.vO.Ix},i.WS=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.mO(),[2]}))}))()},i.mO=function(){if(this.Yj)throw new m("Already closing or closed.")},i.SO=function(t){this.wO.bx(),this.wO.yx(uu,t),this.yo(new eu(this.wO))},Dt(n,[{key:"Fj",get:function(){return this.gO&&this.gO.sessionId||""}},{key:"Bj",get:function(){return NaN}},{key:"Pj",get:function(){return this.vO.Ix}},{key:"nx",get:function(){return this.wO}}]),n}(Ii),qf=function(){function t(t,n,i){this.yO=t,this.Fw=n,this.sd=i;var e=Bf(i)||"video/mp4";this.MO=Df(e)}var n=t.prototype;return n.Kj=function(t){var n=this;return ft((function(){return ht(this,(function(t){return[2,new Wf(n.yO,n.MO)]}))}))()},n.$j=function(t){return Q.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.yO),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.yO):t.addEventListener("loadedmetadata",i),Q.resolve()},n.tO=function(t){return Q.resolve()},n.tr=function(){return Q.resolve()},t}(),Hf=function(){function t(t,n){this.Yw=t,this.DO=n}var n=t.prototype;return n.nO=function(){return this.DO},n.eO=function(){var t=new so.MSMediaKeys(this.Yw);return Q.resolve(new qf(t,this.Yw,this.DO))},Dt(t,[{key:"Fw",get:function(){return this.Yw}}]),t}(),Vf=function(){function t(){}return t.prototype.aO=function(t,n){try{return Q.resolve(function(t,n){if(!Xf())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(jf,nu,t,e);if(r)return new Hf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t._O=function(){return Xf()},t}();function Xf(){return void 0!==so.MSMediaKeys&&"function"==typeof so.MSMediaKeys.isTypeSupported}function jf(t,n){return so.MSMediaKeys.isTypeSupported(t,n)}var Yf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).xO=n,r.MO=i,r.LO=e,r.vO=new fu,r.jO=void 0,r.wO=new su,r.EO=void 0,r.CO=new fu,r.Ss=function(){var t=r.EO&&r.EO.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);r.jO?(r.jO.Sx(n),r.jO=void 0):n.Dx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.SO("output-not-allowed"):r.SO("internal-error"),r.yo(new ou)}},r.bO=function(t){r.yo(new ru(r,"license-request",pi(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.TO=function(){r.jO&&(r.jO.Tx(void 0),r.jO=void 0),r.SO("usable")},r}Bt(n,t);var i=n.prototype;return i.Vj=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.kO;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=li(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 _i;return ai(s,f,r,!0),vi(s,f,e,!0),ai(s,f,o,!0),vi(s,f,n,!0),ai(s,f,i.byteLength,!0),function(t,n,i){gi(t).set(gi(i),n.Lu),n.fp(i.byteLength)}(s,f,i),new E(u)}(mi(n),e,this.LO);return this.EO=this.xO.createSession(this.MO,r),this.EO.addEventListener("webkitkeymessage",this.bO,!1),this.EO.addEventListener("webkitkeyadded",this.TO,!1),this.EO.addEventListener("webkitkeyerror",this.Ss,!1),this.SO("status-pending"),this.CO.Tx(this.EO),this.CO=new fu,Q.resolve()},i.$n=function(t){return Q.resolve(!0)},i.Yn=function(t){var n=this;return ft((function(){var i,e;return ht(this,(function(r){switch(r.label){case 0:if(0===(i=mi(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.jO=new fu,(e=n.EO)?[3,2]:[4,n.CO.Ix];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.jO.Ix];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.EO;return n&&(n.removeEventListener("webkitkeymessage",this.bO,!1),n.removeEventListener("webkitkeyadded",this.TO,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.CO.n_(),null==(t=this.jO)||t.n_(),this.vO.Tx(void 0),this.vO.Ix},i.WS=function(){return Q.resolve(void 0)},i.SO=function(t){this.wO.bx(),this.wO.yx(uu,t),this.yo(new eu(this.wO))},Dt(n,[{key:"Fj",get:function(){return this.EO?this.EO.sessionId:""}},{key:"Bj",get:function(){return NaN}},{key:"Pj",get:function(){return this.vO.Ix}},{key:"nx",get:function(){return this.wO}}]),n}(Ii);var Kf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Gf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Gf||(Gf={}));var $f=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Gf.fromCode(this.code)}}]),n}(nn),Zf=function(){function t(t,n,i){this.xO=t,this.Fw=n,this.sd=i,this.LO=void 0;var e=Bf(i)||"video/mp4";this.MO=Df(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.xO},n.Kj=function(t){var n=this;return ft((function(){return ht(this,(function(t){if(!n.LO)throw new $f(Kf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Yf(n.xO,n.MO,n.LO)]}))}))()},n.$j=function(t){return this.LO=mi(t),Q.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.xO),Q.resolve()},n.tO=function(t){return t.webkitSetMediaKeys(null),Q.resolve()},n.tr=function(){return Q.resolve()},t}(),Jf=function(){function t(t,n){this.Yw=t,this.DO=n}var n=t.prototype;return n.nO=function(){return this.DO},n.eO=function(){var t=new so.WebKitMediaKeys(this.Yw);return Q.resolve(new Zf(t,this.Yw,this.DO))},Dt(t,[{key:"Fw",get:function(){return this.Yw}}]),t}(),Qf=function(){function t(){}return t.prototype.aO=function(t,n){try{return Q.resolve(function(t,n){if(t!==Xo)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!th())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(nh,iu,t,e);if(r)return new Jf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t._O=function(){return th()},t}();function th(){return void 0!==so.WebKitMediaKeys&&"function"==typeof so.WebKitMediaKeys.isTypeSupported}function nh(t,n){return so.WebKitMediaKeys.isTypeSupported(t,n)}var ih,eh=function(){function t(t){this.OO=t}return t.prototype.aO=function(t,n){var i=this;return ft((function(){var e,r,o;return ht(this,(function(u){switch(u.label){case 0:e=0,r=i.OO,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.aO(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}}))}))()},t}(),rh=new an,oh=function(t){function n(n){var i;return(i=t.call(this)||this).Yw=n,i.pO=void 0,i.jO=void 0,i.Bx=!1,i.JO=void 0,i.XO=void 0,i.vO=new fu,i.KO="",i.ZO=new fu,i.qO=new su,i}Bt(n,t);var i=n.prototype;return i.GO=function(){this.jO&&(this.SO("usable"),this.jO.Tx(void 0),this.jO=void 0)},i.VO=function(t){var n=new au("Unknown CDM error",t.errorCode,t.systemCode);this.jO?(this.jO.Sx(n),this.jO=void 0):this.pO?(this.pO.Sx(n),this.pO=void 0):n.Dx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.SO("output-restricted"):1===n.Ex?this.SO("expired"):this.SO("internal-error")},i.WO=function(t){0!==t.message.byteLength?(this.pO&&(this.pO.Tx(void 0),this.pO=void 0),this.yo(new ru(this,"license-request",hu(this.Yw,pi(t.message).buffer),t.defaultURL||void 0))):this.pO&&(this.pO.Sx("Empty key message"),this.pO=void 0)},i.HO=function(t){this.XO||(this.XO=t,this.ZO.Tx(t))},i.Ws=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.throwIfClosed(),t.jO&&(t.jO.Sx(void 0),t.jO=void 0),t.Bx=!0,t.vO.Tx(void 0),[2]}))}))()},i.Vj=function(t,n){var i=this;return ft((function(){var t;return ht(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.pO=new fu,i.JO=mi(n),(t=i.XO)?[3,2]:[4,i.ZO.Ix];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.Yw,i.JO),[4,i.pO.Ix];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return ft((function(){return ht(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.WS=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return ft((function(){return ht(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.jO=new fu,Zi.hL||Zi.sL?[2,rh.RO(ft((function(){return ht(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 ft((function(){var i;return ht(this,(function(e){switch(e.label){case 0:return void 0===n.jO?[2]:(i=n.XO)?[3,2]:[4,n.ZO.Ix];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.Yw,mi(t),n.JO,n.Fj),[4,n.jO.Ix];case 3:return e.sent(),Zi.sL?[4,cn(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.Bx)throw new m("Already closing or closed.")},i.SO=function(t){this.qO.bx(),this.qO.yx(uu,t),this.yo(new eu(this.qO))},i.$O=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:return(i=t.XO)?[3,2]:[4,t.ZO.Ix];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.Yw,t.KO),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,cn(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},Dt(n,[{key:"nx",get:function(){return this.qO}},{key:"Fj",get:function(){return this.KO},set:function(t){this.KO=t}},{key:"Pj",get:function(){return this.vO.Ix}},{key:"Bj",get:function(){return NaN}}]),n}(Ii),uh=function(){function t(t,n){var i=this;this.Fw=t,this.sd=n,this.XO=void 0,this.eR=Lt(),this.sR=[],this.TO=function(t){var n=i.nR(t.sessionId);n&&n.GO()},this.tR=function(t){var n=i.nR(t.sessionId);n&&n.VO(t)},this.iR=function(t){var n=i.nR(t.sessionId);n&&n.WO(t)}}var n=t.prototype;return n.bn=function(t){return this.XO=t,this.XO.addEventListener("webkitkeyadded",this.TO),this.XO.addEventListener("webkitkeyerror",this.tR),this.XO.addEventListener("webkitkeymessage",this.iR),this.eR.forEach((function(n,i){return n.HO(t)})),this.sR.forEach((function(n){return n.HO(t)})),Q.resolve()},n.tO=function(t){return t.removeEventListener("webkitkeyadded",this.TO),t.removeEventListener("webkitkeyerror",this.tR),t.removeEventListener("webkitkeymessage",this.iR),this.XO=void 0,Q.resolve()},n.tr=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:n=t.eR.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].$O()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.eR.clear(),[2]}}))}))()},n.Kj=function(t,n,i){var e=this;return ft((function(){var t;return ht(this,(function(n){return t=new oh(e.Fw),e.XO&&t.HO(e.XO),e.sR.push(t),[2,t]}))}))()},n.$j=function(t){return Q.resolve(!1)},n.nR=function(t){if(t){var n=this.eR.get(t);return n||((n=this.sR.shift())?(n.Fj=t,this.eR.set(t,n),n):void 0)}},t}(),sh=function(){function t(t,n){this.Fw=t,this.rR=n}var n=t.prototype;return n.eO=function(){return Q.resolve(new uh(this.Fw,this.rR))},n.nO=function(){return this.rR},t}(),fh=function(){function t(){}return t.prototype.aO=function(t,n){try{return Q.resolve(function(t,n){if(!fh._O())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(hh,nu,t,e);if(r)return new sh(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t._O=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function hh(t,n){var i=vo();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function ch(){return ih||(ih=function(){var t=[];Qf._O()&&t.push(new Qf);zf._O()&&t.push(new zf);Vf._O()&&t.push(new Vf);fh._O()&&t.push(new fh);return new eh(t)}()),ih}var ah=function(){function t(){this.UF=Lt()}var n=t.prototype;return n.bx=function(t){this.UF.delete(t)},n.QF=function(){this.UF.clear()},n.Ax=function(t){return this.UF.get(t)},n.yx=function(t,n){this.UF.set(t,n)},t}(),vh=function(){function t(){}return t.FF=function(){return t.KL||(t.KL=dh._O()?new dh:new ah),t.KL},t.bx=function(n){t.FF().bx(n)},t.QF=function(){t.FF().QF()},t.Ax=function(n){return t.FF().Ax(n)},t.yx=function(n,i){t.FF().yx(n,i)},t}();vh.KL=void 0;var dh=function(t){function n(){return t.apply(this,arguments)||this}Bt(n,t);var i=n.prototype;return i.bx=function(t){self.sessionStorage.removeItem(t)},i.QF=function(){self.sessionStorage.clear()},i.Ax=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.yx=function(t,n){self.sessionStorage.setItem(t,n)},n._O=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(vh);var lh=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 wh(t,n,i){var e=lh([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}var bh=function(t){return t.lE="arraybuffer",t.dE="json",t.fE="stream",t.JM="text",t}({}),gh=function(){function t(n){var i=this;this.$d={},n instanceof t?n.asList().forEach((function(t){var n=Mt(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Mt(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&p.getOwnPropertyNames(n).forEach((function(t){i.append(t,n[t])}))}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=mh(i),e=ph(e);var r=i.toLowerCase();if(this.$d.hasOwnProperty(r)){var o=this.$d[r],u=o[1];o[1]=u?u+", "+e:e}else this.$d[r]=[i,e]},n.delete=function(t){var n=mh(t).toLowerCase();delete this.$d[n]},n.get=function(t){var n=mh(t).toLowerCase();return this.$d.hasOwnProperty(n)?this.$d[n][1]:null},n.has=function(t){var n=mh(t).toLowerCase();return this.$d.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=mh(i)).toLowerCase();this.$d[e]=[i,ph(n)]},n.forEach=function(t,n){for(var i in this.$d)this.$d.hasOwnProperty(i)&&t.call(n,this.$d[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.$d)if(this.$d.hasOwnProperty(n)){var i=Mt(this.$d[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n._E=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.gE=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.vE=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function mh(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new m("Invalid character in header field name");return n}function ph(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var yh="function"==typeof n&&"symbol"==typeof e?n:function(t){return"Symbol("+t+")"};function _h(){}var Sh=Number.isNaN||function(t){return t!=t},Th=_h;function Eh(t){return"object"==typeof t&&null!==t||"function"==typeof t}function Ih(t){return t.slice()}function kh(t,n,i,e,r){new E(t).set(new E(i,e,r),n)}function Rh(t){return!1!==function(t){if("number"!=typeof t)return!1;if(Sh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Oh(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Nh(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return Ah(r,t,e)};case 1:return function(n){var i=[n].concat(e);return Ah(r,t,i)}}}return function(){return Fh(void 0)}}function Ph(t,n,i){var e=t[n];if(void 0!==e)return Oh(e,t,i)}function Ah(t,n,i){try{return Fh(Oh(t,n,i))}catch(t){return zh(t)}}function Dh(t){if(t=Number(t),Sh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function Ch(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var xh=Q,Bh=Q.prototype.then,Mh=Q.resolve.bind(xh),Uh=Q.reject.bind(xh);function Lh(t){return new xh(t)}function Fh(t){return Mh(t)}function zh(t){return Uh(t)}function Wh(t,n,i){return Bh.call(t,n,i)}function qh(t,n,i){Wh(Wh(t,n,i),void 0,Th)}function Hh(t,n){qh(t,n)}function Vh(t,n){qh(t,void 0,n)}function Xh(t,n,i){return Wh(t,n,i)}function jh(t){Wh(t,void 0,Th)}var Yh=function(){function t(){this.QV=0,this.FV=0,this.YV={GV:[],VV:void 0},this.WV=this.YV,this.QV=0,this.FV=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.FV},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.WV,i=n;16383===n.GV.length&&(i={GV:[],VV:void 0}),n.GV.push(t),i!==n&&(this.WV=i,n.VV=i),++this.FV},t.prototype.shift=function(){var t=this.YV,n=t,i=this.QV,e=i+1,r=t.GV,o=r[i];return 16384===e&&(n=t.VV,e=0),--this.FV,this.QV=e,t!==n&&(this.YV=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.QV,i=this.YV,e=i.GV;!(n===e.length&&void 0===i.VV||n===e.length&&(n=0,0===(e=(i=i.VV).GV).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.YV,n=this.QV;return t.GV[n]},t}();function Kh(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function Gh(t,n){t.HV=!0,t.XV=n,n.ZV=t,"readable"===n.wa?Qh(t):"closed"===n.wa?function(t){Qh(t),ic(t)}(t):tc(t,n.qV)}function $h(t,n){return ov(t.XV,n)}function Zh(t){"readable"===t.XV.wa?nc(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){tc(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.XV.ZV=void 0,t.XV=void 0}function Jh(t){return new m("Cannot "+t+" a stream using a released reader")}function Qh(t){t.zj=Lh((function(n,i){t.KV=n,t.JV=i}))}function tc(t,n){Qh(t),nc(t,n)}function nc(t,n){jh(t.zj),t.JV(n),t.KV=void 0,t.JV=void 0}function ic(t){t.KV(void 0),t.KV=void 0,t.JV=void 0}var ec=yh("[[CancelSteps]]"),rc=yh("[[PullSteps]]");function oc(t,n){void 0===n&&(n=!1);var i=new vc(t);return i.HV=n,i}function uc(t){var n=Lh((function(n,i){var e={Hd:n,Nx:i};t.ZV.$V.push(e)}));return n}function sc(t,n,i){var e=t.ZV;e.$V.shift().Hd(Kh(n,i,e.HV))}function fc(t){return t.ZV.$V.length}function hc(t){var n=t.ZV;return void 0!==n&&!!dc(n)}var cc,ac,vc=function(){function t(t){if(!1===ev(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===rv(t))throw new m("This stream has already been locked for exclusive reading by another reader");Gh(this,t),this.$V=new Yh}return p.defineProperty(t.prototype,"closed",{get:function(){return dc(this)?this.zj:zh(wc("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return dc(this)?void 0===this.XV?zh(Jh("cancel")):$h(this,t):zh(wc("cancel"))},t.prototype.read=function(){return dc(this)?void 0===this.XV?zh(Jh("read from")):lc(this):zh(wc("read"))},t.prototype.releaseLock=function(){if(!dc(this))throw wc("releaseLock");if(void 0!==this.XV){if(this.$V.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");Zh(this)}},t}();function dc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"$V")}function lc(t){var n=t.XV;return n.tW=!0,"closed"===n.wa?Fh(Kh(void 0,!0,t.HV)):"errored"===n.wa?zh(n.qV):n.iW[rc]()}function wc(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof yh.asyncIterator&&((cc={})[yh.asyncIterator]=function(){return this},ac=cc,p.defineProperty(ac,yh.asyncIterator,{enumerable:!1}));var bc={next:function(){if(!1===gc(this))return zh(mc("next"));var t=this.eW;return void 0===t.XV?zh(Jh("iterate")):Xh(lc(t),(function(n){var i=n.done;return i&&Zh(t),Kh(n.value,i,!0)}))},return:function(t){if(!1===gc(this))return zh(mc("next"));var n=this.eW;if(void 0===n.XV)return zh(Jh("finish iterating"));if(n.$V.length>0)return zh(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.sW){var i=$h(n,t);return Zh(n),Xh(i,(function(){return Kh(t,!0,!0)}))}return Zh(n),Fh(Kh(t,!0,!0))}};function gc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"eW")}function mc(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function pc(t){var n=t.nW.shift();return t.rW-=n.size,t.rW<0&&(t.rW=0),n.value}function yc(t,n,i){if(!Rh(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.nW.push({value:n,size:i}),t.rW+=i}function _c(t){t.nW=new Yh,t.rW=0}void 0!==ac&&p.setPrototypeOf(bc,ac),p.defineProperty(bc,"next",{enumerable:!1}),p.defineProperty(bc,"return",{enumerable:!1});var Sc=yh("[[AbortSteps]]"),Tc=yh("[[ErrorSteps]]"),Ec=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),kc(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=Ch(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(Vc.prototype);function o(){return Ph(n,"start",[r])}var u=Nh(n,"write",1,[r]),s=Nh(n,"close",0,[]),f=Nh(n,"abort",1,[]);Xc(t,r,o,u,s,f,i,e)}(this,t,e=Dh(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Rc(this))throw Jc("locked");return Oc(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Rc(this)?zh(Jc("abort")):!0===Oc(this)?zh(new m("Cannot abort a stream that already has a writer")):Nc(this,t)},t.prototype.close=function(){return!1===Rc(this)?zh(Jc("close")):!0===Oc(this)?zh(new m("Cannot close a stream that already has a writer")):!0===xc(this)?zh(new m("Cannot close an already-closing stream")):Pc(this)},t.prototype.getWriter=function(){if(!1===Rc(this))throw Jc("getWriter");return Ic(this)},t}();function Ic(t){return new Uc(t)}function kc(t){t.wa="writable",t.qV=void 0,t.Yx=void 0,t.oW=void 0,t.hW=new Yh,t.aW=void 0,t.uW=void 0,t.cW=void 0,t.lW=void 0,t.dW=!1}function Rc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"oW")}function Oc(t){return void 0!==t.Yx}function Nc(t,n){var i=t.wa;if("closed"===i||"errored"===i)return Fh(void 0);if(void 0!==t.lW)return t.lW.fW;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=Lh((function(i,r){t.lW={fW:void 0,Hd:i,Nx:r,_W:n,gW:e}}));return t.lW.fW=r,!1===e&&Dc(t,n),r}function Pc(t){var n=t.wa;if("closed"===n||"errored"===n)return zh(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=Lh((function(n,i){var e={Hd:n,Nx:i};t.uW=e})),e=t.Yx;return void 0!==e&&!0===t.dW&&"writable"===n&&ha(e),function(t){yc(t,"close",0),Kc(t)}(t.oW),i}function Ac(t,n){"writable"!==t.wa?Cc(t):Dc(t,n)}function Dc(t,n){var i=t.oW;t.wa="erroring",t.qV=n;var e=t.Yx;void 0!==e&&Wc(e,n),!1===function(t){if(void 0===t.aW&&void 0===t.cW)return!1;return!0}(t)&&!0===i.vW&&Cc(t)}function Cc(t){t.wa="errored",t.oW[Tc]();var n=t.qV;if(t.hW.forEach((function(t){t.Nx(n)})),t.hW=new Yh,void 0!==t.lW){var i=t.lW;if(t.lW=void 0,!0===i.gW)return i.Nx(n),void Bc(t);qh(t.oW[Sc](i._W),(function(){i.Hd(),Bc(t)}),(function(n){i.Nx(n),Bc(t)}))}else Bc(t)}function xc(t){return void 0!==t.uW||void 0!==t.cW}function Bc(t){void 0!==t.uW&&(t.uW.Nx(t.qV),t.uW=void 0);var n=t.Yx;void 0!==n&&ea(n,t.qV)}function Mc(t,n){var i=t.Yx;void 0!==i&&n!==t.dW&&(!0===n?function(t){oa(t)}(i):ha(i)),t.dW=n}var Uc=function(){function t(t){if(!1===Rc(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===Oc(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.wW=t,t.Yx=this;var n=t.wa;if("writable"===n)!1===xc(t)&&!0===t.dW?oa(this):sa(this),na(this);else if("erroring"===n)ua(this,t.qV),na(this);else if("closed"===n)sa(this),function(t){na(t),ra(t)}(this);else{var i=t.qV;ua(this,i),ia(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Lc(this)?zh(Qc("closed")):this.zj},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Lc(this))throw Qc("desiredSize");if(void 0===this.wW)throw ta("desiredSize");return function(t){var n=t.wW,i=n.wa;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Yc(n.oW)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Lc(this)?zh(Qc("ready")):this.mW},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Lc(this)?zh(Qc("abort")):void 0===this.wW?zh(ta("abort")):function(t,n){var i=t.wW;return Nc(i,n)}(this,t)},t.prototype.close=function(){if(!1===Lc(this))return zh(Qc("close"));var t=this.wW;return void 0===t?zh(ta("close")):!0===xc(t)?zh(new m("Cannot close an already-closing stream")):Fc(this)},t.prototype.releaseLock=function(){if(!1===Lc(this))throw Qc("releaseLock");void 0!==this.wW&&qc(this)},t.prototype.write=function(t){return!1===Lc(this)?zh(Qc("write")):void 0===this.wW?zh(ta("write to")):Hc(this,t)},t}();function Lc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"wW")}function Fc(t){return Pc(t.wW)}function zc(t,n){"pending"===t.pW?ea(t,n):function(t,n){ia(t,n)}(t,n)}function Wc(t,n){"pending"===t.AW?fa(t,n):function(t,n){ua(t,n)}(t,n)}function qc(t){var n=t.wW,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");Wc(t,i),zc(t,i),n.Yx=void 0,t.wW=void 0}function Hc(t,n){var i=t.wW,e=i.oW,r=function(t,n){try{return t.yW(n)}catch(n){return Gc(t,n),1}}(e,n);if(i!==t.wW)return zh(ta("write to"));var o=i.wa;if("errored"===o)return zh(i.qV);if(!0===xc(i)||"closed"===o)return zh(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return zh(i.qV);var u=function(t){var n=Lh((function(n,i){var e={Hd:n,Nx:i};t.hW.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{yc(t,e,i)}catch(n){return void Gc(t,n)}var r=t.MW;if(!1===xc(r)&&"writable"===r.wa){Mc(r,$c(t))}Kc(t)}(e,n,r),u}var Vc=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!Eh(t))return!1;if(!p.prototype.hasOwnProperty.call(t,"MW"))return!1;return!0}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.MW.wa&&Zc(this,t)},t.prototype[Sc]=function(t){var n=this.bW(t);return jc(this),n},t.prototype[Tc]=function(){_c(this)},t}();function Xc(t,n,i,e,r,o,u,s){n.MW=t,t.oW=n,n.nW=void 0,n.rW=void 0,_c(n),n.vW=!1,n.yW=s,n.TW=u,n.SW=e,n.NW=r,n.bW=o;var f=$c(n);Mc(t,f),qh(Fh(i()),(function(){n.vW=!0,Kc(n)}),(function(i){n.vW=!0,Ac(t,i)}))}function jc(t){t.SW=void 0,t.NW=void 0,t.bW=void 0,t.yW=void 0}function Yc(t){return t.TW-t.rW}function Kc(t){var n=t.MW;if(!1!==t.vW&&void 0===n.aW)if("erroring"!==n.wa){if(0!==t.nW.length){var i=function(t){return t.nW.peek().value}(t);"close"===i?function(t){var n=t.MW;(function(t){t.cW=t.uW,t.uW=void 0})(n),pc(t);var i=t.NW();jc(t),qh(i,(function(){!function(t){t.cW.Hd(void 0),t.cW=void 0,"erroring"===t.wa&&(t.qV=void 0,void 0!==t.lW&&(t.lW.Hd(),t.lW=void 0)),t.wa="closed";var n=t.Yx;void 0!==n&&ra(n)}(n)}),(function(t){!function(t,n){t.cW.Nx(n),t.cW=void 0,void 0!==t.lW&&(t.lW.Nx(n),t.lW=void 0),Ac(t,n)}(n,t)}))}(t):function(t,n){var i=t.MW;!function(t){t.aW=t.hW.shift()}(i);var e=t.SW(n);qh(e,(function(){!function(t){t.aW.Hd(void 0),t.aW=void 0}(i);var n=i.wa;if(pc(t),!1===xc(i)&&"writable"===n){var e=$c(t);Mc(i,e)}Kc(t)}),(function(n){"writable"===i.wa&&jc(t),function(t,n){t.aW.Nx(n),t.aW=void 0,Ac(t,n)}(i,n)}))}(t,i.chunk)}}else Cc(n)}function Gc(t,n){"writable"===t.MW.wa&&Zc(t,n)}function $c(t){return Yc(t)<=0}function Zc(t,n){var i=t.MW;jc(t),Dc(i,n)}function Jc(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Qc(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function ta(t){return new m("Cannot "+t+" a stream using a released writer")}function na(t){t.zj=Lh((function(n,i){t.KV=n,t.JV=i,t.pW="pending"}))}function ia(t,n){na(t),ea(t,n)}function ea(t,n){jh(t.zj),t.JV(n),t.KV=void 0,t.JV=void 0,t.pW="rejected"}function ra(t){t.KV(void 0),t.KV=void 0,t.JV=void 0,t.pW="resolved"}function oa(t){t.mW=Lh((function(n,i){t.IW=n,t.DW=i})),t.AW="pending"}function ua(t,n){oa(t),fa(t,n)}function sa(t){oa(t),ha(t)}function fa(t,n){jh(t.mW),t.DW(n),t.IW=void 0,t.DW=void 0,t.AW="rejected"}function ha(t){t.IW(void 0),t.IW=void 0,t.DW=void 0,t.AW="fulfilled"}function ca(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var aa="undefined"!=typeof DOMException?DOMException:void 0;var va=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(aa)?aa:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)};return t.prototype=p.create(g.prototype),p.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function da(t,n,i,e,r,o){var u=oc(t),s=Ic(n);t.tW=!0;var f=!1,h=Fh(void 0);return Lh((function(c,a){var v,d,l,w;if(void 0!==o){if(v=function(){var i=new va("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.wa?Nc(n,i):Fh(void 0)})),!1===r&&o.push((function(){return"readable"===t.wa?ov(t,i):Fh(void 0)})),y((function(){return Q.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void v();o.addEventListener("abort",v)}if(p(t,u.zj,(function(t){!1===e?y((function(){return Nc(n,t)}),!0,t):_(!0,t)})),p(n,s.zj,(function(n){!1===r?y((function(){return ov(t,n)}),!0,n):_(!0,n)})),d=t,l=u.zj,w=function(){!1===i?y((function(){return function(t){var n=t.wW,i=n.wa;return!0===xc(n)||"closed"===i?Fh(void 0):"errored"===i?zh(n.qV):Fc(t)}(s)})):_()},"closed"===d.wa?w():Hh(l,w),!0===xc(n)||"closed"===n.wa){var b=new m("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return ov(t,b)}),!0,b):_(!0,b)}function g(){var t=h;return Wh(h,(function(){return t!==h?g():void 0}))}function p(t,n,i){"errored"===t.wa?i(t.qV):Vh(n,i)}function y(t,i,e){function r(){qh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.wa&&!1===xc(n)?Hh(g(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.wa&&!1===xc(n)?Hh(g(),(function(){return S(t,i)})):S(t,i))}function S(t,n){qc(s),Zh(u),void 0!==o&&o.removeEventListener("abort",v),t?a(n):c(void 0)}jh(Lh((function(t,n){!function i(e){e?t():Wh(!0===f?Fh(!0):Wh(s.mW,(function(){return Wh(lc(u),(function(t){return!0===t.done||(h=Wh(Hc(s,t.value),void 0,_h),!1)}))})),i,n)}(!1)})))}))}var la=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===wa(this))throw Ia("desiredSize");return Sa(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===wa(this))throw Ia("close");if(!1===Ta(this))throw new m("The stream is not in a state that permits close");pa(this)},t.prototype.enqueue=function(t){if(!1===wa(this))throw Ia("enqueue");if(!1===Ta(this))throw new m("The stream is not in a state that permits enqueue");return ya(this,t)},t.prototype.error=function(t){if(!1===wa(this))throw Ia("error");_a(this,t)},t.prototype[ec]=function(t){_c(this);var n=this.EW(t);return ma(this),n},t.prototype[rc]=function(){var t=this.kW;if(this.nW.length>0){var n=pc(this);return!0===this.LW&&0===this.nW.length?(ma(this),uv(t)):ba(this),Fh(Kh(n,!1,t.ZV.HV))}var i=uc(t);return ba(this),i},t}();function wa(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"kW")}function ba(t){!1!==ga(t)&&(!0!==t.xW?(t.xW=!0,qh(t.jW(),(function(){t.xW=!1,!0===t.OW&&(t.OW=!1,ba(t))}),(function(n){_a(t,n)}))):t.OW=!0)}function ga(t){var n=t.kW;return!1!==Ta(t)&&(!1!==t.vW&&(!0===rv(n)&&fc(n)>0||Sa(t)>0))}function ma(t){t.jW=void 0,t.EW=void 0,t.yW=void 0}function pa(t){var n=t.kW;t.LW=!0,0===t.nW.length&&(ma(t),uv(n))}function ya(t,n){var i=t.kW;if(!0===rv(i)&&fc(i)>0)sc(i,n,!1);else{var e=void 0;try{e=t.yW(n)}catch(n){throw _a(t,n),n}try{yc(t,n,e)}catch(n){throw _a(t,n),n}}ba(t)}function _a(t,n){var i=t.kW;"readable"===i.wa&&(_c(t),ma(t),sv(i,n))}function Sa(t){var n=t.kW.wa;return"errored"===n?null:"closed"===n?0:t.TW-t.rW}function Ta(t){var n=t.kW.wa;return!1===t.LW&&"readable"===n}function Ea(t,n,i,e,r,o,u){n.kW=t,n.nW=void 0,n.rW=void 0,_c(n),n.vW=!1,n.LW=!1,n.OW=!1,n.xW=!1,n.yW=u,n.TW=o,n.jW=e,n.EW=r,t.iW=n,qh(Fh(i()),(function(){n.vW=!0,ba(n)}),(function(t){_a(n,t)}))}function Ia(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var ka=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},Ra=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Pa(this))throw ja("view");return this.DD},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Pa(this))throw ja("respond");if(void 0===this.RW)throw new m("This BYOB request has been invalidated");this.DD.buffer,function(t,n){if(n=Number(n),!1===Rh(n))throw new RangeError("bytesWritten must be a finite");za(t,n)}(this.RW,t)},t.prototype.respondWithNewView=function(t){if(!1===Pa(this))throw ja("respond");if(void 0===this.RW)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.PW.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,za(t,n.byteLength)}(this.RW,t)},t}(),Oa=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Na(this))throw Ya("byobRequest");if(void 0===this.zW&&this.PW.length>0){var t=this.PW.peek(),n=new E(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(Ra.prototype);!function(t,n,i){t.RW=n,t.DD=i}(i,this,n),this.zW=i}return this.zW},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Na(this))throw Ya("desiredSize");return Va(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Na(this))throw Ya("close");if(!0===this.LW)throw new m("The stream has already been closed; do not close it again!");var t=this.BW.wa;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.BW;if(t.rW>0)return void(t.LW=!0);if(t.PW.length>0){if(t.PW.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Ha(t,i),i}}qa(t),uv(n)}(this)},t.prototype.enqueue=function(t){if(!1===Na(this))throw Ya("enqueue");if(!0===this.LW)throw new m("stream is closed or draining");var n=this.BW.wa;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.BW,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===hc(i)){if(0===fc(i))xa(t,u,r,o);else sc(i,new E(u,r,o),!1)}else!0===$a(i)?(xa(t,u,r,o),Fa(t)):xa(t,u,r,o);Aa(t)}(this,t)},t.prototype.error=function(t){if(!1===Na(this))throw Ya("error");Ha(this,t)},t.prototype[ec]=function(t){this.PW.length>0&&(this.PW.peek().bytesFilled=0);_c(this);var n=this.EW(t);return qa(this),n},t.prototype[rc]=function(){var t=this.BW;if(this.rW>0){var n=this.nW.shift();this.rW-=n.byteLength,Ua(this);var i=void 0;try{i=new E(n.buffer,n.byteOffset,n.byteLength)}catch(t){return zh(t)}return Fh(Kh(i,!1,t.ZV.HV))}var e=this.UW;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return zh(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:E,readerType:"default"};this.PW.push(o)}var u=uc(t);return Aa(this),u},t}();function Na(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"BW")}function Pa(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"RW")}function Aa(t){var n=function(t){var n=t.BW;if("readable"!==n.wa)return!1;if(!0===t.LW)return!1;if(!1===t.vW)return!1;if(!0===hc(n)&&fc(n)>0)return!0;if(!0===$a(n)&&Ga(n)>0)return!0;var i=Va(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.xW?(t.xW=!0,qh(t.jW(),(function(){t.xW=!1,!0===t.OW&&(t.OW=!1,Aa(t))}),(function(n){Ha(t,n)}))):t.OW=!0)}function Da(t,n){var i=!1;"closed"===t.wa&&(i=!0);var e=Ca(n);"default"===n.readerType?sc(t,e,i):function(t,n,i){var e=t.ZV,r=e.QW.shift();r.Hd(Kh(n,i,e.HV))}(t,e,i)}function Ca(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function xa(t,n,i,e){t.nW.push({buffer:n,byteOffset:i,byteLength:e}),t.rW+=e}function Ba(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.rW,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.nW;s>0;){var c=h.peek(),a=y.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;kh(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.rW-=a,Ma(t,a,n),s-=a}return f}function Ma(t,n,i){La(t),i.bytesFilled+=n}function Ua(t){0===t.rW&&!0===t.LW?(qa(t),uv(t.BW)):Aa(t)}function La(t){void 0!==t.zW&&(t.zW.RW=void 0,t.zW.DD=void 0,t.zW=void 0)}function Fa(t){for(;t.PW.length>0;){if(0===t.rW)return;var n=t.PW.peek();!0===Ba(t,n)&&(Wa(t),Da(t.BW,n))}}function za(t,n){var i=t.PW.peek();if("closed"===t.BW.wa){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.BW;if(!0===$a(i))for(;Ga(i)>0;)Da(i,Wa(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Ma(t,n,i),!(i.bytesFilled<i.elementSize)){Wa(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);xa(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,Da(t.BW,i),Fa(t)}}(t,n,i);Aa(t)}function Wa(t){var n=t.PW.shift();return La(t),n}function qa(t){t.jW=void 0,t.EW=void 0}function Ha(t,n){var i=t.BW;"readable"===i.wa&&(!function(t){La(t),t.PW=new Yh}(t),_c(t),qa(t),sv(i,n))}function Va(t){var n=t.BW.wa;return"errored"===n?null:"closed"===n?0:t.TW-t.rW}function Xa(t,n,i){var e=p.create(Oa.prototype);var r=Nh(n,"pull",0,[e]),o=Nh(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===ka(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.BW=t,n.OW=!1,n.xW=!1,n.zW=void 0,n.nW=n.rW=void 0,_c(n),n.LW=!1,n.vW=!1,n.TW=Dh(o),n.jW=e,n.EW=r,n.UW=u,n.PW=new Yh,t.iW=n,qh(Fh(i()),(function(){n.vW=!0,Aa(n)}),(function(t){Ha(n,t)}))}(t,e,(function(){return Ph(n,"start",[e])}),r,o,i,u)}function ja(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Ya(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Ka(t){var n=Lh((function(n,i){var e={Hd:n,Nx:i};t.ZV.QW.push(e)}));return n}function Ga(t){return t.ZV.QW.length}function $a(t){var n=t.ZV;return void 0!==n&&!!Ja(n)}var Za=function(){function t(t){if(!ev(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Na(t.iW))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(rv(t))throw new m("This stream has already been locked for exclusive reading by another reader");Gh(this,t),this.QW=new Yh}return p.defineProperty(t.prototype,"closed",{get:function(){return Ja(this)?this.zj:zh(Qa("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Ja(this)?void 0===this.XV?zh(Jh("cancel")):$h(this,t):zh(Qa("cancel"))},t.prototype.read=function(t){return Ja(this)?void 0===this.XV?zh(Jh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?zh(new m("view must have non-zero byteLength")):function(t,n){var i=t.XV;if(i.tW=!0,"errored"===i.wa)return zh(i.qV);return function(t,n){var i=t.BW,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.PW.length>0)return t.PW.push(o),Ka(i);if("closed"===i.wa)return Fh(Kh(new r(o.buffer,o.byteOffset,0),!0,i.ZV.HV));if(t.rW>0){if(!0===Ba(t,o)){var u=Ca(o);return Ua(t),Fh(Kh(u,!1,i.ZV.HV))}if(!0===t.LW){var s=new m("Insufficient bytes to fill elements in the given buffer");return Ha(t,s),zh(s)}}t.PW.push(o);var f=Ka(i);return Aa(t),f}(i.iW,n)}(this,t)):zh(new m("view must be an array buffer view")):zh(Qa("read"))},t.prototype.releaseLock=function(){if(!Ja(this))throw Qa("releaseLock");if(void 0!==this.XV){if(this.QW.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");Zh(this)}},t}();function Ja(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"QW")}function Qa(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var tv=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),iv(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),Xa(this,t,e=Dh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=Ch(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(la.prototype),o=Nh(n,"pull",0,[r]),u=Nh(n,"cancel",1,[]);Ea(t,r,(function(){return Ph(n,"start",[r])}),o,u,i,e)}(this,t,e=Dh(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===ev(this))throw fv("locked");return rv(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===ev(this)?zh(fv("cancel")):!0===rv(this)?zh(new m("Cannot cancel a stream that already has a reader")):ov(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===ev(this))throw fv("getReader");if(void 0===n)return oc(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Za(t);return i.HV=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===ev(this))throw fv("pipeThrough");if(!1===Rc(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===ev(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!ca(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===rv(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===Oc(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return jh(da(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===ev(this)?zh(fv("pipeTo")):!1===Rc(t)?zh(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||ca(u)?!0===rv(this)?zh(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===Oc(t)?zh(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):da(this,t,e,r,o,u):zh(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===ev(this))throw fv("tee");var t=function(t,n){var i,e,r,o,u,s=oc(t),f=!1,h=!1,c=!1,a=Lh((function(t){u=t}));function v(){return!0===f||(f=!0,jh(Xh(lc(s),(function(t){if(f=!1,!0===t.done)return!1===h&&pa(r.iW),void(!1===c&&pa(o.iW));var n=t.value,i=n,e=n;!1===h&&ya(r.iW,i),!1===c&&ya(o.iW,e)})))),Fh(void 0)}function d(){}return r=nv(d,v,(function(n){if(h=!0,i=n,!0===c){var r=Ih([i,e]),o=ov(t,r);u(o)}return a})),o=nv(d,v,(function(n){if(c=!0,e=n,!0===h){var r=Ih([i,e]),o=ov(t,r);u(o)}return a})),Vh(s.zj,(function(t){_a(r.iW,t),_a(o.iW,t)})),[r,o]}(this);return Ih(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===ev(this))throw fv("getIterator");return function(t,n){void 0===n&&(n=!1);var i=oc(t),e=p.create(bc);return e.eW=i,e.sW=Boolean(n),e}(this,i)},t}();function nv(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(tv.prototype);return iv(o),Ea(o,p.create(la.prototype),t,n,i,e,r),o}function iv(t){t.wa="readable",t.ZV=void 0,t.qV=void 0,t.tW=!1}function ev(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"iW")}function rv(t){return void 0!==t.ZV}function ov(t,n){return t.tW=!0,"closed"===t.wa?Fh(void 0):"errored"===t.wa?zh(t.qV):(uv(t),Xh(t.iW[ec](n),_h))}function uv(t){t.wa="closed";var n=t.ZV;void 0!==n&&(dc(n)&&(n.$V.forEach((function(t){t.Hd(Kh(void 0,!0,n.HV))})),n.$V=new Yh),ic(n))}function sv(t,n){t.wa="errored",t.qV=n;var i=t.ZV;void 0!==i&&(dc(i)?(i.$V.forEach((function(t){t.Nx(n)})),i.$V=new Yh):(i.QW.forEach((function(t){t.Nx(n)})),i.QW=new Yh),nc(i,n))}function fv(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof yh.asyncIterator&&p.defineProperty(tv.prototype,yh.asyncIterator,{value:tv.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 hv=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=Ch(e);if(void 0===r&&(r=1),r=Dh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=Ch(o);void 0===u&&(u=0),u=Dh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.FW;if(!0===t.dW){return Xh(t.YW,(function(){var e=t.GW;if("erroring"===e.wa)throw e.qV;return mv(i,n)}))}return mv(i,n)}(t,n)}function f(n){return function(t,n){return av(t,n),Fh(void 0)}(t,n)}function h(){return function(t){var n=t.VW,i=t.FW,e=i.WW();return bv(i),Xh(e,(function(){if("errored"===n.wa)throw n.qV;var t=n.iW;!0===Ta(t)&&pa(t)}),(function(i){throw av(t,i),n.qV}))}(t)}function c(){return function(t){return dv(t,!1),t.YW}(t)}function a(n){return vv(t,n),Fh(void 0)}t.GW=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(Ec.prototype);return kc(u),Xc(u,p.create(Vc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.VW=nv(u,c,a,r,o),t.dW=void 0,t.YW=void 0,t.HW=void 0,dv(t,!0),t.FW=void 0}(this,Lh((function(t){f=t})),r,s,u,h),function(t,n){var i=p.create(lv.prototype),e=function(t){try{return gv(i,t),Fh(void 0)}catch(t){return zh(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return Ah(r,n,[t,i])}}var o=Nh(n,"flush",0,[i]);!function(t,n,i,e){n.XW=t,t.FW=n,n.ZW=i,n.WW=e}(t,i,e,o)}(this,t);var c=Ph(t,"start",[this.FW]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===cv(this))throw yv("readable");return this.VW},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===cv(this))throw yv("writable");return this.GW},enumerable:!0,configurable:!0}),t}();function cv(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"FW")}function av(t,n){_a(t.VW.iW,n),vv(t,n)}function vv(t,n){bv(t.FW),Gc(t.GW.oW,n),!0===t.dW&&dv(t,!1)}function dv(t,n){void 0!==t.YW&&t.HW(),t.YW=Lh((function(n){t.HW=n})),t.dW=n}var lv=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===wv(this))throw pv("desiredSize");return Sa(this.XW.VW.iW)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===wv(this))throw pv("enqueue");gv(this,t)},t.prototype.error=function(t){if(!1===wv(this))throw pv("error");!function(t,n){av(t.XW,n)}(this,t)},t.prototype.terminate=function(){if(!1===wv(this))throw pv("terminate");!function(t){var n=t.XW,i=n.VW.iW;!0===Ta(i)&&pa(i);var e=new m("TransformStream terminated");vv(n,e)}(this)},t}();function wv(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"XW")}function bv(t){t.ZW=void 0,t.WW=void 0}function gv(t,n){var i=t.XW,e=i.VW.iW;if(!1===Ta(e))throw new m("Readable side is not in a state that permits enqueue");try{ya(e,n)}catch(t){throw vv(i,t),i.VW.qV}var r=function(t){return!0!==ga(t)}(e);r!==i.dW&&dv(i,!0)}function mv(t,n){return Xh(t.ZW(n),void 0,(function(n){throw av(t.XW,n),n}))}function pv(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function yv(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}function _v(t){return function(t){return new tv({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function Sv(t){return _v(function(t){return new E(t)}(t))}function Tv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new fu,o=function(){u();var t=new en;e.cancel(t).catch(Nt),r.Sx(t)},u=function(){i&&(i.Hf(o),i=void 0)};i&&(i.Wf?o():i.Xf(o));var s=[],f=function(t){return t.done?(u(),Q.resolve(s)):(s.push(t.value),Q.resolve(e.read()).then(f))};return Q.resolve(e.read()).then(f).then((function(t){u(),r.Tx(t)}),(function(t){u(),r.Sx(t)})),r.Ix}(t,n).then((function(t){return Kn(t).buffer}))}function Ev(t,n){var i=n,e=new hv,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.n_()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Nt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Nt)})),r}function Iv(t){return li(new E(t))}function kv(t){return wi(t).buffer}var Rv="content-type",Ov="text/plain;charset=UTF-8",Nv=function(){function t(){}var n=t.prototype;return n.uP=function(t){return this.ZE(t).then(JSON.parse)},n.QR=function(t,n){switch(t){case bh.lE:return this.NP(n);case bh.dE:return this.uP(n);case bh.fE:return this.qW();case bh.JM:return this.ZE(n);default:throw new m}},t}();function Pv(t,n,i){if(t instanceof Nv)return t;if(t instanceof tv)return function(t,n){return new Dv({hw:0,qW:t,uB:Av(n)})}(t,i);var e=Av(i),r=Q.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{hw:bh.JM,jE:t,uB:n||Ov};if(t instanceof ArrayBuffer||jn(t))return{hw:bh.lE,jE:Fv(t),uB:n};if(function(t){return gt(t)&&t.constructor&&t.constructor===p}(t)||bt(t))return{hw:bh.dE,jE:t,uB:n};throw new m("Unsupported BodyInit type")}return{hw:bh.JM,jE:null,uB:n}}(t,e)}));return new Dv({hw:1,Ix:r,KW:n})}function Av(t){return(t.get(Rv)||"").toLowerCase()}var Dv=function(t){function n(n){var i;return(i=t.call(this)||this).$W=!1,i.sH=new fu,i.sH.Ix.catch(Nt),i.oH(n),i}Bt(n,t);var i=n.prototype;return i.eH=function(){return this.sH.Ix},i.ZE=function(t){return this.nH(Cv,t)},i.uP=function(t){return this.nH(Bv,t)},i.NP=function(t){return this.nH(Uv,t)},i.qW=function(){return this.rH(function(t){return 0===t.hw?t.qW:Ev(t.Ix.then(Lv).then(Sv),t.KW)}(this.iH))},i.nH=function(t,n){if(this.$W)return Q.reject(new m("Already used"));this.$W=!0;var i=t(this.iH,n);return this.sH.r_(i.then(Nt)),i},i.rH=function(t){if(this.$W)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.$W=!0;var n=new hv,i=Q.resolve(t.pipeTo(n.writable));return this.sH.r_(i),n.readable},i.oH=function(t){this.iH=t,1===t.hw&&t.Ix.catch(Nt)},i.hH=function(){if(this.$W)throw new m("Already used");var t=function(t){if(0===t.hw){var n=Mt(t.qW.tee(),2),i=n[0],e=n[1];return[{hw:t.hw,qW:i,uB:t.uB},{hw:t.hw,qW:e,uB:t.uB}]}var r=Mt(t.KW.o_(),2),o=r[0],u=r[1];return[{hw:t.hw,Ix:t.Ix,KW:o},{hw:t.hw,Ix:t.Ix,KW:u}]}(this.iH),i=t[0],e=t[1];return this.oH(i),new n(e)},Dt(n,[{key:"JW",get:function(){return this.$W}},{key:"tH",get:function(){return 0===this.iH.hw}}]),n}(Nv);function Cv(t,n){return 0===t.hw?Tv(t.qW,n).then(Iv):(n&&t.KW.r_(n),un(t.Ix.then(xv),t.KW))}function xv(t){switch(t.hw){case bh.JM:return Q.resolve(t.jE||"");case bh.lE:return Q.resolve(t.jE).then(Iv);case bh.dE:return Q.resolve(t.jE).then(JSON.stringify)}}function Bv(t,n){return 0===t.hw?Cv(t,n).then(JSON.parse):(n&&t.KW.r_(n),un(t.Ix.then(Mv),t.KW))}function Mv(t){return t.hw===bh.dE?Q.resolve(t.jE):xv(t).then(JSON.parse)}function Uv(t,n){return 0===t.hw?Tv(t.qW,n):(n&&t.KW.r_(n),un(t.Ix.then(Lv),t.KW))}function Lv(t){switch(t.hw){case bh.lE:return Q.resolve(t.jE);case bh.JM:case bh.dE:return xv(t).then(kv)}}function Fv(t){return t instanceof ArrayBuffer?t:pi(gi(t)).buffer}var zv=function(t){function n(n){var i;return(i=t.call(this)||this).aH=n,i}Bt(n,t);var i=n.prototype;return i.eH=function(){return this.aH.eH()},i.ZE=function(t){return this.aH.ZE(t)},i.uP=function(t){return this.aH.uP(t)},i.NP=function(t){return this.aH.NP(t)},i.qW=function(t){return this.aH.qW(t)},i.hH=function(){return this.aH.hH()},Dt(n,[{key:"JW",get:function(){return this.aH.JW}},{key:"tH",get:function(){return this.aH.tH}}]),n}(Nv);var Wv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.OE,o=i.PE,u=i.eE,s=i.cP,f=i.uH):(r=[],o=bh.JM,u=200,s="OK",f=!1);var h=n.JD,c=new gh(n.OE||r),a=n.PE||o,v=n.qE||(i&&i.JD===h?i.qE:h.Iu),d=i?i.aH:null,l=Pv(void 0!==n.yp?n.yp:d,n.KW||new hn,c);return(e=t.call(this,l)||this).OE=c,e.JD=h,e.qE=v,e.PE=a,e.eE=void 0!==n.eE?n.eE:u,e.cP=void 0!==n.cP?String(n.cP):s,e.uH=n.uH||f,e}Bt(n,t);var i=n.prototype;return i.yp=function(t){return this.QR(this.PE,t)},i.gp=function(){return new n({yp:this.hH(),JD:this.JD},this)},n}(zv),qv=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Hv=function(t){return t.LE="same-origin",t._w="no-cors",t.xE="cors",t.CE="navigate",t}({}),Vv=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Iu;n?(i=n.jE,e=n.OE,r=n.RE,o=n.PE,u=n.sE,s=n.zE,f=n.Zf,h=n.hw,c=n.BE,a=n.UE,v=n.QE,d=n.FE,l=n.ew,w=n.YE,b=n.GE):(i=null,e={},r="GET",o=bh.JM,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Iu=y,this.jE=t.jE||i,this.OE=new gh(t.OE||e),this.RE=t.RE||r,this.PE=t.PE||o,this.sE=void 0!==t.sE?Number(t.sE)||0:u,this.zE=void 0!==t.zE?Number(t.zE)||0:s,this.Zf=t.Zf||f||(new hn).Zf,this.hw=t.hw||h,this.BE=t.BE||c,this.UE=t.UE||a,this.QE=void 0!==t.QE?Boolean(t.QE):v,this.FE=t.FE||d,this.ew=null!=(g=t.ew)?g:l,this.YE=null!=(m=t.YE)?m:w,this.GE=null!=(p=t.GE)?p:b},Xv=function(){function t(){}var n=t.prototype;return n.JD=function(t){var n=function(t){return new Wv({yp:null,OE:{},JD:t,qE:t.Iu,PE:t.PE,eE:0,cP:tu.Lb})}(new Vv(t));return Q.resolve(n)},n.CG=function(t){},n.gn=function(){},t}();var jv=function(){function t(t,n){void 0===n&&(n=!0),this.fH=t,this.gH=n}var n=t.prototype;return n.JD=function(t){var n=this.dH(t);return this.fH.JD(n)},n.CG=function(t){return this.fH.CG(this._H(t))},n.dH=function(n){var i=new Vv(n);if(!this.gH){var e=t.vH(i.Iu);i=new Vv({Iu:e},i)}return i},n._H=function(n){var i=n.Iu;return this.gH||(i=t.vH(i)),{Iu:i,jE:n.jE}},n.gn=function(){this.fH.gn()},t.vH=function(t){return Rt.wH&&Zn(t,"http://")?t.replace(":","s:"):t},Dt(t,null,[{key:"cH",get:function(){return t.lH||(t.lH=new t(new Xv)),t.lH}}]),t}();jv.lH=void 0;var Yv=function(t){return t.ZD="HttpOpenError",t.qD="HttpResponseError",t.KD="HttpTimeoutError",t}({}),Kv=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).$D=n,r}return Bt(n,t),Dt(n,[{key:"JD",get:function(){return this.$D}}]),n}(nn);var Gv=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Iu),i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Yv.ZD}}]),n}(Kv);var $v=function(t){function n(n,i,e){var r;return(r=t.call(this,n.JD,null!=e?e:function(t){return"Error while loading "+t.JD.Iu+", status code "+t.eE}(n),i)||this).iE=n,r}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Yv.qD}},{key:"tE",get:function(){return this.iE}}]),n}(Kv);var Zv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Iu+" timed out after "+t.sE+" seconds."}(n),i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Yv.KD}}]),n}(Kv),Jv=self.fetch,Qv=self.Request,td=self.Response,nd=self.Headers,id=self.ReadableStream,ed=self.AbortSignal,rd=self.AbortController,od=Pt((function(){try{return mt(Jv)&&pt(Qv)&&pt(td)&&pt(nd)&&"forEach"in nd.prototype&&Co()}catch(t){return!1}})),ud=["http:","https:"];var sd=Pt((function(){try{return od()&&pt(ed)&&pt(rd)&&"signal"in Qv.prototype}catch(t){return!1}})),fd=Pt((function(){try{return od()&&pt(id)&&"body"in td.prototype&&!Zi.Uk}catch(t){return!1}}));function hd(t,n){var i,e=t.OE.has("content-length")?Number(t.OE.get("content-length")):void 0;return i=t.tH?function(t,n,i){return t.pipeThrough(new hv(new cd(n,i)))}(t.qW(),n,e):function(t,n,i){return ad.apply(this,arguments)}(t.NP(),n,e),new Wv({yp:i,JD:t.JD},t)}var cd=function(){function t(t,n){this.vst=t,this.wst=n,this.c5=0}var n=t.prototype;return n.transform=function(t,n){this.c5+=t.byteLength,this.vst(this.c5,this.wst),n.enqueue(t)},n.flush=function(t){var n;this.vst(this.c5,null!=(n=this.wst)?n:this.c5)},t}();function ad(){return ad=ft((function(t,n,i){var e,r;return ht(this,(function(o){switch(o.label){case 0:return[4,Q.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]}}))})),ad.apply(this,arguments)}var vd=function(){function t(t){this.PO=new hn,this.iE=void 0,this.eS=0,this.pst=!1,this.$D=t,this.PO.r_(t.Zf),this.tE=this.mst()}var n=t.prototype;return n.mst=function(){var t=this;return ft((function(){var n,i,e,r,o,u,s,f,h;return ht(this,(function(c){switch(c.label){case 0:(n=t.$D).sE&&(t.eS=d((function(){t.pst=!0,t.PO.n_()}),n.sE),t.PO.Zf.i_((function(){l(t.eS)})));try{i=Jv(n.Iu,{method:n.RE,headers:n.OE._E(),body:n.jE,credentials:n.QE?"include":"same-origin",signal:wd(t.PO.Zf),mode:n.ew,keepalive:n.GE})}catch(t){throw new Gv(n,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i];case 2:return e=c.sent(),[3,4];case 3:throw r=c.sent(),rn(o=t.Ast(r))&&t.PO.n_(),o;case 4:if(u=e.url||n.Iu,s=0===e.status&&"file:"===function(t){return Rt.Ah(t).protocol}(u)?200:e.status,f=new dd(t,e,t.PO),!function(t){return t.eE>=200&&t.eE<=299||304===t.eE}(h=new Wv({yp:f,JD:n,PE:n.PE,OE:bd(e.headers),eE:s,cP:e.statusText,qE:u})))throw new $v(h);return n.FE&&(h=hd(h,n.FE)),[2,h]}}))}))()},n.Ast=function(t){return function(t){return t instanceof Kv}(t)?t:rn(t)?this.pst?new Zv(this.$D):new en(t.message,t):this.iE?new $v(this.iE,t):new Gv(this.$D,t)},t}(),dd=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).sH=new fu,r.Mst=n,r.yst=i,r.PO=e,r.sH.Ix.catch(Nt),r}Bt(n,t);var i=n.prototype;return i.eH=function(){return this.sH.Ix},i.ZE=function(t){return this.nH(this.yst.text(),t)},i.NP=function(t){return this.nH(this.yst.arrayBuffer(),t)},i.qW=function(){var t=this.yst.body;return t?this.rH(t):Ev(this.NP().then(Sv),this.PO)},i.hH=function(){var t=this.yst.clone(),i=Mt(this.PO.o_(),2),e=i[0],r=i[1];return this.PO=e,new n(this.Mst,t,r)},i.nH=function(t,n){var i=this;n&&this.PO.r_(n);var e=on(Q.resolve(t),this.PO.Zf).catch((function(t){throw i.Mst.Ast(t)}));return e=un(e,this.PO),this.sH.r_(e.then(Nt)),e},i.rH=function(t){var n=this;return new tv(new gd(t,(function(t){return n.Mst.Ast(t)}),this.PO,this.sH),{highWaterMark:0})},Dt(n,[{key:"JW",get:function(){return this.yst.bodyUsed}},{key:"tH",get:function(){return wt(this.yst.body)}}]),n}(Nv),ld="abort";function wd(t){if(sd()){var n=new rd;if(t.Wf)n.abort();else if(!t.Kf){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(ld,i),t.Hf(i),t.e_(e)};n.signal.addEventListener(ld,i),t.Xf(i),t.i_(e)}return n.signal}}function bd(t){if(function(t){return gt(t)&&"function"==typeof t.forEach}(t)){var n=new gh;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 gh(t)}var gd=function(){function t(t,n,i,e){this.bst=t,this.Tst=n,this.PO=i,this.sH=e}var n=t.prototype;return n.start=function(t){this.ZV=this.bst.getReader()},n.pull=function(t){var n=this;return ft((function(){var i,e,r;return ht(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,on(n.ZV.read(),n.PO.Zf)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.Tst(e),n.sH.Sx(r),n.PO.n_(),n.ZV.cancel(r).catch(Nt),t.error(r),[2];case 3:return i.done?(n.sH.Tx(),n.PO.n_(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.PO.n_(),this.sH.Sx(t),this.ZV.cancel(t)},t}(),md=function(){function t(t){var n=this;this.PO=new hn,this.iE=void 0,this.Sst=new fu,this.Cst=!1,this.xst=function(){var t;n.Ist(),null==(t=n.Nst)||t.abort()},this.$D=t,this.PO.r_(t.Zf),this.Nst=new I,this.mst()}var n=t.prototype;return n.mst=function(){var t=this,n=this.Nst,i=this.$D;if(i.Zf.Wf)return this.Ist();n.onreadystatechange=function(){return t.Dst()},n.onprogress=function(n){return t.vst(n)},n.onload=function(){return t.Est()},n.onloadend=function(){return t.kst()},n.onerror=function(){return t.jq()},n.ontimeout=function(){return t.Lst()},n.onabort=function(){return t.Ist()},n.open(i.RE,i.Iu,!0),n.withCredentials=Boolean(i.QE),"responseType"in n&&i.PE&&(i.PE===bh.JM?n.responseType="text":n.responseType="arraybuffer"),i.OE.forEach((function(t,i){n.setRequestHeader(i,t)})),i.sE&&(n.timeout=i.sE),this.PO.Zf.Xf(this.xst);var e=i.jE;e?n.send(e):n.send()},n.Dst=function(){var t=this.Nst;void 0!==t&&t.readyState>=2&&!this.Cst&&(this.Cst=!0,this.jst())},n.jst=function(){var t,n,i=this.Nst,e=function(t){var n=new gh,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.$D;this.Ost=new fu,this.iE=new Wv({JD:r,PE:r.PE,yp:this.Ost.Ix,eE:i.status,cP:i.statusText,OE:e,qE:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.Sst)||t.Tx(this.iE)},n.Est=function(){var t,n=this.Nst;if(void 0!==n){var i=n.response;if(!wt(i)){var e=this.$D.PE;i=e===bh.JM?n.responseText:e===bh.lE?new ArrayBuffer(0):{}}null==(t=this.Ost)||t.Tx(i)}},n.kst=function(){this.gn()},n.vst=function(t){void 0!==this.Nst&&(null==this.$D.FE||this.$D.FE.call(this.$D,t.loaded,t.lengthComputable?t.total:void 0))},n.jq=function(){var t=new g("Network request failed");this.iE?this.Ss(new $v(this.iE,t)):this.Ss(new Gv(this.$D,t))},n.Lst=function(){this.Ss(new Zv(this.$D))},n.Ist=function(){this.Ss(new en),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.Ost)?i:this.Sst)||n.Sx(t)},n.gn=function(){this.Nst=void 0,this.iE=void 0,this.Sst=void 0,this.Ost=void 0,this.PO.$f()},Dt(t,[{key:"tE",get:function(){return this.Sst.Ix}}]),t}();var pd=function(){function t(){}var n=t.prototype;return n.JD=function(t){return function(t){if(!od()||!function(t){try{return ud.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Iu))return!1;if(!fd()&&t.FE)return!1;if(!t.YE){if(Zi.hL&&Zi.Zk<=68)return!1;if(Zi.sL)return!1}return!0}(t)?new vd(t).tE:new md(t).tE},n.CG=function(t){var n=t.uB?{"Content-type":t.uB}:void 0;this.JD(new Vv({RE:qv.POST,Iu:t.Iu,jE:t.jE,OE:n,ew:Hv._w})).then((function(t){!function(t){t.then(Nt,Nt)}(t.NP())}),Nt)},n.gn=function(){},t}();var yd=function(t){return t[t.pD=1]="pD",t[t.yD=2]="yD",t[t.JM=3]="JM",t[t.MD=4]="MD",t[t.bD=9]="bD",t}({});var _d=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Bt(n,t),n}(nn),Sd=function(){function t(){}return t.prototype.zD=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new _d(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new _d;return new Nd(n)},t}(),Td=function(){function t(t){this.Rst=t}var n=t.prototype;return n.mD=function(t){return this.Rst.isEqualNode(t.Rst)},n.ND=function(n){return new t(this.Rst.cloneNode(n))},Dt(t,[{key:"TD",get:function(){return yd.yD}},{key:"PD",get:function(){var t;return null!=(t=this.Rst.localName)?t:Dd(this.Rst.nodeName)}},{key:"l",get:function(){return this.Rst.nodeName}},{key:"Pst",get:function(){var t;return null!=(t=this.Rst.namespaceURI)?t:void 0}},{key:"zst",get:function(){var t;return null!=(t=this.Rst.prefix)?t:void 0}},{key:"NM",get:function(){return this.Rst.nodeValue}}]),t}(),Ed=function(){function t(t){this.Bst=void 0,this.Ust=t}var n=t.prototype;return n.OD=function(t){return this.FD.filter((function(n){return Pd(n)&&n.IP===t}))},n.jD=function(t,n){return this.FD.filter((function(i){return Pd(i)&&i.PD===n&&i.Pst===t}))},n.YD=function(t){this.Ust.appendChild(t.cD),this.Bst&&this.Bst.push(t)},n.mD=function(t){return this.Ust.isEqualNode(t.cD)},Dt(t,[{key:"FD",get:function(){return void 0===this.Bst&&(this.Bst=function(t){for(var n=[],i=0;i<t.length;i++){var e=Ad(t.item(i));e&&n.push(e)}return n}(this.Ust.childNodes)),this.Bst}},{key:"m",get:function(){return this.FD.filter(Pd)}},{key:"cD",get:function(){return this.Ust}}]),t}(),Id=function(t){function n(n){return t.call(this,n)||this}Bt(n,t);var i=n.prototype;return i.UD=function(t){if(this.Ust.hasAttribute(t))return this.Ust.getAttribute(t)},i.QD=function(t,n){if(this.Ust.hasAttributeNS(t,n))return this.Ust.getAttributeNS(t,n)},i.LD=function(t){this.Ust.removeAttribute(t)},i.Qst=function(t,n){this.Ust.removeAttributeNS(t,n)},i.Fst=function(t,n){this.Ust.setAttribute(t,n)},i.Yst=function(t,n,i){this.Ust.setAttributeNS(t,n,i)},i.ND=function(t){return new n(this.Ust.cloneNode(t))},Dt(n,[{key:"TD",get:function(){return yd.pD}},{key:"PD",get:function(){var t;return null!=(t=this.Ust.localName)?t:Dd(this.Ust.nodeName)}},{key:"Pst",get:function(){var t;return null!=(t=this.Ust.namespaceURI)?t:void 0}},{key:"zst",get:function(){var t;return null!=(t=this.Ust.prefix)?t:void 0}},{key:"IP",get:function(){return this.Ust.nodeName}},{key:"RD",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Td(t.item(i)));return n}(this.Ust.attributes)}},{key:"AP",get:function(){return this.Ust.textContent}}]),n}(Ed),kd=function(){function t(t){this.Ust=t}return t.prototype.mD=function(t){return this.yp===t.yp},Dt(t,[{key:"yp",get:function(){return this.Ust.nodeValue}},{key:"cD",get:function(){return this.Ust}}]),t}(),Rd=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ND=function(t){return new n(this.Ust.cloneNode(t))},Dt(n,[{key:"TD",get:function(){return yd.JM}}]),n}(kd),Od=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ND=function(t){return new n(this.Ust.cloneNode(t))},Dt(n,[{key:"TD",get:function(){return yd.MD}}]),n}(kd),Nd=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ND=function(t){return new n(this.Ust.cloneNode(t))},Dt(n,[{key:"TD",get:function(){return yd.bD}},{key:"BD",get:function(){return new Id(this.Ust.documentElement)}}]),n}(Ed);function Pd(t){return function(t){return 1===t.TD}(t)}function Ad(t){switch(t.nodeType){case yd.pD:return new Id(t);case yd.JM:return new Rd(t);case yd.MD:return new Od(t)}}function Dd(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Cd=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Gst=void 0,n.Wst=fd(),n.Hst=Zi.OL||Zi.Uk,n.Xst=(Zi.OL||Zi.hL&&Zi.Zk<=68||Zi.Uk)&&!(Zi.sL&&Zi.rL<3),n.tnt=void 0,n.int=new Sd,n}return Bt(n,t),n.prototype.zD=function(t){return this.int.zD(t)},Dt(n,[{key:"ast",get:function(){return this.Gst||(this.Gst=new Qo(ch())),this.Gst}},{key:"Vst",get:function(){return this.Wst}},{key:"u1",get:function(){return this.Hst}},{key:"N1",get:function(){return this.Xst}},{key:"Zst",get:function(){return!1}},{key:"lz",get:function(){return vh.FF()}},{key:"qst",get:function(){return{Kst:wh}}},{key:"Jst",get:function(){return v.connection&&v.connection.effectiveType||"default"}},{key:"$st",get:function(){return v.connection&&v.connection.type||"unknown"}},{key:"ER",get:function(){return this.tnt||(this.tnt=new jv(new pd)),this.tnt}}]),n}(Ao);Ot(new Cd),Ot(new Cd);var xd=self;xd.addEventListener("install",(function(t){t.waitUntil(xd.skipWaiting())})),xd.addEventListener("activate",(function(t){t.waitUntil(xd.clients.claim())})),Li.TR.ur(xd)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|
|
30
|
+
!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,E=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function k(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,i=function(t){return"ul"+t},e=(n=function(t){return"ul"+t+"_"+ ++h}).for("Symbol.iterator"),r=n.for("Symbol.dispose"),o=n.for("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o);var R=d;function O(t){return Boolean(t&&void 0!==t.length)}function N(){}function P(t){if(!(this instanceof P))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.wa=0,this.ttn=!1,this.oTt=void 0,this.ntn=[],M(t,this)}function A(t,n){for(;3===t.wa;)t=t.oTt;0!==t.wa?(t.ttn=!0,P.itn((function(){var i=1===t.wa?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.oTt)}catch(t){return void C(n.promise,t)}D(n.promise,e)}else(1===t.wa?D:C)(n.promise,t.oTt)}))):t.ntn.push(n)}function D(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":k(n))||"function"==typeof n)){var i=n.then;if(n instanceof P)return t.wa=3,t.oTt=n,void x(t);if("function"==typeof i)return void M(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.wa=1,t.oTt=n,x(t)}catch(n){C(t,n)}}function C(t,n){t.wa=2,t.oTt=n,x(t)}function x(t){2===t.wa&&0===t.ntn.length&&P.itn((function(){t.ttn||P.rtn(t.oTt)}));for(var n=0,i=t.ntn.length;n<i;n++)A(t,t.ntn[n]);t.ntn=null}function B(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function M(t,n){var i=!1;try{t((function(t){i||(i=!0,D(n,t))}),(function(t){i||(i=!0,C(n,t))}))}catch(t){if(i)return;i=!0,C(n,t)}}P.prototype.catch=function(t){return this.then(null,t)},P.prototype.then=function(t,n){var i=new this.constructor(N);return A(this,new B(t,n,i)),i},P.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)}))}))},P.all=function(t){return new P((function(n,i){if(!O(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":k(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])}))},P.allSettled=function(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":k(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":k(i))||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,(function(n){o(t,n)}),(function(i){e[t]={status:"rejected",reason:i},0==--r&&n(e)}))}e[t]={status:"fulfilled",value:i},0==--r&&n(e)}for(var u=0;u<e.length;u++)o(u,e[u])}))},P.resolve=function(t){return t&&"object"===(void 0===t?"undefined":k(t))&&t.constructor===P?t:new P((function(n){n(t)}))},P.reject=function(t){return new P((function(n,i){i(t)}))},P.race=function(t){return new P((function(n,i){if(!O(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)P.resolve(t[e]).then(n,i)}))},P.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){R(t,0)},P.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var U=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),L=v?v.userAgent:"",F=L.match(/Firefox\/([0-9]+)/i),z=null!=F,W=F?Number(F[1]):0,q=L.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),H=null!=q,V=q?Number(q[3]):0,X=function(){function t(t){this.Px=0,this.YV=0,this.TC=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.YV+n&this.etn-1;this.TC[i]=t,this.Px=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.YV+n-1,e=this.etn-1;this.TC[i&e]=t,this.Px=n}},t.prototype.shift=function(){var t=this.YV,n=this.TC[t];return this.TC[t]=void 0,this.YV=t+1&this.etn-1,this.Px--,n},t.prototype.length=function(){return this.Px},t.prototype.stn=function(t){this.etn<t&&this.otn(this.etn<<1)},t.prototype.otn=function(t){var n=this.etn;this.etn=t;var i=this.YV+this.Px&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.TC,0,n,i)},t}();var j="unhandledrejection",Y=self.PromiseRejectionEvent,K=self.CustomEvent;function G(t){return new Y(j,{reason:t,promise:U.reject(t).catch((function(){})),cancelable:!0})}function $(t){var n=new K(j,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function Z(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(j,!1,!0,{reason:t}),n}var J,Q,tt,nt,it,et,rt,ot,ut=function(t){return ut=function(){try{var t=U.resolve(),n="error",i=new Y(j,{reason:n,promise:t});return j===i.type&&n===i.reason}catch(t){}return!1}()?G:function(){try{var t="error",n=new K(j,{detail:{reason:t}});return j===n.type&&t===n.detail.reason}catch(t){}return!1}()?$:Z,ut(t)};function st(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):Q.resolve(f).then(e,r)}function ft(t){return function(){var n=this,i=arguments;return new Q((function(e,r){var o=t.apply(n,i);function u(t){st(o,e,r,u,s,"next",t)}function s(t){st(o,e,r,u,s,"throw",t)}u(void 0)}))}}function ht(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}U&&!(z&&W<60||H&&V<15)?Q=U:(Q=P,rt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=U;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:P.itn,tt=rt,nt=new X(16),it=!1,(ot={X4:function(t){nt.push(t),it||(it=!0,tt(et))},DG:et=function(){for(;nt.length()>0;)nt.shift()();it=!1}}).DG,P.itn=ot.X4,P.rtn=function(t){try{var n=ut(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d((function(){throw new g("Unhandled promise rejection: ".concat(t))}),0)});var ct="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};function at(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 vt(t,n){if(t){if("string"==typeof t)return at(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?at(t,n):void 0}}function dt(t){return function(t){if(Array.isArray(t))return at(t)}(t)||function(t){if(void 0!==n&&null!=t[e]||null!=t["@@iterator"])return Array.from(t)}(t)||vt(t)||function(){throw new m("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var lt={}.toString;function wt(t){return null!=t}var bt=Array.isArray||function(t){return"[object Array]"===lt.call(t)};function gt(t){return"object"===(void 0===t?"undefined":k(t))&&null!==t}function mt(t){return"function"==typeof t}function pt(t){return mt(t)||gt(t)}var yt=9007199254740991,_t=(y.pow(2,-52),Array.prototype.find,Array.prototype.findLast,"function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1}),St="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 Tt(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 Et(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 It(t,n){return-1!==t.indexOf(n)}function kt(t){t.length=0}var Rt;Array.prototype.flat,Array.prototype.flatMap;function Ot(t){Rt=t}var Nt=function(){};function Pt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function At(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Dt(t,n,i){return n&&At(t.prototype,n),i&&At(t,i),t}var Ct=function(t){return t.qM="audio",t.KM="video",t.HD="metadata",t}({});function xt(t,n){return xt=p.setPrototypeOf||function(t,n){return t.__proto__=n,t},xt(t,n)}function Bt(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&xt(t,n)}function Mt(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var r=null==t?null:void 0!==n&&t[e]||t["@@iterator"];if(null!=r){var o,u,s=[],f=!0,h=!1;try{for(r=r.call(t);!(f=(o=r.next()).done)&&(s.push(o.value),!i||s.length!==i);f=!0);}catch(t){h=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(h)throw u}}return s}}(t,i)||vt(t,i)||function(){throw new m("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ut(){var t=p.create(null);return t.Uf=void 0,delete t.Uf,t}function Lt(){return new zt}var Ft="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,zt=Ft||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=Ut(),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=Ut(),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}()}();Ft||function(){var t=function(){function t(t,n){this.Qf=t,this.Ff=n}return t.prototype.next=function(){var t=this.Qf.next();return t.done?t:{value:this.Ff(t.value),done:!1}},t}();(function(){function n(){this.$d=Lt()}var i=n.prototype;i.get=function(t){return this.$d.get(""+t)},i.set=function(t,n){return this.$d.set(""+t,n),this},i.has=function(t){return this.$d.has(""+t)},i.delete=function(t){return this.$d.delete(""+t)},i.clear=function(){this.$d.clear()},i.keys=function(){return new t(this.$d.keys(),(function(t){return Number(t)}))},i.values=function(){return this.$d.values()},i.entries=function(){return new t(this.$d.entries(),(function(t){var n=Mt(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.$d.forEach((function(n,i){t(n,Number(i))}))},Dt(n,[{key:"size",get:function(){return this.$d.size}}])})()}();var Wt=function(t){return t.mE="#EXTINF",t.pRt="#EXT-X-MAP",t.i="#EXTM3U",t.p="#EXT-X-VERSION",t.en="#EXT-X-TARGETDURATION",t.xbt="#EXT-X-START",t.ui="#EXT-X-INDEPENDENT-SEGMENTS",t.fE="#EXT-X-STREAM-INF",t.li="#EXT-X-MEDIA-SEQUENCE",t.vr="#EXT-X-ENDLIST",t.if="#EXT-X-MEDIA",t.sf="#EXT-X-DISCONTINUITY",t.ff="#EXT-X-DISCONTINUITY-SEQUENCE",t.af="#EXT-X-PLAYLIST-TYPE",t.tv="#EXT-X-KEY",t}({}),qt=function(){function t(t,n){this.hw="#EXTINF",this.nv=t,this.ev=n}return t.prototype.Gw=function(){return this.hw+":"+this.nv+",\n"+this.ev},t}(),Ht=function(){function t(t){this.hw="#EXT-X-MAP",this.ev=t}return t.prototype.Gw=function(){return this.hw+':URI="'+this.ev+'"'},t}(),Vt=function(){function t(){this.hw="#EXTM3U"}return t.prototype.Gw=function(){return this.hw},t}(),Xt=function(){function t(t){this.hw="#EXT-X-VERSION",this.Zp=t}return t.prototype.Gw=function(){return this.hw+":"+this.Zp},t}(),jt=function(){function t(t){this.hw="#EXT-X-TARGETDURATION",this.cRt=t}return t.prototype.Gw=function(){return this.hw+":"+this.cRt},t}(),Yt=function(){function t(t){this.hw="#EXT-X-START",this.lPt=t}return t.prototype.Gw=function(){return this.hw+":TIME-OFFSET="+this.lPt},t}(),Kt=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.hw="#EXT-X-KEY"}return t.prototype.Gw=function(){return this.hw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Gt=function(){function t(t){this.hw="#EXT-X-STREAM-INF",this.Ez=1,this.ev=t}return t.prototype.Gw=function(){return this.hw+":BANDWIDTH="+this.Ez+',AUDIO="audio"\n'+this.ev},t}(),$t=function(){function t(t){this.hw="#EXT-X-MEDIA-SEQUENCE",this.dM=t}return t.prototype.Gw=function(){return this.hw+":"+this.dM},t}(),Zt=function(){function t(t){this.hw="#EXT-X-MEDIA",this.ev=t}return t.prototype.Gw=function(){var t=Lt();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.hw+":"+n.join(",")},t}(),Jt=function(){function t(t){this.rC=[],this.rC=t}var n=t.prototype;return n.BA=function(){return this.rC},n.sv=function(t){this.rC.push(t)},n.zBt=function(){for(var t="",n=0,i=this.BA();n<i.length;n++){t+=i[n].Gw()+"\n"}return t},n.$f=function(){this.rC.length=0},t}(),Qt=function(t){function n(n,i){var e;return e=t.call(this,[new Vt,new Xt(8)])||this,i&&e.sv(new Gt("video/index.m3u8")),n&&e.sv(new Zt("audio/index.m3u8")),e}return Bt(n,t),n}(Jt),tn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(tn.prototype=p.create(g.prototype)).constructor=tn;var nn=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(tn),en=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(nn);function rn(t){return t instanceof g&&"AbortError"===t.name}function on(t,n){return n?new Q((function(i,e){if(n.Wf)return t.catch(Nt),e(new en);var r=function(){n.Hf(r),e(new en)};n.Xf(r),t.then((function(t){n.Hf(r),i(t)}),(function(t){n.Hf(r),e(t)}))})):t}function un(t,n){return sn.apply(this,arguments)}function sn(){return sn=ft((function(t,n){var i,e;return ht(this,(function(u){switch(u.label){case 0:i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),function(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new m("Object expected.");var e,u;if(i){if(!o)throw new m("Symbol.asyncDispose is not defined.");e=n[o]}if(void 0===e){if(!r)throw new m("Symbol.dispose is not defined.");e=n[r],i&&(u=e)}if("function"!=typeof e)throw new m("Object not disposable.");u&&(e=function(){try{u.call(this)}catch(t){return Q.reject(t)}}),t.stack.push({value:n,dispose:e,async:i})}else i&&t.stack.push({async:!0});return n}(i,n,!1),[4,t];case 2:return[2,u.sent()];case 3:return e=u.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return function(t){function n(n){t.error=t.hasError?new ct(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,e=0;(function r(){for(;i=t.stack.pop();)try{if(!i.async&&1===e)return e=0,t.stack.push(i),Q.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,Q.resolve(o).then(r,(function(t){return n(t),r()}))}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?Q.reject(t.error):Q.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}}))})),sn.apply(this,arguments)}var fn=function(){function t(){this.Wf=!1,this.Kf=!1,this.Jf=[],this.t_=[]}var n=t.prototype;return n.qf=function(){if(!this.Wf&&!this.Kf){this.Wf=!0;for(var t=0,n=this.Jf.slice();t<n.length;t++){(0,n[t])()}this.$f()}},n.$f=function(){if(!this.Kf){this.Kf=!0;for(var t=0,n=this.t_.slice();t<n.length;t++){(0,n[t])()}kt(this.Jf),kt(this.t_)}},n.Xf=function(t){this.Kf||this.Jf.push(t)},n.Hf=function(t){this.Kf||Tt(this.Jf,t)},n.i_=function(t){this.Kf||this.t_.push(t)},n.e_=function(t){this.Kf||Tt(this.t_,t)},t}(),hn=function(){function t(){this.s_=new fn}var n=t.prototype;return n.n_=function(){this.s_.qf()},n.$f=function(){this.s_.$f()},n.r_=function(t){var n=this.s_;if(!n.Wf)if(t.Wf)n.qf();else if(!n.Kf&&!t.Kf){var i=function(){e(),n.qf()},e=function(){t.Hf(i),t.e_(e),n.Hf(i),n.e_(e)};t.Xf(i),t.i_(e),n.Xf(i),n.i_(e)}},n.o_=function(){var n=new t,i=new t,e=n.Zf,r=i.Zf,o=this.s_,u=function(){e.Wf&&r.Kf||r.Wf&&e.Kf?o.qf():e.Kf&&r.Kf&&o.$f()};e.Xf(u),r.Xf(u),e.i_(u),r.i_(u),n.r_(o),i.r_(o);return o.i_((function(){e.Hf(u),r.Hf(u),e.e_(u),r.e_(u)})),[n,i]},n[r]=function(){this.n_()},t.h_=function(n){for(var i=new t,e=0;e<n.length;e++){var r=n[e];void 0!==r&&i.r_(r)}return i},Dt(t,[{key:"Zf",get:function(){return this.s_}}]),t}();Q.resolve();function cn(t,n){return new Q((function(i,e){if(void 0!==n&&n.Wf)e(new en);else{var r=Rt.Vf((function(){void 0!==n&&n.Hf(o),i()}),t),o=function(){Rt.Gf(r),e(new en)};void 0!==n&&n.Xf(o)}}))}var an=function(){function t(t){var n=this;this.zO=[],this.BO=void 0,this.PO=new hn,this.UO=function(){return 0===n.zO.length?n.FO?vn(n.FO,n.PO.Zf).then(n.YO,n.YO):n.YO():n.zO.shift()().then(n.UO)},this.YO=function(){if(0!==n.zO.length)return n.UO();n.BO=void 0},this.FO=t}var n=t.prototype;return n.RO=function(t,n){var i=this;return new Q((function(e){var r=hn.h_([i.PO.Zf,n]),o=function(){r.$f()};i.zO.push((function(){var n=vn(t,r.Zf);return e(n),n.then(o,o)})),i.BO||(i.BO=i.UO())}))},n.n_=function(){return this.QO(!0)},n.gn=function(){return this.FO=void 0,this.QO(!1)},n.QO=function(t){var n=this.BO;return this.PO.n_(),t&&(this.PO=new hn),Q.resolve(n)},t}();function vn(t,n){return new Q((function(i){return i(t(n))}))}var dn=function(t){return t.k7="HELLO",t.L7="HI_THERE",t.x7="INITIALIZE",t.C7="APPEND_INIT",t.j7="APPEND_DATA",t.O7="ACK",t.R7="REMOVE",t.P7="DESTROY_SESSION",t}({}),ln=null;try{ln=new WebAssembly.Instance(new WebAssembly.Module(new E([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(tt){}function wn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function bn(t){return!0===(t&&t.vp)}function gn(t){var n=y.clz32(t&-t);return t?31-n:n}wn.prototype.vp,p.defineProperty(wn.prototype,"vp",{value:!0}),wn.isLong=bn;var mn={},pn={};function yn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=pn[t])?e:(i=Sn(t,0,!0),r&&(pn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=mn[t])?e:(i=Sn(t,t<0?-1:0,!1),r&&(mn[t]=i),i)}function _n(t,n){if(T(t))return n?An:Pn;if(n){if(t<0)return An;if(t>=Rn)return Mn}else{if(t<=-On)return Un;if(t+1>=On)return Bn}return t<0?_n(-t,n).neg():Sn(t%kn|0,t/kn|0,n)}function Sn(t,n,i){return new wn(t,n,i)}wn.fromInt=yn,wn.fromNumber=_n,wn.fromBits=Sn;var Tn=y.pow;function En(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?An:Pn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw g("interior hyphen");if(0===e)return En(t.substring(1),n,i).neg();for(var r=_n(Tn(i,8)),o=Pn,u=0;u<t.length;u+=8){var s=y.min(8,t.length-u),f=_(t.substring(u,u+s),i);if(s<8){var h=_n(Tn(i,s));o=o.mul(h).add(_n(f))}else o=(o=o.mul(r)).add(_n(f))}return o.unsigned=n,o}function In(t,n){return"number"==typeof t?_n(t,n):"string"==typeof t?En(t,n):Sn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}wn.fromString=En,wn.fromValue=In;var kn=4294967296,Rn=kn*kn,On=Rn/2,Nn=yn(1<<24),Pn=yn(0);wn.ZERO=Pn;var An=yn(0,!0);wn.UZERO=An;var Dn=yn(1);wn.ONE=Dn;var Cn=yn(1,!0);wn.UONE=Cn;var xn=yn(-1);wn.NEG_ONE=xn;var Bn=Sn(-1,2147483647,!1);wn.MAX_VALUE=Bn;var Mn=Sn(-1,-1,!0);wn.MAX_UNSIGNED_VALUE=Mn;var Un=Sn(0,-2147483648,!1);wn.MIN_VALUE=Un;var Ln=wn.prototype;Ln.toInt=function(){return this.unsigned?this.low>>>0:this.low},Ln.toNumber=function(){return this.unsigned?(this.high>>>0)*kn+(this.low>>>0):this.high*kn+(this.low>>>0)},Ln.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Un)){var n=_n(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=_n(Tn(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}},Ln.getHighBits=function(){return this.high},Ln.getHighBitsUnsigned=function(){return this.high>>>0},Ln.getLowBits=function(){return this.low},Ln.getLowBitsUnsigned=function(){return this.low>>>0},Ln.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Un)?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},Ln.isZero=function(){return 0===this.high&&0===this.low},Ln.eqz=Ln.isZero,Ln.isNegative=function(){return!this.unsigned&&this.high<0},Ln.isPositive=function(){return this.unsigned||this.high>=0},Ln.isOdd=function(){return 1==(1&this.low)},Ln.isEven=function(){return 0==(1&this.low)},Ln.equals=function(t){return bn(t)||(t=In(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Ln.eq=Ln.equals,Ln.notEquals=function(t){return!this.eq(t)},Ln.neq=Ln.notEquals,Ln.ne=Ln.notEquals,Ln.lessThan=function(t){return this.comp(t)<0},Ln.lt=Ln.lessThan,Ln.lessThanOrEqual=function(t){return this.comp(t)<=0},Ln.lte=Ln.lessThanOrEqual,Ln.le=Ln.lessThanOrEqual,Ln.greaterThan=function(t){return this.comp(t)>0},Ln.gt=Ln.greaterThan,Ln.greaterThanOrEqual=function(t){return this.comp(t)>=0},Ln.gte=Ln.greaterThanOrEqual,Ln.ge=Ln.greaterThanOrEqual,Ln.compare=function(t){if(bn(t)||(t=In(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},Ln.comp=Ln.compare,Ln.negate=function(){return!this.unsigned&&this.eq(Un)?Un:this.not().add(Dn)},Ln.neg=Ln.negate,Ln.add=function(t){bn(t)||(t=In(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,Sn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},Ln.subtract=function(t){return bn(t)||(t=In(t)),this.add(t.neg())},Ln.sub=Ln.subtract,Ln.multiply=function(t){if(this.isZero())return this;if(bn(t)||(t=In(t)),ln)return Sn(ln.mul(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned);if(t.isZero())return this.unsigned?An:Pn;if(this.eq(Un))return t.isOdd()?Un:Pn;if(t.eq(Un))return this.isOdd()?Un:Pn;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(Nn)&&t.lt(Nn))return _n(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,Sn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},Ln.mul=Ln.multiply,Ln.divide=function(t){if(bn(t)||(t=In(t)),t.isZero())throw g("division by zero");var n,i,e;if(ln)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Sn((this.unsigned?ln.div_u:ln.div_s)(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?An:Pn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return An;if(t.gt(this.shru(1)))return Cn;e=An}else{if(this.eq(Un))return t.eq(Dn)||t.eq(xn)?Un:t.eq(Un)?Dn:(n=this.shr(1).div(t).shl(1)).eq(Pn)?t.isNegative()?Dn:xn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Un))return this.unsigned?An:Pn;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=Pn}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:Tn(2,r-48),u=_n(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=_n(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=Dn),e=e.add(u),i=i.sub(s)}return e},Ln.div=Ln.divide,Ln.modulo=function(t){return bn(t)||(t=In(t)),ln?Sn((this.unsigned?ln.rem_u:ln.rem_s)(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Ln.mod=Ln.modulo,Ln.rem=Ln.modulo,Ln.not=function(){return Sn(~this.low,~this.high,this.unsigned)},Ln.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Ln.clz=Ln.countLeadingZeros,Ln.countTrailingZeros=function(){return this.low?gn(this.low):gn(this.high)+32},Ln.ctz=Ln.countTrailingZeros,Ln.and=function(t){return bn(t)||(t=In(t)),Sn(this.low&t.low,this.high&t.high,this.unsigned)},Ln.or=function(t){return bn(t)||(t=In(t)),Sn(this.low|t.low,this.high|t.high,this.unsigned)},Ln.xor=function(t){return bn(t)||(t=In(t)),Sn(this.low^t.low,this.high^t.high,this.unsigned)},Ln.shiftLeft=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Sn(0,this.low<<t-32,this.unsigned)},Ln.shl=Ln.shiftLeft,Ln.shiftRight=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Sn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Ln.shr=Ln.shiftRight,Ln.shiftRightUnsigned=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Sn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Ln.shru=Ln.shiftRightUnsigned,Ln.shr_u=Ln.shiftRightUnsigned,Ln.rotateLeft=function(t){var n;return bn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Sn(this.high,this.low,this.unsigned):t<32?(n=32-t,Sn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Sn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},Ln.rotl=Ln.rotateLeft,Ln.rotateRight=function(t){var n;return bn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Sn(this.high,this.low,this.unsigned):t<32?(n=32-t,Sn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Sn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},Ln.rotr=Ln.rotateRight,Ln.toSigned=function(){return this.unsigned?Sn(this.low,this.high,!1):this},Ln.toUnsigned=function(){return this.unsigned?this:Sn(this.low,this.high,!0)},Ln.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Ln.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]},Ln.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]},wn.fromBytes=function(t,n,i){return i?wn.fromBytesLE(t,n):wn.fromBytesBE(t,n)},wn.fromBytesLE=function(t,n){return new wn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},wn.fromBytesBE=function(t,n){return new wn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Fn=wn;function zn(){return Date.now()||(new Date).getTime()}Fn.fromNumber(yt);var Wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),qn=16383;function Hn(t,n,i){return Wn[t>>2]+Wn[(3&t)<<4|n>>4]+Wn[(15&n)<<2|i>>6]+Wn[63&i]}function Vn(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Hn(t[r],t[r+1],t[r+2]));return e.join("")}var Xn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],jn=ArrayBuffer.isView||function(t){return t&&It(Xn,lt.call(t))};function Yn(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(mi(t),mi(n))}function Kn(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new E(n),e=0,r=0;r<t.length;r++){var o=t[r];i.set(o,e),e+=o.byteLength}return i}(t,n)}function Gn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=qn)e.push(Vn(t,o,y.min(r,o+qn)));if(1===i){var u=t[n-1];e.push(Wn[u>>2]+Wn[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Wn[s>>2]+Wn[(3&s)<<4|f>>4]+Wn[(15&f)<<2]+"=")}return e.join("")}(new E(t))}var $n=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.fp=function(t){this.Hu+=t},n._p=function(t){this.Hu=t},n.gp=function(){return new t(this.Lu)},Dt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}();String.prototype.replaceAll;var Zn="function"==typeof String.prototype.startsWith?function(t,n){return wt(t)&&t.startsWith(n)}:function(t,n){return wt(t)&&t.substr(0,n.length)===n},Jn=(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}),Qn=(String.prototype.padStart,String.prototype.padEnd,16384),ti="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Qn?(n=String).fromCodePoint.apply(n,dt(t)):ii(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 ni(n)};function ni(t){var n;return t.length<=Qn?(n=String).fromCharCode.apply(n,dt(t)):ii(t,String.fromCharCode)}function ii(t,n){for(var i=[],e=0;e<t.length;e+=Qn)i.push(n.apply(void 0,dt(t.slice(e,e+Qn))));return i.join("")}function ei(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ri(t,n){return t>>n&63|128}function oi(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(ei(t),n.push(t>>12&15|224),n.push(ri(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ri(t,12)),n.push(ri(t,6))),n.push(63&t|128)):n.push(t)}function ui(t,n){if(n.Lu>=t.length)throw new g("Invalid byte index");var i=255&t[n.Lu];if(n.fp(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function si(t,n){var i=n.Lu;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.fp(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|ui(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|ui(t,n)<<6|ui(t,n);if(o>=2048)return ei(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|ui(t,n)<<12|ui(t,n)<<6|ui(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}var fi=65279;function hi(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Lu,i);return n.fp(2),e}function ci(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Lu,i,e),n.fp(2)}function ai(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Lu,i,e),n.fp(4)}function vi(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){ci(t,n,i.charCodeAt(o),e)}}function di(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Lu+2<=t.byteLength;){var o=hi(t,n,i);if(e&&!o)break;r.push(o)}return ni(r)}(bi(t),new _i,n,!1)}function li(t){return function(t){return ti(t)}(function(t,n){var i,e=[],r=new _i;if(!n){if(!1===(i=si(t,r)))return e;i===fi||e.push(i)}for(;!1!==(i=si(t,r));)e.push(i);return e}(gi(t)))}function wi(t){return new E(function(t){for(var n=[],i=0;i<t.length;i++)oi(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 bi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function gi(t){return new E(t.buffer,t.byteOffset,t.byteLength)}function mi(t){return t instanceof ArrayBuffer?new E(t):gi(t)}function pi(t){if(t.slice)return t.slice(0);var n=new E(t.byteLength);return n.set(t,0),n}var yi,_i=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.fp=function(t){this.Hu+=t},n._p=function(t){this.Hu=t},n.gp=function(){return new t(this.Lu)},n.pp=function(){return new $n(this.Lu<<3)},Dt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}(),Si=new Array(256);for(yi=0;yi<256;yi+=1)Si[yi]=(yi<16?"0":"")+yi.toString(16);function Ti(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*y.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function Ei(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 Ii=function(){function t(t){var n=this;this.u_=Ut(),this.d_=void 0,this.c_=0,this.Ds=function(t){n.yo(t)},this.f_=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.a_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.a_(e,n)}},n.a_=function(t,n){var i=this.u_[t];void 0===i?this.u_[t]=n:"function"==typeof i?this.u_[t]=[i,n]:0===this.c_?i.push(n):this.u_[t]=i.concat(n)},n.l_=function(t){if("function"==typeof t){var n=this.d_;void 0===n?this.d_=t:"function"==typeof n?this.d_=[n,t]:0===this.c_?n.push(t):this.d_=n.concat(t)}},n.Bo=function(){this.u_=Ut(),this.d_=void 0},n.yo=function(t){this.c_++;var n=this.u_[t.type],i=this.d_;void 0!==n&&Ei(this.f_,t,n),void 0!==i&&Ei(this.f_,t,i),this.c_--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.__(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.__(e,n)}},n.__=function(t,n){var i=this.u_[t];void 0!==i&&("function"==typeof i?i===n&&(this.u_[t]=void 0):0===this.c_?Tt(i,n):this.u_[t]=Et(i,n))},n.g_=function(t){if("string"==typeof t)this.u_[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.u_[i]=void 0}},n.v_=function(t){var n=this.d_;void 0!==n&&("function"==typeof n?n===t&&(this.d_=void 0):0===this.c_?Tt(n,t):this.d_=Et(n,t))},n.w_=function(t,n){var i=this;return new Q((function(e,r){if(n&&n.Wf)return r(new en);var o=function(t){s(),e(t)},u=function(){s(),r(new en)},s=function(){i.fn(t,o),n&&n.Hf(u)};i.yn(t,o),n&&n.Xf(u)}))},t}(),ki=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},Ri=function(t){function n(n){var i;return(i=t.call(this,"append")||this).yp=n,i}return Bt(n,t),n}(ki),Oi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).ZNt=0,n.TC=new E(0),n.Bx=!1,n.cv=!1,n}Bt(n,t);var i=n.prototype;return i.X$=function(t,n){this.ZNt+=n,this.TC=Kn([this.TC,t]),this.yo(new Ri(t))},i.Ws=function(){this.Pj||(this.yo(new ki("close")),this.Bx=!0)},Dt(n,[{key:"y_",get:function(){return this.ZNt}},{key:"yp",get:function(){return this.TC}},{key:"Pj",get:function(){return this.Bx}},{key:"av",get:function(){return this.cv},set:function(t){this.cv=t}}]),n}(Ii),Ni="sync-seg-",Pi=function(){function t(t,n){this.dv=!1,this.lv=!1,this.o=Ni+Ti(),this.wv=n?new Oi:void 0,this.gv=t?new Oi:void 0}return t.prototype.Ws=function(){this.wv&&this.wv.Ws(),this.gv&&this.gv.Ws()},Dt(t,[{key:"kv",get:function(){return this.dv},set:function(t){this.dv=t}},{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}}]),t}(),Ai=1.1,Di=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Vt,new Xt(8),new jt(1),new Yt(0)])||this).gd=[],r.cyt=Lt(),r.Ad=0,r.tw=function(t){if(t.cN>=yt)for(;r.gd.length>0;)r.rw()},e&&r.sv(new Kt(e,"com.apple.streamingkeydelivery","1")),r.Fat=n,r.Yrt=i,r.Yrt.yn("remove",r.tw),r.sw=new $t(0),r.sv(r.sw),r}Bt(n,t);var i=n.prototype;return i.UEt=function(){return this.Fat===Ct.KM?this.Yrt.bw:this.Fat===Ct.qM?this.Yrt.kw:void 0},i.zat=function(t){return this.cyt.get(t)},i.$f=function(){this.gd.length=0,this.sw.dM=0,this.cyt.clear(),this.Ad=0},i.BA=function(){return this.tb(),dt(t.prototype.BA.call(this)).concat(dt(this.gd))},i.tb=function(){for(var t=this.Yrt.nb(),n=0;n<t.length;n++){var i=t[n];if(!this.cyt.has(i.o)){var e=void 0;if(this.Fat===Ct.KM?(e=i.wv,i.jv=!0):(e=i.gv,i.kv=!0),!e)return;this.cyt.set(i.o,e),e.av&&this.gd.push(new Ht(i.o+"-init")),this.gd.push(new qt(Ai,i.o)),this.Ad+=Ai}}this.cb()},i.cb=function(){for(;this.Ad>60;)this.rw()},i.rw=function(){var t=this.gd.shift();void 0!==t&&function(t){return t.hw===Wt.mE}(t)&&(this.cyt.delete(t.ev),this.Ad-=t.nv,this.sw.dM++)},n}(Jt);var Ci=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).cN=n,i}return Bt(n,t),n}(ki),xi=function(t){function n(n,i){var e;return(e=t.call(this)||this).ab=n,e.lb=i,e.tg=[],e.ng=[],e.ig=Lt(),e.ug=Lt(),e.sg=Lt(),e.lg=0,e}Bt(n,t);var i=n.prototype;return i.nb=function(){return this.bg?(this.tg=this.tg.filter((function(t){return!(t.jv&&t.kv)})),dt(this.tg).concat([this.bg],dt(this.ng))):[]},i.K$=function(t){this.mg(t)},i.X$=function(t){this.mg(t),this.kg(t),this.tm(t)},i.WS=function(t){this.mg(t),this.tm(t)},i.$f=function(){var t;null==(t=this.bg)||t.Ws(),this.bg=void 0,this.ng.forEach((function(t){return t.Ws()})),this.ng.length=0,this.tg.length=0,this.sg=Lt(),this.lg=0},i.kg=function(t){var n=t.startPts,i=t.totalDuration;this.ug.set(t.mediaType,n+i)},i.rm=function(){if(this.bg){this.bg.Ws(),this.tg.push(this.bg);var t=this.ng.shift(),n=new Pi(this.ab,this.lb);t?(this.bg=t,this.ng.push(n)):this.bg=n}},i.om=function(t){if(this.bg){var n=!this.bg.gv||0===this.bg.gv.y_,i=!this.bg.wv||0===this.bg.wv.y_,e=this.bg.gv&&this.bg.gv.av,r=this.bg.wv&&this.bg.wv.av,o=i&&(n&&!(this.bg.kv||this.bg.jv)||e),u=n&&(i&&!(this.bg.kv||this.bg.jv)||r);(t===Ct.qM&&!u||t===Ct.KM&&!o)&&(this.rm(),this.rm())}},i.mg=function(t){var n=t.mediaType,i=t.kind,e=this.ig.get(n);if(void 0===e){if(i===dn.C7||i===dn.j7){var r=[t];this.ig.set(n,r)}}else e.push(t)},i.tm=function(t){var n=this.sm(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case dn.C7:this.am(e),this.sg=Lt(),this.lg=0;break;case dn.R7:this.bm(e);break;case dn.j7:this.km(e)}}},i.am=function(t){var n=t.mediaType;void 0===this.bg?(this.bg=new Pi(this.ab,this.lb),this.ng.push(new Pi(this.ab,this.lb))):this.om(n),n===Ct.KM?(this.ip=t.segment,this.bg.wv.av=!0):n===Ct.qM&&(this.up=t.segment,this.bg.gv.av=!0)},i.km=function(t){var n,i,e=t.mediaType===Ct.qM,r=t.totalDuration,o=null!=(n=this.sg.get(t.mediaType))?n:0;e?(this.bg.gv.X$(t.segment,r),i=o+this.bg.gv.y_):(this.bg.wv.X$(t.segment,r),i=o+this.bg.wv.y_),i>=this.lg+Ai&&(this.sg.set(t.mediaType,i),this.lg+=Ai,this.rm())},i.bm=function(t){this.ug.set(t.mediaType,void 0),this.om(t.mediaType),this.tg.length=0,this.yo(new Ci(t.endTime))},i.sm=function(t){var n=this;if(t.kind===dn.R7)return this.ty(t);var i=[];return this.ig.forEach((function(t){if(t&&t.length>0){var e=_t(t,(function(t){return t.kind===dn.R7}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!It(i,u)){var s,f=n.ty(u);if(f.length>0)(s=i).push.apply(s,dt(f));else if(u.kind===dn.j7)break}}}})),i},i.ty=function(t){var n=this.ig.get(t.mediaType),i=function(t){return t===Ct.KM?Ct.qM:Ct.KM}(t.mediaType);if(!(i===Ct.KM?this.lb:this.ab))return n.splice(0,n.indexOf(t)+1);if(t.kind===dn.C7)return[];var e=this.ug.get(i);if(void 0===e)return[];if(t.kind===dn.R7){var r=this.ny(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),dt(o).concat(dt(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.hy(t,u,i);return dt(u).concat(dt(s),[t])}return[]},i.hy=function(t,n,i){var e=this.ig.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=_t(e,(function(t){return t.kind===dn.R7})),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===dn.j7&&h.startPts>r&&(s=f)}var c=-1;return-1!==_t(n,(function(t){return t.kind===dn.C7}))&&(c=_t(e,(function(t){return t.kind===dn.C7}))),c>s&&(s=c+1),s>0?(e[s-1].kind===dn.C7&&(s-=1),e.splice(0,s)):[]},i.ny=function(t){var n=this.ig.get(t);if(n){var i=_t(n,(function(t){return t.kind===dn.R7}));if(i>=0)return n.splice(0,i+1)}return[]},i.by=function(){var t="[MEDIABUFFER] endPTS: ";this.ug.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),Rt.rst(t)},i.my=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),Rt.rst(i)},Dt(n,[{key:"kw",get:function(){var t;return null==(t=this.up)?void 0:t.slice()}},{key:"bw",get:function(){var t;return null==(t=this.ip)?void 0:t.slice()}}]),n}(Ii);var Bi=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.ky=new xi(i,e),this.OS=new Qt(i,e),i&&(this.AS=new Di(Ct.qM,this.ky,n)),e&&(this.BS=new Di(Ct.KM,this.ky,n))}var n=t.prototype;return n.RT=function(t){var n,i,e=Mi(t);return e===Ct.KM?null==(n=this.BS)?void 0:n.UEt():e===Ct.qM?null==(i=this.AS)?void 0:i.UEt():void 0},n.zat=function(t){var n,i,e=t.split("/")[1],r=Mi(t);return r===Ct.KM?null==(n=this.BS)?void 0:n.zat(e):r===Ct.qM?null==(i=this.AS)?void 0:i.zat(e):void 0},n.K$=function(t){this.ky.K$(t)},n.X$=function(t){this.ky.X$(t)},n.glt=function(t){this.ky.WS(t)},n.$f=function(){var t,n;this.ky.$f(),this.OS.$f(),null==(t=this.AS)||t.$f(),null==(n=this.BS)||n.$f()},Dt(t,[{key:"IE",get:function(){return this.OS}},{key:"ME",get:function(){return this.AS}},{key:"tk",get:function(){return this.BS}}]),t}();function Mi(t){return t.match(/video/)?Ct.KM:Ct.qM}var Ui=function(){function t(t,n){var i=this;this.ik=t,this.uk=n,this._ut=void 0,this.ZWt=ft((function(t){var n,e;return ht(this,(function(r){switch((n=t.data).kind){case dn.x7:i._ut=new Bi(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case dn.C7:i._ut.K$(n);break;case dn.j7:i._ut.X$(n);break;case dn.R7:i._ut.glt(n)}return e={kind:dn.O7},i.ik.postMessage(e),[2]}))})),this.ik.onmessage=this.ZWt}var n=t.prototype;return n.zBt=function(t){return"master.m3u8"===t?this._ut.IE:"video/index.m3u8"===t?this._ut.tk:"audio/index.m3u8"===t?this._ut.ME:void 0},n.sk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.zBt(t))?void 0:n.zBt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Ni)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this._ut)?void 0:r.RT(t);return new Response(o,{headers:e})}var u=this.Rat(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.yp)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.yp),t.Pj?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.Rat=function(t){return this._ut.zat(t)},n.close=function(){var t;this.ik.close(),null==(t=this._ut)||t.$f()},t}(),Li=function(){function t(){var t=this;this.E3=Lt(),this.ZWt=function(n){var i=n.data;if(i.kind===dn.k7){t.ak().catch(Nt);var e=i.port,r=Ti(),o=new Ui(e,n.source.id);t.E3.set(r,o);var u=function(n){n.data.kind===dn.P7&&(t.mk(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:dn.L7,sessionId:r};e.postMessage(s)}},this.kk=function(n){if(Zn(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.E3.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.sk(r);n.respondWith(f)}}}var n=t.prototype;return n.ur=function(t){this.NWt=t,t.addEventListener("message",this.ZWt),t.addEventListener("fetch",this.kk)},n.mk=function(t){var n=this.E3.get(t);n&&n.close(),this.E3.delete(t)},n.ak=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:return[4,t.NWt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.E3.forEach((function(n,e){It(i,n.uk)||t.mk(e)})),[2]}}))}))()},t}();Li.TR=new Li;var Fi=function(t){return t.nk="web",t.rk="android",t.hk="android-tv",t.ck="ios",t.lk="tvos",t.dk="chromecast",t.fk="theoliveweb",t}({});var zi=v?v.userAgent:"",Wi=zi.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),qi=zi.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Hi=zi.match(/Android ([0-9\.]+)/i),Vi=zi.match(/Windows NT ([0-9\.]+)/i),Xi=zi.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),ji=zi.match(/Firefox\/([0-9\.]+)/i),Yi=zi.match(/OPR\/(\d+\.\d+)/i),Ki=zi.match(/Tizen ([0-9\.]+)/i),Gi=zi.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),$i=function(){function t(){this._k=Boolean("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch||v&&v.msMaxTouchPoints),this.vk=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(zi)||/(macintosh|mac(?=_powerpc)\s)/i.test(zi),this.pk=/Windows NT/i.test(zi),this.yk=Vi?S(Vi[1]):0,this.bk=/Android/i.test(zi),this.Sk=Hi?S(Hi[1]):0,this.Ik=/windows phone (8|8\.1)/i.test(zi),this.Ek=/iPhone/i.test(zi),this.xk=/iPad/i.test(zi),this.jk=this.vk&&this._k&&!this.xk,this.Rk=/iPod/i.test(zi),this.Yk=/Mobile Safari/i.test(zi),this.Qk=/EOS\d*STB/i.test(zi),this.Fk=/APP\d*STB/i.test(zi),this.Pk=(this.Ek||this.xk||this.jk||this.Rk)&&!this.Ik,this.Bk=Gi?S(Gi[2]):0,this.Gk=this.Ik||this.Pk||this.bk||this.Yk,this.Wk=/CriOS/i.test(zi),this.Xk=Boolean(self.chrome&&/google/i.test(v.vendor))||this.Wk,this.$k=this.Xk&&/Edg\//i.test(v.userAgent),this.iL=qi?_(qi[1],10):0,this.qL=Boolean(/CriOS/i.test(zi)),this.ZL=Boolean(self.chrome||/Chrome/i.test(zi)||this.qL),this.Kk=Wi?_(Wi[1],10):0,this.nL=/SMART-TV.*Tizen/i.test(zi),this.oL=Ki?S(Ki[1]):0,this.qk=this.oL>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.oL):void 0,this.aL=/webos|web0s/i.test(zi),this.cL=/VIZIO/i.test(zi),this.dL=/Edge\/\d+/i.test(zi),this._L=/Trident/i.test(zi),this.vL=this._L&&!self.ActiveXObject&&"ActiveXObject"in self,this.mL=/Vivaldi/i.test(zi),this.AL=/Firefox/i.test(zi)&&!/Seamonkey/i.test(zi),this.ML=ji?S(ji[1]):0,this.TL=/Safari/i.test(zi)&&!/Chrome/i.test(zi)&&!this.Ik&&!this.nL,this.NL=Xi?S(Xi[2]):0,this.DL=Boolean(Yi),this.kL=Yi?S(Yi[1]):0,this.xL=/CrKey/.test(zi),this.jL=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(zi),this.PL="web"===Fi.hk,this.BL="web"===Fi.rk,this.QL=this.BL||this.PL,this.YL="web"===Fi.ck,this.VL="web"===Fi.lk,this.HL="web"===Fi.dk}return Dt(t,[{key:"Je",get:function(){return this._k}},{key:"gk",get:function(){return this.vk}},{key:"wk",get:function(){return this.pk}},{key:"Ak",get:function(){return this.yk}},{key:"Mk",get:function(){return this.bk}},{key:"Tk",get:function(){return this.Sk}},{key:"Nk",get:function(){return this.Ik}},{key:"Dk",get:function(){return this.Ek}},{key:"Lk",get:function(){return this.xk}},{key:"Ck",get:function(){return this.jk}},{key:"Ok",get:function(){return this.Rk}},{key:"Ua",get:function(){return this.Pk}},{key:"zk",get:function(){return this.Bk}},{key:"Uk",get:function(){return this.Qk||this.Fk}},{key:"ql",get:function(){return this.Yk}},{key:"Qs",get:function(){return this.Gk}},{key:"Vk",get:function(){return this.Wk}},{key:"Hk",get:function(){return this.Xk}},{key:"Zk",get:function(){var t;return null!=(t=this.qk)?t:this.Kk}},{key:"Jk",get:function(){return this.$k}},{key:"tL",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.iL>0}},{key:"eL",get:function(){return this.iL}},{key:"sL",get:function(){return this.nL}},{key:"rL",get:function(){return this.oL}},{key:"hL",get:function(){return this.aL}},{key:"uL",get:function(){return this.cL}},{key:"lL",get:function(){return this.dL}},{key:"fL",get:function(){return this._L}},{key:"gL",get:function(){return this.vL}},{key:"wL",get:function(){return this.mL}},{key:"pL",get:function(){return this.AL}},{key:"yL",get:function(){return this.ML}},{key:"bL",get:function(){return this.TL}},{key:"SL",get:function(){return this.NL}},{key:"IL",get:function(){return this.DL}},{key:"EL",get:function(){return this.kL}},{key:"LL",get:function(){return this.xL}},{key:"CL",get:function(){return this.jL}},{key:"OL",get:function(){return!(!this.hL&&!this.sL)&&this.Zk<=56}},{key:"RL",get:function(){return this.PL}},{key:"zL",get:function(){return this.BL}},{key:"UL",get:function(){return this.QL}},{key:"FL",get:function(){return this.YL}},{key:"GL",get:function(){return this.VL}},{key:"WL",get:function(){return this.HL}},{key:"XL",get:function(){return this.ZL}},{key:"IS_IOS_CHROME",get:function(){return this.qL}}]),t}();$i.KL=new $i;var Zi=$i.KL,Ji=!(Zi.fL&&!Zi.gL),Qi=self.console;function te(t){if(gt(t))try{return JSON.stringify(t)}catch(t){}return t}function ne(t){return t.map(te).join(" ")}function ie(t){var n=Qi&&Qi[t];return n?n.bind&&Ji?n.bind(Qi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Qi[t](ne(i))}:void 0}var ee=ie("log")||Nt,re=ie("warn")||ee.bind(void 0,"WARNING:"),oe=ie("error")||ee.bind(void 0,"ERROR:"),ue=function(){var t=Qi&&Qi.assert;return t?t.bind&&Ji?t.bind(Qi):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];Qi.assert(t,ne(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||oe.apply(void 0,["Assertion failed:"].concat(dt(i)))}}();function se(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function fe(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){he(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&he(i,null,t.length,t),t}function he(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 ce=/[a-zA-Z]/,ae=/[0-9]/,ve=/[0-9a-fA-F]/,de=/^0x/i,le=/^[0-9]+$/,we=/^[0-9a-fA-F]+$/,be=/^[0-7]+$/,ge=p.prototype.toString,me=Array.isArray||function(t){return"[object Array]"===ge.call(t)},pe=void 0!==n&&"symbol"==typeof e;function ye(t){return me(t)?t:Array.from(t)}function _e(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function Se(t){return t>=65&&t<=90}function Te(t){return Se(t)||function(t){return t>=97&&t<=122}(t)}function Ee(t){return t>=48&&t<=57}function Ie(t){return Ee(t)||Te(t)}function ke(t){return Ee(t)||t>=65&&t<=70||t>=97&&t<=102}function Re(t){return Se(t)?t+32:t}function Oe(t){return Ee(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ne(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Pe=y.min,Ae=String.fromCharCode,De=16384;function Ce(t){for(var n=t.length,i=[],e=0;e<n;e+=De){var r=Pe(e+De,n);i.push(Ae.apply(null,t.slice(e,r)))}return i.join("")}var xe=2147483647,Be=/[^\0-\x7E]/,Me=/[\x2E\u3002\uFF0E\uFF61]/g,Ue={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Le=y.floor,Fe=String.fromCharCode;function ze(t){throw new RangeError(Ue[t])}function We(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 qe,He,Ve,Xe=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},je=function(t,n,i){var e=0;for(t=i?Le(t/700):t>>1,t+=Le(t/n);t>455;e+=36)t=Le(t/35);return Le(e+36*t/(t+38))},Ye=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(Me,".")).split("."),n).join(".");return e+r}(t,(function(t){return Be.test(t)?"xn--"+function(t){for(var n=[],i=(t=We(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(Fe(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=xe,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>Le((xe-r)/w)&&ze("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>xe&&ze("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(Fe(Xe(_+S%T,0))),p=Le(S/T)}n.push(Fe(Xe(p,0))),o=je(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t}))};function Ke(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 Ce(n)}function Ge(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function $e(t,n){return t>>n&63|128}function Ze(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Ge(t),n.push(t>>12&15|224),n.push($e(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push($e(t,12)),n.push($e(t,6))),n.push(63&t|128)):n.push(t)}function Je(t){for(var n=[],i=0;i<t.length;i++){Ze(t[i],n)}return n}function Qe(){if(Ve>=He)throw new g("Invalid byte index");var t=255&qe[Ve];if(Ve++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function tr(){var t,n;if(Ve>He)throw new g("Invalid byte index");if(Ve===He)return!1;if(t=255&qe[Ve],Ve++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Qe())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Qe()<<6|Qe())>=2048)return Ge(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Qe()<<12|Qe()<<6|Qe())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function nr(t){return[37,Ne(t>>4),Ne(15&t)]}function ir(t){return function(t){return t>=0&&t<=31}(t)||t>126}function er(t){return ir(t)||32===t||34===t||60===t||62===t||96===t}function rr(t){return er(t)||35===t||63===t||123===t||125===t}function or(t){return rr(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function ur(t){return t<33||t>126||34===t||35===t||60===t||62===t}function sr(t){return ur(t)||39===t}function fr(t,n){if(!n(t))return[t];for(var i=Je([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,nr(o))}return e}function hr(t,n){for(var i=[],e=0,r=We(t);e<r.length;e++){var o=r[e];i.push.apply(i,fr(o,n))}return Ke(i)}function cr(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&&ke(t[e+1])&&ke(t[e+2])){var o=Oe(t[e+1])<<4|Oe(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Je(t))}function ar(t){return Ke(function(t){qe=t.slice(),He=qe.length,Ve=0;for(var n,i=[];!1!==(n=tr());)i.push(n);return i}(cr(We(t))))}function vr(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new m;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new m("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&ve.test(t[o]);)u=u<<4|_(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new m;if(o-=s,e>6)throw new m;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!ae.test(t[o]))throw new m;for(;o<n&&ae.test(t[o]);){var c=_(t[o],10);if(null===h)h=c;else{if(0===h)throw new m;if((h=10*h+c)>255)throw new m}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o<n)throw new m;i[e]=u,e+=1}else{if(null!==r)throw new m("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)_e(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function dr(t){var n=10,i=le;return de.test(t)?(t=t.slice(2),n=16,i=we):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=be),""===t?0:i.test(t)?_(t,n):void 0}var lr={B2:4},wr=/[\0\t\n\r #%/:?@\[\\\]]/,br=/[\0\t\n\r #/:?@\[\\\]]/;function gr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{B2:2,Eet:vr(t.slice(1,-1))}}if(!n)return function(t){if(br.test(t))throw new m("Invalid code point in opaque host");var n=hr(t,ir);return""===n?lr:{B2:3,TC:n}}(t);var i=function(t){var n=function(t){return Ye(t.toLowerCase())}(t);return n}(ar(t));if(wr.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e<n.length;e++){var r=n[e];if(""===r)return;var o=dr(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*y.pow(256,3-f);return s}}(i);return void 0!==e?{B2:1,Eet:e}:""===i?lr:{B2:0,ket:i}}function mr(t){switch(t.B2){case 0:return t.ket;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.Eet);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.Eet)+"]";case 3:return t.TC;case 4:return""}}var pr=/\+/g;function yr(t){return 42===t||45===t||46===t||95===t||Ie(t)}function _r(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(pr," "),s=s.replace(pr," ");var f=ar(u),h=ar(s);i.push([f,h])}}return i}function Sr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=Tr(Je(We(e[0])))+"="+Tr(Je(We(e[1])))}return n}function Tr(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):yr(e)?n.push(e):n.push.apply(n,nr(e))}return Ce(n)}var Er=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function Ir(t){var n=""+t,i=Er.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Rr(o))if(Or(o)||r===i-1)e.push(kr);else{var u=t.charCodeAt(r+1);Or(u)?(e.push(o,u),r++):e.push(kr)}else e.push(o)}return t.slice(0,n)+Ce(e)}(n,i.index):n}var kr=65533,Rr=function(t){return 55296==(63488&t)},Or=function(t){return 0!=(1024&t)};function Nr(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Pr(t){t.tf.length=0}function Ar(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.tf,_r(n))}function Dr(t){if(t.Vu){var n=Sr(t.tf);""===n&&(n=null),t.Vu.Vu.Let=n}}var Cr=function(){function t(t){if(void 0===t&&(t=void 0),this.Vu=null,null==t)this.tf=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Cr&&!!me(t.tf)&&(!pe||t[e]===xr)}(t))this.tf=t.tf.slice();else if(function(t){return null!=t&&(!!me(t)||!!pe&&"function"==typeof t[e])}(t)){this.tf=[];for(var n=0,i=ye(t);n<i.length;n++){var r=ye(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.tf.push([Ir(r[0]),Ir(r[1])])}}else for(var o in this.tf=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.tf.push([Ir(o),Ir(t[o])]);else(t=Ir(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.tf=_r(t)}var n=t.prototype;return n.append=function(t,n){t=Ir(t),n=Ir(n),this.tf.push([t,n]),Dr(this)},n.delete=function(t){t=Ir(t);for(var n=this.tf,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Dr(this)},n.get=function(t){t=Ir(t);for(var n=this.tf,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=Ir(t);for(var n=this.tf,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=Ir(t);for(var n=this.tf,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=Ir(t),n=Ir(n);for(var i=this.tf,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]),Dr(this)},n.sort=function(){fe(this.tf,Nr),Dr(this)},n.toString=function(){return Sr(this.tf)},n.entries=function(){return new Lr(this.tf,Br)},n.keys=function(){return new Lr(this.tf,Mr)},n.values=function(){return new Lr(this.tf,Ur)},n.forEach=function(t){var n=this;this.tf.forEach((function(i){return t(i[1],i[0],n)}))},t}(),xr=Cr.prototype.entries;pe&&(Cr.prototype[e]=xr);var Br=function(t){return[t[0],t[1]]},Mr=function(t){return t[0]},Ur=function(t){return t[1]},Lr=function(){function t(t,n){this.xet=0,this.tf=t,this.Cet=n}return t.prototype.next=function(){return this.xet<this.tf.length?{done:!1,value:this.Cet(this.tf[this.xet++])}:{done:!0,value:void 0}},t}(),Fr="null";var zr=p.create(null);zr.ftp=21,zr.file=0,zr.gopher=70,zr.http=80,zr.https=443,zr.ws=80,zr.wss=443;var Wr=/^(?:\.|%2e)$/i,qr=/^(?:\.|%2e){2}$/i;function Hr(t){return Wr.test(t)}function Vr(t){return qr.test(t)}function Xr(t){return void 0!==zr[t]}function jr(t){return Xr(t.HP)}function Yr(t){return""!==t.jet||""!==t.Oet}function Kr(t){var n=t.length;if(!(n>=2))return!1;if(!$r(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 Gr(t){return 2===t.length&&ce.test(t[0])&&(":"===t[1]||"|"===t[1])}function $r(t){return 2===t.length&&Gr(Ce(t))}function Zr(t){return Gr(t)&&":"===t[1]}function Jr(t){var n=t.Ret;0!==n.length&&("file"===t.HP&&1===n.length&&Zr(n[0])||n.pop())}function Qr(t){return null===t.Pet||lr===t.Pet||t.zet||"file"===t.HP}var to=-1,no=/\t|\n|\r/g,io=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function eo(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new oo,t=t.replace(io,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=We(t=t.replace(no,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:to;switch(r){case 0:if(!Te(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(Re(v)),r=1;break;case 1:if(Ie(v)||43===v||45===v||46===v)o.push(Re(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=Ke(o);if(null!==e){if(Xr(i.HP)&&!Xr(d))return;if(!Xr(i.HP)&&Xr(d))return;if((Yr(i)||null!==i.B7)&&"file"===d)return;if("file"===i.HP&&(i.Pet===lr||null===i.Pet))return}if(i.HP=d,null!==e)return void(jr(i)&&i.B7===zr[i.HP]&&(i.B7=null));o.length=0,"file"===i.HP?r=13:jr(i)&&n&&n.HP===i.HP?r=3:jr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.zet=!0,i.Ret.push(""),r=18)}break;case 2:if(!n||n.zet&&35!==v)throw new m("Invalid scheme");n.zet&&35===v?(i.HP=n.HP,i.Ret=n.Ret.slice(),i.Let=n.Let,i.Bet="",i.zet=!0,r=20):"file"!==n.HP?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===h[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.HP=n.HP,to===v?(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,i.Ret=n.Ret.slice(),i.Let=n.Let):47===v?r=6:63===v?(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,i.Ret=n.Ret.slice(),i.Let="",r=19):35===v?(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,i.Ret=n.Ret.slice(),i.Let=n.Let,i.Bet="",r=20):92===v&&jr(i)?r=6:(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,i.Ret=n.Ret.slice(),i.Ret.pop(),r=17,a-=1);break;case 6:!jr(i)||47!==v&&92!==v?47===v?r=9:(i.jet=n.jet,i.Oet=n.Oet,i.Pet=n.Pet,i.B7=n.B7,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var b=Ke(fr(w,or));f?i.Oet+=b:i.jet+=b}else f=!0}o.length=0}else if(to===v||47===v||63===v||35===v||jr(i)&&92===v){if(u&&0===o.length)throw new m("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.HP)a-=1,r=15;else if(58!==v||s)if(to===v||47===v||63===v||35===v||jr(i)&&92===v){if(a-=1,jr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(Yr(i)||null!==i.B7))return;var g=gr(Ke(o),jr(i));if(i.Pet=g,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new m("Invalid host");var p=gr(Ke(o),jr(i));if(i.Pet=p,o.length=0,r=12,11===e)return}break;case 12:if(Ee(v))o.push(v);else{if(!(to===v||47===v||63===v||35===v||jr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(Ke(o),10);if(y>65535)throw new m("Invalid port");i.B7=y===zr[i.HP]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.HP="file",47===v||92===v?r=14:n&&"file"===n.HP?to===v?(i.Pet=n.Pet,i.Ret=n.Ret.slice(),i.Let=n.Let):63===v?(i.Pet=n.Pet,i.Ret=n.Ret.slice(),i.Let="",r=19):35===v?(i.Pet=n.Pet,i.Ret=n.Ret.slice(),i.Let=n.Let,i.Bet="",r=20):(Kr(h.slice(a))||(i.Pet=n.Pet,i.Ret=n.Ret.slice(),Jr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.HP&&!Kr(h.slice(a))&&(Zr(n.Ret[0])?i.Ret.push(n.Ret[0]):i.Pet=n.Pet),r=17,a-=1);break;case 15:if(to===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&$r(o))r=17;else if(0===o.length){if(i.Pet=lr,null!==e)return;r=16}else{var S=gr(Ke(o),jr(i));if(0===S.B2&&"localhost"===S.ket&&(S=lr),i.Pet=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:jr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Let="",r=19):null===e&&35===v?(i.Bet="",r=20):to!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(to===v||47===v||jr(i)&&92===v||null===e&&(63===v||35===v)){var T=Ke(o);if(Vr(T)?(Jr(i),47===v||jr(i)&&92===v||i.Ret.push("")):!Hr(T)||47===v||jr(i)&&92===v?Hr(T)||("file"===i.HP&&0===i.Ret.length&&$r(o)&&(lr!==i.Pet&&null!==i.Pet&&(i.Pet=lr),o[1]=58,T=Ke(o)),i.Ret.push(T)):i.Ret.push(""),o.length=0,"file"===i.HP&&(to===v||63===v||35===v))for(;i.Ret.length>1&&""===i.Ret[0];)i.Ret.shift();63===v?(i.Let="",r=19):35===v&&(i.Bet="",r=20)}else o.push.apply(o,fr(v,rr));break;case 18:63===v?(i.Let="",r=19):35===v?(i.Bet="",r=20):to!==v&&(i.Ret[0]+=Ke(fr(v,ir)));break;case 19:null===e&&35===v?(i.Bet="",r=20):to!==v&&(i.Let+=Ke(fr(v,jr(i)?sr:ur)));break;case 20:to===v||0===v||(i.Bet+=Ke(fr(v,er)))}a++}return i}function ro(t,n,i,e){try{eo(t,n,i,e)}catch(t){}}var oo=function(){this.HP="",this.jet="",this.Oet="",this.Pet=null,this.B7=null,this.Ret=[],this.Let=null,this.Bet=null,this.zet=!1};function uo(t){switch(t.HP){case"blob":var n;try{n=eo(t.Ret[0],null)}catch(t){return Fr}return uo(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+mr(n)+(null===i?"":":"+i)}(t.HP,t.Pet,t.B7);default:return Fr}}var so,fo,ho=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof ho&&"object"==typeof t.Vu}(n))e=n.Vu;else try{e=eo(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=eo(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Let;this.Vu=i,this.Let=function(t){var n=new Cr;return null!==t&&Ar(n,t),n}(r),this.Let.Vu=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&se(t.prototype,n),i&&se(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.HP+":";if(null!==t.Pet?(i+="//",Yr(t)&&(i+=t.jet,""!==t.Oet&&(i+=":"+t.Oet),i+="@"),i+=mr(t.Pet),null!==t.B7&&(i+=":"+t.B7)):null===t.Pet&&"file"===t.HP&&(i+="//"),t.zet)i+=t.Ret[0];else for(var e=0,r=t.Ret;e<r.length;e++)i+="/"+r[e];return null!==t.Let&&(i+="?"+t.Let),n||null===t.Bet||(i+="#"+t.Bet),i}(this.Vu)},set:function(t){var n;try{n=eo(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.Vu=n,Pr(this.Let);var i=this.Vu.Let;null!==i&&Ar(this.Let,i)}},{key:"origin",get:function(){return uo(this.Vu)}},{key:"protocol",get:function(){return this.Vu.HP+":"},set:function(t){ro(t+":",null,this.Vu,0)}},{key:"username",get:function(){return this.Vu.jet},set:function(t){Qr(this.Vu)||(this.Vu.jet=hr(t,or))}},{key:"password",get:function(){return this.Vu.Oet},set:function(t){Qr(this.Vu)||(this.Vu.Oet=hr(t,or))}},{key:"host",get:function(){var t=this.Vu,n=t.Pet;if(null===n)return"";var i=t.B7,e=mr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Vu.zet||ro(t,null,this.Vu,10)}},{key:"hostname",get:function(){var t=this.Vu.Pet;return null===t?"":mr(t)},set:function(t){this.Vu.zet||ro(t,null,this.Vu,11)}},{key:"port",get:function(){var t=this.Vu.B7;return null===t?"":""+t},set:function(t){Qr(this.Vu)||(""===t?this.Vu.B7=null:ro(t,null,this.Vu,12))}},{key:"pathname",get:function(){var t=this.Vu.Ret;return this.Vu.zet?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Vu.zet||(this.Vu.Ret.length=0,ro(t,null,this.Vu,16))}},{key:"search",get:function(){var t=this.Vu.Let;return null===t||""===t?"":"?"+t},set:function(t){t=Ir(t);var n=this.Vu;if(""===t)return n.Let=null,void Pr(this.Let);"?"===t[0]&&(t=t.slice(1)),n.Let="",ro(t,null,n,19),Ar(this.Let,t)}},{key:"searchParams",get:function(){return this.Let}},{key:"hash",get:function(){var t=this.Vu.Bet;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Vu.Bet="",ro(t,null,this.Vu,20)):this.Vu.Bet=null}}]),t}();function co(t){return t.document&&t.document.baseURI||t.location.href||""}function ao(){return void 0!==a?a.createElement("video"):void 0}function vo(){return fo||(fo=ao()),fo}var lo=!!("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch)||!(!v||!v.msMaxTouchPoints),wo=vo(),bo=!(!wo||!wo.webkitShowPlaybackTargetPicker),go=function(){function t(){this.Qet=void 0,this.tst=!1,this.Je=lo,this.Qs=!1,this.xtt=!0}var n=t.prototype;return n.Fet=function(){return 0},n.Jet=function(t,n){return!0},n.$et=function(t){return t>=.3333333333333333},Dt(t,[{key:"Uet",get:function(){return void 0===this.Qet&&(this.Qet=this.Fet()),this.Qet}},{key:"Yet",get:function(){return!Zi.CL}},{key:"Get",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"M5",get:function(){return c.devicePixelRatio||1}},{key:"Vet",get:function(){return bo}},{key:"i5",get:function(){return!1}},{key:"X3",get:function(){return!0}},{key:"mS",get:function(){return!(!Zi.bL&&!Zi.Ua)||!!Zi.uL}},{key:"pS",get:function(){return Zi.uL}},{key:"Wet",get:function(){return!Zi.Ua}},{key:"dP",get:function(){return!0}},{key:"Het",get:function(){return!0}},{key:"Xet",get:function(){return!1}},{key:"Zet",get:function(){}},{key:"qet",get:function(){return!0}},{key:"L0",get:function(){return!1}},{key:"Ket",get:function(){return Zi.uL}}]),t}(),mo=function(){var t=ao();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Zi.Ck)return!1;var t=ao();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var po=function(t){function n(n){var i;return(i=t.call(this)||this).ist=n,i.ist&&(i.tst=i.ist.tst,i.Je=i.ist.Je,i.xtt=mo&&i.ist.xtt),i}Bt(n,t);var i=n.prototype;return i.Fet=function(){return this.ist?this.ist.Uet:t.prototype.Fet.call(this)},i.Jet=function(n,i){return this.ist?this.ist.Jet(n,i):t.prototype.Jet.call(this,n,i)},i.$et=function(n){return this.ist?this.ist.$et(n):t.prototype.$et.call(this,n)},Dt(n,[{key:"Zet",get:function(){var t;return null==(t=this.ist)?void 0:t.Zet}},{key:"qet",get:function(){var t,n;return null==(n=null==(t=this.ist)?void 0:t.qet)||n}}]),n}(go),yo=function(t){function n(n){var i;return(i=t.call(this,n)||this).tst=!0,i.Qs=!0,i}return Bt(n,t),Dt(n,[{key:"Xet",get:function(){return Zi.Ua}}]),n}(po);var _o=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.Fet=function(){return function(t){return t&&pt(so.ManagedMediaSource)?so.ManagedMediaSource:pt(so.MediaSource)?so.MediaSource:void 0}(!0)?t.prototype.Fet.call(this):1},Dt(n,[{key:"Xet",get:function(){return!0}}]),n}(yo),So=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.Jet=function(n,i){return t.prototype.Jet.call(this,n,i)},Dt(n,[{key:"i5",get:function(){return Zi.rL<3}},{key:"X3",get:function(){return Zi.rL>=3}},{key:"Get",get:function(){var t=this;return c.tizen&&!this.sst&&c.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.sst={width:i,height:e})})),this.sst}},{key:"L0",get:function(){return Zi.rL<3}}]),n}(po),To=function(t){function n(){return t.call(this)||this}return Bt(n,t),n}(go),Eo=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.Jet=function(t,n){if(t&&t.nst&&n&&n.nst){var i=Io(t.nst,"mp4a.40.2")&&Io(n.nst,"mp4a.40.5"),e=Io(t.nst,"mp4a.40.5")&&Io(n.nst,"mp4a.40.2"),r=Io(t.nst,"mp4a.40.2")&&Io(n.nst,"mp4a.40.34"),o=Io(t.nst,"mp4a.40.34")&&Io(n.nst,"mp4a.40.2"),u=Io(t.nst,"mp4a.40.5")&&Io(n.nst,"mp4a.40.34"),s=Io(t.nst,"mp4a.40.34")&&Io(n.nst,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Dt(n,[{key:"Zet",get:function(){if(Zi.gk)return 4096}}]),n}(To);function Io(t,n){return t.indexOf(n)>-1}var ko=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.$et=function(t){return t>=2},n}(To),Ro=function(t){function n(){var n;return(n=t.call(this)||this).tst=Zi.SL>=11,n.xtt=Zi.bL&&!(Zi.Ua&&Zi.SL<10),n}return Bt(n,t),n}(To),Oo=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"Get",get:function(){var t=this;return c.webOS&&!this.sst&&c.webOS.deviceInfo((function(n){t.sst={width:n.screenWidth,height:n.screenHeight}})),this.sst}},{key:"dP",get:function(){return!1}}]),n}(po),No=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"qet",get:function(){return!Zi.wk||(Zi.Jk?92!==Zi.eL:Zi.Zk>=100)}}]),n}(To),Po=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"Xet",get:function(){return!0}}]),n}(po),Ao=function(){function t(){this.ust=new Do,this.lst=function(){var t=function(){if(Zi.pL)return new Eo;if(Zi.lL||Zi.fL)return new ko;if(Zi.bL)return new Ro;if(Zi.Hk)return new No;return new To}();return Zi.Ua?new _o(t):Zi.Qs?new yo(t):Zi.sL?new So(t):Zi.hL?new Oo(t):Zi.gk?new Po(t):new po(t)}(),this.cst=Co(),self.performance&&self.performance.now?this.Yf=function(){return self.performance.now()}:this.Yf=zn}var n=t.prototype;return n.rst=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];ee.apply(void 0,dt(n))},n.Iw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];re.apply(void 0,dt(n))},n.ost=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];oe.apply(void 0,dt(n))},n.hst=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];ue.apply(void 0,[t].concat(dt(i)))},n.Vf=function(t,n){return d(t,n)},n.oS=function(t,n){return w(t,n)},n.Gf=function(t){l(t)},n.aS=function(t){b(t)},n.cO=function(){return this.ast.cO()},n.XM=function(){return this.ast.XM()},n.ZM=function(){return this.ast.ZM()},n.HM=function(){return this.ast.HM()},n.WM=function(){return this.ast.WM()},n.hO=function(t,n){return this.ast.hO(t,n)},n.rO=function(t){return this.ast.rO(t)},n.Ah=function(t,n){var i;return void 0===n&&(n=co(so)),i="object"!==(void 0===n?"undefined":k(n))||n instanceof ho?n:n.href,new ho(t,i)},n.fw=function(t,n){if(void 0===n&&(n=co(so)),this.cst){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Ah(t,n).href},Dt(t,[{key:"rP",get:function(){return this.ust}},{key:"Ys",get:function(){return this.lst}},{key:"dst",get:function(){return{fst:v&&v.userAgent.match(/Android /i)?"Android":"other",_st:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"wH",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"gst",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),Do=function(){function t(){}return Dt(t,[{key:"oP",get:function(){return v.oscpu}},{key:"Ys",get:function(){return v.platform}},{key:"hP",get:function(){return v.vendor}},{key:"aP",get:function(){return v.vendorSub}}]),t}();function Co(){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 xo(){return xo=p.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)p.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},xo.apply(this,arguments)}var Bo="9a04f079-9840-4286-ab92-e65be0885f95",Mo="urn:uuid:"+Bo,Uo="com.microsoft.playready",Lo="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Fo="urn:uuid:"+Lo,zo="com.widevine.alpha",Wo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",qo="urn:uuid:"+Wo,Ho="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",Vo="urn:uuid:"+Ho,Xo="com.apple.fps.1_0",jo=function(t){return t.Dw="playready",t.Ew="widevine",t.Lw="fairplay",t.xw="clearkey",t.Cw="aes128",t}({}),Yo={hw:jo.Dw,JL:Uo,$L:"cenc",tx:Bo,ix:Mo,sx:"PlayReady"},Ko={hw:jo.Ew,JL:zo,$L:"cenc",tx:Lo,ix:Fo,sx:"Widevine"},Go={hw:jo.Lw,JL:Xo,$L:"skd",tx:Ho,ix:Vo,sx:"FairPlay"},$o=(jo.Lw,{hw:jo.xw,JL:"org.w3.clearkey",$L:"cenc",tx:Wo,ix:qo,sx:"ClearKey"}),Zo=Zi.Hk&&Zi.Zk>=42||Zi.pL&&Zi.yL>=38||Zi.lL||Zi.gL||Zi.IL&&Zi.EL>=29;function Jo(t,n){return function(t,n){return wt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[xo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[xo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var Qo=function(){function t(t){this.oO=Lt(),this.lO=void 0,this.uO=t}var n=t.prototype;return n.WM=function(){return this.rO(Ko)},n.XM=function(){return this.rO($o)},n.HM=function(){return this.rO(Yo)},n.ZM=function(){return this.rO(Go)},n.rO=function(t){var n=t.ix,i=this.oO.get(n);if(i)return i;var e=this.hO(t,'video/mp4; codecs="avc1.42000a"');return this.oO.set(n,e),e},n.hO=function(t,n){var i=this;return ft((function(){return ht(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.uO.aO(t.JL,[Jo(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.uO.aO(t.JL,[Jo(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.cO=function(){return this.lO||(this.lO=this.dO()),this.lO},n.dO=function(){var t=this;return ft((function(){return ht(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:Zo?[4,t.XM()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),tu=function(t){return t.eb="sb",t.ob="hb",t.ub="contentprotectionerror",t.fb="contentprotectionsuccess",t._b="currentsourcechange",t.gb="destroy",t.vb="durationchange",t.wb="emptied",t.mb="encrypted",t.pb="ended",t.Ab="yb",t.Mb="bb",t.Tb="Sb",t.Nb="Ib",t.Db="loadstart",t.Eb="manifestupdate",t.kb="nosupportedrepresentationfound",t.Lb="offline",t.xb="online",t.Cb="pause",t.so="play",t.jb="progress",t.Ob="ratechange",t.Rb="representationchange",t.Pb="resize",t.zb="seeked",t.Bb="seeking",t.Ub="segmentnotfound",t.Qb="Fb",t.Yb="Gb",t.ro="sourcechange",t.Vb="timeupdate",t.Wb="volumechange",t.Hb="Xb",t.Zb="qb",t.Kb="metricschange",t}({}),nu=["cenc"],iu=["cbcs","cbcs-1-9"],eu=function(t){function n(n){var i;return(i=t.call(this,tu.Zb)||this).nx=n,i}return Bt(n,t),n}(ki),ru=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"ox")||this).hx=n,o.ux=i,o.ox=e,o.lx=r,o}return Bt(n,t),n}(ki),ou=function(t){function n(){return t.call(this,"lt")||this}return Bt(n,t),n}(ki),uu=new E([0]).buffer,su=function(){function t(){this.Ou=[]}var n=t.prototype;return n.mx=function(t){for(var n=0,i=this.Ou;n<i.length;n++){if(Yn(i[n][0],t))return!0}return!1},n.Ax=function(t){for(var n=0,i=this.Ou;n<i.length;n++){var e=i[n];if(Yn(e[0],t))return e[1]}},n.yx=function(t,n){for(var i=0,e=this.Ou;i<e.length;i++){var r=e[i];if(Yn(r[0],t))return void(r[1]=n)}this.Ou.push([t,n])},n.Mx=function(t,n){this.Ou.forEach((function(n){return t(n[1],n[0])}),n)},n.bx=function(){kt(this.Ou)},Dt(t,[{key:"Gp",get:function(){return this.Ou.length}}]),t}(),fu=function(){function t(){var t=this;this.Ix=new Q((function(n,i){t.Hd=n,t.Nx=i}))}var n=t.prototype;return n.Tx=function(t){this.Hd&&(this.Hd(t),this.$f())},n.Sx=function(t){this.Nx&&(this.Nx(t),this.$f())},n.n_=function(){this.Ix.catch(Nt),this.Sx(new en)},n.r_=function(t){var n=this;t.then((function(t){return n.Tx(t)}),(function(t){return n.Sx(t)}))},n.$f=function(){this.Hd=void 0,this.Nx=void 0},t}();function hu(t,n){return t===Uo?function(t){if(t.byteLength<2*cu.length)return t;var n=new DataView(t,0,2*cu.length),i=di(n,!0);if(i===cu)return t;return function(t){var n='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',i='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',e=""+n+Gn(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new E(2*t.length);return vi(bi(i),new _i,t,n),i}(e,!0).buffer}(t)}(n):n}var cu="<PlayReady";var au=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Dx=i,o.Ex=e,o}return Bt(n,t),n}(nn),vu=function(t,n){return vu=p.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)p.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},vu(t,n)};function du(t,n){if("function"!=typeof n&&null!==n)throw new m("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}vu(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function lu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.kx=t,this.Lx=n}t.prototype.get=function(t){var n=this.kx.get(t);if(0===this.Lx||void 0===n)return n;var i=this.kx.get(t+1)||0,e=n&(1<<8-this.Lx)-1,r=i>>8-this.Lx;return(e<<this.Lx)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.kx.get(y.floor((t+this.Lx)/8));if(void 0!==n)return(n&1<<7-this.Lx-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.kx.bitLength-this.Lx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.kx.length},enumerable:!1,configurable:!0})})(),y.pow(2,-52);function wu(t,n,i){return y.min(y.max(t,n),i)}function bu(t,n){return t>>8-n}function gu(t,n){return t&(1<<n)-1}var mu=function(){function t(t){this.xx=t,this.Cx=0,this.jx=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Cx+this.jx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.Cx===this.xx.length&&0===this.jx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Cx,bit:this.jx}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.xx);return n.seek(this.Cx,this.jx),n},t.prototype.canReadBits=function(t){return 8*this.Cx+t+this.jx<=8*this.xx.length},t.prototype.canReadBytes=function(t){return 0===this.jx?this.Cx+t<=this.xx.length:this.Cx+t<this.xx.length},t.prototype.incBit=function(){this.jx++,this.jx>7&&(this.Cx++,this.jx=0)},t.prototype.seek=function(t,n){this.Cx=t,this.jx=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.xx.get(this.Cx)>>7-this.jx&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.jx)return this.xx.get(this.Cx++);var t=gu(this.xx.get(this.Cx),8-this.jx),n=bu(this.xx.get(this.Cx+1),this.jx);return this.Cx++,t<<this.jx|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readBit());return n},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.jx&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<<i;else for(i=t-1;i>=0;i--)n|=this.readBit()<<i;return n},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-y.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var n=1<<t;return n+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var n=this.jx+t;this.Cx+=n>>3,this.jx=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}(),pu=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},yu=function(){function t(){this.Ox=[],this.Rx=[],this.Px=0}return t.from=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var e=new t,r=0,o=n;r<o.length;r++){var u=o[r];e.pushRange(u)}return e},t.prototype.pushRange=function(t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),i<0)throw new g("The buffer length must be positive.");if(0!==i){if(0===this.Rx.length)this.Rx.push(0);else{var e=this.Rx[this.Rx.length-1]+this.Ox[this.Ox.length-1].length;this.Rx.push(e)}this.Ox.push(t.subarray(n,n+i)),this.Px+=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.Ox;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.Ox=[],this.Rx=[],this.Px=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.Rx[n];return this.Ox[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.Ox.length<1)return-1;if(this.Ox.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.Ox[0];return"number"==typeof t?lu(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],e=n.length,r=t.length-e,o=0;o<=r&&!((o=lu(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u<s&&t[u]===n[f];u++,f++);if(u===s)return o}return-1}(i,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,n,i){if(0!==t.length){var e=0,r=t.length-1;if(1!==i(t[e],n)){if(1===i(n,t[r]))return r;for(;e!==r;){var o=y.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.Rx,t,pu)},t.prototype.join=function(){if(1===this.Ox.length)return this.Ox[0];var t=new E(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.Px},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,n){if(n<=0||n>4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;e<n;e++)i+=this.get(t+e)*y.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=wu(n,0,this.length),r=wu(i,0,this.length);if(e>r)return new t;if(e===r)return new t;for(var o=new t,u=this.findContainingBufferIndex(e),s=this.Ox[u],f=e,h=f-this.Rx[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.Rx[u],s=this.Ox[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.Ox.length-1,e=this.Ox[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.Ox[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),_u=function(){function t(n){this.zx=n||t.BUFFER_CHUNK_SIZE,this.Bx=!1,this.Ux=new yu,this.xx=new E(this.zx),this.Qx=0,this.Fx=0,this.jx=7}return t.prototype.closeByte=function(){this.xx[this.Qx++]=this.Fx,this.Qx>=this.zx&&this.closeBuffer(),this.Fx=0,this.jx=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.Qx&&(this.Ux.pushRange(this.xx,0,this.Qx),t&&(this.xx=new E(this.zx)),this.Qx=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.jx},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.Bx)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.Bx=!0,this.Ux},t.prototype.writeBit=function(t){if(this.Bx)throw new g("Cannot write to a closed BitWriter.");this.Fx|=t<<this.jx,0===this.jx?this.closeByte():this.jx--},t.prototype.writeByte=function(t){if(this.Bx)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.Fx=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.jx;this.Fx|=bu(t,n+1),this.closeByte(),this.Fx=gu(t,8-n)<<n+1,this.jx=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.Bx)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.Qx+t.length<=this.zx?(this.xx.set(t,this.Qx),this.Qx+=t.length,this.Qx===this.zx&&this.closeBuffer()):(this.closeBuffer(),this.Ux.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.jx;this.Fx|=bu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=gu(t[i-1],8-n),r=bu(t[i],n+1);this.Fx=e<<n+1|r,this.closeByte()}this.Fx=gu(t[t.length-1],8-n)<<n+1,this.jx=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new g("Received a negative number.");if(n>32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<<i)>0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i<n-1;i++)this.writeBit(0);this.writeUInt(t+1,n)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var n=function(t){for(var n=new E(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(t),i=0;i<n.length;i++)this.writeByte(n[i])},t.BUFFER_CHUNK_SIZE=1024,t}(),Su=function(){function t(t){this.rb=new yu,this.Yx=t}return t.prototype.closeWriter=function(){void 0!==this.Yx&&(this.rb=this.rb.concat(this.Yx.close()),this.Yx=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Yx&&(this.Yx=new _u),this.Yx},enumerable:!1,configurable:!0}),t.prototype.concat=function(t){this.closeWriter(),this.rb=this.rb.concat(t)},t.prototype.toRangedBuffer=function(){return this.closeWriter(),this.rb},t}(),Tu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(n){var i=this.getSize(),e=i>=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new Su;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Eu(t,n){return t instanceof Fn?64===n:t<y.pow(2,n)}function Iu(t,n){return y.round(t*y.pow(2,n))}function ku(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Ru(t,n){return t/y.pow(2,n)}var Ou=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return du(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Tu),Nu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return du(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(yu.from(this.data))},n}(Tu),Pu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();var Au=16384;function Du(t){var n=t.length;if(n<=Au)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Au)i.push(String.fromCharCode.apply(String,t.slice(e,e+Au)));return i.join("")}var Cu=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function xu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Bu(t,n,i){var e=qu(Vu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Mu(t,n,i){return n.offset+i<=t.byteLength}function Uu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Lu(t,n,i){void 0===i&&(i=!1);var e=Uu(t,n,i),r=Uu(t,n,i),o=i?r:e,u=i?e:r;return Fn.fromBits(u,o,!0)}function Fu(t,n,i){return Du(function(t){return[].slice.call(t)}(Bu(t,n,i)))}function zu(t,n){var i,e=xu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&xu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&xu(t,n))+(63&xu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&xu(t,n))+64*(63&xu(t,n))+(63&xu(t,n))),i}function Wu(t,n){return function(t,n,i){var e=[],r=function(t,n){return n.offset+3<=t.byteLength&&239===t.getUint8(n.offset)&&187===t.getUint8(n.offset+1)&&191===t.getUint8(n.offset+2)}(t,n);r&&n.shift(3);for(;n.offset<t.byteLength;){var o=zu(t,n);if(void 0===o)break;if(i&&0===o)break;e.push(o)}return function(t){for(var n=[],i=0,e=t;i<e.length;i++){var r=e[i];r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Du(n)}(e)}(t,n,!0)}function qu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new E(t.buffer,t.byteOffset+n,i-n)}function Hu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function Vu(t){return new E(t.buffer,t.byteOffset,t.byteLength)}var Xu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Pu(this.offset<<3)},t}(),ju=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return xu(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Uu(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=Uu(t,n,i),r=Uu(t,n,i),o=i?r:e,u=i?e:r;return Fn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Lu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Bu(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;r<i;r++)e.push(Uu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Fu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Wu(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function Yu(t,n){return t.type===n}var Ku=8;function Gu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=$u(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new g("Data incomplete");return n.boxes}function $u(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Mu(t,n,Ku)){return{complete:!1,neededOffset:o=n.offset+Ku}}var e=Uu(t,n),r=Fu(t,n,4);if(1===e){if(!Mu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Lu(t,n).toNumber()}if("uuid"===r){if(!Mu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Fu(t,n,16)}var u=n.offset,s={type:r,size:e,headerSize:u-i};return{complete:!0,header:s}}(t,n);if(!e.complete)return e;var r=e.header,o=r.size;0===o&&(o=t.byteLength-i);var u=i+o;if(u>t.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new ju(Hu(t,i,u),new Xu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Zu(t){return{version:t>>24,flags:new Cu(16777215&t)}}function Ju(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Qu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function ts(t){var n=t.nextUint32Array(9);return{a:Ru(n[0],16),b:Ru(n[1],16),u:Ru(n[2],30),c:Ru(n[3],16),d:Ru(n[4],16),v:Ru(n[5],30),x:Ru(n[6],16),y:Ru(n[7],16),w:Ru(n[8],30)}}function ns(t){return new Nu(t.type,qu(Vu(t.data.data),t.data.cursor.offset))}var is=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return du(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.Gx},set:function(t){this.Gx=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Ou);function es(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new is(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}du(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(is);var rs=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.Vx},set:function(t){if(!Eu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.Vx=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}(),os=(function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f=t.call(this,4,s.fixed28BitMode)||this;return f.upStream=e,f.decoderSpecificInfo=u,f.objectTypeIndication=n,f.streamType=i,f.bufferSizeDb=r,f.maxBitrate=o.max,f.avgBitrate=o.avg,f}du(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.Wx},set:function(t){if(!Eu(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.Wx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.Hx},set:function(t){if(!Eu(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.Hx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Xx},set:function(t){if(!Eu(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.Xx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.Zx},set:function(t){if(!Eu(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.Zx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.qx},set:function(t){if(!Eu(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.qx=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var n=0,i=this.decoderSpecificInfo;n<i.length;n++){i[n].serialize(t)}}}(rs),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}du(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(yu.from(this.data))}}(rs),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return du(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(rs)),us=(function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,3,r.fixed28BitMode)||this;return o.decoderConfigDescriptor=e,o.esId=n,o.streamPriority=i,o.dependsOnEsId=null==r?void 0:r.dependsOnEsId,o.urlString=null==r?void 0:r.url,o.ocrEsId=null==r?void 0:r.ocrEsId,o.slConfigDescriptor=new os(r.fixed28BitMode),o}du(n,t),p.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"esId",{get:function(){return this.Kx},set:function(t){if(!Eu(t,16))throw new g("Provided esId does not fit in 16 bits.");this.Kx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Jx},set:function(t){if(!Eu(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.Jx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.$x},set:function(t){if(t&&!Eu(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.$x=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.tC},set:function(t){if(t&&!Eu(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.tC=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},n.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(rs),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return du(n,t),n.prototype.getSize=function(){return t.prototype.getSize.call(this)+this.boxes.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serialize=function(){for(var n=t.prototype.serialize.call(this),i=0,e=this.boxes;i<e.length;i++){var r=e[i];n=n.concat(r.serialize())}return n},n}(Tu)),ss=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return du(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(us),fs=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return du(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.iC},set:function(t){if(!Eu(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.iC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){for(var n=0;n<6;n++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},n}(ss),hs=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return du(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.eC},set:function(t){if(!Eu(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.eC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.sC},set:function(t){if(!Eu(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.sC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.nC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.nC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+8+2+2+2+2+(void 0!==this.sampleRate?4:0)+(null!==(i=null===(n=this.extra)||void 0===n?void 0:n.length)&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.channelCount,16),n.writer.writeUInt(this.sampleSize,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(Iu(this.sampleRate,16),32),this.extra&&ku(n.writer,this.extra)},n}(fs),cs=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ou),function(t){function n(n){var i=t.call(this,"clap")||this;return i.cleanApertureWidthN=n.cleanApertureWidthN,i.cleanApertureWidthD=n.cleanApertureWidthD,i.cleanApertureHeightN=n.cleanApertureHeightN,i.cleanApertureHeightD=n.cleanApertureHeightD,i.horizOffN=n.horizOffN,i.horizOffD=n.horizOffD,i.vertOffN=n.vertOffN,i.vertOffD=n.vertOffD,i}du(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.oC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.oC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.hC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.hC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.aC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.uC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.cC},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.cC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.lC},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.lC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.dC},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.dC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.fC},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.fC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 32},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.cleanApertureWidthN,32),t.writer.writeUInt(this.cleanApertureWidthD,32),t.writer.writeUInt(this.cleanApertureHeightN,32),t.writer.writeUInt(this.cleanApertureHeightD,32),t.writer.writeUInt(this.horizOffN,32),t.writer.writeUInt(this.horizOffD,32),t.writer.writeUInt(this.vertOffN,32),t.writer.writeUInt(this.vertOffD,32)}}(Tu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleOffset,32)})))throw new g("Not all entries can be represented in 64 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(Ou),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}du(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this._C},set:function(t){this.flags=void 0===t?1:0,this._C=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ou),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}du(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this._C},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this._C=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ou),function(t){function n(){return t.call(this,"dinf")||this}du(n,t)}(ss),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return du(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(us)),as=(function(t){function n(){return t.call(this,"dref",0,0)||this}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(cs),function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"elst",i,e)||this;return r.entries=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Eu(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(Ou)),vs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration,32),t.writer.writeInt(r.mediaTime,32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(as),ds=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(r.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(r.mediaTime.getHighBits(),32),t.writer.writeInt(r.mediaTime.getLowBits(),32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(as);function ls(t){for(var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=[],s=0;s<o;s++){var f=void 0,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 vs(u,r.raw):new ds(u,r.raw)}var ws=function(t){function n(){return t.call(this,"edts")||this}return du(n,t),n}(ss);function bs(t){for(var n=new ws,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"elst")?n.boxes.push(ls(r)):n.boxes.push(ns(r))}return n}var gs=function(t){function n(n,i,e,r){var o=t.call(this,n)||this;return o.majorBrand=i,o.minorVersion=e,o.compatibleBrands=r,o}return du(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.gC},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.gC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.vC},set:function(t){if(!Eu(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.vC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.wC},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.wC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4*(2+this.compatibleBrands.length)},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.majorBrand),t.writer.writeUInt(this.minorVersion,32);for(var n=0,i=this.compatibleBrands;n<i.length;n++){var e=i[n];t.writer.writeString(e)}},n}(Tu),ms=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}du(n,t)}(gs),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}du(n,t),n.prototype.getBoxContentSize=function(){var t,n;return null!==(n=null===(t=this.data)||void 0===t?void 0:t.length)&&void 0!==n?n:0},n.prototype.serializeBoxContent=function(t){this.data&&t.concat(yu.from(this.data))}}(Tu),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=t.call(this,"mdhd",e,r)||this;return o.creationTime=n.creation,o.modificationTime=n.modification,o.timescale=n.scale,o.duration=n.duration,o.language=i,o}return du(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.mC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.mC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.pC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.pC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.yC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.yC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.MC},set:function(t){if(!Ss(t))throw new g("Expected an ISO-639-2/T language code");this.MC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Ou)),ps=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return du(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(ms),ys=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return du(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(ms);function _s(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=Ju(n,e),u=new mu(yu.from(n.nextUint8Array(2)));u.skipBits(1);for(var s=[],f=0;f<3;f++)s.push(u.readUInt(5));var h=s.map((function(t){return String.fromCharCode(t+96)})).join("");return Ss(h)||(h="und"),n.skip(2),0===e?new ps(o,h,r.raw):new ys(o,h,r.raw)}function Ss(t){return/^[a-z]{3}$/.test(t)}var Ts=function(t){function n(){return t.call(this,"mdia")||this}return du(n,t),n}(ss);function Es(t){for(var n=new Ts,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mdhd")?n.boxes.push(_s(r)):Yu(r,"hdlr")?n.boxes.push(es(r)):n.boxes.push(ns(r))}return n}var Is;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new yu,n}du(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(Tu),function(t){function n(){return t.call(this,"minf")||this}du(n,t)}(ss),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.handler.serialize())}}(cs);!function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(Is||(Is={}));var ks,Rs,Os={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ns(t,n){n.writer.writeUInt(Iu(t.a,16),32),n.writer.writeUInt(Iu(t.b,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.c,16),32),n.writer.writeUInt(Iu(t.d,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.x,16),32),n.writer.writeUInt(Iu(t.y,16),32),n.writer.writeUInt(Iu(1,30),32)}function Ps(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:ks.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Rs.UNKNOWN,2)}function As(t,n){var i,e,r;n.writer.writeUInt(0,4),Ps(t,n),n.writer.writeUInt(null!==(i=t.samplePaddingValue)&&void 0!==i?i:0,3),n.writer.writeBool(null!==(e=t.sampleIsNonSyncSample)&&void 0!==e&&e),n.writer.writeUInt(null!==(r=t.sampleDegradationPriority)&&void 0!==r?r:0,16)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(ks||(ks={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Rs||(Rs={}));var Ds=function(){},Cs=function(t){function n(n,i,e){var r=t.call(this,"pssh",n,0)||this;return r.systemId=i,r.data=e,r}return du(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.bC},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.bC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.TC},set:function(t){if(!Eu(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.TC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+16+4+this.data.length},n.prototype.serializeVersionBoxContent=function(t){},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(yu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(yu.from(this.data))},n}(Ou),xs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return du(n,t),n}(Cs),Bs=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return du(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.SC},set:function(t){if(!Eu(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new g("Not all provided key ids are 16 bytes long.");this.SC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+16*this.kIds.length},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.kIds.length,32);for(var n=0,i=this.kIds;n<i.length;n++){var e=i[n];t.concat(yu.from(e))}},n}(Cs);function Ms(t){var n=t.data.nextUint8();t.data.skip(3);var i=t.data.nextUint8Array(16),e=[];if(1===n)for(var r=t.data.nextUint32(),o=0;o<r;o++)e.push(t.data.nextUint8Array(16));var u=t.data.nextUint32(),s=t.data.nextUint8Array(u);return 1===n?new Bs(i,s,e):new xs(i,s)}var Us=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"mehd",i,e)||this;return r.fragmentDuration=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.NC},set:function(t){if(!Eu(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.NC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),Ls=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Us),Fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),n.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},n}(Us);function zs(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Ls(n.nextUint32(),r.raw):new Fs(n.nextUint64(),r.raw)}var Ws=function(t){function n(n,i,e,r){void 0===i&&(i={}),void 0===e&&(e=0),void 0===r&&(r=0);var o,u,s,f=this;return(f=t.call(this,"trex",e,r)||this).trackId=n,f.defaultSampleDescriptionIndex=null!==(o=null==i?void 0:i.sampleDescriptionIndex)&&void 0!==o?o:0,f.defaultSampleDuration=null!==(u=i.sampleDuration)&&void 0!==u?u:0,f.defaultSampleSize=null!==(s=i.sampleSize)&&void 0!==s?s:0,f.defaultSampleFlags=i.sampleFlags,f}return du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.IC},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.DC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.DC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.EC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.EC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.kC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.kC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.LC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.LC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},n.prototype.serializeBoxContent=function(n){var i;t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),n.writer.writeUInt(this.defaultSampleDescriptionIndex,32),n.writer.writeUInt(this.defaultSampleDuration,32),n.writer.writeUInt(this.defaultSampleSize,32),As(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Ou);function qs(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Qu(new mu(yu.from(n.nextUint8Array(4))));return new Ws(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Hs=function(t){function n(){return t.call(this,"mvex")||this}return du(n,t),n}(ss);function Vs(t){for(var n=new Hs,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mehd")?n.boxes.push(zs(r)):Yu(r,"trex")?n.boxes.push(qs(r)):n.boxes.push(ns(r))}return n}var Xs=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:Os,c.xC=e,c}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.mC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.mC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.pC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.pC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.yC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.yC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.jC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.jC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.OC},set:function(t){if(!Eu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.OC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.RC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.RC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.xC},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!Eu(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.xC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+2+2+8+36+24+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMvhdContent(n),n.writer.writeUInt(Iu(this.rate,16),32),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ns(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(Ou),js=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return du(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(Xs),Ys=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,1,r)||this}return du(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Xs);function Ks(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=Ju(n,e),u=Ru(n.nextUint32(),16),s=Ru(n.nextUint16(),8);n.skip(2),n.skip(8);var f=ts(n);n.skip(24);var h=n.nextUint32();return 0===e?new js(o,h,{rate:u,volume:s,matrix:f},r.raw):new Ys(o,h,{rate:u,volume:s,matrix:f},r.raw)}var Gs=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:Os,a}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.mC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.mC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.pC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.pC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.IC},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!Eu(t,32))throw new g("trackId cannot exceed 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.yC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.yC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.OC},set:function(t){if(!Eu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.OC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.zC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.zC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.BC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.BC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.QC},set:function(t){if(!Eu(t,16))throw new g("Provided layer does not fit in 16 bits.");this.QC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.FC},set:function(t){if(!Eu(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.FC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.RC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.RC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeTkhdContent(n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.layer,16),n.writer.writeUInt(this.alternateGroup,16),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),Ns(this.matrix,n),n.writer.writeUInt(Iu(this.width,16),32),n.writer.writeUInt(Iu(this.height,16),32)},n}(Ou),$s=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},n}(Gs),Zs=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Gs);function Js(t){var n,i,e,r,o=t.data,u=Zu(o.nextUint32()),s=u.version,f=u.flags,h=f.isSet(8),c=f.isSet(4),a=f.isSet(2),v=f.isSet(1);0===s?(n=o.nextUint32(),i=o.nextUint32(),e=o.nextUint32(),o.skip(4),r=o.nextUint32()):(n=o.nextUint64(),i=o.nextUint64(),e=o.nextUint32(),o.skip(4),r=o.nextUint64()),o.skip(8);var d=o.nextInt16(),l=o.nextInt16(),w=Ru(o.nextInt16(),8);o.skip(2);var b=ts(o),g=Ru(o.nextUint32(),16),m=Ru(o.nextUint32(),16);return 0===s?new $s({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a}):new Zs({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var Qs=function(t){function n(){return t.call(this,"trak")||this}return du(n,t),n}(ss);function tf(t){for(var n=new Qs,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"tkhd")?n.boxes.push(Js(r)):Yu(r,"mdia")?n.boxes.push(Es(r)):Yu(r,"edts")?n.boxes.push(bs(r)):n.boxes.push(ns(r))}return n}var nf=function(t){function n(){return t.call(this,"moov")||this}return du(n,t),n}(ss);var ef=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"tfdt",i,e)||this;return r.baseMediaDecodeTime=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.YC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.YC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),rf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(ef),of=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},n}(ef);function uf(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new rf(n.nextUint32(),r.raw):new of(n.nextUint64(),r.raw)}var sf=function(t){function n(n,i){void 0===i&&(i=0);var e=t.call(this,"tfhd",i,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(n))||this;return e.trackId=n.trackId,e.baseDataOffset=n.baseDataOffset,e.sampleDescriptionIndex=n.sampleDescriptionIndex,e.defaultSampleDuration=n.defaultSampleDuration,e.defaultSampleSize=n.defaultSampleSize,e.defaultSampleFlags=n.defaultSampleFlags,e}return du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.IC},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.GC},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!Eu(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.GC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.VC},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!Eu(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.VC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.EC},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.EC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.kC},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.kC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.LC},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.LC=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(n+=8),this.flags.sampleDescriptionIndexPresent&&(n+=4),this.flags.defaultSampleDurationPresent&&(n+=4),this.flags.defaultSampleSizePresent&&(n+=4),this.flags.defaultSampleFlagsPresent&&(n+=4),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(n.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&n.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&n.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&n.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&As(this.defaultSampleFlags,n)},n}(Ou);function ff(t){var n=t.data,i=n.nextUint8(),e=new mu(yu.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var 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?Qu(new mu(yu.from(n.nextUint8Array(4)))):void 0;return new sf({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var hf=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return du(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.WC},set:function(t){if(t&&!Eu(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.WC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.HC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.HC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.XC},set:function(t){var n,i;if(!Eu(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!Eu(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!Eu(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Eu(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Eu(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Eu(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.XC=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(n+=4),this.flags.firstSampleFlagsPresent&&(n+=4),this.flags.sampleDurationPresent&&(n+=4*this.samples.length),this.flags.sampleSizePresent&&(n+=4*this.samples.length),this.flags.sampleFlagsPresent&&(n+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(n+=4*this.samples.length),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&n.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&As(this.firstSampleFlags,n);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];this.flags.sampleDurationPresent&&n.writer.writeUInt(r.duration,32),this.flags.sampleSizePresent&&n.writer.writeUInt(r.size,32),this.flags.sampleFlagsPresent&&As(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Ou);function cf(t){var n=t.data,i=n.nextUint8(),e=new mu(yu.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Qu(new mu(yu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Qu(new mu(yu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new hf(i,a,v)}var af=function(t){function n(){return t.call(this,"traf")||this}return du(n,t),n}(ss);function vf(t){for(var n=new af,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"tfhd")?n.boxes.push(ff(r)):Yu(r,"tfdt")?n.boxes.push(uf(r)):Yu(r,"trun")?n.boxes.push(cf(r)):n.boxes.push(ns(r))}return n}var df=function(t){function n(){return t.call(this,"moof")||this}return du(n,t),n}(ss);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}du(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.ZC},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.ZC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(Ou);var lf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return du(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.qC},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.qC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Tu),wf=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}du(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.KC},set:function(t){if(!Eu(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.KC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.JC},set:function(t){if(!Eu(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.JC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.hSpacing,32),t.writer.writeUInt(this.vSpacing,32)}}(Tu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}du(n,t),n.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},n.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(ss),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new lf(n),r}du(n,t),n.prototype.getBoxContentSize=function(){var t,n,i,e;return this.frma.getSize()+(null!==(n=null===(t=this.schm)||void 0===t?void 0:t.getSize())&&void 0!==n?n:0)+(null!==(e=null===(i=this.schi)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)},n.prototype.serializeBoxContent=function(t){t.concat(this.frma.serialize()),this.schm&&t.concat(this.schm.serialize()),this.schi&&t.concat(this.schi.serialize())}}(Tu),function(t){function n(n,i,e){var r=t.call(this,"saio",n,void 0===e?0:1)||this;return r.entries=i,r.explicitAuxInfoType=e,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){var n=this;if(!Eu(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,n.bitSize)})))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.rC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.$C},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.$C=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(Ou)),bf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}du(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e,32)}}}(wf),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}du(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.getHighBitsUnsigned(),32),t.writer.writeUInt(e.getLowBitsUnsigned(),32)}}}(wf),function(t){function n(n,i,e){var r=t.call(this,"saiz",0,void 0===e?0:1)||this;return r.defaultSampleInfoSize=n,r.sampleInfoSizes=i,r.explicitAuxInfoType=e,r}du(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.tj},set:function(t){if(!Eu(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.tj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.ij},set:function(t){if(!Eu(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,8)})))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.ij=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.$C},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.$C=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},n.prototype.serializeBoxContent=function(n){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Ou),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n);for(var i=0,e=this.samples;i<e.length;i++){Ps(e[i],n)}}}(Ou),function(t){function n(n){return t.call(this,"stsd",n,0)||this}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(cs),function(t){function n(n,i,e){var r=t.call(this,"sgpd",n,0)||this;return r.entries=e,r.groupingType=i,r}return du(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.ej},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.ej=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(Ou)),gf=(function(t){function n(n,i){return t.call(this,0,n,i)||this}du(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(bf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}du(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.sj},set:function(t){if(!Eu(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.sj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},n.prototype.serializeEntryBoxContent=function(t,n){0===this.defaultLength&&t.writer.writeUInt(n.getBoxContentSize(),32),n.serializeBoxContent(t)}}(bf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new g("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}du(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.DC},set:function(t){if(!Eu(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.DC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(bf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}du(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.nj},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all sampleSizes can be represented in 32 bits.");this.nj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ou),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}du(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.kC},set:function(t){if(!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.kC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.XC},set:function(t){if(!Eu(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.XC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(Ou),function(t){function n(){return t.call(this,"stbl")||this}du(n,t)}(ss),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.firstChunk,32)||!Eu(t.sampleDescriptionIndex,32)||!Eu(t.samplesPerChunk,32)})))throw new g("Not all entries can be represented in 96 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(Ou),function(t){function n(){return t.call(this,"schi")||this}du(n,t)}(ss),function(t){function n(n,i,e){var r=t.call(this,"schm",0,void 0===e?0:1)||this;return r.schemeType=n,r.schemeVersion=i,r.schemeUri=e,r}du(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this.rj},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.rj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.hj},set:function(t){if(!Eu(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.hj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.aj},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.aj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(Ou),function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s=0);var f=t.call(this,"sidx",n,s)||this;return f.referenceId=i,f.timescale=e,f.earliestPresentationTime=r,f.firstOffset=o,f.references=u,f}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"referenceId",{get:function(){return this.uj},set:function(t){if(!Eu(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.uj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.cj},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.cj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.lj},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.lj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.dj},set:function(t){if(!Eu(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!Eu(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!Eu(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!Eu(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.dj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(Ou)),mf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,0,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(gf),pf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,1,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},n}(gf);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}du(n,t)})(gs),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}du(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this._j},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Eu(Iu(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this._j=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(Iu(this.balance,8),16),n.writer.writeUInt(0,16)}}(Ou),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ou),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.rC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleDelta,32)})))throw new g("Not all entries can be represented in 64 bits.");this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(Ou),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.IC},set:function(t){if(!Eu(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32)}}(cs),function(t){function n(){return t.call(this,"udta")||this}du(n,t)}(ss);var yf={red:0,green:0,blue:0},_f=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=yf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}du(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.gj},set:function(t){if(!Eu(t.red,16)||!Eu(t.green,16)||!Eu(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.gj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(Ou),function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,h,c,a=this;return(a=t.call(this,n,i)||this).width=e.width,a.height=e.height,a.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,a.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,a.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",a.frameCount=null!==(h=r.frameCount)&&void 0!==h?h:1,a.depth=null!==(c=r.depth)&&void 0!==c?c:24,a.clap=r.clap,a.pasp=r.pasp,a.extra=o,a}return du(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.zC},set:function(t){if(!Eu(t,16))throw new g("Provided width does not fit in 16 bits.");this.zC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.BC},set:function(t){if(!Eu(t,16))throw new g("Provided height does not fit in 16 bits.");this.BC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.vj},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.vj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.wj},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.wj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.mj},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.mj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.pj},set:function(t){if(!Eu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.pj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.Aj},set:function(t){if(!Eu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.Aj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(Iu(this.horizontalResolution,16),32),n.writer.writeUInt(Iu(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&ku(n.writer,this.extra)},n}(fs)),Sf=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof E?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof E?n.concat(yu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ou),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(hs),function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,"mp4v",n,i,r)||this;return o.esDescriptor=e,o}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(_f),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(fs),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Tu),function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.yj},set:function(t){if(!Eu(t,8))throw new g("Provided version does not fit in 8 bits.");this.yj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.Mj},set:function(t){if(!Eu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.Mj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.bj},set:function(t){if(!Eu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.bj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.Tj},set:function(t){if(!Eu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.Tj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.Sj},set:function(t){if(!Eu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.Sj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Nj},set:function(t){if(!Eu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.Nj=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce((function(t,n){return t+n.length}),0)+2*this.ppsSets.length+this.ppsSets.reduce((function(t,n){return t+n.length}),0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.length,16),t.concat(yu.from(e))}t.writer.writeByte(this.ppsSets.length);for(var r=0,o=this.ppsSets;r<o.length;r++){var u=o[r];t.writer.writeUInt(u.length,16),t.concat(yu.from(u))}}}(),function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u=t.call(this,"avc1",n,i,r)||this;return u.configurationBox=e,u.bitrateBox=o,u}du(n,t),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(i=null===(n=this.bitrateBox)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.configurationBox.serialize()),this.bitrateBox&&n.concat(this.bitrateBox.serialize())}}(_f),function(t){function n(n,i,e){var r=t.call(this,"btrt")||this;return r.bufferSizeDb=n,r.max=i,r.avg=e,r}du(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Xx},set:function(t){if(!Eu(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.Xx=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.nf},set:function(t){if(!Eu(t,32))throw new g("Provided max does not fit in 32 bits.");this.nf=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.Ij},set:function(t){if(!Eu(t,32))throw new g("Provided avg does not fit in 32 bits.");this.Ij=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 12},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.bufferSizeDb,32),t.writer.writeUInt(this.max,32),t.writer.writeUInt(this.avg,32)}}(Tu),function(t){function n(n,i){var e,r,o,u,s=this;if(s=t.call(this,"tenc",n,0)||this,i.perSampleIvSize>0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new E(0),s}return du(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.Dj},set:function(t){if(!Eu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.Dj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.Ej},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.Ej=t,this.Lj=new E(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.xj},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.xj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.Lj},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.Lj=t,this.Ej=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),ku(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),ku(t.writer,this.constantIv))},n}(Ou)),Tf=(function(t){function n(n){return t.call(this,0,n)||this}du(n,t)}(Sf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return du(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.Cj},set:function(t){if(!Eu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.Cj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.jj},set:function(t){if(!Eu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.jj=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(Sf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new Tf(n),i}du(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ds);function Ef(t){return void 0!==t.iv}function If(t){return void 0!==t.subsamples}(function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}du(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.XC},set:function(t){var n;if(!Eu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(Ef(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=If(r)),!0===n&&!If(r)||!1===n&&If(r))throw new g("Mix of samples with and without subsamples detected.");if(If(r)){if(!Eu(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!Eu(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Eu(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.XC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];Ef(r)&&(n+=r.iv.length),If(r)&&(n+=2+6*r.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];if(Ef(r)&&ku(n.writer,r.iv),If(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}})(Ou),function(t){function n(n,i,e,r,o){var u=t.call(this,"emsg",0,0)||this;return u.schemeIdUri=n,u.value=i,u.data=o,u.id=e,u.timescale=r.timescale,u.presentationTimeDelta=r.presentationTimeDelta,u.eventDuration=r.eventDuration,u}du(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Oj},set:function(t){if(!Eu(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.Oj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.Rj},set:function(t){if(!Eu(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.Rj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.qS},set:function(t){if(!Eu(t,32))throw new g("The provided id does not fit in 32 bits.");this.qS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.schemeIdUri.length+1+this.value.length+1+16+this.data.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeIdUri),n.writer.writeByte(0),n.writer.writeString(this.value),n.writer.writeByte(0),n.writer.writeUInt(this.timescale,32),n.writer.writeUInt(this.presentationTimeDelta,32),n.writer.writeUInt(this.eventDuration,32),n.writer.writeUInt(this.id,32),n.concat(yu.from(this.data))}}(Ou),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new Su,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function kf(t,n){return function(i){var e=new ju(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Xu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=$u(i,e);if(!r.complete)return;if(Yu(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}kf("moov",(function(t){for(var n=new nf,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mvhd")?n.boxes.push(Ks(r)):Yu(r,"trak")?n.boxes.push(tf(r)):Yu(r,"mvex")?n.boxes.push(Vs(r)):Yu(r,"pssh")?n.boxes.push(Ms(r)):n.boxes.push(ns(r))}return n})),kf("sidx",(function(t){var n,i,e=t.data,r=Zu(e.nextUint32()),o=r.version,u=r.flags,s=e.nextUint32(),f=e.nextUint32();0===o?(n=e.nextUint32(),i=e.nextUint32()):(n=e.nextUint64(),i=e.nextUint64()),e.skip(2);for(var h=e.nextUint16(),c=[],a=0;a<h;a++){var v=new mu(yu.from(e.nextUint8Array(12))),d=v.readBit(),l=v.readUInt(31),w=v.readUInt(32),b=Boolean(v.readBit()),g=v.readUInt(3),m=v.readUInt(28);c.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new mf(s,f,n,i,c,u.raw):new pf(s,f,n,i,c,u.raw)})),kf("moof",(function(t){for(var n=new df,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"traf")?n.boxes.push(vf(r)):Yu(r,"pssh")?n.boxes.push(Ms(r)):n.boxes.push(ns(r))}return n}));var Rf=kf("pssh",Ms),Of=function(t){function n(n,i){var e;(e=t.call(this)||this).Uj=n,e.Yw=i,e.Yj=!1,e.Xj=function(){e.Wj()},e.Zj=function(t){e.yo(new ru(e,t.messageType,hu(e.Yw,t.message)))},e.qj=function(){e.Yj=!0,e.Qj.Gp>0&&(e.Qj.bx(),e.yo(new eu(e.Qj))),e.Uj.removeEventListener("keystatuseschange",e.Xj),e.Uj.removeEventListener("message",e.Zj)},e.Uj.addEventListener("keystatuseschange",e.Xj),e.Uj.addEventListener("message",e.Zj),e.Qj=new su;var r=[];return e.Uj.closed&&r.push(Q.resolve(e.Uj.closed)),e.Gj=new fu,r.push(e.Gj.Ix),e.zj=Q.race(r).then(e.qj,e.qj),e.Wj(),e}Bt(n,t);var i=n.prototype;return i.Ws=function(){if(this.Yj)return this.zj;var t=[];return t.push(Q.resolve(this.Uj.close())),t.push(cn(1e3)),this.Gj.r_(Q.race(t).catch(Nf)),this.Yj=!0,this.zj},i.Vj=function(t,n,i){if(Zi.Uk){var e=Rf(mi(n));if(1===e.version)n=new xs(e.systemId,e.data).serialize().join()}return Q.resolve(this.Uj.generateRequest(t,n)).catch(Nf)},i.$n=function(t){return Q.resolve(this.Uj.load(t)).catch(Nf)},i.WS=function(){return Q.resolve(this.Uj.remove()).catch(Nf)},i.Yn=function(t){return Q.resolve(this.Uj.update(t)).catch(Nf)},i.Wj=function(){var t=this;this.Qj.bx(),this.Uj.keyStatuses.forEach((function(n,i){t.Hj(i,n)})),this.yo(new eu(this.Qj))},i.Hj=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=mi(t);if(this.Yw===Uo&&16===e.byteLength){var r=bi(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.Yw===Uo&&"status-pending"===n&&(n="usable"),this.Qj.yx(e,n)},Dt(n,[{key:"Pj",get:function(){return this.zj}},{key:"Bj",get:function(){return this.Uj.expiration}},{key:"nx",get:function(){return this.Qj}},{key:"Fj",get:function(){return this.Uj.sessionId}}]),n}(Ii);function Nf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new au(t.message,void 0,n,t)}var Pf=function(){function t(t,n,i){this.Jj=t,this.Fw=n,this.sd=i}var n=t.prototype;return n.Kj=function(t){var n=this;return ft((function(){return ht(this,(function(i){return[2,new Of(n.Jj.createSession(t),n.Fw)]}))}))()},n.$j=function(t){return Q.resolve(this.Jj.setServerCertificate(t))},n.bn=function(t){return Q.resolve(t.setMediaKeys(this.Jj))},n.tO=function(t){return Q.resolve(t.setMediaKeys(null))},n.tr=function(){return Q.resolve()},t}(),Af=function(){function t(t,n,i){this.iO=t,this.Yw=n,this.sO=i}var n=t.prototype;return n.eO=function(){var t=this;return ft((function(){var n;return ht(this,(function(i){switch(i.label){case 0:return[4,t.iO.createMediaKeys()];case 1:return n=i.sent(),[2,new Pf(n,t.Yw,t.sO)]}}))}))()},n.nO=function(){return this.sO},Dt(t,[{key:"Fw",get:function(){return this.iO.keySystem}}]),t}();function Df(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Cf(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,fO:e.fO},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter((function(t){return Boolean(t.contentType)}));s.length&&(o.audioCapabilities=s.filter((function(e){return xf(t,n,i,e)})),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter((function(t){return Boolean(t.contentType)}));f.length&&(o.videoCapabilities=f.filter((function(e){return xf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function xf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!It(n,e.encryptionScheme))&&(!e.robustness&&t(i,Df(e.contentType))))}function Bf(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Mf(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e.encryptionScheme&&n.push({contentType:e.contentType,robustness:e.robustness})}return t.concat(n)}function Uf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Lf))||!(!t.videoCapabilities||!t.videoCapabilities.some(Lf))}function Lf(t){return!t.robustness}function Ff(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(xo({},r,{robustness:n}))}return i}var zf=function(){function t(){}return t.prototype.aO=function(t,n){return ft((function(){var i,e,r,o,u,s,f;return ht(this,(function(h){switch(h.label){case 0:for(n=n.filter((function(t){return!t.fO})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Mf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Mf(e.videoCapabilities));if(t!==zo||!n.some(Uf))return[3,4];r=n.map((function(t){return function(t,n){return xo({},t,{videoCapabilities:t.videoCapabilities?Ff(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Ff(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,r)];case 2:return o=h.sent(),u=o.getConfiguration(),[2,new Af(o,t,u)];case 3:return h.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return s=h.sent(),f=s.getConfiguration(),[2,new Af(s,t,f)]}}))}))()},t._O=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}(),Wf=function(t){function n(n,i){var e;return(e=t.call(this)||this).yO=n,e.MO=i,e.Yj=!1,e.IO=void 0,e.pO=void 0,e.gO=void 0,e.qj=function(){e.Yj=!0,e.vO.Tx(void 0),e.gO&&(e.gO.removeEventListener("mskeyclose",e.qj),e.gO.removeEventListener("mskeymessage",e.bO),e.gO.removeEventListener("mskeyerror",e.Ss),e.gO.removeEventListener("mskeyadded",e.TO))},e.bO=function(t){e.pO&&(e.pO.Tx(void 0),e.pO=void 0),e.yo(new ru(e,"license-request",pi(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.gO&&e.gO.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);if(e.pO)e.pO.Sx(n),e.pO=void 0;else if(e.IO)e.IO.Sx(n),e.IO=void 0;else switch(n.Dx){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.SO("output-not-allowed");break;default:e.SO("internal-error")}}},e.TO=function(){e.pO&&(e.SO("usable"),e.pO.Tx(void 0),e.pO=void 0),e.IO&&(e.SO("usable"),e.IO.Tx(void 0),e.IO=void 0)},e.vO=new fu,e.wO=new su,e}Bt(n,t);var i=n.prototype;return i.Vj=function(t,n,i){var e=this;return ft((function(){return ht(this,(function(t){switch(t.label){case 0:return e.mO(),e.pO=new fu,e.Kj(mi(n),i),[4,e.pO.Ix];case 1:return t.sent(),[2]}}))}))()},i.Kj=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.AO;return(i=n?this.yO.createSession(this.MO,t,e):this.yO.createSession(this.MO,t)).addEventListener("mskeyclose",this.qj),i.addEventListener("mskeymessage",this.bO),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.TO),this.gO=i,this.SO("status-pending"),i},i.$n=function(t){var n=this;return ft((function(){return ht(this,(function(t){return n.mO(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return ft((function(){var i;return ht(this,(function(e){switch(e.label){case 0:if(n.IO=new fu,n.mO(),!n.gO)return[2,Q.resolve()];if(0===(i=mi(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.gO.update(i),[4,n.IO.Ix];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.Yj&&this.gO&&(this.Yj=!0,this.gO.close()),this.vO.Ix},i.WS=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.mO(),[2]}))}))()},i.mO=function(){if(this.Yj)throw new m("Already closing or closed.")},i.SO=function(t){this.wO.bx(),this.wO.yx(uu,t),this.yo(new eu(this.wO))},Dt(n,[{key:"Fj",get:function(){return this.gO&&this.gO.sessionId||""}},{key:"Bj",get:function(){return NaN}},{key:"Pj",get:function(){return this.vO.Ix}},{key:"nx",get:function(){return this.wO}}]),n}(Ii),qf=function(){function t(t,n,i){this.yO=t,this.Fw=n,this.sd=i;var e=Bf(i)||"video/mp4";this.MO=Df(e)}var n=t.prototype;return n.Kj=function(t){var n=this;return ft((function(){return ht(this,(function(t){return[2,new Wf(n.yO,n.MO)]}))}))()},n.$j=function(t){return Q.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.yO),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.yO):t.addEventListener("loadedmetadata",i),Q.resolve()},n.tO=function(t){return Q.resolve()},n.tr=function(){return Q.resolve()},t}(),Hf=function(){function t(t,n){this.Yw=t,this.DO=n}var n=t.prototype;return n.nO=function(){return this.DO},n.eO=function(){var t=new so.MSMediaKeys(this.Yw);return Q.resolve(new qf(t,this.Yw,this.DO))},Dt(t,[{key:"Fw",get:function(){return this.Yw}}]),t}(),Vf=function(){function t(){}return t.prototype.aO=function(t,n){try{return Q.resolve(function(t,n){if(!Xf())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(jf,nu,t,e);if(r)return new Hf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t._O=function(){return Xf()},t}();function Xf(){return void 0!==so.MSMediaKeys&&"function"==typeof so.MSMediaKeys.isTypeSupported}function jf(t,n){return so.MSMediaKeys.isTypeSupported(t,n)}var Yf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).xO=n,r.MO=i,r.LO=e,r.vO=new fu,r.jO=void 0,r.wO=new su,r.EO=void 0,r.CO=new fu,r.Ss=function(){var t=r.EO&&r.EO.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);r.jO?(r.jO.Sx(n),r.jO=void 0):n.Dx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.SO("output-not-allowed"):r.SO("internal-error"),r.yo(new ou)}},r.bO=function(t){r.yo(new ru(r,"license-request",pi(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.TO=function(){r.jO&&(r.jO.Tx(void 0),r.jO=void 0),r.SO("usable")},r}Bt(n,t);var i=n.prototype;return i.Vj=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.kO;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=li(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 _i;return ai(s,f,r,!0),vi(s,f,e,!0),ai(s,f,o,!0),vi(s,f,n,!0),ai(s,f,i.byteLength,!0),function(t,n,i){gi(t).set(gi(i),n.Lu),n.fp(i.byteLength)}(s,f,i),new E(u)}(mi(n),e,this.LO);return this.EO=this.xO.createSession(this.MO,r),this.EO.addEventListener("webkitkeymessage",this.bO,!1),this.EO.addEventListener("webkitkeyadded",this.TO,!1),this.EO.addEventListener("webkitkeyerror",this.Ss,!1),this.SO("status-pending"),this.CO.Tx(this.EO),this.CO=new fu,Q.resolve()},i.$n=function(t){return Q.resolve(!0)},i.Yn=function(t){var n=this;return ft((function(){var i,e;return ht(this,(function(r){switch(r.label){case 0:if(0===(i=mi(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.jO=new fu,(e=n.EO)?[3,2]:[4,n.CO.Ix];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.jO.Ix];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.EO;return n&&(n.removeEventListener("webkitkeymessage",this.bO,!1),n.removeEventListener("webkitkeyadded",this.TO,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.CO.n_(),null==(t=this.jO)||t.n_(),this.vO.Tx(void 0),this.vO.Ix},i.WS=function(){return Q.resolve(void 0)},i.SO=function(t){this.wO.bx(),this.wO.yx(uu,t),this.yo(new eu(this.wO))},Dt(n,[{key:"Fj",get:function(){return this.EO?this.EO.sessionId:""}},{key:"Bj",get:function(){return NaN}},{key:"Pj",get:function(){return this.vO.Ix}},{key:"nx",get:function(){return this.wO}}]),n}(Ii);var Kf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Gf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Gf||(Gf={}));var $f=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Gf.fromCode(this.code)}}]),n}(nn),Zf=function(){function t(t,n,i){this.xO=t,this.Fw=n,this.sd=i,this.LO=void 0;var e=Bf(i)||"video/mp4";this.MO=Df(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.xO},n.Kj=function(t){var n=this;return ft((function(){return ht(this,(function(t){if(!n.LO)throw new $f(Kf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Yf(n.xO,n.MO,n.LO)]}))}))()},n.$j=function(t){return this.LO=mi(t),Q.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.xO),Q.resolve()},n.tO=function(t){return t.webkitSetMediaKeys(null),Q.resolve()},n.tr=function(){return Q.resolve()},t}(),Jf=function(){function t(t,n){this.Yw=t,this.DO=n}var n=t.prototype;return n.nO=function(){return this.DO},n.eO=function(){var t=new so.WebKitMediaKeys(this.Yw);return Q.resolve(new Zf(t,this.Yw,this.DO))},Dt(t,[{key:"Fw",get:function(){return this.Yw}}]),t}(),Qf=function(){function t(){}return t.prototype.aO=function(t,n){try{return Q.resolve(function(t,n){if(t!==Xo)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!th())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(nh,iu,t,e);if(r)return new Jf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t._O=function(){return th()},t}();function th(){return void 0!==so.WebKitMediaKeys&&"function"==typeof so.WebKitMediaKeys.isTypeSupported}function nh(t,n){return so.WebKitMediaKeys.isTypeSupported(t,n)}var ih,eh=function(){function t(t){this.OO=t}return t.prototype.aO=function(t,n){var i=this;return ft((function(){var e,r,o;return ht(this,(function(u){switch(u.label){case 0:e=0,r=i.OO,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.aO(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}}))}))()},t}(),rh=new an,oh=function(t){function n(n){var i;return(i=t.call(this)||this).Yw=n,i.pO=void 0,i.jO=void 0,i.Bx=!1,i.JO=void 0,i.XO=void 0,i.vO=new fu,i.KO="",i.ZO=new fu,i.qO=new su,i}Bt(n,t);var i=n.prototype;return i.GO=function(){this.jO&&(this.SO("usable"),this.jO.Tx(void 0),this.jO=void 0)},i.VO=function(t){var n=new au("Unknown CDM error",t.errorCode,t.systemCode);this.jO?(this.jO.Sx(n),this.jO=void 0):this.pO?(this.pO.Sx(n),this.pO=void 0):n.Dx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.SO("output-restricted"):1===n.Ex?this.SO("expired"):this.SO("internal-error")},i.WO=function(t){0!==t.message.byteLength?(this.pO&&(this.pO.Tx(void 0),this.pO=void 0),this.yo(new ru(this,"license-request",hu(this.Yw,pi(t.message).buffer),t.defaultURL||void 0))):this.pO&&(this.pO.Sx("Empty key message"),this.pO=void 0)},i.HO=function(t){this.XO||(this.XO=t,this.ZO.Tx(t))},i.Ws=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.throwIfClosed(),t.jO&&(t.jO.Sx(void 0),t.jO=void 0),t.Bx=!0,t.vO.Tx(void 0),[2]}))}))()},i.Vj=function(t,n){var i=this;return ft((function(){var t;return ht(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.pO=new fu,i.JO=mi(n),(t=i.XO)?[3,2]:[4,i.ZO.Ix];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.Yw,i.JO),[4,i.pO.Ix];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return ft((function(){return ht(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.WS=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return ft((function(){return ht(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.jO=new fu,Zi.hL||Zi.sL?[2,rh.RO(ft((function(){return ht(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 ft((function(){var i;return ht(this,(function(e){switch(e.label){case 0:return void 0===n.jO?[2]:(i=n.XO)?[3,2]:[4,n.ZO.Ix];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.Yw,mi(t),n.JO,n.Fj),[4,n.jO.Ix];case 3:return e.sent(),Zi.sL?[4,cn(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.Bx)throw new m("Already closing or closed.")},i.SO=function(t){this.qO.bx(),this.qO.yx(uu,t),this.yo(new eu(this.qO))},i.$O=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:return(i=t.XO)?[3,2]:[4,t.ZO.Ix];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.Yw,t.KO),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,cn(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},Dt(n,[{key:"nx",get:function(){return this.qO}},{key:"Fj",get:function(){return this.KO},set:function(t){this.KO=t}},{key:"Pj",get:function(){return this.vO.Ix}},{key:"Bj",get:function(){return NaN}}]),n}(Ii),uh=function(){function t(t,n){var i=this;this.Fw=t,this.sd=n,this.XO=void 0,this.eR=Lt(),this.sR=[],this.TO=function(t){var n=i.nR(t.sessionId);n&&n.GO()},this.tR=function(t){var n=i.nR(t.sessionId);n&&n.VO(t)},this.iR=function(t){var n=i.nR(t.sessionId);n&&n.WO(t)}}var n=t.prototype;return n.bn=function(t){return this.XO=t,this.XO.addEventListener("webkitkeyadded",this.TO),this.XO.addEventListener("webkitkeyerror",this.tR),this.XO.addEventListener("webkitkeymessage",this.iR),this.eR.forEach((function(n,i){return n.HO(t)})),this.sR.forEach((function(n){return n.HO(t)})),Q.resolve()},n.tO=function(t){return t.removeEventListener("webkitkeyadded",this.TO),t.removeEventListener("webkitkeyerror",this.tR),t.removeEventListener("webkitkeymessage",this.iR),this.XO=void 0,Q.resolve()},n.tr=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:n=t.eR.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].$O()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.eR.clear(),[2]}}))}))()},n.Kj=function(t,n,i){var e=this;return ft((function(){var t;return ht(this,(function(n){return t=new oh(e.Fw),e.XO&&t.HO(e.XO),e.sR.push(t),[2,t]}))}))()},n.$j=function(t){return Q.resolve(!1)},n.nR=function(t){if(t){var n=this.eR.get(t);return n||((n=this.sR.shift())?(n.Fj=t,this.eR.set(t,n),n):void 0)}},t}(),sh=function(){function t(t,n){this.Fw=t,this.rR=n}var n=t.prototype;return n.eO=function(){return Q.resolve(new uh(this.Fw,this.rR))},n.nO=function(){return this.rR},t}(),fh=function(){function t(){}return t.prototype.aO=function(t,n){try{return Q.resolve(function(t,n){if(!fh._O())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(hh,nu,t,e);if(r)return new sh(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t._O=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function hh(t,n){var i=vo();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function ch(){return ih||(ih=function(){var t=[];Qf._O()&&t.push(new Qf);zf._O()&&t.push(new zf);Vf._O()&&t.push(new Vf);fh._O()&&t.push(new fh);return new eh(t)}()),ih}var ah=function(){function t(){this.UF=Lt()}var n=t.prototype;return n.bx=function(t){this.UF.delete(t)},n.QF=function(){this.UF.clear()},n.Ax=function(t){return this.UF.get(t)},n.yx=function(t,n){this.UF.set(t,n)},t}(),vh=function(){function t(){}return t.FF=function(){return t.KL||(t.KL=dh._O()?new dh:new ah),t.KL},t.bx=function(n){t.FF().bx(n)},t.QF=function(){t.FF().QF()},t.Ax=function(n){return t.FF().Ax(n)},t.yx=function(n,i){t.FF().yx(n,i)},t}();vh.KL=void 0;var dh=function(t){function n(){return t.apply(this,arguments)||this}Bt(n,t);var i=n.prototype;return i.bx=function(t){self.sessionStorage.removeItem(t)},i.QF=function(){self.sessionStorage.clear()},i.Ax=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.yx=function(t,n){self.sessionStorage.setItem(t,n)},n._O=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(vh);var lh=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 wh(t,n,i){var e=lh([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}var bh=function(t){return t.lE="arraybuffer",t.dE="json",t.fE="stream",t.JM="text",t}({}),gh=function(){function t(n){var i=this;this.$d={},n instanceof t?n.asList().forEach((function(t){var n=Mt(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Mt(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&p.getOwnPropertyNames(n).forEach((function(t){i.append(t,n[t])}))}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=mh(i),e=ph(e);var r=i.toLowerCase();if(this.$d.hasOwnProperty(r)){var o=this.$d[r],u=o[1];o[1]=u?u+", "+e:e}else this.$d[r]=[i,e]},n.delete=function(t){var n=mh(t).toLowerCase();delete this.$d[n]},n.get=function(t){var n=mh(t).toLowerCase();return this.$d.hasOwnProperty(n)?this.$d[n][1]:null},n.has=function(t){var n=mh(t).toLowerCase();return this.$d.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=mh(i)).toLowerCase();this.$d[e]=[i,ph(n)]},n.forEach=function(t,n){for(var i in this.$d)this.$d.hasOwnProperty(i)&&t.call(n,this.$d[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.$d)if(this.$d.hasOwnProperty(n)){var i=Mt(this.$d[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n._E=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.gE=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.vE=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function mh(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new m("Invalid character in header field name");return n}function ph(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var yh="function"==typeof n&&"symbol"==typeof e?n:function(t){return"Symbol("+t+")"};function _h(){}var Sh=Number.isNaN||function(t){return t!=t},Th=_h;function Eh(t){return"object"==typeof t&&null!==t||"function"==typeof t}function Ih(t){return t.slice()}function kh(t,n,i,e,r){new E(t).set(new E(i,e,r),n)}function Rh(t){return!1!==function(t){if("number"!=typeof t)return!1;if(Sh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Oh(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Nh(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return Ah(r,t,e)};case 1:return function(n){var i=[n].concat(e);return Ah(r,t,i)}}}return function(){return Fh(void 0)}}function Ph(t,n,i){var e=t[n];if(void 0!==e)return Oh(e,t,i)}function Ah(t,n,i){try{return Fh(Oh(t,n,i))}catch(t){return zh(t)}}function Dh(t){if(t=Number(t),Sh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function Ch(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var xh=Q,Bh=Q.prototype.then,Mh=Q.resolve.bind(xh),Uh=Q.reject.bind(xh);function Lh(t){return new xh(t)}function Fh(t){return Mh(t)}function zh(t){return Uh(t)}function Wh(t,n,i){return Bh.call(t,n,i)}function qh(t,n,i){Wh(Wh(t,n,i),void 0,Th)}function Hh(t,n){qh(t,n)}function Vh(t,n){qh(t,void 0,n)}function Xh(t,n,i){return Wh(t,n,i)}function jh(t){Wh(t,void 0,Th)}var Yh=function(){function t(){this.QV=0,this.FV=0,this.YV={GV:[],VV:void 0},this.WV=this.YV,this.QV=0,this.FV=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.FV},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.WV,i=n;16383===n.GV.length&&(i={GV:[],VV:void 0}),n.GV.push(t),i!==n&&(this.WV=i,n.VV=i),++this.FV},t.prototype.shift=function(){var t=this.YV,n=t,i=this.QV,e=i+1,r=t.GV,o=r[i];return 16384===e&&(n=t.VV,e=0),--this.FV,this.QV=e,t!==n&&(this.YV=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.QV,i=this.YV,e=i.GV;!(n===e.length&&void 0===i.VV||n===e.length&&(n=0,0===(e=(i=i.VV).GV).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.YV,n=this.QV;return t.GV[n]},t}();function Kh(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function Gh(t,n){t.HV=!0,t.XV=n,n.ZV=t,"readable"===n.wa?Qh(t):"closed"===n.wa?function(t){Qh(t),ic(t)}(t):tc(t,n.qV)}function $h(t,n){return ov(t.XV,n)}function Zh(t){"readable"===t.XV.wa?nc(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){tc(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.XV.ZV=void 0,t.XV=void 0}function Jh(t){return new m("Cannot "+t+" a stream using a released reader")}function Qh(t){t.zj=Lh((function(n,i){t.KV=n,t.JV=i}))}function tc(t,n){Qh(t),nc(t,n)}function nc(t,n){jh(t.zj),t.JV(n),t.KV=void 0,t.JV=void 0}function ic(t){t.KV(void 0),t.KV=void 0,t.JV=void 0}var ec=yh("[[CancelSteps]]"),rc=yh("[[PullSteps]]");function oc(t,n){void 0===n&&(n=!1);var i=new vc(t);return i.HV=n,i}function uc(t){var n=Lh((function(n,i){var e={Hd:n,Nx:i};t.ZV.$V.push(e)}));return n}function sc(t,n,i){var e=t.ZV;e.$V.shift().Hd(Kh(n,i,e.HV))}function fc(t){return t.ZV.$V.length}function hc(t){var n=t.ZV;return void 0!==n&&!!dc(n)}var cc,ac,vc=function(){function t(t){if(!1===ev(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===rv(t))throw new m("This stream has already been locked for exclusive reading by another reader");Gh(this,t),this.$V=new Yh}return p.defineProperty(t.prototype,"closed",{get:function(){return dc(this)?this.zj:zh(wc("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return dc(this)?void 0===this.XV?zh(Jh("cancel")):$h(this,t):zh(wc("cancel"))},t.prototype.read=function(){return dc(this)?void 0===this.XV?zh(Jh("read from")):lc(this):zh(wc("read"))},t.prototype.releaseLock=function(){if(!dc(this))throw wc("releaseLock");if(void 0!==this.XV){if(this.$V.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");Zh(this)}},t}();function dc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"$V")}function lc(t){var n=t.XV;return n.tW=!0,"closed"===n.wa?Fh(Kh(void 0,!0,t.HV)):"errored"===n.wa?zh(n.qV):n.iW[rc]()}function wc(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof yh.asyncIterator&&((cc={})[yh.asyncIterator]=function(){return this},ac=cc,p.defineProperty(ac,yh.asyncIterator,{enumerable:!1}));var bc={next:function(){if(!1===gc(this))return zh(mc("next"));var t=this.eW;return void 0===t.XV?zh(Jh("iterate")):Xh(lc(t),(function(n){var i=n.done;return i&&Zh(t),Kh(n.value,i,!0)}))},return:function(t){if(!1===gc(this))return zh(mc("next"));var n=this.eW;if(void 0===n.XV)return zh(Jh("finish iterating"));if(n.$V.length>0)return zh(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.sW){var i=$h(n,t);return Zh(n),Xh(i,(function(){return Kh(t,!0,!0)}))}return Zh(n),Fh(Kh(t,!0,!0))}};function gc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"eW")}function mc(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function pc(t){var n=t.nW.shift();return t.rW-=n.size,t.rW<0&&(t.rW=0),n.value}function yc(t,n,i){if(!Rh(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.nW.push({value:n,size:i}),t.rW+=i}function _c(t){t.nW=new Yh,t.rW=0}void 0!==ac&&p.setPrototypeOf(bc,ac),p.defineProperty(bc,"next",{enumerable:!1}),p.defineProperty(bc,"return",{enumerable:!1});var Sc=yh("[[AbortSteps]]"),Tc=yh("[[ErrorSteps]]"),Ec=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),kc(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=Ch(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(Vc.prototype);function o(){return Ph(n,"start",[r])}var u=Nh(n,"write",1,[r]),s=Nh(n,"close",0,[]),f=Nh(n,"abort",1,[]);Xc(t,r,o,u,s,f,i,e)}(this,t,e=Dh(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Rc(this))throw Jc("locked");return Oc(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Rc(this)?zh(Jc("abort")):!0===Oc(this)?zh(new m("Cannot abort a stream that already has a writer")):Nc(this,t)},t.prototype.close=function(){return!1===Rc(this)?zh(Jc("close")):!0===Oc(this)?zh(new m("Cannot close a stream that already has a writer")):!0===xc(this)?zh(new m("Cannot close an already-closing stream")):Pc(this)},t.prototype.getWriter=function(){if(!1===Rc(this))throw Jc("getWriter");return Ic(this)},t}();function Ic(t){return new Uc(t)}function kc(t){t.wa="writable",t.qV=void 0,t.Yx=void 0,t.oW=void 0,t.hW=new Yh,t.aW=void 0,t.uW=void 0,t.cW=void 0,t.lW=void 0,t.dW=!1}function Rc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"oW")}function Oc(t){return void 0!==t.Yx}function Nc(t,n){var i=t.wa;if("closed"===i||"errored"===i)return Fh(void 0);if(void 0!==t.lW)return t.lW.fW;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=Lh((function(i,r){t.lW={fW:void 0,Hd:i,Nx:r,_W:n,gW:e}}));return t.lW.fW=r,!1===e&&Dc(t,n),r}function Pc(t){var n=t.wa;if("closed"===n||"errored"===n)return zh(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=Lh((function(n,i){var e={Hd:n,Nx:i};t.uW=e})),e=t.Yx;return void 0!==e&&!0===t.dW&&"writable"===n&&ha(e),function(t){yc(t,"close",0),Kc(t)}(t.oW),i}function Ac(t,n){"writable"!==t.wa?Cc(t):Dc(t,n)}function Dc(t,n){var i=t.oW;t.wa="erroring",t.qV=n;var e=t.Yx;void 0!==e&&Wc(e,n),!1===function(t){if(void 0===t.aW&&void 0===t.cW)return!1;return!0}(t)&&!0===i.vW&&Cc(t)}function Cc(t){t.wa="errored",t.oW[Tc]();var n=t.qV;if(t.hW.forEach((function(t){t.Nx(n)})),t.hW=new Yh,void 0!==t.lW){var i=t.lW;if(t.lW=void 0,!0===i.gW)return i.Nx(n),void Bc(t);qh(t.oW[Sc](i._W),(function(){i.Hd(),Bc(t)}),(function(n){i.Nx(n),Bc(t)}))}else Bc(t)}function xc(t){return void 0!==t.uW||void 0!==t.cW}function Bc(t){void 0!==t.uW&&(t.uW.Nx(t.qV),t.uW=void 0);var n=t.Yx;void 0!==n&&ea(n,t.qV)}function Mc(t,n){var i=t.Yx;void 0!==i&&n!==t.dW&&(!0===n?function(t){oa(t)}(i):ha(i)),t.dW=n}var Uc=function(){function t(t){if(!1===Rc(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===Oc(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.wW=t,t.Yx=this;var n=t.wa;if("writable"===n)!1===xc(t)&&!0===t.dW?oa(this):sa(this),na(this);else if("erroring"===n)ua(this,t.qV),na(this);else if("closed"===n)sa(this),function(t){na(t),ra(t)}(this);else{var i=t.qV;ua(this,i),ia(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Lc(this)?zh(Qc("closed")):this.zj},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Lc(this))throw Qc("desiredSize");if(void 0===this.wW)throw ta("desiredSize");return function(t){var n=t.wW,i=n.wa;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Yc(n.oW)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Lc(this)?zh(Qc("ready")):this.mW},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Lc(this)?zh(Qc("abort")):void 0===this.wW?zh(ta("abort")):function(t,n){var i=t.wW;return Nc(i,n)}(this,t)},t.prototype.close=function(){if(!1===Lc(this))return zh(Qc("close"));var t=this.wW;return void 0===t?zh(ta("close")):!0===xc(t)?zh(new m("Cannot close an already-closing stream")):Fc(this)},t.prototype.releaseLock=function(){if(!1===Lc(this))throw Qc("releaseLock");void 0!==this.wW&&qc(this)},t.prototype.write=function(t){return!1===Lc(this)?zh(Qc("write")):void 0===this.wW?zh(ta("write to")):Hc(this,t)},t}();function Lc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"wW")}function Fc(t){return Pc(t.wW)}function zc(t,n){"pending"===t.pW?ea(t,n):function(t,n){ia(t,n)}(t,n)}function Wc(t,n){"pending"===t.AW?fa(t,n):function(t,n){ua(t,n)}(t,n)}function qc(t){var n=t.wW,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");Wc(t,i),zc(t,i),n.Yx=void 0,t.wW=void 0}function Hc(t,n){var i=t.wW,e=i.oW,r=function(t,n){try{return t.yW(n)}catch(n){return Gc(t,n),1}}(e,n);if(i!==t.wW)return zh(ta("write to"));var o=i.wa;if("errored"===o)return zh(i.qV);if(!0===xc(i)||"closed"===o)return zh(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return zh(i.qV);var u=function(t){var n=Lh((function(n,i){var e={Hd:n,Nx:i};t.hW.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{yc(t,e,i)}catch(n){return void Gc(t,n)}var r=t.MW;if(!1===xc(r)&&"writable"===r.wa){Mc(r,$c(t))}Kc(t)}(e,n,r),u}var Vc=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!Eh(t))return!1;if(!p.prototype.hasOwnProperty.call(t,"MW"))return!1;return!0}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.MW.wa&&Zc(this,t)},t.prototype[Sc]=function(t){var n=this.bW(t);return jc(this),n},t.prototype[Tc]=function(){_c(this)},t}();function Xc(t,n,i,e,r,o,u,s){n.MW=t,t.oW=n,n.nW=void 0,n.rW=void 0,_c(n),n.vW=!1,n.yW=s,n.TW=u,n.SW=e,n.NW=r,n.bW=o;var f=$c(n);Mc(t,f),qh(Fh(i()),(function(){n.vW=!0,Kc(n)}),(function(i){n.vW=!0,Ac(t,i)}))}function jc(t){t.SW=void 0,t.NW=void 0,t.bW=void 0,t.yW=void 0}function Yc(t){return t.TW-t.rW}function Kc(t){var n=t.MW;if(!1!==t.vW&&void 0===n.aW)if("erroring"!==n.wa){if(0!==t.nW.length){var i=function(t){return t.nW.peek().value}(t);"close"===i?function(t){var n=t.MW;(function(t){t.cW=t.uW,t.uW=void 0})(n),pc(t);var i=t.NW();jc(t),qh(i,(function(){!function(t){t.cW.Hd(void 0),t.cW=void 0,"erroring"===t.wa&&(t.qV=void 0,void 0!==t.lW&&(t.lW.Hd(),t.lW=void 0)),t.wa="closed";var n=t.Yx;void 0!==n&&ra(n)}(n)}),(function(t){!function(t,n){t.cW.Nx(n),t.cW=void 0,void 0!==t.lW&&(t.lW.Nx(n),t.lW=void 0),Ac(t,n)}(n,t)}))}(t):function(t,n){var i=t.MW;!function(t){t.aW=t.hW.shift()}(i);var e=t.SW(n);qh(e,(function(){!function(t){t.aW.Hd(void 0),t.aW=void 0}(i);var n=i.wa;if(pc(t),!1===xc(i)&&"writable"===n){var e=$c(t);Mc(i,e)}Kc(t)}),(function(n){"writable"===i.wa&&jc(t),function(t,n){t.aW.Nx(n),t.aW=void 0,Ac(t,n)}(i,n)}))}(t,i.chunk)}}else Cc(n)}function Gc(t,n){"writable"===t.MW.wa&&Zc(t,n)}function $c(t){return Yc(t)<=0}function Zc(t,n){var i=t.MW;jc(t),Dc(i,n)}function Jc(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Qc(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function ta(t){return new m("Cannot "+t+" a stream using a released writer")}function na(t){t.zj=Lh((function(n,i){t.KV=n,t.JV=i,t.pW="pending"}))}function ia(t,n){na(t),ea(t,n)}function ea(t,n){jh(t.zj),t.JV(n),t.KV=void 0,t.JV=void 0,t.pW="rejected"}function ra(t){t.KV(void 0),t.KV=void 0,t.JV=void 0,t.pW="resolved"}function oa(t){t.mW=Lh((function(n,i){t.IW=n,t.DW=i})),t.AW="pending"}function ua(t,n){oa(t),fa(t,n)}function sa(t){oa(t),ha(t)}function fa(t,n){jh(t.mW),t.DW(n),t.IW=void 0,t.DW=void 0,t.AW="rejected"}function ha(t){t.IW(void 0),t.IW=void 0,t.DW=void 0,t.AW="fulfilled"}function ca(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var aa="undefined"!=typeof DOMException?DOMException:void 0;var va=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(aa)?aa:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)};return t.prototype=p.create(g.prototype),p.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function da(t,n,i,e,r,o){var u=oc(t),s=Ic(n);t.tW=!0;var f=!1,h=Fh(void 0);return Lh((function(c,a){var v,d,l,w;if(void 0!==o){if(v=function(){var i=new va("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.wa?Nc(n,i):Fh(void 0)})),!1===r&&o.push((function(){return"readable"===t.wa?ov(t,i):Fh(void 0)})),y((function(){return Q.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void v();o.addEventListener("abort",v)}if(p(t,u.zj,(function(t){!1===e?y((function(){return Nc(n,t)}),!0,t):_(!0,t)})),p(n,s.zj,(function(n){!1===r?y((function(){return ov(t,n)}),!0,n):_(!0,n)})),d=t,l=u.zj,w=function(){!1===i?y((function(){return function(t){var n=t.wW,i=n.wa;return!0===xc(n)||"closed"===i?Fh(void 0):"errored"===i?zh(n.qV):Fc(t)}(s)})):_()},"closed"===d.wa?w():Hh(l,w),!0===xc(n)||"closed"===n.wa){var b=new m("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return ov(t,b)}),!0,b):_(!0,b)}function g(){var t=h;return Wh(h,(function(){return t!==h?g():void 0}))}function p(t,n,i){"errored"===t.wa?i(t.qV):Vh(n,i)}function y(t,i,e){function r(){qh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.wa&&!1===xc(n)?Hh(g(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.wa&&!1===xc(n)?Hh(g(),(function(){return S(t,i)})):S(t,i))}function S(t,n){qc(s),Zh(u),void 0!==o&&o.removeEventListener("abort",v),t?a(n):c(void 0)}jh(Lh((function(t,n){!function i(e){e?t():Wh(!0===f?Fh(!0):Wh(s.mW,(function(){return Wh(lc(u),(function(t){return!0===t.done||(h=Wh(Hc(s,t.value),void 0,_h),!1)}))})),i,n)}(!1)})))}))}var la=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===wa(this))throw Ia("desiredSize");return Sa(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===wa(this))throw Ia("close");if(!1===Ta(this))throw new m("The stream is not in a state that permits close");pa(this)},t.prototype.enqueue=function(t){if(!1===wa(this))throw Ia("enqueue");if(!1===Ta(this))throw new m("The stream is not in a state that permits enqueue");return ya(this,t)},t.prototype.error=function(t){if(!1===wa(this))throw Ia("error");_a(this,t)},t.prototype[ec]=function(t){_c(this);var n=this.EW(t);return ma(this),n},t.prototype[rc]=function(){var t=this.kW;if(this.nW.length>0){var n=pc(this);return!0===this.LW&&0===this.nW.length?(ma(this),uv(t)):ba(this),Fh(Kh(n,!1,t.ZV.HV))}var i=uc(t);return ba(this),i},t}();function wa(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"kW")}function ba(t){!1!==ga(t)&&(!0!==t.xW?(t.xW=!0,qh(t.jW(),(function(){t.xW=!1,!0===t.OW&&(t.OW=!1,ba(t))}),(function(n){_a(t,n)}))):t.OW=!0)}function ga(t){var n=t.kW;return!1!==Ta(t)&&(!1!==t.vW&&(!0===rv(n)&&fc(n)>0||Sa(t)>0))}function ma(t){t.jW=void 0,t.EW=void 0,t.yW=void 0}function pa(t){var n=t.kW;t.LW=!0,0===t.nW.length&&(ma(t),uv(n))}function ya(t,n){var i=t.kW;if(!0===rv(i)&&fc(i)>0)sc(i,n,!1);else{var e=void 0;try{e=t.yW(n)}catch(n){throw _a(t,n),n}try{yc(t,n,e)}catch(n){throw _a(t,n),n}}ba(t)}function _a(t,n){var i=t.kW;"readable"===i.wa&&(_c(t),ma(t),sv(i,n))}function Sa(t){var n=t.kW.wa;return"errored"===n?null:"closed"===n?0:t.TW-t.rW}function Ta(t){var n=t.kW.wa;return!1===t.LW&&"readable"===n}function Ea(t,n,i,e,r,o,u){n.kW=t,n.nW=void 0,n.rW=void 0,_c(n),n.vW=!1,n.LW=!1,n.OW=!1,n.xW=!1,n.yW=u,n.TW=o,n.jW=e,n.EW=r,t.iW=n,qh(Fh(i()),(function(){n.vW=!0,ba(n)}),(function(t){_a(n,t)}))}function Ia(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var ka=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},Ra=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Pa(this))throw ja("view");return this.DD},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Pa(this))throw ja("respond");if(void 0===this.RW)throw new m("This BYOB request has been invalidated");this.DD.buffer,function(t,n){if(n=Number(n),!1===Rh(n))throw new RangeError("bytesWritten must be a finite");za(t,n)}(this.RW,t)},t.prototype.respondWithNewView=function(t){if(!1===Pa(this))throw ja("respond");if(void 0===this.RW)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.PW.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,za(t,n.byteLength)}(this.RW,t)},t}(),Oa=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Na(this))throw Ya("byobRequest");if(void 0===this.zW&&this.PW.length>0){var t=this.PW.peek(),n=new E(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(Ra.prototype);!function(t,n,i){t.RW=n,t.DD=i}(i,this,n),this.zW=i}return this.zW},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Na(this))throw Ya("desiredSize");return Va(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Na(this))throw Ya("close");if(!0===this.LW)throw new m("The stream has already been closed; do not close it again!");var t=this.BW.wa;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.BW;if(t.rW>0)return void(t.LW=!0);if(t.PW.length>0){if(t.PW.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Ha(t,i),i}}qa(t),uv(n)}(this)},t.prototype.enqueue=function(t){if(!1===Na(this))throw Ya("enqueue");if(!0===this.LW)throw new m("stream is closed or draining");var n=this.BW.wa;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.BW,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===hc(i)){if(0===fc(i))xa(t,u,r,o);else sc(i,new E(u,r,o),!1)}else!0===$a(i)?(xa(t,u,r,o),Fa(t)):xa(t,u,r,o);Aa(t)}(this,t)},t.prototype.error=function(t){if(!1===Na(this))throw Ya("error");Ha(this,t)},t.prototype[ec]=function(t){this.PW.length>0&&(this.PW.peek().bytesFilled=0);_c(this);var n=this.EW(t);return qa(this),n},t.prototype[rc]=function(){var t=this.BW;if(this.rW>0){var n=this.nW.shift();this.rW-=n.byteLength,Ua(this);var i=void 0;try{i=new E(n.buffer,n.byteOffset,n.byteLength)}catch(t){return zh(t)}return Fh(Kh(i,!1,t.ZV.HV))}var e=this.UW;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return zh(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:E,readerType:"default"};this.PW.push(o)}var u=uc(t);return Aa(this),u},t}();function Na(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"BW")}function Pa(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"RW")}function Aa(t){var n=function(t){var n=t.BW;if("readable"!==n.wa)return!1;if(!0===t.LW)return!1;if(!1===t.vW)return!1;if(!0===hc(n)&&fc(n)>0)return!0;if(!0===$a(n)&&Ga(n)>0)return!0;var i=Va(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.xW?(t.xW=!0,qh(t.jW(),(function(){t.xW=!1,!0===t.OW&&(t.OW=!1,Aa(t))}),(function(n){Ha(t,n)}))):t.OW=!0)}function Da(t,n){var i=!1;"closed"===t.wa&&(i=!0);var e=Ca(n);"default"===n.readerType?sc(t,e,i):function(t,n,i){var e=t.ZV,r=e.QW.shift();r.Hd(Kh(n,i,e.HV))}(t,e,i)}function Ca(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function xa(t,n,i,e){t.nW.push({buffer:n,byteOffset:i,byteLength:e}),t.rW+=e}function Ba(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.rW,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.nW;s>0;){var c=h.peek(),a=y.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;kh(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.rW-=a,Ma(t,a,n),s-=a}return f}function Ma(t,n,i){La(t),i.bytesFilled+=n}function Ua(t){0===t.rW&&!0===t.LW?(qa(t),uv(t.BW)):Aa(t)}function La(t){void 0!==t.zW&&(t.zW.RW=void 0,t.zW.DD=void 0,t.zW=void 0)}function Fa(t){for(;t.PW.length>0;){if(0===t.rW)return;var n=t.PW.peek();!0===Ba(t,n)&&(Wa(t),Da(t.BW,n))}}function za(t,n){var i=t.PW.peek();if("closed"===t.BW.wa){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.BW;if(!0===$a(i))for(;Ga(i)>0;)Da(i,Wa(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Ma(t,n,i),!(i.bytesFilled<i.elementSize)){Wa(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);xa(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,Da(t.BW,i),Fa(t)}}(t,n,i);Aa(t)}function Wa(t){var n=t.PW.shift();return La(t),n}function qa(t){t.jW=void 0,t.EW=void 0}function Ha(t,n){var i=t.BW;"readable"===i.wa&&(!function(t){La(t),t.PW=new Yh}(t),_c(t),qa(t),sv(i,n))}function Va(t){var n=t.BW.wa;return"errored"===n?null:"closed"===n?0:t.TW-t.rW}function Xa(t,n,i){var e=p.create(Oa.prototype);var r=Nh(n,"pull",0,[e]),o=Nh(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===ka(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.BW=t,n.OW=!1,n.xW=!1,n.zW=void 0,n.nW=n.rW=void 0,_c(n),n.LW=!1,n.vW=!1,n.TW=Dh(o),n.jW=e,n.EW=r,n.UW=u,n.PW=new Yh,t.iW=n,qh(Fh(i()),(function(){n.vW=!0,Aa(n)}),(function(t){Ha(n,t)}))}(t,e,(function(){return Ph(n,"start",[e])}),r,o,i,u)}function ja(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Ya(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Ka(t){var n=Lh((function(n,i){var e={Hd:n,Nx:i};t.ZV.QW.push(e)}));return n}function Ga(t){return t.ZV.QW.length}function $a(t){var n=t.ZV;return void 0!==n&&!!Ja(n)}var Za=function(){function t(t){if(!ev(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Na(t.iW))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(rv(t))throw new m("This stream has already been locked for exclusive reading by another reader");Gh(this,t),this.QW=new Yh}return p.defineProperty(t.prototype,"closed",{get:function(){return Ja(this)?this.zj:zh(Qa("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Ja(this)?void 0===this.XV?zh(Jh("cancel")):$h(this,t):zh(Qa("cancel"))},t.prototype.read=function(t){return Ja(this)?void 0===this.XV?zh(Jh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?zh(new m("view must have non-zero byteLength")):function(t,n){var i=t.XV;if(i.tW=!0,"errored"===i.wa)return zh(i.qV);return function(t,n){var i=t.BW,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.PW.length>0)return t.PW.push(o),Ka(i);if("closed"===i.wa)return Fh(Kh(new r(o.buffer,o.byteOffset,0),!0,i.ZV.HV));if(t.rW>0){if(!0===Ba(t,o)){var u=Ca(o);return Ua(t),Fh(Kh(u,!1,i.ZV.HV))}if(!0===t.LW){var s=new m("Insufficient bytes to fill elements in the given buffer");return Ha(t,s),zh(s)}}t.PW.push(o);var f=Ka(i);return Aa(t),f}(i.iW,n)}(this,t)):zh(new m("view must be an array buffer view")):zh(Qa("read"))},t.prototype.releaseLock=function(){if(!Ja(this))throw Qa("releaseLock");if(void 0!==this.XV){if(this.QW.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");Zh(this)}},t}();function Ja(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"QW")}function Qa(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var tv=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),iv(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),Xa(this,t,e=Dh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=Ch(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(la.prototype),o=Nh(n,"pull",0,[r]),u=Nh(n,"cancel",1,[]);Ea(t,r,(function(){return Ph(n,"start",[r])}),o,u,i,e)}(this,t,e=Dh(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===ev(this))throw fv("locked");return rv(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===ev(this)?zh(fv("cancel")):!0===rv(this)?zh(new m("Cannot cancel a stream that already has a reader")):ov(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===ev(this))throw fv("getReader");if(void 0===n)return oc(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Za(t);return i.HV=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===ev(this))throw fv("pipeThrough");if(!1===Rc(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===ev(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!ca(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===rv(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===Oc(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return jh(da(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===ev(this)?zh(fv("pipeTo")):!1===Rc(t)?zh(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||ca(u)?!0===rv(this)?zh(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===Oc(t)?zh(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):da(this,t,e,r,o,u):zh(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===ev(this))throw fv("tee");var t=function(t,n){var i,e,r,o,u,s=oc(t),f=!1,h=!1,c=!1,a=Lh((function(t){u=t}));function v(){return!0===f||(f=!0,jh(Xh(lc(s),(function(t){if(f=!1,!0===t.done)return!1===h&&pa(r.iW),void(!1===c&&pa(o.iW));var n=t.value,i=n,e=n;!1===h&&ya(r.iW,i),!1===c&&ya(o.iW,e)})))),Fh(void 0)}function d(){}return r=nv(d,v,(function(n){if(h=!0,i=n,!0===c){var r=Ih([i,e]),o=ov(t,r);u(o)}return a})),o=nv(d,v,(function(n){if(c=!0,e=n,!0===h){var r=Ih([i,e]),o=ov(t,r);u(o)}return a})),Vh(s.zj,(function(t){_a(r.iW,t),_a(o.iW,t)})),[r,o]}(this);return Ih(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===ev(this))throw fv("getIterator");return function(t,n){void 0===n&&(n=!1);var i=oc(t),e=p.create(bc);return e.eW=i,e.sW=Boolean(n),e}(this,i)},t}();function nv(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(tv.prototype);return iv(o),Ea(o,p.create(la.prototype),t,n,i,e,r),o}function iv(t){t.wa="readable",t.ZV=void 0,t.qV=void 0,t.tW=!1}function ev(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"iW")}function rv(t){return void 0!==t.ZV}function ov(t,n){return t.tW=!0,"closed"===t.wa?Fh(void 0):"errored"===t.wa?zh(t.qV):(uv(t),Xh(t.iW[ec](n),_h))}function uv(t){t.wa="closed";var n=t.ZV;void 0!==n&&(dc(n)&&(n.$V.forEach((function(t){t.Hd(Kh(void 0,!0,n.HV))})),n.$V=new Yh),ic(n))}function sv(t,n){t.wa="errored",t.qV=n;var i=t.ZV;void 0!==i&&(dc(i)?(i.$V.forEach((function(t){t.Nx(n)})),i.$V=new Yh):(i.QW.forEach((function(t){t.Nx(n)})),i.QW=new Yh),nc(i,n))}function fv(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof yh.asyncIterator&&p.defineProperty(tv.prototype,yh.asyncIterator,{value:tv.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 hv=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=Ch(e);if(void 0===r&&(r=1),r=Dh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=Ch(o);void 0===u&&(u=0),u=Dh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.FW;if(!0===t.dW){return Xh(t.YW,(function(){var e=t.GW;if("erroring"===e.wa)throw e.qV;return mv(i,n)}))}return mv(i,n)}(t,n)}function f(n){return function(t,n){return av(t,n),Fh(void 0)}(t,n)}function h(){return function(t){var n=t.VW,i=t.FW,e=i.WW();return bv(i),Xh(e,(function(){if("errored"===n.wa)throw n.qV;var t=n.iW;!0===Ta(t)&&pa(t)}),(function(i){throw av(t,i),n.qV}))}(t)}function c(){return function(t){return dv(t,!1),t.YW}(t)}function a(n){return vv(t,n),Fh(void 0)}t.GW=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(Ec.prototype);return kc(u),Xc(u,p.create(Vc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.VW=nv(u,c,a,r,o),t.dW=void 0,t.YW=void 0,t.HW=void 0,dv(t,!0),t.FW=void 0}(this,Lh((function(t){f=t})),r,s,u,h),function(t,n){var i=p.create(lv.prototype),e=function(t){try{return gv(i,t),Fh(void 0)}catch(t){return zh(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return Ah(r,n,[t,i])}}var o=Nh(n,"flush",0,[i]);!function(t,n,i,e){n.XW=t,t.FW=n,n.ZW=i,n.WW=e}(t,i,e,o)}(this,t);var c=Ph(t,"start",[this.FW]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===cv(this))throw yv("readable");return this.VW},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===cv(this))throw yv("writable");return this.GW},enumerable:!0,configurable:!0}),t}();function cv(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"FW")}function av(t,n){_a(t.VW.iW,n),vv(t,n)}function vv(t,n){bv(t.FW),Gc(t.GW.oW,n),!0===t.dW&&dv(t,!1)}function dv(t,n){void 0!==t.YW&&t.HW(),t.YW=Lh((function(n){t.HW=n})),t.dW=n}var lv=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===wv(this))throw pv("desiredSize");return Sa(this.XW.VW.iW)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===wv(this))throw pv("enqueue");gv(this,t)},t.prototype.error=function(t){if(!1===wv(this))throw pv("error");!function(t,n){av(t.XW,n)}(this,t)},t.prototype.terminate=function(){if(!1===wv(this))throw pv("terminate");!function(t){var n=t.XW,i=n.VW.iW;!0===Ta(i)&&pa(i);var e=new m("TransformStream terminated");vv(n,e)}(this)},t}();function wv(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"XW")}function bv(t){t.ZW=void 0,t.WW=void 0}function gv(t,n){var i=t.XW,e=i.VW.iW;if(!1===Ta(e))throw new m("Readable side is not in a state that permits enqueue");try{ya(e,n)}catch(t){throw vv(i,t),i.VW.qV}var r=function(t){return!0!==ga(t)}(e);r!==i.dW&&dv(i,!0)}function mv(t,n){return Xh(t.ZW(n),void 0,(function(n){throw av(t.XW,n),n}))}function pv(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function yv(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}function _v(t){return function(t){return new tv({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function Sv(t){return _v(function(t){return new E(t)}(t))}function Tv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new fu,o=function(){u();var t=new en;e.cancel(t).catch(Nt),r.Sx(t)},u=function(){i&&(i.Hf(o),i=void 0)};i&&(i.Wf?o():i.Xf(o));var s=[],f=function(t){return t.done?(u(),Q.resolve(s)):(s.push(t.value),Q.resolve(e.read()).then(f))};return Q.resolve(e.read()).then(f).then((function(t){u(),r.Tx(t)}),(function(t){u(),r.Sx(t)})),r.Ix}(t,n).then((function(t){return Kn(t).buffer}))}function Ev(t,n){var i=n,e=new hv,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.n_()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Nt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Nt)})),r}function Iv(t){return li(new E(t))}function kv(t){return wi(t).buffer}var Rv="content-type",Ov="text/plain;charset=UTF-8",Nv=function(){function t(){}var n=t.prototype;return n.uP=function(t){return this.ZE(t).then(JSON.parse)},n.QR=function(t,n){switch(t){case bh.lE:return this.NP(n);case bh.dE:return this.uP(n);case bh.fE:return this.qW();case bh.JM:return this.ZE(n);default:throw new m}},t}();function Pv(t,n,i){if(t instanceof Nv)return t;if(t instanceof tv)return function(t,n){return new Dv({hw:0,qW:t,uB:Av(n)})}(t,i);var e=Av(i),r=Q.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{hw:bh.JM,jE:t,uB:n||Ov};if(t instanceof ArrayBuffer||jn(t))return{hw:bh.lE,jE:Fv(t),uB:n};if(function(t){return gt(t)&&t.constructor&&t.constructor===p}(t)||bt(t))return{hw:bh.dE,jE:t,uB:n};throw new m("Unsupported BodyInit type")}return{hw:bh.JM,jE:null,uB:n}}(t,e)}));return new Dv({hw:1,Ix:r,KW:n})}function Av(t){return(t.get(Rv)||"").toLowerCase()}var Dv=function(t){function n(n){var i;return(i=t.call(this)||this).$W=!1,i.sH=new fu,i.sH.Ix.catch(Nt),i.oH(n),i}Bt(n,t);var i=n.prototype;return i.eH=function(){return this.sH.Ix},i.ZE=function(t){return this.nH(Cv,t)},i.uP=function(t){return this.nH(Bv,t)},i.NP=function(t){return this.nH(Uv,t)},i.qW=function(){return this.rH(function(t){return 0===t.hw?t.qW:Ev(t.Ix.then(Lv).then(Sv),t.KW)}(this.iH))},i.nH=function(t,n){if(this.$W)return Q.reject(new m("Already used"));this.$W=!0;var i=t(this.iH,n);return this.sH.r_(i.then(Nt)),i},i.rH=function(t){if(this.$W)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.$W=!0;var n=new hv,i=Q.resolve(t.pipeTo(n.writable));return this.sH.r_(i),n.readable},i.oH=function(t){this.iH=t,1===t.hw&&t.Ix.catch(Nt)},i.hH=function(){if(this.$W)throw new m("Already used");var t=function(t){if(0===t.hw){var n=Mt(t.qW.tee(),2),i=n[0],e=n[1];return[{hw:t.hw,qW:i,uB:t.uB},{hw:t.hw,qW:e,uB:t.uB}]}var r=Mt(t.KW.o_(),2),o=r[0],u=r[1];return[{hw:t.hw,Ix:t.Ix,KW:o},{hw:t.hw,Ix:t.Ix,KW:u}]}(this.iH),i=t[0],e=t[1];return this.oH(i),new n(e)},Dt(n,[{key:"JW",get:function(){return this.$W}},{key:"tH",get:function(){return 0===this.iH.hw}}]),n}(Nv);function Cv(t,n){return 0===t.hw?Tv(t.qW,n).then(Iv):(n&&t.KW.r_(n),un(t.Ix.then(xv),t.KW))}function xv(t){switch(t.hw){case bh.JM:return Q.resolve(t.jE||"");case bh.lE:return Q.resolve(t.jE).then(Iv);case bh.dE:return Q.resolve(t.jE).then(JSON.stringify)}}function Bv(t,n){return 0===t.hw?Cv(t,n).then(JSON.parse):(n&&t.KW.r_(n),un(t.Ix.then(Mv),t.KW))}function Mv(t){return t.hw===bh.dE?Q.resolve(t.jE):xv(t).then(JSON.parse)}function Uv(t,n){return 0===t.hw?Tv(t.qW,n):(n&&t.KW.r_(n),un(t.Ix.then(Lv),t.KW))}function Lv(t){switch(t.hw){case bh.lE:return Q.resolve(t.jE);case bh.JM:case bh.dE:return xv(t).then(kv)}}function Fv(t){return t instanceof ArrayBuffer?t:pi(gi(t)).buffer}var zv=function(t){function n(n){var i;return(i=t.call(this)||this).aH=n,i}Bt(n,t);var i=n.prototype;return i.eH=function(){return this.aH.eH()},i.ZE=function(t){return this.aH.ZE(t)},i.uP=function(t){return this.aH.uP(t)},i.NP=function(t){return this.aH.NP(t)},i.qW=function(t){return this.aH.qW(t)},i.hH=function(){return this.aH.hH()},Dt(n,[{key:"JW",get:function(){return this.aH.JW}},{key:"tH",get:function(){return this.aH.tH}}]),n}(Nv);var Wv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.OE,o=i.PE,u=i.eE,s=i.cP,f=i.uH):(r=[],o=bh.JM,u=200,s="OK",f=!1);var h=n.JD,c=new gh(n.OE||r),a=n.PE||o,v=n.qE||(i&&i.JD===h?i.qE:h.Iu),d=i?i.aH:null,l=Pv(void 0!==n.yp?n.yp:d,n.KW||new hn,c);return(e=t.call(this,l)||this).OE=c,e.JD=h,e.qE=v,e.PE=a,e.eE=void 0!==n.eE?n.eE:u,e.cP=void 0!==n.cP?String(n.cP):s,e.uH=n.uH||f,e}Bt(n,t);var i=n.prototype;return i.yp=function(t){return this.QR(this.PE,t)},i.gp=function(){return new n({yp:this.hH(),JD:this.JD},this)},n}(zv),qv=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Hv=function(t){return t.LE="same-origin",t._w="no-cors",t.xE="cors",t.CE="navigate",t}({}),Vv=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Iu;n?(i=n.jE,e=n.OE,r=n.RE,o=n.PE,u=n.sE,s=n.zE,f=n.Zf,h=n.hw,c=n.BE,a=n.UE,v=n.QE,d=n.FE,l=n.ew,w=n.YE,b=n.GE):(i=null,e={},r="GET",o=bh.JM,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Iu=y,this.jE=t.jE||i,this.OE=new gh(t.OE||e),this.RE=t.RE||r,this.PE=t.PE||o,this.sE=void 0!==t.sE?Number(t.sE)||0:u,this.zE=void 0!==t.zE?Number(t.zE)||0:s,this.Zf=t.Zf||f||(new hn).Zf,this.hw=t.hw||h,this.BE=t.BE||c,this.UE=t.UE||a,this.QE=void 0!==t.QE?Boolean(t.QE):v,this.FE=t.FE||d,this.ew=null!=(g=t.ew)?g:l,this.YE=null!=(m=t.YE)?m:w,this.GE=null!=(p=t.GE)?p:b},Xv=function(){function t(){}var n=t.prototype;return n.JD=function(t){var n=function(t){return new Wv({yp:null,OE:{},JD:t,qE:t.Iu,PE:t.PE,eE:0,cP:tu.Lb})}(new Vv(t));return Q.resolve(n)},n.CG=function(t){},n.gn=function(){},t}();var jv=function(){function t(t,n){void 0===n&&(n=!0),this.fH=t,this.gH=n}var n=t.prototype;return n.JD=function(t){var n=this.dH(t);return this.fH.JD(n)},n.CG=function(t){return this.fH.CG(this._H(t))},n.dH=function(n){var i=new Vv(n);if(!this.gH){var e=t.vH(i.Iu);i=new Vv({Iu:e},i)}return i},n._H=function(n){var i=n.Iu;return this.gH||(i=t.vH(i)),{Iu:i,jE:n.jE}},n.gn=function(){this.fH.gn()},t.vH=function(t){return Rt.wH&&Zn(t,"http://")?t.replace(":","s:"):t},Dt(t,null,[{key:"cH",get:function(){return t.lH||(t.lH=new t(new Xv)),t.lH}}]),t}();jv.lH=void 0;var Yv=function(t){return t.ZD="HttpOpenError",t.qD="HttpResponseError",t.KD="HttpTimeoutError",t}({}),Kv=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).$D=n,r}return Bt(n,t),Dt(n,[{key:"JD",get:function(){return this.$D}}]),n}(nn);var Gv=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Iu),i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Yv.ZD}}]),n}(Kv);var $v=function(t){function n(n,i,e){var r;return(r=t.call(this,n.JD,null!=e?e:function(t){return"Error while loading "+t.JD.Iu+", status code "+t.eE}(n),i)||this).iE=n,r}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Yv.qD}},{key:"tE",get:function(){return this.iE}}]),n}(Kv);var Zv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Iu+" timed out after "+t.sE+" seconds."}(n),i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Yv.KD}}]),n}(Kv),Jv=self.fetch,Qv=self.Request,td=self.Response,nd=self.Headers,id=self.ReadableStream,ed=self.AbortSignal,rd=self.AbortController,od=Pt((function(){try{return mt(Jv)&&pt(Qv)&&pt(td)&&pt(nd)&&"forEach"in nd.prototype&&Co()}catch(t){return!1}})),ud=["http:","https:"];var sd=Pt((function(){try{return od()&&pt(ed)&&pt(rd)&&"signal"in Qv.prototype}catch(t){return!1}})),fd=Pt((function(){try{return od()&&pt(id)&&"body"in td.prototype&&!Zi.Uk}catch(t){return!1}}));function hd(t,n){var i,e=t.OE.has("content-length")?Number(t.OE.get("content-length")):void 0;return i=t.tH?function(t,n,i){return t.pipeThrough(new hv(new cd(n,i)))}(t.qW(),n,e):function(t,n,i){return ad.apply(this,arguments)}(t.NP(),n,e),new Wv({yp:i,JD:t.JD},t)}var cd=function(){function t(t,n){this.vst=t,this.wst=n,this.c5=0}var n=t.prototype;return n.transform=function(t,n){this.c5+=t.byteLength,this.vst(this.c5,this.wst),n.enqueue(t)},n.flush=function(t){var n;this.vst(this.c5,null!=(n=this.wst)?n:this.c5)},t}();function ad(){return ad=ft((function(t,n,i){var e,r;return ht(this,(function(o){switch(o.label){case 0:return[4,Q.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]}}))})),ad.apply(this,arguments)}var vd=function(){function t(t){this.PO=new hn,this.iE=void 0,this.eS=0,this.pst=!1,this.$D=t,this.PO.r_(t.Zf),this.tE=this.mst()}var n=t.prototype;return n.mst=function(){var t=this;return ft((function(){var n,i,e,r,o,u,s,f,h;return ht(this,(function(c){switch(c.label){case 0:(n=t.$D).sE&&(t.eS=d((function(){t.pst=!0,t.PO.n_()}),n.sE),t.PO.Zf.i_((function(){l(t.eS)})));try{i=Jv(n.Iu,{method:n.RE,headers:n.OE._E(),body:n.jE,credentials:n.QE?"include":"same-origin",signal:wd(t.PO.Zf),mode:n.ew,keepalive:n.GE})}catch(t){throw new Gv(n,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i];case 2:return e=c.sent(),[3,4];case 3:throw r=c.sent(),rn(o=t.Ast(r))&&t.PO.n_(),o;case 4:if(u=e.url||n.Iu,s=0===e.status&&"file:"===function(t){return Rt.Ah(t).protocol}(u)?200:e.status,f=new dd(t,e,t.PO),!function(t){return t.eE>=200&&t.eE<=299||304===t.eE}(h=new Wv({yp:f,JD:n,PE:n.PE,OE:bd(e.headers),eE:s,cP:e.statusText,qE:u})))throw new $v(h);return n.FE&&(h=hd(h,n.FE)),[2,h]}}))}))()},n.Ast=function(t){return function(t){return t instanceof Kv}(t)?t:rn(t)?this.pst?new Zv(this.$D):new en(t.message,t):this.iE?new $v(this.iE,t):new Gv(this.$D,t)},t}(),dd=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).sH=new fu,r.Mst=n,r.yst=i,r.PO=e,r.sH.Ix.catch(Nt),r}Bt(n,t);var i=n.prototype;return i.eH=function(){return this.sH.Ix},i.ZE=function(t){return this.nH(this.yst.text(),t)},i.NP=function(t){return this.nH(this.yst.arrayBuffer(),t)},i.qW=function(){var t=this.yst.body;return t?this.rH(t):Ev(this.NP().then(Sv),this.PO)},i.hH=function(){var t=this.yst.clone(),i=Mt(this.PO.o_(),2),e=i[0],r=i[1];return this.PO=e,new n(this.Mst,t,r)},i.nH=function(t,n){var i=this;n&&this.PO.r_(n);var e=on(Q.resolve(t),this.PO.Zf).catch((function(t){throw i.Mst.Ast(t)}));return e=un(e,this.PO),this.sH.r_(e.then(Nt)),e},i.rH=function(t){var n=this;return new tv(new gd(t,(function(t){return n.Mst.Ast(t)}),this.PO,this.sH),{highWaterMark:0})},Dt(n,[{key:"JW",get:function(){return this.yst.bodyUsed}},{key:"tH",get:function(){return wt(this.yst.body)}}]),n}(Nv),ld="abort";function wd(t){if(sd()){var n=new rd;if(t.Wf)n.abort();else if(!t.Kf){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(ld,i),t.Hf(i),t.e_(e)};n.signal.addEventListener(ld,i),t.Xf(i),t.i_(e)}return n.signal}}function bd(t){if(function(t){return gt(t)&&"function"==typeof t.forEach}(t)){var n=new gh;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 gh(t)}var gd=function(){function t(t,n,i,e){this.bst=t,this.Tst=n,this.PO=i,this.sH=e}var n=t.prototype;return n.start=function(t){this.ZV=this.bst.getReader()},n.pull=function(t){var n=this;return ft((function(){var i,e,r;return ht(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,on(n.ZV.read(),n.PO.Zf)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.Tst(e),n.sH.Sx(r),n.PO.n_(),n.ZV.cancel(r).catch(Nt),t.error(r),[2];case 3:return i.done?(n.sH.Tx(),n.PO.n_(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.PO.n_(),this.sH.Sx(t),this.ZV.cancel(t)},t}(),md=function(){function t(t){var n=this;this.PO=new hn,this.iE=void 0,this.Sst=new fu,this.Cst=!1,this.xst=function(){var t;n.Ist(),null==(t=n.Nst)||t.abort()},this.$D=t,this.PO.r_(t.Zf),this.Nst=new I,this.mst()}var n=t.prototype;return n.mst=function(){var t=this,n=this.Nst,i=this.$D;if(i.Zf.Wf)return this.Ist();n.onreadystatechange=function(){return t.Dst()},n.onprogress=function(n){return t.vst(n)},n.onload=function(){return t.Est()},n.onloadend=function(){return t.kst()},n.onerror=function(){return t.jq()},n.ontimeout=function(){return t.Lst()},n.onabort=function(){return t.Ist()},n.open(i.RE,i.Iu,!0),n.withCredentials=Boolean(i.QE),"responseType"in n&&i.PE&&(i.PE===bh.JM?n.responseType="text":n.responseType="arraybuffer"),i.OE.forEach((function(t,i){n.setRequestHeader(i,t)})),i.sE&&(n.timeout=i.sE),this.PO.Zf.Xf(this.xst);var e=i.jE;e?n.send(e):n.send()},n.Dst=function(){var t=this.Nst;void 0!==t&&t.readyState>=2&&!this.Cst&&(this.Cst=!0,this.jst())},n.jst=function(){var t,n,i=this.Nst,e=function(t){var n=new gh,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.$D;this.Ost=new fu,this.iE=new Wv({JD:r,PE:r.PE,yp:this.Ost.Ix,eE:i.status,cP:i.statusText,OE:e,qE:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.Sst)||t.Tx(this.iE)},n.Est=function(){var t,n=this.Nst;if(void 0!==n){var i=n.response;if(!wt(i)){var e=this.$D.PE;i=e===bh.JM?n.responseText:e===bh.lE?new ArrayBuffer(0):{}}null==(t=this.Ost)||t.Tx(i)}},n.kst=function(){this.gn()},n.vst=function(t){void 0!==this.Nst&&(null==this.$D.FE||this.$D.FE.call(this.$D,t.loaded,t.lengthComputable?t.total:void 0))},n.jq=function(){var t=new g("Network request failed");this.iE?this.Ss(new $v(this.iE,t)):this.Ss(new Gv(this.$D,t))},n.Lst=function(){this.Ss(new Zv(this.$D))},n.Ist=function(){this.Ss(new en),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.Ost)?i:this.Sst)||n.Sx(t)},n.gn=function(){this.Nst=void 0,this.iE=void 0,this.Sst=void 0,this.Ost=void 0,this.PO.$f()},Dt(t,[{key:"tE",get:function(){return this.Sst.Ix}}]),t}();var pd=function(){function t(){}var n=t.prototype;return n.JD=function(t){return function(t){if(!od()||!function(t){try{return ud.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Iu))return!1;if(!fd()&&t.FE)return!1;if(!t.YE){if(Zi.hL&&Zi.Zk<=68)return!1;if(Zi.sL)return!1}return!0}(t)?new vd(t).tE:new md(t).tE},n.CG=function(t){var n=t.uB?{"Content-type":t.uB}:void 0;this.JD(new Vv({RE:qv.POST,Iu:t.Iu,jE:t.jE,OE:n,ew:Hv._w})).then((function(t){!function(t){t.then(Nt,Nt)}(t.NP())}),Nt)},n.gn=function(){},t}();var yd=function(t){return t[t.pD=1]="pD",t[t.yD=2]="yD",t[t.JM=3]="JM",t[t.MD=4]="MD",t[t.bD=9]="bD",t}({});var _d=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Bt(n,t),n}(nn),Sd=function(){function t(){}return t.prototype.zD=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new _d(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new _d;return new Nd(n)},t}(),Td=function(){function t(t){this.Rst=t}var n=t.prototype;return n.mD=function(t){return this.Rst.isEqualNode(t.Rst)},n.ND=function(n){return new t(this.Rst.cloneNode(n))},Dt(t,[{key:"TD",get:function(){return yd.yD}},{key:"PD",get:function(){var t;return null!=(t=this.Rst.localName)?t:Dd(this.Rst.nodeName)}},{key:"l",get:function(){return this.Rst.nodeName}},{key:"Pst",get:function(){var t;return null!=(t=this.Rst.namespaceURI)?t:void 0}},{key:"zst",get:function(){var t;return null!=(t=this.Rst.prefix)?t:void 0}},{key:"NM",get:function(){return this.Rst.nodeValue}}]),t}(),Ed=function(){function t(t){this.Bst=void 0,this.Ust=t}var n=t.prototype;return n.OD=function(t){return this.FD.filter((function(n){return Pd(n)&&n.IP===t}))},n.jD=function(t,n){return this.FD.filter((function(i){return Pd(i)&&i.PD===n&&i.Pst===t}))},n.YD=function(t){this.Ust.appendChild(t.cD),this.Bst&&this.Bst.push(t)},n.mD=function(t){return this.Ust.isEqualNode(t.cD)},Dt(t,[{key:"FD",get:function(){return void 0===this.Bst&&(this.Bst=function(t){for(var n=[],i=0;i<t.length;i++){var e=Ad(t.item(i));e&&n.push(e)}return n}(this.Ust.childNodes)),this.Bst}},{key:"m",get:function(){return this.FD.filter(Pd)}},{key:"cD",get:function(){return this.Ust}}]),t}(),Id=function(t){function n(n){return t.call(this,n)||this}Bt(n,t);var i=n.prototype;return i.UD=function(t){if(this.Ust.hasAttribute(t))return this.Ust.getAttribute(t)},i.QD=function(t,n){if(this.Ust.hasAttributeNS(t,n))return this.Ust.getAttributeNS(t,n)},i.LD=function(t){this.Ust.removeAttribute(t)},i.Qst=function(t,n){this.Ust.removeAttributeNS(t,n)},i.Fst=function(t,n){this.Ust.setAttribute(t,n)},i.Yst=function(t,n,i){this.Ust.setAttributeNS(t,n,i)},i.ND=function(t){return new n(this.Ust.cloneNode(t))},Dt(n,[{key:"TD",get:function(){return yd.pD}},{key:"PD",get:function(){var t;return null!=(t=this.Ust.localName)?t:Dd(this.Ust.nodeName)}},{key:"Pst",get:function(){var t;return null!=(t=this.Ust.namespaceURI)?t:void 0}},{key:"zst",get:function(){var t;return null!=(t=this.Ust.prefix)?t:void 0}},{key:"IP",get:function(){return this.Ust.nodeName}},{key:"RD",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Td(t.item(i)));return n}(this.Ust.attributes)}},{key:"AP",get:function(){return this.Ust.textContent}}]),n}(Ed),kd=function(){function t(t){this.Ust=t}return t.prototype.mD=function(t){return this.yp===t.yp},Dt(t,[{key:"yp",get:function(){return this.Ust.nodeValue}},{key:"cD",get:function(){return this.Ust}}]),t}(),Rd=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ND=function(t){return new n(this.Ust.cloneNode(t))},Dt(n,[{key:"TD",get:function(){return yd.JM}}]),n}(kd),Od=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ND=function(t){return new n(this.Ust.cloneNode(t))},Dt(n,[{key:"TD",get:function(){return yd.MD}}]),n}(kd),Nd=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ND=function(t){return new n(this.Ust.cloneNode(t))},Dt(n,[{key:"TD",get:function(){return yd.bD}},{key:"BD",get:function(){return new Id(this.Ust.documentElement)}}]),n}(Ed);function Pd(t){return function(t){return 1===t.TD}(t)}function Ad(t){switch(t.nodeType){case yd.pD:return new Id(t);case yd.JM:return new Rd(t);case yd.MD:return new Od(t)}}function Dd(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Cd=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Gst=void 0,n.Wst=fd(),n.Hst=Zi.OL||Zi.Uk,n.Xst=(Zi.OL||Zi.hL&&Zi.Zk<=68||Zi.Uk)&&!(Zi.sL&&Zi.rL<3),n.tnt=void 0,n.int=new Sd,n}return Bt(n,t),n.prototype.zD=function(t){return this.int.zD(t)},Dt(n,[{key:"ast",get:function(){return this.Gst||(this.Gst=new Qo(ch())),this.Gst}},{key:"Vst",get:function(){return this.Wst}},{key:"u1",get:function(){return this.Hst}},{key:"N1",get:function(){return this.Xst}},{key:"Zst",get:function(){return!1}},{key:"lz",get:function(){return vh.FF()}},{key:"qst",get:function(){return{Kst:wh}}},{key:"Jst",get:function(){return v.connection&&v.connection.effectiveType||"default"}},{key:"$st",get:function(){return v.connection&&v.connection.type||"unknown"}},{key:"ER",get:function(){return this.tnt||(this.tnt=new jv(new pd)),this.tnt}}]),n}(Ao);Ot(new Cd),Ot(new Cd);var xd=self;xd.addEventListener("install",(function(t){t.waitUntil(xd.skipWaiting())})),xd.addEventListener("activate",(function(t){t.waitUntil(xd.clients.claim())})),Li.TR.ur(xd)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|