@theoplayer/extended 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/theoplayer.sw.js CHANGED
@@ -24,7 +24,7 @@
24
24
  THEOplayer is based on patented technology developed by
25
25
  THEO Technologies (https://www.theoplayer.com).
26
26
 
27
- Version: 2022.2.1 (3.4.0)
28
- Created: 2022-05-05T15:08:19.282Z
27
+ Version: 2022.2.2 (3.5.0)
28
+ Created: 2022-06-02T15:18:37.379Z
29
29
  */
30
- !function(t){!function(){"use strict";var n=t.window,i=t.document,e=(t.location,t.navigator),r=t.setTimeout,o=t.clearTimeout,u=t.setInterval,s=t.clearInterval,f=t.Error,h=t.TypeError,a=(t.SyntaxError,t.Object),c=t.Math,v=t.parseInt,l=t.parseFloat,d=t.isNaN,w=t.Uint8Array,b=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);var g=r;function m(t){return Boolean(t&&void 0!==t.length)}function p(){}function y(t){if(!(this instanceof y))throw new h("Promises must be constructed via new");if("function"!=typeof t)throw new h("not a function");this.we=0,this.me=!1,this.ye=void 0,this.ke=[],k(t,this)}function _(t,n){for(;3===t.we;)t=t.ye;0!==t.we?(t.me=!0,y.pe(function(){var i=1===t.we?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.ye)}catch(t){return void I(n.promise,t)}S(n.promise,e)}else(1===t.we?S:I)(n.promise,t.ye)})):t.ke.push(n)}function S(t,n){try{if(n===t)throw new h("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var i=n.then;if(n instanceof y)return t.we=3,t.ye=n,void T(t);if("function"==typeof i)return void k((e=i,r=n,function(){e.apply(r,arguments)}),t)}t.we=1,t.ye=n,T(t)}catch(n){I(t,n)}var e,r}function I(t,n){t.we=2,t.ye=n,T(t)}function T(t){2===t.we&&0===t.ke.length&&y.pe(function(){t.me||y.Ae(t.ye)});for(var n=0,i=t.ke.length;n<i;n++)_(t,t.ke[n]);t.ke=null}function E(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function k(t,n){var i=!1;try{t(function(t){i||(i=!0,S(n,t))},function(t){i||(i=!0,I(n,t))})}catch(t){if(i)return;i=!0,I(n,t)}}y.prototype.catch=function(t){return this.then(null,t)},y.prototype.then=function(t,n){var i=new this.constructor(p);return _(this,new E(t,n,i)),i},y.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)})})},y.all=function(t){return new y(function(n,i){if(!m(t))return i(new h("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var s=u.then;if("function"==typeof s)return void s.call(u,function(n){o(t,n)},i)}e[t]=u,0==--r&&n(e)}catch(t){i(t)}}for(var u=0;u<e.length;u++)o(u,e[u])})},y.allSettled=function(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new h(typeof 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"==typeof 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])})},y.resolve=function(t){return t&&"object"==typeof t&&t.constructor===y?t:new y(function(n){n(t)})},y.reject=function(t){return new y(function(n,i){i(t)})},y.race=function(t){return new y(function(n,i){if(!m(t))return i(new h("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)y.resolve(t[e]).then(n,i)})},y.pe="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){g(t,0)},y.Ae=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var R=function(){var n=t.Promise;if(void 0!==n)try{if(-1!==n.toString().indexOf("[native code]"))return n}catch(t){}}(),N=e?e.userAgent:"",O=N.match(/Firefox\/([0-9]+)/i),P=null!=O,A=O?Number(O[1]):0,D=N.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),C=null!=D,x=D?Number(D[3]):0,B=function(){function t(t){this.Te=0,this.Se=0,this.Wi=[],this.Ee=t}return t.prototype.Ie=function(t){var n=this.length();this.Re(n+1);var i=this.Se+n&this.Ee-1;this.Wi[i]=t,this.Te=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.Ee<n)this.Ie(t);else{var i=this.Se+n-1,e=this.Ee-1;this.Wi[i&e]=t,this.Te=n}},t.prototype.shift=function(){var t=this.Se,n=this.Wi[t];return this.Wi[t]=void 0,this.Se=t+1&this.Ee-1,this.Te--,n},t.prototype.length=function(){return this.Te},t.prototype.Re=function(t){this.Ee<t&&this.Ne(this.Ee<<1)},t.prototype.Ne=function(t){var n=this.Ee;this.Ee=t;var i=this.Se+this.Te&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.Wi,0,n,i)},t}();var F="unhandledrejection",L=t.PromiseRejectionEvent,z=t.CustomEvent;function U(t){return new L(F,{reason:t,promise:R.reject(t).catch(function(){}),cancelable:!0})}function M(t){var n=new z(F,{detail:{reason:t},cancelable:!0});return a.defineProperty(n,"reason",{value:t}),n}function W(t){var n=i.createEvent("CustomEvent");return n.initCustomEvent(F,!1,!0,{reason:t}),n}var q,j,V,H,X,G,Y=function(t){return(Y=function(){try{var t=R.resolve(),n=new L(F,{reason:"error",promise:t});return F===n.type&&"error"===n.reason}catch(t){}return!1}()?U:function(){try{var t=new z(F,{detail:{reason:"error"}});return F===t.type&&"error"===t.detail.reason}catch(t){}return!1}()?M:W)(t)};if(R&&!(P&&A<60||C&&x<15))j=R,function(){};else{j=y;var K=null!==(q=function(){var n=t.queueMicrotask;if("function"==typeof n)return function(t){return n(t)};var i=R;if(i&&"function"==typeof i.resolve){var e=i.resolve();return function(t){return e.then(t)}}}())&&void 0!==q?q:y.pe,Q=(V=K,H=new B(16),X=!1,{De:function(t){H.push(t),X||(X=!0,V(G))},Ce:G=function(){for(;H.length()>0;)H.shift()();X=!1}});Q.Ce,y.pe=Q.De,y.Ae=function(n){try{var i=Y(n);if(!t.dispatchEvent(i)||i.defaultPrevented)return}catch(t){}r(function(){throw new f("Unhandled promise rejection: ".concat(n))},0)}}function $(t,n,i){return t(i={path:n,exports:{},require:function(t,n){return function(){throw new f("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&i.path)}},i.exports),i.exports}var J,Z=$(function(t){!function(t){var n,i=a.prototype,e=i.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",u=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,n,i,e){var r=n&&n.prototype instanceof p?n:p,o=a.create(r.prototype),u=new A(e||[]);return o.Wr=function(t,n,i){var e=l;return function(r,o){if(e===b)throw new f("Generator is already running");if(e===g){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var u=i.delegate;if(u){var s=N(u,i);if(s){if(s===m)continue;return s}}if("next"===i.method)i.sent=i.qr=i.arg;else if("throw"===i.method){if(e===l)throw e=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);e=b;var h=v(t,n,i);if("normal"===h.type){if(e=i.done?g:w,h.arg===m)continue;return{value:h.arg,done:i.done}}"throw"===h.type&&(e=g,i.method="throw",i.arg=h.arg)}}}(t,i,u),o}function v(t,n,i){try{return{type:"normal",arg:t.call(n,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l="suspendedStart",w="suspendedYield",b="executing",g="completed",m={};function p(){}function y(){}function _(){}var S={};S[o]=function(){return this};var I=a.getPrototypeOf,T=I&&I(I(D([])));T&&T!==i&&e.call(T,o)&&(S=T);var E=_.prototype=p.prototype=a.create(S);function k(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this.Wr(n,t)}})}function R(t){var n;this.Wr=function(i,r){function o(){return new j(function(n,o){!function n(i,r,o,u){var s=v(t[i],t,r);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==typeof h&&e.call(h,"Gr")?j.resolve(h.Gr).then(function(t){n("next",t,o,u)},function(t){n("throw",t,o,u)}):j.resolve(h).then(function(t){f.value=t,o(f)},function(t){return n("throw",t,o,u)})}u(s.arg)}(i,r,n,o)})}return n=n?n.then(o,o):o()}}function N(t,i){var e=t.iterator[i.method];if(e===n){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=n,N(t,i),"throw"===i.method))return m;i.method="throw",i.arg=new h("The iterator does not provide a 'throw' method")}return m}var r=v(e,t.iterator,i.arg);if("throw"===r.type)return i.method="throw",i.arg=r.arg,i.delegate=null,m;var o=r.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=n),i.delegate=null,m):o:(i.method="throw",i.arg=new h("iterator result is not an object"),i.delegate=null,m)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function P(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function D(t){if(t){var i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!d(t.length)){var r=-1,u=function i(){for(;++r<t.length;)if(e.call(t,r))return i.value=t[r],i.done=!1,i;return i.value=n,i.done=!0,i};return u.next=u}}return{next:C}}function C(){return{value:n,done:!0}}y.prototype=E.constructor=_,_.constructor=y,_[s]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return a.setPrototypeOf?a.setPrototypeOf(t,_):(t.__proto__=_,s in t||(t[s]="GeneratorFunction")),t.prototype=a.create(E),t},t.awrap=function(t){return{Gr:t}},k(R.prototype),R.prototype[u]=function(){return this},t.AsyncIterator=R,t.async=function(n,i,e,r){var o=new R(c(n,i,e,r));return t.isGeneratorFunction(i)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(E),E[s]="Generator",E[o]=function(){return this},E.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var i in t)n.push(i);return n.reverse(),function i(){for(;n.length;){var e=n.pop();if(e in t)return i.value=e,i.done=!1,i}return i.done=!0,i}},t.values=D,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this.qr=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!t)for(var i in this)"t"===i.charAt(0)&&e.call(this,i)&&!d(+i.slice(1))&&(this[i]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function r(e,r){return s.type="throw",s.arg=t,i.next=e,r&&(i.method="next",i.arg=n),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],s=u.completion;if("root"===u.tryLoc)return r("end");if(u.tryLoc<=this.prev){var h=e.call(u,"catchLoc"),a=e.call(u,"finallyLoc");if(h&&a){if(this.prev<u.catchLoc)return r(u.catchLoc,!0);if(this.prev<u.finallyLoc)return r(u.finallyLoc)}else if(h){if(this.prev<u.catchLoc)return r(u.catchLoc,!0)}else{if(!a)throw new f("try statement without catch or finally");if(this.prev<u.finallyLoc)return r(u.finallyLoc)}}}},abrupt:function(t,n){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&e.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),m},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),P(i),m}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc===t){var e=i.completion;if("throw"===e.type){var r=e.arg;P(i)}return r}}throw new f("illegal catch attempt")},delegateYield:function(t,i,e){return this.delegate={iterator:D(t),resultName:i,nextLoc:e},"next"===this.method&&(this.arg=n),m}}}(t.exports)});function tt(t){J=t}var nt={}.toString;var it=Array.isArray||function(t){return"[object Array]"===nt.call(t)};function et(t){return"object"==typeof t&&null!==t}var rt,ot=9007199254740991,ut=c.pow(2,-52);function st(t,n){for(var i=t,e=n;0!==e;){var r=i%e;i=e,e=r}return i<0?-i:i}!function(t){t[t.Ss=0]="Ss",t[t.Es=1]="Es",t[t.Is=-1]="Is"}(rt||(rt={}));var ft=function(t,n){return function(t,n){if(t===n)return!0;var i=c.abs(t-n);return i<ut||i<c.max(c.abs(t),c.abs(n))*ut}(t,n)?rt.Ss:function(t,n){return t===n?rt.Ss:t<n?rt.Is:t>n?rt.Es:d(t)?d(n)?rt.Ss:rt.Es:rt.Is}(t,n)};function ht(t,n,i){for(var e=0;e<t.length;e+=1){var r=t[e];if(n.call(i,r,e,t))return e}return-1}function at(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){t.splice(n,1)}(t,i),!0)}function ct(t,n){return-1!==t.indexOf(n)}function vt(t){t.length=0}var lt=function(){};function dt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=16*c.random()|0;return("x"===t?n:3&n|8).toString(16)})}var wt,bt="https://theo.proxy";function gt(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),a.defineProperty(t,e.key,e)}}function mt(t,n,i){return n&&gt(t.prototype,n),i&&gt(t,i),a.defineProperty(t,"prototype",{writable:!1}),t}function pt(){var t=a.create(null);return t.__=void 0,delete t.__,t}function yt(){return new It}!function(t){t.Sl="audio",t.El="video",t.IA="metadata"}(wt||(wt={}));var _t,St,It=("undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0)||(_t=function(){function t(t,n){this.data=void 0,this.keys=void 0,this.index=0,this.selector=void 0,this.data=t,this.selector=n,this.keys=a.keys(t)}var n=t.prototype;return n.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}(),function(){function t(){this.data=pt(),this.size=0}var n=t.prototype;return n.get=function(t){return this.data[t]},n.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},n.has=function(t){return t in this.data},n.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},n.clear=function(){this.data=pt(),this.size=0},n.keys=function(){return new _t(this.data,function(t,n){return n})},n.values=function(){return new _t(this.data,function(t,n){return t[n]})},n.entries=function(){return new _t(this.data,function(t,n){return[n,t[n]]})},n.forEach=function(t){for(var n in this.data)t(this.data[n],n)},t}());!function(t){t.fl="#EXTINF",t.Lkt="#EXT-X-MAP",t.vO="#EXTM3U",t.i="#EXT-X-VERSION",t.o="#EXT-X-TARGETDURATION",t.V5="#EXT-X-START",t.s="#EXT-X-INDEPENDENT-SEGMENTS",t.qf="#EXT-X-STREAM-INF",t.h="#EXT-X-MEDIA-SEQUENCE",t.m="#EXT-X-ENDLIST",t.dO="#EXT-X-MEDIA",t.p="#EXT-X-DISCONTINUITY",t.S="#EXT-X-DISCONTINUITY-SEQUENCE",t.I="#EXT-X-PLAYLIST-TYPE"}(St||(St={}));var Tt,Et=function(){function t(t,n){this.us=St.fl,this.T=void 0,this.k=void 0,this.T=t,this.k=n}return t.prototype.YI=function(){return this.us+":"+this.T+",\n"+this.k},t}(),kt=function(){function t(){this.us=St.vO}return t.prototype.YI=function(){return this.us},t}(),Rt=function(){function t(t){this.us=St.i,this.iT=void 0,this.iT=t}return t.prototype.YI=function(){return this.us+":"+this.iT},t}(),Nt=function(){function t(t){this.us=St.o,this.Mpt=void 0,this.Mpt=t}return t.prototype.YI=function(){return this.us+":"+this.Mpt},t}(),Ot=function(){function t(t){this.us=St.V5,this.RAt=void 0,this.RAt=t}return t.prototype.YI=function(){return this.us+":TIME-OFFSET="+this.RAt},t}(),Pt=function(){function t(){this.us=St.s}return t.prototype.YI=function(){return this.us},t}(),At=function(){function t(t){this.us=St.qf,this.rN=1,this.k=void 0,this.k=t}return t.prototype.YI=function(){return this.us+":BANDWIDTH="+this.rN+',AUDIO="audio"\n'+this.k},t}(),Dt=function(){function t(t){this.us=St.h,this.VS=void 0,this.VS=t}return t.prototype.YI=function(){return this.us+":"+this.VS},t}(),Ct=function(){function t(){this.us=St.p}return t.prototype.YI=function(){return this.us},t}(),xt=function(){function t(t){this.us=St.S,this.VS=void 0,this.VS=t}return t.prototype.YI=function(){return this.us+":"+this.VS},t}();!function(t){t.Ukt="VOD",t.IDt="EVENT"}(Tt||(Tt={}));var Bt=function(){function t(t){this.us=St.dO,this.k=void 0,this.k=t}return t.prototype.YI=function(){var t=yt();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.k+'"');var n=[];return t.forEach(function(t,i){return n.push(i+"="+t)}),this.us+":"+n.join(",")},t}(),Ft=function(){function t(t){this.Fo=[],this.Fo=t}return t.prototype.O=function(){for(var t="",n=0,i=this.Fo;n<i.length;n++){t+=i[n].YI()+"\n"}return t},mt(t,[{key:"GT",get:function(){return this.Fo}}]),t}(),Lt=function(){function t(){this.Fo=[];for(var t=[new kt,new Rt(8)],n=0;n<t.length;n++){var i=t[n];this.P(i)}}var n=t.prototype;return n.P=function(t){this.Fo.push(t)},n.Os=function(){this.Fo.length=0},mt(t,[{key:"GT",get:function(){return new Ft(this.Fo)}}]),t}();function zt(t,n){return(zt=a.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Ut(t,n){t.prototype=a.create(n.prototype),t.prototype.constructor=t,zt(t,n)}var Mt=function(){function t(){}var n=t.prototype;return n.ip=function(t){return this.ep()*t},n.rp=function(t){return this.sp(t)>0},n.op=function(t){return this.sp(t)>=0},n.hp=function(t,n){return this.cp(t).ap(n)},n.Gk=function(t){return 0===this.sp(t)},n.fp=function(t){return this.sp(t)<0},n.ap=function(t){return this.sp(t)<=0},n.vp=function(){return this.dp()?this.lp():this},n._p=function(t){return this.rk(t.lp())},n.cp=function(t){return this._p(t).vp()},t}();function Wt(t,n){return t.wp()?n.wp()?rt.Ss:rt.Es:n.wp()?rt.Is:t.gp()?n.gp()&&t.dp()===n.dp()?rt.Ss:t.dp()?rt.Is:rt.Es:n.dp()?rt.Es:rt.Is}var qt=$(function(t,n){var i=function(t){a.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new w([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(t){}function i(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function e(t){return!0===(t&&t.Yn)}function r(t){var n=c.clz32(t&-t);return t?31-n:n}i.prototype.Yn,a.defineProperty(i.prototype,"Yn",{value:!0}),i.isLong=e;var o={},u={};function s(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=u[t])?e:(i=l(t,0,!0),r&&(u[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=o[t])?e:(i=l(t,t<0?-1:0,!1),r&&(o[t]=i),i)}function h(t,n){if(d(t))return n?T:I;if(n){if(t<0)return T;if(t>=y)return O}else{if(t<=-_)return P;if(t+1>=_)return N}return t<0?h(-t,n).neg():l(t%p|0,t/p|0,n)}function l(t,n,e){return new i(t,n,e)}i.fromInt=s,i.fromNumber=h,i.fromBits=l;var b=c.pow;function g(t,n,i){if(0===t.length)throw f("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?T:I;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw f("interior hyphen");if(0===e)return g(t.substring(1),n,i).neg();for(var r=h(b(i,8)),o=I,u=0;u<t.length;u+=8){var s=c.min(8,t.length-u),a=v(t.substring(u,u+s),i);if(s<8){var l=h(b(i,s));o=o.mul(l).add(h(a))}else o=(o=o.mul(r)).add(h(a))}return o.unsigned=n,o}function m(t,n){return"number"==typeof t?h(t,n):"string"==typeof t?g(t,n):l(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}i.fromString=g,i.fromValue=m;var p=4294967296,y=p*p,_=y/2,S=s(1<<24),I=s(0);i.ZERO=I;var T=s(0,!0);i.UZERO=T;var E=s(1);i.ONE=E;var k=s(1,!0);i.UONE=k;var R=s(-1);i.NEG_ONE=R;var N=l(-1,2147483647,!1);i.MAX_VALUE=N;var O=l(-1,-1,!0);i.MAX_UNSIGNED_VALUE=O;var P=l(0,-2147483648,!1);i.MIN_VALUE=P;var A=i.prototype;A.toInt=function(){return this.unsigned?this.low>>>0:this.low},A.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},A.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(P)){var n=h(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=h(b(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}},A.getHighBits=function(){return this.high},A.getHighBitsUnsigned=function(){return this.high>>>0},A.getLowBits=function(){return this.low},A.getLowBitsUnsigned=function(){return this.low>>>0},A.getNumBitsAbs=function(){if(this.isNegative())return this.eq(P)?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},A.isZero=function(){return 0===this.high&&0===this.low},A.eqz=A.isZero,A.isNegative=function(){return!this.unsigned&&this.high<0},A.isPositive=function(){return this.unsigned||this.high>=0},A.isOdd=function(){return 1==(1&this.low)},A.isEven=function(){return 0==(1&this.low)},A.equals=function(t){return e(t)||(t=m(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},A.eq=A.equals,A.notEquals=function(t){return!this.eq(t)},A.neq=A.notEquals,A.ne=A.notEquals,A.lessThan=function(t){return this.comp(t)<0},A.lt=A.lessThan,A.lessThanOrEqual=function(t){return this.comp(t)<=0},A.lte=A.lessThanOrEqual,A.le=A.lessThanOrEqual,A.greaterThan=function(t){return this.comp(t)>0},A.gt=A.greaterThan,A.greaterThanOrEqual=function(t){return this.comp(t)>=0},A.gte=A.greaterThanOrEqual,A.ge=A.greaterThanOrEqual,A.compare=function(t){if(e(t)||(t=m(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},A.comp=A.compare,A.negate=function(){return!this.unsigned&&this.eq(P)?P:this.not().add(E)},A.neg=A.negate,A.add=function(t){e(t)||(t=m(t));var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,o=65535&this.low,u=t.high>>>16,s=65535&t.high,f=t.low>>>16,h=0,a=0,c=0,v=0;return c+=(v+=o+(65535&t.low))>>>16,a+=(c+=r+f)>>>16,h+=(a+=i+s)>>>16,h+=n+u,l((c&=65535)<<16|(v&=65535),(h&=65535)<<16|(a&=65535),this.unsigned)},A.subtract=function(t){return e(t)||(t=m(t)),this.add(t.neg())},A.sub=A.subtract,A.multiply=function(t){if(this.isZero())return this;if(e(t)||(t=m(t)),n)return l(n.mul(this.low,this.high,t.low,t.high),n.get_high(),this.unsigned);if(t.isZero())return this.unsigned?T:I;if(this.eq(P))return t.isOdd()?P:I;if(t.eq(P))return this.isOdd()?P:I;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(S)&&t.lt(S))return h(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,o=this.low>>>16,u=65535&this.low,s=t.high>>>16,f=65535&t.high,a=t.low>>>16,c=65535&t.low,v=0,d=0,w=0,b=0;return w+=(b+=u*c)>>>16,d+=(w+=o*c)>>>16,w&=65535,d+=(w+=u*a)>>>16,v+=(d+=r*c)>>>16,d&=65535,v+=(d+=o*a)>>>16,d&=65535,v+=(d+=u*f)>>>16,v+=i*c+r*a+o*f+u*s,l((w&=65535)<<16|(b&=65535),(v&=65535)<<16|(d&=65535),this.unsigned)},A.mul=A.multiply,A.divide=function(t){if(e(t)||(t=m(t)),t.isZero())throw f("division by zero");var i,r,o;if(n)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?l((this.unsigned?n.div_u:n.div_s)(this.low,this.high,t.low,t.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?T:I;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return T;if(t.gt(this.shru(1)))return k;o=T}else{if(this.eq(P))return t.eq(E)||t.eq(R)?P:t.eq(P)?E:(i=this.shr(1).div(t).shl(1)).eq(I)?t.isNegative()?E:R:(r=this.sub(t.mul(i)),o=i.add(r.div(t)));if(t.eq(P))return this.unsigned?T:I;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();o=I}for(r=this;r.gte(t);){i=c.max(1,c.floor(r.toNumber()/t.toNumber()));for(var u=c.ceil(c.log(i)/c.LN2),s=u<=48?1:b(2,u-48),a=h(i),v=a.mul(t);v.isNegative()||v.gt(r);)v=(a=h(i-=s,this.unsigned)).mul(t);a.isZero()&&(a=E),o=o.add(a),r=r.sub(v)}return o},A.div=A.divide,A.modulo=function(t){return e(t)||(t=m(t)),n?l((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,t.low,t.high),n.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},A.mod=A.modulo,A.rem=A.modulo,A.not=function(){return l(~this.low,~this.high,this.unsigned)},A.countLeadingZeros=function(){return this.high?c.clz32(this.high):c.clz32(this.low)+32},A.clz=A.countLeadingZeros,A.countTrailingZeros=function(){return this.low?r(this.low):r(this.high)+32},A.ctz=A.countTrailingZeros,A.and=function(t){return e(t)||(t=m(t)),l(this.low&t.low,this.high&t.high,this.unsigned)},A.or=function(t){return e(t)||(t=m(t)),l(this.low|t.low,this.high|t.high,this.unsigned)},A.xor=function(t){return e(t)||(t=m(t)),l(this.low^t.low,this.high^t.high,this.unsigned)},A.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?l(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):l(0,this.low<<t-32,this.unsigned)},A.shl=A.shiftLeft,A.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?l(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):l(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},A.shr=A.shiftRight,A.shiftRightUnsigned=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?l(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):l(32===t?this.high:this.high>>>t-32,0,this.unsigned)},A.shru=A.shiftRightUnsigned,A.shr_u=A.shiftRightUnsigned,A.rotateLeft=function(t){var n;return e(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?l(this.high,this.low,this.unsigned):t<32?(n=32-t,l(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),l(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},A.rotl=A.rotateLeft,A.rotateRight=function(t){var n;return e(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?l(this.high,this.low,this.unsigned):t<32?(n=32-t,l(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),l(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},A.rotr=A.rotateRight,A.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},A.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},A.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},A.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]},A.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]},i.fromBytes=function(t,n,e){return e?i.fromBytesLE(t,n):i.fromBytesBE(t,n)},i.fromBytesLE=function(t,n){return new i(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},i.fromBytesBE=function(t,n){return new i(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var D=i;return t.default=D,"default"in t?t.default:t}({});t.exports=i}),jt=function(){function t(t,n){this.mp=void 0,this.yp=void 0,this.mp=t,this.yp=n}t.kp=function(n,i,e){return e?new t(n.toUnsigned(),i.toUnsigned()):new t(n.toSigned(),i.toSigned())},t.pp=function(n){return n.unsigned?new t(n,qt.UZERO):new t(n,n.isNegative()?qt.NEG_ONE:qt.ZERO)},t.bp=function(n,i){if(d(n))return i?t.Ap:t.Tp;if(i){if(n<0)return t.Ap;if(n>=3.402823669209385e38)return t.Sp}else{if(n<=-1.7014118346046923e38)return t.Ep;if(n+1>=1.7014118346046923e38)return t.Ip}return n<0?t.bp(-n,i).lp():t.kp(qt.fromNumber(n%0x10000000000000000),qt.fromNumber(n/0x10000000000000000),i)};var n=t.prototype;return n.Rp=function(){return this.yp.unsigned},n.Np=function(){return this.mp.isZero()&&this.yp.isZero()},n.dp=function(){return this.yp.isNegative()},n.Dp=function(){return this.Rp()?t.kp(this.mp,this.yp,!1):this},n.Cp=function(){return this.Rp()?this:t.kp(this.mp,this.yp,!0)},n.Pp=function(){return this.mp},n.ep=function(){return this.dp()?-this.lp().ep():0x10000000000000000*this.yp.toNumber()+this.mp.toUnsigned().toNumber()},n.Op=function(){return this.mp.toInt()},n.Gk=function(t){return(this.Rp()===t.Rp()||this.yp.getHighBits()>>>31!=1||t.yp.getHighBits()>>>31!=1)&&(this.yp.toUnsigned().eq(t.yp.toUnsigned())&&this.mp.toUnsigned().eq(t.mp.toUnsigned()))},n.sp=function(t){if(this.Gk(t))return rt.Ss;var n=this.dp(),i=t.dp();if(n&&!i)return rt.Is;if(!n&&i)return rt.Es;if(!this.Rp())return this._p(t).dp()?rt.Is:rt.Es;var e=this.Cp(),r=t.Cp(),o=r.yp.comp(e.yp);return o>0||0===o&&r.mp.gt(e.mp)?rt.Is:rt.Es},n.fp=function(t){return this.sp(t)<0},n.ap=function(t){return this.sp(t)<=0},n.Bp=function(t){return this.sp(t)>0},n.Lp=function(t){return this.sp(t)>=0},n.Mp=function(){return new t(this.mp.not(),this.yp.not())},n.xp=function(n){return new t(this.mp.and(n.mp),this.yp.and(n.yp))},n.Fp=function(n){return new t(this.mp.or(n.mp),this.yp.or(n.yp))},n.Up=function(n){var i=127&n;return 0===i?this:i<64?t.kp(this.mp.shl(i),this.yp.shl(i).or(this.mp.shru(64-i)),this.Rp()):t.kp(qt.ZERO,this.mp.shl(i-64),this.Rp())},n.Hp=function(n){var i=127&n;return 0===i?this:i<64?t.kp(this.mp.shru(i).or(this.yp.shl(64-i)),this.yp.shr(i),this.Rp()):t.kp(this.yp.shr(i-64),this.yp.isNegative()?qt.NEG_ONE:qt.ZERO,this.Rp())},n.Vp=function(n){var i=127&n;return 0===i?this:i<64?t.kp(this.mp.shru(i).or(this.yp.shl(64-i)),this.yp.shru(i),this.Rp()):64===i?t.kp(this.yp,qt.ZERO,this.Rp()):t.kp(this.yp.shru(i-64),qt.ZERO,this.Rp())},n.rk=function(n){var i=this.yp.high>>>16,e=65535&this.yp.high,r=this.yp.low>>>16,o=65535&this.yp.low,u=this.mp.high>>>16,s=65535&this.mp.high,f=this.mp.low>>>16,h=65535&this.mp.low,a=n.yp.high>>>16,c=65535&n.yp.high,v=n.yp.low>>>16,l=65535&n.yp.low,d=n.mp.high>>>16,w=65535&n.mp.high,b=n.mp.low>>>16,g=0,m=0,p=0,y=0,_=0,S=0,I=0,T=0;I+=(T+=h+(65535&n.mp.low))>>>16,T&=65535,S+=(I+=f+b)>>>16,I&=65535,_+=(S+=s+w)>>>16,S&=65535,y+=(_+=u+d)>>>16,_&=65535,p+=(y+=o+l)>>>16,y&=65535,m+=(p+=r+v)>>>16,p&=65535,g+=(m+=e+c)>>>16,m&=65535,g+=i+a,g&=65535;var E=this.Rp(),k=qt.fromBits(p<<16|y,g<<16|m,E),R=qt.fromBits(I<<16|T,_<<16|S,E);return t.kp(R,k,E)},n._p=function(t){return this.rk(t.lp())},n.lp=function(){return this.Mp().rk(t.Xp)},n.zp=function(n){if(this.Np()||n.Np())return this.Rp()?t.Ap:t.Tp;if(this.dp())return n.dp()?this.lp().zp(n.lp()):this.lp().zp(n).lp();if(n.dp())return this.zp(n.lp()).lp();if(this.yp.isZero()&&0===this.mp.high&&n.yp.isZero()&&0===n.mp.high)return t.pp(this.mp.multiply(n.mp));var i=qt.fromBits(4294967295,0,!0),e=this.mp.and(i),r=this.mp.shru(32),o=this.yp.and(i),u=this.yp.shru(32),s=n.mp.and(i),f=n.mp.shru(32),h=n.yp.and(i),a=n.yp.shru(32),c=qt.UZERO,v=qt.UZERO,l=qt.UZERO,d=qt.UZERO;c=c.add(e.mul(s)),v=v.add(c.shru(32)),c=c.and(i),v=v.add(r.mul(s)),l=l.add(v.shru(32)),v=(v=v.and(i)).add(e.mul(f)),l=l.add(v.shru(32)),v=v.and(i),l=l.add(o.mul(s)),d=d.add(l.shru(32)),l=(l=l.and(i)).add(r.mul(f)),d=d.add(l.shru(32)),l=(l=l.and(i)).add(e.mul(h)),d=d.add(l.shru(32)),l=l.and(i),d=d.add(u.mul(s)).add(o.mul(f)).add(r.mul(h)).add(e.mul(a)).and(i);var w=qt.fromBits(c.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0),b=qt.fromBits(l.getLowBitsUnsigned(),d.getLowBitsUnsigned(),!0);return t.kp(w,b,this.Rp())},n.Wp=function(n){var i,e,r=n;if(r.Np())throw new RangeError("division by zero");if(this.Np())return this.Rp()?[t.Ap,t.Ap]:[t.Tp,t.Tp];if(this.Rp()){if(r.Rp()||(r=r.Cp()),r.Bp(this))return[t.Ap,this];if(r.Bp(this.Vp(1)))return[e=t.qp,i=this._p(r)];e=t.Ap}else{if(this.Gk(t.Ep)){if(r.Gk(t.Xp)||r.Gk(t.Gp))return[t.Ep,t.Tp];if(r.Gk(t.Ep))return[t.Xp,t.Tp];var o=this.Hp(1).Qp(r).Up(1);return o.Gk(t.Tp)?e=r.dp()?t.Xp:t.Gp:(i=this._p(r.zp(o)),e=o.rk(i.Qp(r))),[e,i=this._p(r.zp(e))]}if(r.Gk(t.Ep))return this.Rp()?[t.Ap,this]:[t.Tp,this];if(this.dp()){if(r.dp())return this.lp().Wp(r.lp());var u=this.lp().Wp(r);return e=u[0],i=u[1],[e.lp(),i.lp()]}if(r.dp()){var s=this.Wp(r.lp());return e=s[0],i=s[1],[e.lp(),i.lp()]}e=t.Tp}for(i=this;i.Lp(r);){for(var f=c.max(1,c.floor(i.ep()/r.ep())),h=c.ceil(c.log(f)/c.LN2),a=h<=48?1:c.pow(2,h-48),v=t.bp(f),l=v.zp(r);l.dp()||l.Bp(i);)f-=a,l=(v=t.bp(f,this.Rp())).zp(r);v.Np()&&(v=t.Xp),e=e.rk(v),i=i._p(l)}return[e,i]},n.Qp=function(t){return this.Wp(t)[0]},n.Yp=function(t){return this.Wp(t)[1]},n.toString=function(n){var i=n||10;if(i<2||i>36)throw new RangeError("radix");if(this.Np())return"0";if(this.dp()){if(this.Gk(t.Ep)){var e=t.bp(i),r=this.Qp(e),o=r.zp(e)._p(this);return r.toString(i)+o.Op().toString(i)}return"-"+this.lp().toString(i)}for(var u=t.bp(c.pow(i,6),this.Rp()),s=this,f="";;){var h=s.Qp(u),a=(s._p(h.zp(u)).Op()>>>0).toString(i);if((s=h).Np())return a+f;for(;a.length<6;)a="0"+a;f=String(a)+f}},t}();jt.Tp=jt.pp(qt.ZERO),jt.Ap=jt.pp(qt.UZERO),jt.Xp=jt.pp(qt.ONE),jt.qp=jt.pp(qt.UONE),jt.Gp=jt.pp(qt.NEG_ONE),jt.Ip=jt.kp(qt.NEG_ONE,qt.MAX_VALUE,!1),jt.Sp=jt.kp(qt.MAX_UNSIGNED_VALUE,qt.MAX_UNSIGNED_VALUE,!0),jt.Ep=jt.kp(qt.ZERO,qt.MIN_VALUE,!1);var Vt=function(){function t(t,n){void 0===n&&(n=1),this.jp=void 0,this.Kp=void 0,this.jp=t,this.Kp=n}t.Zp=function(n){return new t(c.ceil(n.jp),n.Kp)},t.Jp=function(n){return new t(c.floor(n.jp),n.Kp)},t.$p=function(t,n){return t.op(n)?t:n},t.ib=function(t,n){return t.ap(n)?t:n};var n=t.prototype;return n.rk=function(n){return this.Kp>=n.Kp?new t(this.jp+n.eb(this.Kp).jp,this.Kp):new t(this.eb(n.Kp).jp+n.jp,n.Kp)},n.rp=function(t){return t.fp(this)},n.op=function(t){return t.ap(this)},n.cp=function(n){return this.Kp>=n.Kp?new t(c.abs(this.jp-n.eb(this.Kp).jp),this.Kp):n.cp(this)},n.hp=function(t,n){return this.cp(t).ap(n)},n.sp=function(t){return i=t,(n=this).Kp>=i.Kp?ft(n.jp,i.eb(n.Kp).jp):ft(n.eb(i.Kp).jp,i.jp);var n,i},n.Gk=function(t){return 0===this.sp(t)},n.fp=function(t){return this.sp(t)<0},n.ap=function(t){return this.sp(t)<=0},n.eb=function(n){return new t(this.jp*(n/this.Kp),n)},n._p=function(n){return this.Kp>=n.Kp?new t(this.jp-n.eb(this.Kp).jp,this.Kp):new t(this.eb(n.Kp).jp-n.jp,n.Kp)},n.sb=function(n){return new t(this.jp*n,this.Kp)},mt(t,[{key:"gp",get:function(){return!isFinite(this.jp)}},{key:"ub",get:function(){return this.jp/this.Kp}}]),t}();Vt.ob=new Vt(1/6,1),Vt.Tp=new Vt(0),Vt.hb=new Vt(1/0),Vt.cb=1e6;var Ht=function(t){function n(n,i){var e;return(e=t.call(this)||this).gi=void 0,e.Kp=void 0,e.gi=n.toSigned(),e.Kp=i>>>0,e}Ut(n,t),n.fb=function(t,i){return void 0===i&&(i=1e6),n.bp(t*i,i)},n.bp=function(t,i){return d(t)?n.vb:t===1/0?n._b:t===-1/0?n.wb:new n(qt.fromNumber(t),i)},n.pp=function(t,i){return new n(t,i)},n.gb=function(t){return n.fb(t.ub,1e6)},n.mb=function(t){return new n(qt.fromNumber(t.getTime()),1e3)},n.$p=function(t,n){return t.op(n)?t:n},n.ib=function(t,n){return t.ap(n)?t:n},n.yb=function(t,i,e){return n.$p(i,n.ib(e,t))};var i=n.prototype;return i.dp=function(){return this.gi.isNegative()},i.Np=function(){return 0!==this.Kp&&this.gi.isZero()},i.gp=function(){return 0===this.Kp&&!this.gi.isZero()},i.wp=function(){return 0===this.Kp&&this.gi.isZero()},i.ep=function(){if(0===this.Kp)return this.gi.isZero()?NaN:this.gi.isNegative()?-1/0:1/0;var t=this.gi.divide(this.Kp),n=this.gi.subtract(t.multiply(this.Kp));return t.toNumber()+n.toNumber()/this.Kp},i.Pp=function(){if(0===this.Kp)throw new f("Failed to convert timestamp");return this.gi},i.kb=function(){return new Date(0===this.Kp?NaN:this.eb(1e3).gi.toNumber())},i.pb=function(){return new Vt(0===this.Kp?this.ep():this.gi.toNumber(),this.Kp)},i.eb=function(t,i){void 0===i&&(i=Yt.bb);var e=this.Kp;if(e===t)return this;if(0===e)return this;var r=st(e,t);return new n(function(t,n,i){var e=t.Wp(n),r=e[0],o=e[1];if(o.Np())return r;if(i===Yt.bb)return o.dp()?r._p(jt.Xp):r;if(i===Yt.Ab)return o.dp()?r:r.rk(jt.Xp);var u=o.zp(jt.bp(2));return u.dp()?u.lp().fp(n)?r:r._p(jt.Xp):u.fp(n)?r:r.rk(jt.Xp)}(jt.pp(this.gi).zp(jt.bp(t/r)),jt.bp(e/r),i).Pp(),t)},i.sp=function(t){if(this===t)return rt.Ss;if(0===this.Kp||0===t.Kp)return Wt(this,t);if(this.Np())return t.Np()?rt.Ss:t.dp()?rt.Es:rt.Is;if(t.Np())return this.dp()?rt.Is:rt.Es;var n=c.min(this.Kp,t.Kp),i=this.eb(n,Yt.Tb).gi,e=t.eb(n,Yt.Tb).gi;return i.compare(e)},i.lp=function(){return 0===this.Kp?Xt(this):new n(this.gi.negate(),this.Kp)},i.rk=function(t){if(0===this.Kp||0===t.Kp)return Gt(this,t);if(this.Np())return t;if(t.Np())return this;var i=c.max(this.Kp,t.Kp),e=this.eb(i,Yt.Tb),r=t.eb(i,Yt.Tb);return new n(e.gi.add(r.gi),i)},i.zp=function(t){if(this.wp()||d(t))return n.vb;if(this.gp()||!isFinite(t)){if(this.Np()||0===t)return n.vb;var i=this.dp()?n.wb:n._b;return t<0?i.lp():i}return this.Np()?this:new n(0===t?qt.ZERO:this.gi.multiply(t),this.Kp)},i.Qp=function(t){if(this.wp()||d(t))return n.vb;if(this.gp())return isFinite(t)?0===t?1/t<0?this.lp():this:t<0?this.lp():this:n.vb;if(!isFinite(t))return new n(qt.ZERO,this.Kp);if(this.Np())return 0===t?n.vb:new n(qt.ZERO,this.Kp);if(0===t){var i=this.dp()?n.wb:n._b;return 1/t<0?i.lp():i}return new n(this.gi.divide(t),this.Kp)},i.Sb=function(){return[this.gi.low,this.gi.high,this.Kp]},n}(Mt);function Xt(t){return t.wp()?t:t.dp()?Ht._b:Ht.wb}function Gt(t,n){return t.wp()||n.wp()?Ht.vb:t.gp()&&n.gp()?t.dp()===n.dp()?t:Ht.vb:t.gp()?t:n}Ht.Tp=new Ht(qt.ZERO,1e6),Ht.vb=new Ht(qt.ZERO,0),Ht._b=new Ht(qt.ONE,0),Ht.wb=new Ht(qt.NEG_ONE,0);var Yt,Kt=function(t){function n(n,i){var e;return(e=t.call(this)||this).gi=void 0,e.Kp=void 0,e.gi=BigInt.asIntN(64,n),e.Kp=i>>>0,e}Ut(n,t),n.fb=function(t,i){return void 0===i&&(i=1e6),n.bp(t*i,i)},n.bp=function(t,i){return d(t)?n.vb:t===1/0?n._b:t===-1/0?n.wb:new n(BigInt(c.floor(t)),i)},n.pp=function(t,i){return new n(BigInt(t.high)<<BigInt(32)|BigInt(t.low>>>0),i)},n.gb=function(t){return n.fb(t.ub,1e6)},n.mb=function(t){return n.bp(t.getTime(),1e3)},n.$p=function(t,n){return t.op(n)?t:n},n.ib=function(t,n){return t.ap(n)?t:n},n.yb=function(t,i,e){return n.$p(i,n.ib(e,t))};var i=n.prototype;return i.dp=function(){return this.gi<BigInt(0)},i.Np=function(){return 0!==this.Kp&&this.gi===BigInt(0)},i.gp=function(){return 0===this.Kp&&this.gi!==BigInt(0)},i.wp=function(){return 0===this.Kp&&this.gi===BigInt(0)},i.ep=function(){if(0===this.Kp)return this.gi===BigInt(0)?NaN:this.gi<BigInt(0)?-1/0:1/0;var t=this.gi/BigInt(this.Kp),n=this.gi-t*BigInt(this.Kp);return Number(t)+Number(n)/this.Kp},i.Pp=function(){if(0===this.Kp)throw new f("Failed to convert timestamp");return this.Eb()},i.Eb=function(){var t=this.gi&BigInt(4294967295),n=this.gi>>BigInt(32)&BigInt(4294967295);return qt.fromBits(Number(t),Number(n))},i.kb=function(){return new Date(0===this.Kp?NaN:Number(this.eb(1e3).gi))},i.pb=function(){return new Vt(0===this.Kp?this.ep():Number(this.gi),this.Kp)},i.eb=function(t,i){void 0===i&&(i=Yt.bb);var e=this.Kp;if(e===t)return this;if(0===e)return this;var r=st(e,t);return new n(function(t,n,i){var e=t/n,r=t-e*n;if(r===BigInt(0))return e;if(i===Yt.bb)return r<BigInt(0)?e-BigInt(1):e;if(i===Yt.Ab)return r<BigInt(0)?e:e+BigInt(1);var o=r*BigInt(2);return o<BigInt(0)?-o<n?e:e-BigInt(1):o<n?e:e+BigInt(1)}(this.gi*BigInt(t/r),BigInt(e/r),i),t)},i.sp=function(t){if(this===t)return rt.Ss;if(0===this.Kp||0===t.Kp)return Wt(this,t);if(this.Np())return t.Np()?rt.Ss:t.dp()?rt.Es:rt.Is;if(t.Np())return this.dp()?rt.Is:rt.Es;var n=c.min(this.Kp,t.Kp),i=this.eb(n,Yt.Tb).gi,e=t.eb(n,Yt.Tb).gi;return i>e?rt.Es:i<e?rt.Is:rt.Ss},i.lp=function(){return 0===this.Kp?Qt(this):new n(-this.gi,this.Kp)},i.rk=function(t){if(0===this.Kp||0===t.Kp)return $t(this,t);if(this.Np())return t;if(t.Np())return this;var i=c.max(this.Kp,t.Kp),e=this.eb(i,Yt.Tb),r=t.eb(i,Yt.Tb);return new n(e.gi+r.gi,i)},i.zp=function(t){if(this.wp()||d(t))return n.vb;if(this.gp()||!isFinite(t)){if(this.Np()||0===t)return n.vb;var i=this.dp()?n.wb:n._b;return t<0?i.lp():i}return this.Np()?this:new n(0===t?BigInt(0):this.gi*BigInt(t),this.Kp)},i.Qp=function(t){if(this.wp()||d(t))return n.vb;if(this.gp())return isFinite(t)?0===t?1/t<0?this.lp():this:t<0?this.lp():this:n.vb;if(!isFinite(t))return new n(BigInt(0),this.Kp);if(this.Np())return 0===t?n.vb:new n(BigInt(0),this.Kp);if(0===t){var i=this.dp()?n.wb:n._b;return 1/t<0?i.lp():i}return new n(this.gi/BigInt(t),this.Kp)},i.Sb=function(){var t=this.Eb();return[t.low,t.high,this.Kp]},mt(n,null,[{key:"Tp",get:function(){return n.Ib||(n.Ib=new n(BigInt(0),1e6)),n.Ib}},{key:"vb",get:function(){return n.Rb||(n.Rb=new n(BigInt(0),0)),n.Rb}},{key:"_b",get:function(){return n.Nb||(n.Nb=new n(BigInt(1),0)),n.Nb}},{key:"wb",get:function(){return n.Db||(n.Db=new n(BigInt(-1),0)),n.Db}}]),n}(Mt);function Qt(t){return t.wp()?t:t.dp()?Kt._b:Kt.wb}function $t(t,n){return t.wp()||n.wp()?Kt.vb:t.gp()&&n.gp()?t.dp()===n.dp()?t:Kt.vb:t.gp()?t:n}Kt.Ib=void 0,Kt.Rb=void 0,Kt.Nb=void 0,Kt.Db=void 0,function(t){t[t.bb=0]="bb",t[t.Ab=1]="Ab",t[t.Tb=2]="Tb"}(Yt||(Yt={}));var Jt=function(){try{return"function"==typeof BigInt&&"bigint"==typeof BigInt(0)}catch(t){return!1}}()?Kt:Ht;function Zt(t){return Jt.pp(qt.fromBits(t[0],t[1],!1),t[2])}function tn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var nn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];f.apply(this,n)};(nn.prototype=a.create(f.prototype)).constructor=nn;var en=function(t){function n(n,i){var e;return(e=t.call(this)||this).cause=void 0,e.message=n||"Unknown error",e.cause=i,f.captureStackTrace&&f.captureStackTrace(tn(e),e.constructor),e}return Ut(n,t),mt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(nn),rn=function(){function t(){this.Rs=!1,this.Ns=!1,this.Ds=[],this.Cs=[]}var n=t.prototype;return n.Ps=function(){if(!this.Rs&&!this.Ns){this.Rs=!0;for(var t=0,n=this.Ds.slice();t<n.length;t++){(0,n[t])()}this.Os()}},n.Os=function(){if(!this.Ns){this.Ns=!0;for(var t=0,n=this.Cs.slice();t<n.length;t++){(0,n[t])()}vt(this.Ds),vt(this.Cs)}},n.Bs=function(t){this.Ns||this.Ds.push(t)},n.Ls=function(t){this.Ns||at(this.Ds,t)},n.Ms=function(t){this.Ns||this.Cs.push(t)},n.xs=function(t){this.Ns||at(this.Cs,t)},t}(),on=function(){function t(){this.Fs=new rn}var n=t.prototype;return n.Us=function(){this.Fs.Ps()},n.Os=function(){this.Fs.Os()},n.Hs=function(t){var n=this.Fs;if(!n.Rs)if(t.Rs)n.Ps();else if(!n.Ns&&!t.Ns){var i=function(){e(),n.Ps()},e=function e(){t.Ls(i),t.xs(e),n.Ls(i),n.xs(e)};t.Bs(i),t.Ms(e),n.Bs(i),n.Ms(e)}},n.Vs=function(){var n=new t,i=new t,e=n.Xs,r=i.Xs,o=this.Fs,u=function(){e.Rs&&r.Ns||r.Rs&&e.Ns?o.Ps():e.Ns&&r.Ns&&o.Os()};e.Bs(u),r.Bs(u),e.Ms(u),r.Ms(u),n.Hs(o),i.Hs(o);return o.Ms(function(){e.Ls(u),r.Ls(u),e.xs(u),r.xs(u)}),[n,i]},mt(t,[{key:"Xs",get:function(){return this.Fs}}]),t}(),un=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Ut(n,t),mt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(en);function sn(t){return t instanceof f&&"AbortError"===t.name}function fn(t,n){return t.then(function(t){return n.Os(),t},function(t){throw n.Os(),t})}var hn;j.resolve();!function(t){t.DZ="HELLO",t.CZ="HI_THERE",t.PZ="INITIALIZE",t.OZ="APPEND_INIT",t.BZ="APPEND_DATA",t.LZ="ACK",t.MZ="REMOVE",t.xZ="DESTROY_SESSION"}(hn||(hn={}));var an="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),cn=16383;function vn(t,n,i){for(var e,r,o,u=[],s=n;s<i;s+=3)u.push((e=t[s],r=t[s+1],o=t[s+2],an[e>>2]+an[(3&e)<<4|r>>4]+an[(15&r)<<2|o>>6]+an[63&o]));return u.join("")}var ln=function(){function t(t){void 0===t&&(t=0),this.Pu=t}var n=t.prototype;return n.Cu=function(t){this.Pu+=t},n.Ou=function(t){this.Pu=t},n.Bu=function(){return new t(this.Du)},mt(t,[{key:"Du",get:function(){return this.Pu}}]),t}();function dn(t,n){return null!=t&&t.substr(0,n.length)===n}var wn=16384;function bn(t){var n=t.length;if(n<=wn)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=wn)i.push(String.fromCharCode.apply(String,t.slice(e,e+wn)));return i.join("")}function gn(t){return 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 bn(n)}(t)}function mn(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function pn(t,n){return t>>n&63|128}function yn(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(mn(t),n.push(t>>12&15|224),n.push(pn(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(pn(t,12)),n.push(pn(t,6))),n.push(63&t|128)):n.push(t)}function _n(t,n){if(n.Du>=t.length)throw new f("Invalid byte index");var i=255&t[n.Du];if(n.Cu(1),128==(192&i))return 63&i;throw new f("Invalid continuation byte")}function Sn(t,n){var i=n.Du;if(i>t.length)throw new f("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Cu(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|_n(t,n);if(r>=128)return r;throw new f("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|_n(t,n)<<6|_n(t,n);if(o>=2048)return mn(o),o;throw new f("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|_n(t,n)<<12|_n(t,n)<<6|_n(t,n);if(u>=65536&&u<=1114111)return u}throw new f("Invalid UTF-8 detected")}var In=65279;function Tn(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Du,i);return n.Cu(2),e}function En(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Du,i,e),n.Cu(2)}function kn(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Du+2<=t.byteLength;){var o=Tn(t,n,i);if(e&&!o)break;r.push(o)}return bn(r)}(Pn(t),new xn,n,!1)}function Rn(t,n){void 0===n&&(n=!1);var i=new w(2*t.length);return function(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1)En(t,n,i.charCodeAt(o),e)}(Pn(i),new xn,t,n),i}function Nn(t){return gn(function(t,n){var i,e=[],r=new xn;if(!n){if(!1===(i=Sn(t,r)))return e;i===In||e.push(i)}for(;!1!==(i=Sn(t,r));)e.push(i);return e}(An(t)))}function On(t){return new w(function(t){for(var n=[],i=0;i<t.length;i++)yn(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 Pn(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function An(t){return new w(t.buffer,t.byteOffset,t.byteLength)}function Dn(t){return t instanceof ArrayBuffer?new w(t):An(t)}function Cn(t){if(t.slice)return t.slice(0);var n=new w(t.byteLength);return n.set(t,0),n}var xn=function(){function t(t){void 0===t&&(t=0),this.Pu=t}var n=t.prototype;return n.Cu=function(t){this.Pu+=t},n.Ou=function(t){this.Pu=t},n.Bu=function(){return new t(this.Du)},n.xu=function(){return new ln(this.Du<<3)},mt(t,[{key:"Du",get:function(){return this.Pu}}]),t}(),Bn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],Fn=ArrayBuffer.isView||function(t){return t&&ct(Bn,nt.call(t))};function Ln(t){var n=t.reduce(function(t,n){return t+n.byteLength},0);return function(t,n){for(var i=new w(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 zn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=cn)e.push(vn(t,o,c.min(r,o+cn)));if(1===i){var u=t[n-1];e.push(an[u>>2]+an[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(an[s>>2]+an[(3&s)<<4|f>>4]+an[(15&f)<<2]+"=")}return e.join("")}(new w(t))}function Un(t){return t&&"function"!=typeof t?t.slice():t}function Mn(t,n,i){if(i)if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var Wn=function(){function t(t){var n=this;this.zs=pt(),this.Ws=void 0,this.qs=void 0,this.Gs=function(t){n.Qs(t)},this.qs=t||this}var n=t.prototype;return n.Ys=function(t,n){if("function"==typeof n)if("string"==typeof t)this.js(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.js(e,n)}},n.js=function(t,n){var i=this.zs[t];i?"function"==typeof i?this.zs[t]=[i,n]:i.push(n):this.zs[t]=n},n.Ks=function(t){if("function"==typeof t){var n=this.Ws;n?"function"==typeof n?this.Ws=[n,t]:n.push(t):this.Ws=t}},n.Zs=function(){this.zs=pt(),this.Ws=void 0},n.Qs=function(t){var n=Un(this.zs[t.type]),i=Un(this.Ws);Mn(this.qs,t,n),Mn(this.qs,t,i)},n.Js=function(t,n){if("function"==typeof n)if("string"==typeof t)this.$s(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.$s(e,n)}},n.$s=function(t,n){var i=this.zs[t];i&&("function"==typeof i?i===n&&(this.zs[t]=void 0):at(i,n))},n.tu=function(t){if("string"==typeof t)this.zs[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.zs[i]=void 0}},n.nu=function(t){var n=this.Ws;n&&("function"==typeof n?n===t&&(this.Ws=void 0):at(n,t))},n.uu=function(t,n){var i=this;return new j(function(e,r){if(n&&n.Rs)return r(new un);var o=function(t){s(),e(t)},u=function(){s(),r(new un)},s=function(){i.Js(t,o),n&&n.Ls(u)};i.Ys(t,o),n&&n.Bs(u)})},t}(),qn=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},jn=function(t){function n(n){var i;return(i=t.call(this,"append")||this).Hi=void 0,i.Hi=n,i}return Ut(n,t),n}(qn),Vn=function(t){function n(n){var i;return(i=t.call(this)||this).jg=void 0,i.Zct=0,i.Wi=new w(0),i.oo=!1,i.A=!1,i.D=void 0,i.jg=n,i}Ut(n,t);var i=n.prototype;return i.CV=function(t,n){this.C&&0===this.Wi.length&&(this.Wi=this.D.slice()),this.Zct+=n.ep(),this.Wi=Ln([this.Wi,t]),this.Qs(new jn(t))},i.Xa=function(){this.Ka||(this.Qs(new qn("close")),this.oo=!0)},mt(n,[{key:"Dm",get:function(){return this.Zct}},{key:"Hi",get:function(){return this.Wi}},{key:"Ka",get:function(){return this.oo}},{key:"C",get:function(){return this.A},set:function(t){this.A=t}},{key:"B",get:function(){return this.D},set:function(t){this.D=t}}]),n}(Wn),Hn=function(){function t(t){this.L=!1,this.W=void 0,this.H=void 0,this.DEFAULT_SEGMENT_DURATION_IN_SECONDS=1.1,this.Xw="sync-seg-"+dt(),this.X=this.DEFAULT_SEGMENT_DURATION_IN_SECONDS,this.tt=t;for(var n=0,i=this.tt;n<i.length;n++){var e=i[n];if(e.match(/video/))this.W=new Vn(this.it(e));else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");this.H=new Vn(this.it(e))}}}var n=t.prototype;return n.it=function(t){for(var n=0,i=this.tt;n<i.length;n++){if(i[n]===t)return this.X}},n.Xa=function(){this.W&&this.W.Xa(),this.H&&this.H.Xa()},mt(t,[{key:"et",get:function(){return this.L},set:function(t){this.L=t}},{key:"rt",get:function(){var t,n;return Boolean((null==(t=this.W)?void 0:t.C)||(null==(n=this.H)?void 0:n.C))}}]),t}(),Xn=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).Nk=void 0,i.Nk=n,i}return Ut(n,t),n}(qn),Gn=function(t){function n(n){var i;return(i=t.call(this)||this).st=[],i.ht=void 0,i.pt=[],i.tn=yt(),i.nn=yt(),i.en=0,i.rn=0,i.tt=n,i.ht=new Hn(i.tt),i.ht.H&&(i.ht.H.C=!0),i.ht.W&&(i.ht.W.C=!0),i.pt.push(new Hn(i.tt)),i}Ut(n,t);var i=n.prototype;return i.sn=function(){var t=[].concat(this.st,[this.ht],this.pt);return this.st.length=0,t},i.CV=function(t){this.an(t),this.ln(t),this.bn(t)},i.BV=function(t){this.an(t)},i.Ga=function(t){this.an(t),this.bn(t)},i.Os=function(){this.ht.Xa(),this.pt.forEach(function(t){return t.Xa()}),this.st.length=0},i.ln=function(t){var n=Zt(t.startPts),i=Zt(t.totalDuration);this.nn.set(t.mimeType,n.rk(i))},i.gn=function(){this.ht.Xa(),this.st.push(this.ht);var t=this.pt.shift(),n=this.mn();t?(this.ht=t,this.pt.push(n)):this.ht=n},i.mn=function(){var t=new Hn(this.tt);return t.H&&(t.H.B=this.ht.H.B),t.W&&(t.W.B=this.ht.W.B),t},i.kn=function(t){var i=!this.ht.H||0===this.ht.H.Dm,e=!this.ht.W||0===this.ht.W.Dm,r=this.ht.H&&this.ht.H.C,o=this.ht.W&&this.ht.W.C,u=e&&(i&&!this.ht.et||r),s=i&&(e&&!this.ht.et||o);("audio"===n.ti(t)&&!s||"video"===n.ti(t)&&!u)&&(this.gn(),this.gn())},i.an=function(t){var n=t.mimeType,i=t.kind,e=this.tn.get(n);void 0===e&&(i!==hn.OZ&&i!==hn.BZ||(e=[],this.tn.set(n,e))),void 0!==e&&e.push(t)},i.bn=function(t){for(var n=this.ii(t),i=0;i<n.length;i++){var e=n[i];switch(e.kind){case hn.OZ:this.ui(e),this.en=0,this.rn=0;break;case hn.MZ:this.si(e);break;case hn.BZ:this.fi(e)}}},i.ui=function(t){var n=t.mimeType,i=t.segment;this.kn(n),n.match(/video/)?(this.ht.W.B=i,this.pt.forEach(function(t){t.W.B=i})):(this.ht.H.B=i,this.pt.forEach(function(t){t.H.B=i})),this.ht.H&&(this.ht.H.C=!0),this.ht.W&&(this.ht.W.C=!0)},i.fi=function(t){var n=t.mimeType.match(/audio/),i=Zt(t.totalDuration);if(n?this.ht.H.CV(t.segment,i):this.ht.W.CV(t.segment,i),n||1===this.tt.length){this.en+=i.ep();var e=this.ht.it(t.mimeType);this.en>=this.rn+e&&(this.rn+=e,this.gn())}},i.si=function(t){this.nn.set(t.mimeType,void 0),this.kn(t.mimeType),this.ht.H&&(this.ht.H.C=!0),this.ht.W&&(this.ht.W.C=!0),this.st.length=0,this.Qs(new Xn(Zt(t.endTime)))},i.ii=function(t){var n=this;if(t.kind===hn.MZ)return this.hi(t);var i=[];return this.tn.forEach(function(t){if(t&&t.length>0){var e=ht(t,function(t){return t.kind===hn.MZ});-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!ct(i,u)){var s=n.hi(u);if(s.length>0)i.push.apply(i,s);else if(u.kind===hn.BZ)break}}}}),i},i.hi=function(t){for(var i,e=this.tn.get(t.mimeType),r=0,o=this.tt;r<o.length;r++){var u=o[r];if(u!==t.mimeType){i=u;break}}if(!i)return e.splice(0,e.indexOf(t)+1);if(t.kind===hn.OZ)return[];var s=this.nn.get(i);if(void 0===s)return[];if(t.kind===hn.MZ){var f=this.vi(i);if(f.length>0){var h=e.splice(0,e.indexOf(t));return e.splice(0,1),[].concat(h,f,[t])}return[]}if(n.li(t,s)){var a=e.splice(0,e.indexOf(t));e.splice(0,1);var c=this.bi(t,a,i);return[].concat(a,c,[t])}return[]},i.bi=function(t,i,e){var r=this.tn.get(e);if(!r)return[];var o=Zt(t.startPts),u=Zt(t.totalDuration),s=o.rk(u),f=ht(r,function(t){return t.kind===hn.MZ}),h=f-1;-1===f&&(h=r.length-1);for(var a=h+1,c=0;c<=h&&a===h+1;c++){var v=r[c];v.kind!==hn.BZ||n.li(v,s)||(a=c)}var l=-1;return-1!==ht(i,function(t){return t.kind===hn.OZ})&&(l=ht(r,function(t){return t.kind===hn.OZ})),l>a&&(a=l+1),a>0?(r[a-1].kind===hn.OZ&&(a-=1),r.splice(0,a)):[]},i.vi=function(t){var n=this.tn.get(t);if(n){var i=ht(n,function(t){return t.kind===hn.MZ});if(i>=0)return n.splice(0,i+1)}return[]},n.li=function(t,n){var i=n,e=Zt(t.startPts);return i.op(e)},i.mi=function(){var t="[MEDIABUFFER] endPTS: ";this.nn.forEach(function(i,e){t=t.concat(n.ti(e)+" = "+(null==i?void 0:i.ep())+" ")}),J._r(t)},i.pi=function(){var t=this;J._r("[MEDIABUFFER] unsyncedMessageMap:"),this.tn.forEach(function(i,e){void 0!==i&&t.yi(n.ti(e),i)})},i.yi=function(t,i){var e=t+": [";null==i||i.forEach(function(t){e=e.concat(" "+t.kind+"("+n.ti(t.mimeType)+")")}),e=e.concat(" ]"),J._r(e)},n.ti=function(t){return t.match(/audio/)?"audio":"video"},n}(Wn);var Yn=function(){function t(t,n,i){var e=this;this.ki=[],this.te=yt(),this.ie=0,this.prt=void 0,this.ee=void 0,this.se=function(t){if(t.Nk.op(Jt.fb(ot)))for(;e.ki.length>0;)e.he()},this.ae=n,this.ce=i,this.ee=[new kt,new Rt(8),new Nt(1),new Pt,new Ot(0)],this.prt=t,this.prt.Ys("remove",this.se)}var n=t.prototype;return n.Mnt=function(t,n){var i=this.te.get(t);if(i)if(n===wt.El){var e=i.W;if(e)return e}else{var r=i.H;if(r)return r}throw new f(t+" segment not available!")},n.Os=function(){this.ki.length=0,this.ae.VS=0,this.te.clear(),this.ie=0},n.GT=function(){return this.ve(),new Ft([].concat(this.ee,[this.ae,this.ce],this.ki))},n.ve=function(){for(var t=this.prt.sn(),n=0;n<t.length;n++){var i=t[n];if(!this.te.has(i.Xw)){i.et=!0;var e=i.X;i.rt&&this.ki.push(new Ct),this.te.set(i.Xw,i),this.ki.push(new Et(e,i.Xw)),this.ie+=e}}this.de()},n.de=function(){for(;this.ie>300;)this.he()},n.he=function(){var t=this.ki.shift();void 0!==t&&(t.us===St.fl?(this.be(t),this.ie-=t.T,this.ae.VS++):function(t){return t.us===St.p}(t)&&this.ce.VS++)},n.be=function(t){this.te.delete(t.k)},t}(),Kn=function(){function t(t){this.N$t=void 0,this.tr=void 0,this.nr=void 0,this.tt=t,this.N$t=new Lt,this.tr=new Gn(this.tt);for(var n=0,i=this.tt;n<i.length;n++){var e=i[n];if(this.nr=new Yn(this.tr,new Dt(0),new xt(0)),e.match(/video/)){var r=new At("video/index.m3u8");this.N$t.P(r)}else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");var o=new Bt("audio/index.m3u8");this.N$t.P(o)}}}var n=t.prototype;return n.er=function(t){if("master.m3u8"===t){if(this.N$t)return this.N$t.GT;throw new f("Master playlist not ready yet")}if(this.nr)return this.nr.GT();throw new f("Media playlist not ready yet")},n.Mnt=function(n){var i=n.split("/")[1];return this.nr.Mnt(i,t.ur(n))},n.BV=function(t){this.tr.BV(t)},n.CV=function(t){this.tr.CV(t)},n.xet=function(t){this.tr.Ga(t)},n.Os=function(){this.tr.Os(),this.N$t.Os(),this.nr&&this.nr.Os()},t.ur=function(t){return t.match(/video/)?wt.El:wt.Sl},t}();var Qn,$n=function(){function n(t,n){var i=this;this.cit=void 0,this.wNt=function(t){var n,e,r;return Z.async(function(o){for(;;)switch(o.prev=o.next){case 0:n=t.data,o.t0=n.kind,o.next=o.t0===hn.PZ?4:o.t0===hn.OZ?7:o.t0===hn.BZ?9:o.t0===hn.MZ?11:13;break;case 4:return e=n.mediaBufferConfigs,i.cit=new Kn(e),o.abrupt("break",13);case 7:return i.cit.BV(n),o.abrupt("break",13);case 9:return i.cit.CV(n),o.abrupt("break",13);case 11:return i.cit.xet(n),o.abrupt("break",13);case 13:r={kind:hn.LZ},i.sr.postMessage(r);case 15:case"end":return o.stop()}},null,null,null,j)},this.sr=t,this.hr=n,this.sr.onmessage=this.wNt}var i=n.prototype;return i.ar=function(t){return this.cit.er(t)},i.cr=function(n){if(this.cit){if(n.match(/m3u8/)){var i=this.ar(n);return new Response(i.O(),{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}var e={"Content-Type":n.match(/video/)?"video/mp4":"audio/mp4"},r=function(t){return{start:function(n){var i,e;return Z.async(function(r){for(;;)switch(r.prev=r.next){case 0:if(n.enqueue(t.Hi),!t.Ka){r.next=6;break}return n.close(),r.abrupt("return");case 6:i=function(t){n.enqueue(t.Hi)},t.Ys("append",i),e=function e(){n.close(),t.Js("append",i),t.Js("close",e)},t.Ys("close",e);case 10:case"end":return r.stop()}},null,null,null,j)}}}(this.Ont(n)),o=new t.ReadableStream(r);return new Response(o,{headers:e})}throw new f("Stream not active.")},i.Ont=function(t){return this.cit.Mnt(t)},i.close=function(){this.sr.close(),this.cit&&this.cit.Os()},n}(),Jn=function(){function t(){var t=this;this.mq=yt(),this.KRt=void 0,this.wNt=function(n){var i=n.data;switch(i.kind){case hn.DZ:t.vr().catch(lt);var e=i.port,r=dt(),o=new $n(e,n.source.id);t.mq.set(r,o);e.addEventListener("message",function n(i){i.data.kind===hn.xZ&&(t.lr(r),e.removeEventListener("message",n))});var u={kind:hn.CZ,sessionId:r};e.postMessage(u)}},this.br=function(n){if(dn(n.request.url,bt)){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/");if(void 0!==e&&void 0!==r){var o=t.mq.get(e);if(o)try{var u=o.cr(r);n.respondWith(u)}catch(t){n.respondWith(j.resolve(new Response(void 0,{headers:{message:"Segment not found"},status:404,statusText:"Not Found"})))}else n.respondWith(j.resolve(new Response(void 0,{headers:{message:"Given session ["+e+"] not found"},status:404,statusText:"Not Found"})))}else n.respondWith(j.resolve(new Response(void 0,{headers:{message:"No session ["+e+"] or resource ["+r+"] provided"},status:404,statusText:"Not Found"})))}}}var n=t.prototype;return n.Ny=function(t){this.KRt=t,t.addEventListener("message",this.wNt),t.addEventListener("fetch",this.br)},n.lr=function(t){var n=this.mq.get(t);n&&n.close(),this.mq.delete(t)},n.vr=function(){var t,n,i=this;return Z.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z.awrap(this.KRt.clients.matchAll());case 2:t=e.sent,n=t.map(function(t){return t.id}),this.mq.forEach(function(t,e){ct(n,t.hr)||i.lr(e)});case 5:case"end":return e.stop()}},null,this,null,j)},t}();Jn.mr=new Jn,function(t){t.l="web",t.g="android",t.R="android-tv",t.N="ios",t.M="tvos",t.F="chromecast"}(Qn||(Qn={}));var Zn=e?e.userAgent:"",ti=Zn.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),ni=Zn.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),ii=Zn.match(/Android ([0-9\.]+)/i),ei=Zn.match(/Windows NT ([0-9\.]+)/i),ri=Zn.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),oi=Zn.match(/Firefox\/([0-9\.]+)/i),ui=Zn.match(/OPR\/(\d+\.\d+)/i),si=Zn.match(/Tizen ([0-9\.]+)/i),fi=function(){function n(){this.U=Boolean("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch||e&&e.msMaxTouchPoints),this.V=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Zn)||/(macintosh|mac(?=_powerpc)\s)/i.test(Zn),this.q=/Windows NT/i.test(Zn),this.G=ei?l(ei[1]):0,this.Y=/Android/i.test(Zn),this.j=ii?l(ii[1]):0,this.K=/windows phone (8|8\.1)/i.test(Zn),this.Z=/iPhone/i.test(Zn),this.J=/iPad/i.test(Zn),this.nt=this.V&&this.U&&!this.J,this.ut=/iPod/i.test(Zn),this.ot=/Mobile Safari/i.test(Zn),this.ct=/EOSSTB/i.test(Zn),this.ft=(this.Z||this.J||this.nt||this.ut)&&!this.K,this.vt=this.K||this.ft||this.Y||this.ot,this.dt=/CriOS/i.test(Zn),this._t=Boolean(t.chrome&&/google/i.test(e.vendor))||this.dt,this.wt=this._t&&/Edg\//i.test(e.userAgent),this.yt=ni?v(ni[1],10):0,this.kt=Boolean(t.chrome||/Chrome/i.test(Zn)||/CriOS/i.test(Zn)),this.bt=ti?v(ti[1],10):0,this.At=/SMART-TV.*Tizen/i.test(Zn),this.Tt=si?l(si[1]):0,this.St=/webos|web0s/i.test(Zn),this.Et=/Edge\/\d+/i.test(Zn),this.It=/Trident/i.test(Zn),this.Rt=this.It&&!t.ActiveXObject&&"ActiveXObject"in t,this.Nt=/Vivaldi/i.test(Zn),this.Dt=/Firefox/i.test(Zn)&&!/Seamonkey/i.test(Zn),this.Ct=oi?l(oi[1]):0,this.Pt=/Safari/i.test(Zn)&&!/Chrome/i.test(Zn)&&!this.K&&!this.At,this.Ot=ri?l(ri[2]):0,this.Bt=Boolean(ui),this.Lt=ui?l(ui[1]):0,this.Mt=/CrKey/.test(Zn),this.xt=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(Zn),this.Ft="web"===Qn.R,this.Ut="web"===Qn.g,this.Ht=this.Ut||this.Ft,this.Vt="web"===Qn.N,this.Xt="web"===Qn.M,this.zt="web"===Qn.F}return mt(n,[{key:"Wt",get:function(){return this.U}},{key:"qt",get:function(){return this.V}},{key:"Gt",get:function(){return this.q}},{key:"Qt",get:function(){return this.G}},{key:"Yt",get:function(){return this.Y}},{key:"jt",get:function(){return this.j}},{key:"Kt",get:function(){return this.K}},{key:"Zt",get:function(){return this.Z}},{key:"Jt",get:function(){return this.J}},{key:"$t",get:function(){return this.nt}},{key:"in",get:function(){return this.ut}},{key:"un",get:function(){return this.ft}},{key:"hn",get:function(){return this.ct}},{key:"cn",get:function(){return this.ot}},{key:"fn",get:function(){return this.vt}},{key:"vn",get:function(){return this.dt}},{key:"dn",get:function(){return this._t}},{key:"_n",get:function(){return this.bt}},{key:"wn",get:function(){return this.wt}},{key:"yn",get:function(){return this.yt}},{key:"pn",get:function(){return this.At}},{key:"An",get:function(){return this.Tt}},{key:"Tn",get:function(){return this.St}},{key:"Sn",get:function(){return this.Et}},{key:"En",get:function(){return this.It}},{key:"In",get:function(){return this.Rt}},{key:"Rn",get:function(){return this.Nt}},{key:"Nn",get:function(){return this.Dt}},{key:"Dn",get:function(){return this.Ct}},{key:"Cn",get:function(){return this.Pt}},{key:"Pn",get:function(){return this.Ot}},{key:"On",get:function(){return this.Bt}},{key:"Bn",get:function(){return this.Lt}},{key:"Ln",get:function(){return this.Mt}},{key:"Mn",get:function(){return this.xt}},{key:"xn",get:function(){if(!(this.Tn||this.pn))return!1;var t=this._n;return void 0===t||Number(t)<56}},{key:"Fn",get:function(){return this.Ft}},{key:"Un",get:function(){return this.Ut}},{key:"Hn",get:function(){return this.Ht}},{key:"Vn",get:function(){return this.Vt}},{key:"Xn",get:function(){return this.Xt}},{key:"zn",get:function(){return this.zt}},{key:"Wn",get:function(){return this.kt}}]),n}();fi.qn=new fi;var hi=fi.qn,ai=!(hi.En&&!hi.In),ci=t.console;function vi(t){if(et(t))try{return JSON.stringify(t)}catch(t){}return t}function li(t){return t.map(vi).join(" ")}function di(t){var n=ci&&ci[t];return n?n.bind&&ai?n.bind(ci):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];ci[t](li(i))}:void 0}var wi,bi=di("log")||lt,gi=di("warn")||bi.bind(void 0,"WARNING:"),mi=di("error")||bi.bind(void 0,"ERROR:"),pi=(wi=ci&&ci.assert)?wi.bind&&ai?wi.bind(ci):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];ci.assert(t,li(i))}:function(t){if(!t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];mi.apply(void 0,["Assertion failed:"].concat(i))}};function yi(){return Date.now()||(new Date).getTime()}var _i;qt.fromNumber(ot);!function(t){t[t.Kn=1]="Kn",t[t.Jn=2]="Jn",t[t.Zn=3]="Zn",t[t.$n=4]="$n",t[t.ni=9]="ni"}(_i||(_i={}));var Si=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Ut(n,t),n}(en),Ii=function(){function t(){}return t.prototype.ei=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Si(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Si;return new Pi(n)},t}(),Ti=function(){function t(t){this.ri=void 0,this.ri=t}var n=t.prototype;return n.oi=function(t){return this.ri.isEqualNode(t.ri)},n.ai=function(n){return new t(this.ri.cloneNode(n))},mt(t,[{key:"jn",get:function(){return _i.Jn}},{key:"ci",get:function(){var t;return null!=(t=this.ri.localName)?t:Ci(this.ri.nodeName)}},{key:"di",get:function(){return this.ri.nodeName}},{key:"_i",get:function(){var t;return null!=(t=this.ri.namespaceURI)?t:void 0}},{key:"wi",get:function(){var t;return null!=(t=this.ri.prefix)?t:void 0}},{key:"gi",get:function(){return this.ri.nodeValue}}]),t}(),Ei=function(){function t(t){this.Ai=void 0,this.Ti=void 0,this.Ai=t}var n=t.prototype;return n.Si=function(t){return this.Ei.filter(function(n){return Ai(n)&&n.Ii===t})},n.Ri=function(t,n){return this.Ei.filter(function(i){return Ai(i)&&i.ci===n&&i._i===t})},n.Ni=function(t){this.Ai.appendChild(t.Di),this.Ti&&this.Ti.push(t)},n.oi=function(t){return this.Ai.isEqualNode(t.Di)},mt(t,[{key:"Ei",get:function(){return void 0===this.Ti&&(this.Ti=function(t){for(var n=[],i=0;i<t.length;i++){var e=Di(t.item(i));e&&n.push(e)}return n}(this.Ai.childNodes)),this.Ti}},{key:"Ci",get:function(){return this.Ei.filter(Ai)}},{key:"Di",get:function(){return this.Ai}}]),t}(),ki=function(t){function n(n){return t.call(this,n)||this}Ut(n,t);var i=n.prototype;return i.Pi=function(t){if(this.Ai.hasAttribute(t))return this.Ai.getAttribute(t)},i.Oi=function(t,n){if(this.Ai.hasAttributeNS(t,n))return this.Ai.getAttributeNS(t,n)},i.Bi=function(t){this.Ai.removeAttribute(t)},i.Li=function(t,n){this.Ai.removeAttributeNS(t,n)},i.Mi=function(t,n){this.Ai.setAttribute(t,n)},i.xi=function(t,n,i){this.Ai.setAttributeNS(t,n,i)},i.ai=function(t){return new n(this.Ai.cloneNode(t))},mt(n,[{key:"jn",get:function(){return _i.Kn}},{key:"ci",get:function(){var t;return null!=(t=this.Ai.localName)?t:Ci(this.Ai.nodeName)}},{key:"_i",get:function(){var t;return null!=(t=this.Ai.namespaceURI)?t:void 0}},{key:"wi",get:function(){var t;return null!=(t=this.Ai.prefix)?t:void 0}},{key:"Ii",get:function(){return this.Ai.nodeName}},{key:"Fi",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Ti(t.item(i)));return n}(this.Ai.attributes)}},{key:"Ui",get:function(){return this.Ai.textContent}}]),n}(Ei),Ri=function(){function t(t){this.Ai=void 0,this.Ai=t}return t.prototype.oi=function(t){return this.Hi===t.Hi},mt(t,[{key:"Hi",get:function(){return this.Ai.nodeValue}},{key:"Di",get:function(){return this.Ai}}]),t}(),Ni=function(t){function n(n){return t.call(this,n)||this}return Ut(n,t),n.prototype.ai=function(t){return new n(this.Ai.cloneNode(t))},mt(n,[{key:"jn",get:function(){return _i.Zn}}]),n}(Ri),Oi=function(t){function n(n){return t.call(this,n)||this}return Ut(n,t),n.prototype.ai=function(t){return new n(this.Ai.cloneNode(t))},mt(n,[{key:"jn",get:function(){return _i.$n}}]),n}(Ri),Pi=function(t){function n(n){return t.call(this,n)||this}return Ut(n,t),n.prototype.ai=function(t){return new n(this.Ai.cloneNode(t))},mt(n,[{key:"jn",get:function(){return _i.ni}},{key:"Vi",get:function(){return new ki(this.Ai.documentElement)}}]),n}(Ei);function Ai(t){return function(t){return t.jn===_i.Kn}(t)}function Di(t){switch(t.nodeType){case _i.Kn:return new ki(t);case _i.Zn:return new Ni(t);case _i.$n:return new Oi(t)}}function Ci(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}function xi(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),a.defineProperty(t,e.key,e)}}function Bi(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){Fi(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Fi(i,null,t.length,t),t}function Fi(t,n,i,e){var r,o,u,s,f,h=t.length,a=0,c=2*i;for(r=0;r<h;r+=c)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[a++]=t[s++]:e[a++]=t[f++];else if(s<o)e[a++]=t[s++];else{if(!(f<u))break;e[a++]=t[f++]}}var Li=/[a-zA-Z]/,zi=/[0-9]/,Ui=/[0-9a-fA-F]/,Mi=/^0x/i,Wi=/^[0-9]+$/,qi=/^[0-9a-fA-F]+$/,ji=/^[0-7]+$/,Vi=a.prototype.toString,Hi=Array.isArray||function(t){return"[object Array]"===Vi.call(t)},Xi="undefined"!=typeof Symbol&&"symbol"==typeof Symbol.iterator;function Gi(t){return Hi(t)?t:Array.from(t)}function Yi(t){return t>=65&&t<=90}function Ki(t){return Yi(t)||function(t){return t>=97&&t<=122}(t)}function Qi(t){return t>=48&&t<=57}function $i(t){return Qi(t)||Ki(t)}function Ji(t){return Qi(t)||t>=65&&t<=70||t>=97&&t<=102}function Zi(t){return Yi(t)?t+32:t}function te(t){return Qi(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 ie=c.min,ee=String.fromCharCode,re=16384;function oe(t){for(var n=t.length,i=[],e=0;e<n;e+=re){var r=ie(e+re,n);i.push(ee.apply(null,t.slice(e,r)))}return i.join("")}var ue=/[^\0-\x7E]/,se=/[\x2E\u3002\uFF0E\uFF61]/g,fe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},he=c.floor,ae=String.fromCharCode;function ce(t){throw new RangeError(fe[t])}function ve(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 le,de,we,be=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},ge=function(t,n,i){var e=0;for(t=i?he(t/700):t>>1,t+=he(t/n);t>455;e+=36)t=he(t/35);return he(e+36*t/(t+38))},me=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(se,".")).split("."),n).join(".");return e+r}(t,function(t){return ue.test(t)?"xn--"+function(t){for(var n=[],i=(t=ve(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(ae(f))}var h=n.length,a=h;for(h&&n.push("-");a<i;){for(var c=2147483647,v=0,l=t;v<l.length;v++){var d=l[v];d>=e&&d<c&&(c=d)}var w=a+1;c-e>he((2147483647-r)/w)&&ce("overflow"),r+=(c-e)*w,e=c;for(var b=0,g=t;b<g.length;b++){var m=g[b];if(m<e&&++r>2147483647&&ce("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-_,I=36-_;n.push(ae(be(_+S%I,0))),p=he(S/I)}n.push(ae(be(p,0))),o=ge(r,w,a==h),r=0,++a}}++r,++e}return n.join("")}(t):t})};function pe(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 oe(n)}function ye(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function _e(t,n){return t>>n&63|128}function Se(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(ye(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 Ie(t){for(var n=[],i=0;i<t.length;i++){Se(t[i],n)}return n}function Te(){if(we>=de)throw new f("Invalid byte index");var t=255&le[we];if(we++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function Ee(){var t,n;if(we>de)throw new f("Invalid byte index");if(we===de)return!1;if(t=255&le[we],we++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Te())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Te()<<6|Te())>=2048)return ye(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Te()<<12|Te()<<6|Te())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}function ke(t){return[37,ne(t>>4),ne(15&t)]}function Re(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Ne(t){return Re(t)||32===t||34===t||60===t||62===t||96===t}function Oe(t){return Ne(t)||35===t||63===t||123===t||125===t}function Pe(t){return Oe(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Ae(t){return t<33||t>126||34===t||35===t||60===t||62===t}function De(t){return Ae(t)||39===t}function Ce(t,n){if(!n(t))return[t];for(var i=Ie([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,ke(o))}return e}function xe(t,n){for(var i=[],e=0,r=ve(t);e<r.length;e++){var o=r[e];i.push.apply(i,Ce(o,n))}return pe(i)}function Be(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&&Ji(t[e+1])&&Ji(t[e+2])){var o=te(t[e+1])<<4|te(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Ie(t))}function Fe(t){return pe(function(t){le=t.slice(),de=le.length,we=0;for(var n,i=[];!1!==(n=Ee());)i.push(n);return i}(Be(ve(t))))}function Le(t){var n,i,e,r,o=t.length,u=[0,0,0,0,0,0,0,0],s=0,f=null,a=0;if(a<o&&":"===t[a]){if(!(a+1<o&&":"===t[a+1]))throw new h;a+=2,f=s+=1}for(;a<o;){if(8===s)throw new h("Too many groups");if(":"!==t[a]){for(var c=0,l=0;l<4&&a<o&&Ui.test(t[a]);)c=c<<4|v(t[a],16),a+=1,l+=1;if("."===t[a]){if(0===l)throw new h;if(a-=l,s>6)throw new h;for(var d=0;a<o;){var w=null;if(d>0){if(!("."===t[a]&&d<4))throw new h;a+=1}if(!zi.test(t[a]))throw new h;for(;a<o&&zi.test(t[a]);){var b=v(t[a],10);if(null===w)w=b;else{if(0===w)throw new h;if((w=10*w+b)>255)throw new h}a+=1}u[s]=u[s]<<8|w,2!==(d+=1)&&4!==d||(s+=1)}if(4!==d)throw new h;break}if(":"===t[a]){if((a+=1)===o)throw new h}else if(a<o)throw new h;u[s]=c,s+=1}else{if(null!==f)throw new h("Too many :: groups");a+=1,f=s+=1}}if(null!==f){var g=s-f;for(s=7;0!==s&&g>0;)e=f+g-1,r=void 0,r=(n=u)[i=s],n[i]=n[e],n[e]=r,s-=1,g-=1}else if(8!==s)throw new h;return u}function ze(t){var n=10,i=Wi;return Mi.test(t)?(t=t.slice(2),n=16,i=qi):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ji),""===t?0:i.test(t)?v(t,n):void 0}var Ue={Xi:4},Me=/[\0\t\n\r #%/:?@\[\\\]]/,We=/[\0\t\n\r #/:?@\[\\\]]/;function qe(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new h("Invalid IPv6 address");return{Xi:2,zi:Le(t.slice(1,-1))}}if(!n)return function(t){if(We.test(t))throw new h("Invalid code point in opaque host");var n=xe(t,Re);return""===n?Ue:{Xi:3,Wi:n}}(t);var i=function(t){return function(t){return me(t.toLowerCase())}(t)}(Fe(t));if(Me.test(i))throw new h("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=ze(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new h;if(i[i.length-1]>=c.pow(256,5-i.length))throw new h;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*c.pow(256,3-f);return s}}(i);return void 0!==e?{Xi:1,zi:e}:""===i?Ue:{Xi:0,qi:i}}function je(t){switch(t.Xi){case 0:return t.qi;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.zi);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.zi)+"]";case 3:return t.Wi;case 4:return""}}var Ve=/\+/g;function He(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(Ve," "),s=s.replace(Ve," ");var f=Fe(u),h=Fe(s);i.push([f,h])}}return i}function Xe(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=Ge(Ie(ve(e[0])))+"="+Ge(Ie(ve(e[1])))}return n}function Ge(t){for(var n,i=[],e=0;e<t.length;e++){var r=t[e];32===r?i.push(43):42===(n=r)||45===n||46===n||95===n||$i(n)?i.push(r):i.push.apply(i,ke(r))}return oe(i)}var Ye=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function Ke(t){var n=""+t,i=Ye.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if($e(o))if(Je(o)||r===i-1)e.push(Qe);else{var u=t.charCodeAt(r+1);Je(u)?(e.push(o,u),r++):e.push(Qe)}else e.push(o)}return t.slice(0,n)+oe(e)}(n,i.index):n}var Qe=65533,$e=function(t){return 55296==(63488&t)},Je=function(t){return 0!=(1024&t)};function Ze(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function tr(t){t.Gi.length=0}function nr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Gi,He(n))}function ir(t){if(t.Qi){var n=Xe(t.Gi);""===n&&(n=null),t.Qi.Qi.Yi=n}}var er=function(){function t(t){if(void 0===t&&(t=void 0),this.Qi=null,null==t)this.Gi=[];else if("object"==typeof t||"function"==typeof t)if((o=t)instanceof er&&Hi(o.Gi)&&(!Xi||o[Symbol.iterator]===rr))this.Gi=t.Gi.slice();else if(function(t){return null!=t&&(!!Hi(t)||!!Xi&&"function"==typeof t[Symbol.iterator])}(t)){this.Gi=[];for(var n=0,i=Gi(t);n<i.length;n++){var e=Gi(i[n]);if(2!==e.length)throw new h("Invalid name-value pair");this.Gi.push([Ke(e[0]),Ke(e[1])])}}else for(var r in this.Gi=[],t)a.prototype.hasOwnProperty.call(t,r)&&this.Gi.push([Ke(r),Ke(t[r])]);else(t=Ke(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Gi=He(t);var o}var n=t.prototype;return n.append=function(t,n){t=Ke(t),n=Ke(n),this.Gi.push([t,n]),ir(this)},n.delete=function(t){t=Ke(t);for(var n=this.Gi,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}ir(this)},n.get=function(t){t=Ke(t);for(var n=this.Gi,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=Ke(t);for(var n=this.Gi,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=Ke(t);for(var n=this.Gi,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=Ke(t),n=Ke(n);for(var i=this.Gi,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]),ir(this)},n.sort=function(){Bi(this.Gi,Ze),ir(this)},n.toString=function(){return Xe(this.Gi)},n.entries=function(){return new fr(this.Gi,or)},n.keys=function(){return new fr(this.Gi,ur)},n.values=function(){return new fr(this.Gi,sr)},n.forEach=function(t){var n=this;this.Gi.forEach(function(i){return t(i[1],i[0],n)})},t}(),rr=er.prototype.entries;Xi&&(er.prototype[Symbol.iterator]=rr);var or=function(t){return[t[0],t[1]]},ur=function(t){return t[0]},sr=function(t){return t[1]},fr=function(){function t(t,n){this.ji=0,this.Gi=t,this.Ki=n}return t.prototype.next=function(){return this.ji<this.Gi.length?{done:!1,value:this.Ki(this.Gi[this.ji++])}:{done:!0,value:void 0}},t}(),hr="null";var ar=a.create(null);ar.ftp=21,ar.file=0,ar.gopher=70,ar.http=80,ar.https=443,ar.ws=80,ar.wss=443;var cr=/^(?:\.|%2e)$/i,vr=/^(?:\.|%2e){2}$/i;function lr(t){return cr.test(t)}function dr(t){return vr.test(t)}function wr(t){return void 0!==ar[t]}function br(t){return wr(t.Zi)}function gr(t){return""!==t.Ji||""!==t.$i}function mr(t){var n=t.length;if(!(n>=2))return!1;if(!yr(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 pr(t){return 2===t.length&&Li.test(t[0])&&(":"===t[1]||"|"===t[1])}function yr(t){return 2===t.length&&pr(oe(t))}function _r(t){return pr(t)&&":"===t[1]}function Sr(t){var n=t.re;0!==n.length&&("file"===t.Zi&&1===n.length&&_r(n[0])||n.pop())}function Ir(t){return null===t.ue||Ue===t.ue||t.oe||"file"===t.Zi}var Tr=-1,Er=/\t|\n|\r/g,kr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Rr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Or,t=t.replace(kr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,a=ve(t=t.replace(Er,"")),c=a.length,l=0;l<=c;){var d=l<c?a[l]:Tr;switch(r){case 0:if(!Ki(d)){if(null===e){o.length=0,r=2;continue}throw new h("Invalid scheme")}o.push(Zi(d)),r=1;break;case 1:if($i(d)||43===d||45===d||46===d)o.push(Zi(d));else{if(58!==d){if(null===e){o.length=0,r=2,l=0;continue}throw new h("Invalid scheme")}var w=pe(o);if(null!==e){if(wr(i.Zi)&&!wr(w))return;if(!wr(i.Zi)&&wr(w))return;if((gr(i)||null!==i.fe)&&"file"===w)return;if("file"===i.Zi&&(i.ue===Ue||null===i.ue))return}if(i.Zi=w,null!==e)return void(br(i)&&i.fe===ar[i.Zi]&&(i.fe=null));o.length=0,"file"===i.Zi?r=13:br(i)&&n&&n.Zi===i.Zi?r=3:br(i)?r=7:47===a[l+1]?(r=4,l+=1):(i.oe=!0,i.re.push(""),r=18)}break;case 2:if(!n||n.oe&&35!==d)throw new h("Invalid scheme");n.oe&&35===d?(i.Zi=n.Zi,i.re=n.re.slice(),i.Yi=n.Yi,i._e="",i.oe=!0,r=20):"file"!==n.Zi?(r=5,l-=1):(r=13,l-=1);break;case 3:47===d&&47===a[l+1]?r=8:(r=5,l-=1);break;case 4:47===d?r=9:(r=17,l-=1);break;case 5:i.Zi=n.Zi,Tr===d?(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,i.re=n.re.slice(),i.Yi=n.Yi):47===d?r=6:63===d?(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,i.re=n.re.slice(),i.Yi="",r=19):35===d?(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,i.re=n.re.slice(),i.Yi=n.Yi,i._e="",r=20):92===d&&br(i)?r=6:(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,i.re=n.re.slice(),i.re.pop(),r=17,l-=1);break;case 6:!br(i)||47!==d&&92!==d?47===d?r=9:(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,r=17,l-=1):r=8;break;case 7:if(47!==d||47!==a[l+1]){r=8;continue}r=8,l+=1;break;case 8:47!==d&&92!==d&&(r=9,l-=1);break;case 9:if(64===d){u&&o.unshift(37,52,48),u=!0;for(var b=0;b<o.length;b++){var g=o[b];if(58!==g||f){var m=pe(Ce(g,Pe));f?i.$i+=m:i.Ji+=m}else f=!0}o.length=0}else if(Tr===d||47===d||63===d||35===d||br(i)&&92===d){if(u&&0===o.length)throw new h("Invalid host");l-=o.length+1,o.length=0,r=10}else o.push(d);break;case 10:case 11:if(null!==e&&"file"===i.Zi)l-=1,r=15;else if(58!==d||s)if(Tr===d||47===d||63===d||35===d||br(i)&&92===d){if(l-=1,br(i)&&0===o.length)throw new h("Invalid host");if(null!==e&&0===o.length&&(gr(i)||null!==i.fe))return;var p=qe(pe(o),br(i));if(i.ue=p,o.length=0,r=16,null!==e)return}else 91===d?s=!0:93===d&&(s=!1),o.push(d);else{if(0===o.length)throw new h("Invalid host");var y=qe(pe(o),br(i));if(i.ue=y,o.length=0,r=12,11===e)return}break;case 12:if(Qi(d))o.push(d);else{if(!(Tr===d||47===d||63===d||35===d||br(i)&&92===d||null!==e))throw new h("Invalid port");if(0!==o.length){var _=v(pe(o),10);if(_>65535)throw new h("Invalid port");i.fe=_===ar[i.Zi]?null:_,o.length=0}if(null!==e)return;r=16,l-=1}break;case 13:i.Zi="file",47===d||92===d?r=14:n&&"file"===n.Zi?Tr===d?(i.ue=n.ue,i.re=n.re.slice(),i.Yi=n.Yi):63===d?(i.ue=n.ue,i.re=n.re.slice(),i.Yi="",r=19):35===d?(i.ue=n.ue,i.re=n.re.slice(),i.Yi=n.Yi,i._e="",r=20):(mr(a.slice(l))||(i.ue=n.ue,i.re=n.re.slice(),Sr(i)),r=17,l-=1):(r=17,l-=1);break;case 14:47===d||92===d?r=15:(n&&"file"===n.Zi&&!mr(a.slice(l))&&(_r(n.re[0])?i.re.push(n.re[0]):i.ue=n.ue),r=17,l-=1);break;case 15:if(Tr===d||47===d||92===d||63===d||35===d)if(l-=1,null===e&&yr(o))r=17;else if(0===o.length){if(i.ue=Ue,null!==e)return;r=16}else{var S=qe(pe(o),br(i));if(0===S.Xi&&"localhost"===S.qi&&(S=Ue),i.ue=S,null!==e)return;o.length=0,r=16}else o.push(d);break;case 16:br(i)?(r=17,47!==d&&92!==d&&(l-=1)):null===e&&63===d?(i.Yi="",r=19):null===e&&35===d?(i._e="",r=20):Tr!==d&&(r=17,47!==d&&(l-=1));break;case 17:if(Tr===d||47===d||br(i)&&92===d||null===e&&(63===d||35===d)){var I=pe(o);if(dr(I)?(Sr(i),47===d||br(i)&&92===d||i.re.push("")):!lr(I)||47===d||br(i)&&92===d?lr(I)||("file"===i.Zi&&0===i.re.length&&yr(o)&&(Ue!==i.ue&&null!==i.ue&&(i.ue=Ue),o[1]=58,I=pe(o)),i.re.push(I)):i.re.push(""),o.length=0,"file"===i.Zi&&(Tr===d||63===d||35===d))for(;i.re.length>1&&""===i.re[0];)i.re.shift();63===d?(i.Yi="",r=19):35===d&&(i._e="",r=20)}else o.push.apply(o,Ce(d,Oe));break;case 18:63===d?(i.Yi="",r=19):35===d?(i._e="",r=20):Tr!==d&&(i.re[0]+=pe(Ce(d,Re)));break;case 19:null===e&&35===d?(i._e="",r=20):Tr!==d&&(i.Yi+=pe(Ce(d,br(i)?De:Ae)));break;case 20:Tr===d||0===d||(i._e+=pe(Ce(d,Ne)))}l++}return i}function Nr(t,n,i,e){try{Rr(t,n,i,e)}catch(t){}}var Or=function(){this.Zi="",this.Ji="",this.$i="",this.ue=null,this.fe=null,this.re=[],this.Yi=null,this._e=null,this.oe=!1};function Pr(t){switch(t.Zi){case"blob":var n;try{n=Rr(t.re[0],null)}catch(t){return hr}return Pr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return i=t.Zi,e=t.ue,r=t.fe,i+"://"+je(e)+(null===r?"":":"+r);case"file":default:return hr}var i,e,r}var Ar,Dr,Cr=function(){function t(t,n){var i,e,r=null;if(null!=n)if(null!=(i=n)&&i instanceof Cr&&"object"==typeof i.Qi)r=n.Qi;else try{r=Rr(String(n),null)}catch(t){throw new h("Invalid base URL: "+t.message)}try{e=Rr(String(t),r)}catch(t){throw new h("Invalid URL: "+t.message)}var o=e.Yi;this.Qi=e,this.Yi=function(t){var n=new er;return null!==t&&nr(n,t),n}(o),this.Yi.Qi=this}var n,i,e,r=t.prototype;return r.toString=function(){return this.href},r.toJSON=function(){return this.href},n=t,(i=[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Zi+":";if(null!==t.ue?(i+="//",gr(t)&&(i+=t.Ji,""!==t.$i&&(i+=":"+t.$i),i+="@"),i+=je(t.ue),null!==t.fe&&(i+=":"+t.fe)):null===t.ue&&"file"===t.Zi&&(i+="//"),t.oe)i+=t.re[0];else for(var e=0,r=t.re;e<r.length;e++)i+="/"+r[e];return null!==t.Yi&&(i+="?"+t.Yi),n||null===t._e||(i+="#"+t._e),i}(this.Qi)},set:function(t){var n;try{n=Rr(String(t),null)}catch(t){throw new h("Invalid URL: "+t.message)}this.Qi=n,tr(this.Yi);var i=this.Qi.Yi;null!==i&&nr(this.Yi,i)}},{key:"origin",get:function(){return Pr(this.Qi)}},{key:"protocol",get:function(){return this.Qi.Zi+":"},set:function(t){Nr(t+":",null,this.Qi,0)}},{key:"username",get:function(){return this.Qi.Ji},set:function(t){Ir(this.Qi)||(this.Qi.Ji=xe(t,Pe))}},{key:"password",get:function(){return this.Qi.$i},set:function(t){Ir(this.Qi)||(this.Qi.$i=xe(t,Pe))}},{key:"host",get:function(){var t=this.Qi,n=t.ue;if(null===n)return"";var i=t.fe,e=je(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Qi.oe||Nr(t,null,this.Qi,10)}},{key:"hostname",get:function(){var t=this.Qi.ue;return null===t?"":je(t)},set:function(t){this.Qi.oe||Nr(t,null,this.Qi,11)}},{key:"port",get:function(){var t=this.Qi.fe;return null===t?"":""+t},set:function(t){Ir(this.Qi)||(""===t?this.Qi.fe=null:Nr(t,null,this.Qi,12))}},{key:"pathname",get:function(){var t=this.Qi.re;return this.Qi.oe?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Qi.oe||(this.Qi.re.length=0,Nr(t,null,this.Qi,16))}},{key:"search",get:function(){var t=this.Qi.Yi;return null===t||""===t?"":"?"+t},set:function(t){t=Ke(t);var n=this.Qi;if(""===t)return n.Yi=null,void tr(this.Yi);"?"===t[0]&&(t=t.slice(1)),n.Yi="",Nr(t,null,n,19),nr(this.Yi,t)}},{key:"searchParams",get:function(){return this.Yi}},{key:"hash",get:function(){var t=this.Qi._e;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Qi._e="",Nr(t,null,this.Qi,20)):this.Qi._e=null}}])&&xi(n.prototype,i),e&&xi(n,e),t}();function xr(t){return t.document&&t.document.baseURI||t.location.href||""}function Br(){return void 0!==i?i.createElement("video"):void 0}function Fr(){return Dr||(Dr=Br()),Dr}var Lr=!!("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch)||!(!e||!e.msMaxTouchPoints),zr=Fr(),Ur=!(!zr||!zr.webkitShowPlaybackTargetPicker),Mr=function(){function t(){this.Pe=void 0,this.Oe=!1,this.Wt=Lr,this.fn=!1,this.Be=!0,this.Le=!0}var i=t.prototype;return i.Me=function(){return 0},i.xe=function(t,n){return!0},i.Fe=function(t){return t>=1/6*2},mt(t,[{key:"Ue",get:function(){return void 0===this.Pe&&(this.Pe=this.Me()),this.Pe}},{key:"He",get:function(){return n.devicePixelRatio||1}},{key:"Ve",get:function(){return Ur}},{key:"Xe",get:function(){return!1}},{key:"ze",get:function(){return!0}},{key:"We",get:function(){return hi.qt||hi.un}},{key:"qe",get:function(){return!0}},{key:"Ge",get:function(){return!0}},{key:"Qe",get:function(){}},{key:"Ye",get:function(){return!0}},{key:"je",get:function(){return!1}}]),t}(),Wr=function(){var t=Br();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(hi.$t)return!1;var t=Br();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var qr=function(t){function n(n){var i;return(i=t.call(this)||this).Ke=void 0,i.Ke=n,i.Ke&&(i.Oe=i.Ke.Oe,i.Wt=i.Ke.Wt,i.Be=Wr&&i.Ke.Be),i}Ut(n,t);var i=n.prototype;return i.Me=function(){return this.Ke?this.Ke.Ue:t.prototype.Me.call(this)},i.xe=function(n,i){return this.Ke?this.Ke.xe(n,i):t.prototype.xe.call(this,n,i)},i.Fe=function(n){return this.Ke?this.Ke.Fe(n):t.prototype.Fe.call(this,n)},mt(n,[{key:"Qe",get:function(){var t;return null==(t=this.Ke)?void 0:t.Qe}},{key:"Ye",get:function(){var t,n;return null==(t=null==(n=this.Ke)?void 0:n.Ye)||t}}]),n}(Mr),jr=function(t){function n(n){var i;return(i=t.call(this,n)||this).Oe=!0,i.fn=!0,i}return Ut(n,t),n}(qr),Vr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.Me=function(){if(!Ar.MediaSource)return 1},n}(jr),Hr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.xe=function(n,i){return t.prototype.xe.call(this,n,i)},mt(n,[{key:"Xe",get:function(){return hi.An<3}},{key:"ze",get:function(){return hi.An>=3}},{key:"je",get:function(){return hi.An<3}}]),n}(qr),Xr=function(t){function n(){return t.call(this)||this}return Ut(n,t),n}(Mr),Gr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.xe=function(t,n){if(t&&t.Ze&&n&&n.Ze){var i=Yr(t.Ze,"mp4a.40.2")&&Yr(n.Ze,"mp4a.40.5"),e=Yr(t.Ze,"mp4a.40.5")&&Yr(n.Ze,"mp4a.40.2"),r=Yr(t.Ze,"mp4a.40.2")&&Yr(n.Ze,"mp4a.40.34"),o=Yr(t.Ze,"mp4a.40.34")&&Yr(n.Ze,"mp4a.40.2"),u=Yr(t.Ze,"mp4a.40.5")&&Yr(n.Ze,"mp4a.40.34"),s=Yr(t.Ze,"mp4a.40.34")&&Yr(n.Ze,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},mt(n,[{key:"Qe",get:function(){if(hi.qt)return 4096}}]),n}(Xr);function Yr(t,n){return t.indexOf(n)>-1}var Kr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.Fe=function(t){return t>=2},n}(Xr),Qr=function(t){function n(){var n;return(n=t.call(this)||this).Oe=hi.Pn>=11,n.Be=hi.Cn&&!(hi.un&&hi.Pn<10),n}return Ut(n,t),n}(Xr),$r=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),mt(n,[{key:"qe",get:function(){return!1}}]),n}(qr),Jr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),mt(n,[{key:"Ye",get:function(){return!hi.Gt||!!hi.wn&&92!==hi.yn}}]),n}(Xr),Zr=function(){function n(){var n;this.Je=void 0,this.$e=new Ii,this.ir=new to,this.rr=(n=function(){if(hi.Nn)return new Gr;if(hi.Sn||hi.En)return new Kr;if(hi.Cn)return new Qr;if(hi.dn)return new Jr;return new Xr}(),hi.un?new Vr(n):hi.fn?new jr(n):hi.pn?new Hr(n):hi.Tn?new $r(n):new qr(n)),this.dr=function(){if(t.URL)try{var n=new t.URL("b","http://a");return n.pathname="c d","http://a/c%20d"===n.href}catch(t){}return!1}(),t.performance&&t.performance.now?this.Je=function(){return t.performance.now()}:this.Je=yi}var i=n.prototype;return i._r=function(){bi.apply(void 0,arguments)},i.wr=function(){gi.apply(void 0,arguments)},i.gr=function(){mi.apply(void 0,arguments)},i.yr=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];pi.apply(void 0,[t].concat(i))},i.Qn=function(t,n){return r(t,n)},i.pr=function(t,n){return u(t,n)},i.Gn=function(t){o(t)},i.Ar=function(t){s(t)},i.ei=function(t){return this.$e.ei(t)},i.Tr=function(){return this.Sr.Tr()},i.Er=function(){return this.Sr.Er()},i.Ir=function(){return this.Sr.Ir()},i.Rr=function(){return this.Sr.Rr()},i.Nr=function(){return this.Sr.Nr()},i.Dr=function(t,n){return this.Sr.Dr(t,n)},i.Cr=function(t){return this.Sr.Cr(t)},i.Pr=function(t,n){var i;return void 0===n&&(n=xr(Ar)),i="object"!=typeof n||n instanceof Cr?n:n.href,new Cr(t,i)},i.Or=function(n,i){if(void 0===i&&(i=xr(Ar)),this.dr){var e="string"==typeof i?i:i.toString();return new t.URL(n,e).href}return this.Pr(n,i).href},mt(n,[{key:"Br",get:function(){return this.ir}},{key:"Lr",get:function(){return this.rr}},{key:"Mr",get:function(){return{xr:e&&e.userAgent.match(/Android /i)?"Android":"other",Fr:Boolean(e&&e.userAgent.match(/Android 8.0.0/i))}}},{key:"Ur",get:function(){return t&&t.location&&"https:"===t.location.protocol}},{key:"Hr",get:function(){return"languages"in e?e.languages.slice():[e.language]}}]),n}(),to=function(){function t(){}return mt(t,[{key:"Vr",get:function(){return e.oscpu}},{key:"Lr",get:function(){return e.platform}},{key:"Xr",get:function(){return e.vendor}},{key:"zr",get:function(){return e.vendorSub}}]),t}();function no(){return(no=a.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)a.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t}).apply(this,arguments)}var io,eo="com.microsoft.playready",ro="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",oo="urn:uuid:"+ro,uo="com.apple.fps.1_0";!function(t){t.Zr="playready",t.Jr="widevine",t.$r="fairplay",t.ns="clearkey",t.rs="aes128"}(io||(io={}));var so={us:io.Zr,hs:eo,fs:"cenc",vs:"9a04f079-9840-4286-ab92-e65be0885f95",ds:"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",ls:"PlayReady"},fo={us:io.Jr,hs:"com.widevine.alpha",fs:"cenc",vs:"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",ds:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",ls:"Widevine"},ho={us:io.$r,hs:uo,fs:"skd",vs:ro,ds:oo,ls:"FairPlay"},ao=(io.$r,{us:io.ns,hs:"org.w3.clearkey",fs:"cenc",vs:"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",ds:"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",ls:"ClearKey"}),co=hi.dn&&hi._n>=42||hi.Nn&&hi.Dn>=38||hi.Sn||hi.In||hi.On&&hi.Bn>=29;function vo(t,n){return e="audio",null!=(i=t)&&-1!==i.indexOf(e)?{initDataTypes:["cenc"],audioCapabilities:[no({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[no({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]};var i,e}var lo,wo=function(){function t(t){this._s=void 0,this.gs=yt(),this.ys=void 0,this._s=t}var n=t.prototype;return n.Nr=function(){return this.Cr(fo)},n.Er=function(){return this.Cr(ao)},n.Rr=function(){return this.Cr(so)},n.Ir=function(){return this.Cr(ho)},n.Cr=function(t){var n=t.ds,i=this.gs.get(n);if(i)return i;var e=this.Dr(t,'video/mp4; codecs="avc1.42000a"');return this.gs.set(n,e),e},n.Dr=function(t,n){return Z.async(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,Z.awrap(this._s.As(t.hs,[vo(n,!0)]));case 3:return i.abrupt("return",!0);case 6:return i.prev=6,i.t0=i.catch(0),i.prev=8,i.next=11,Z.awrap(this._s.As(t.hs,[vo(n,!1)]));case 11:return i.abrupt("return",!0);case 14:return i.prev=14,i.t1=i.catch(8),i.abrupt("return",!1);case 17:case"end":return i.stop()}},null,this,[[0,6],[8,14]],j)},n.Tr=function(){return this.ys||(this.ys=this.Ts()),this.ys},n.Ts=function(){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:if("https:"!==(void 0).protocol){t.next=2;break}case 2:if(co){t.next=4;break}return t.abrupt("return",!1);case 4:return t.next=6,Z.awrap(this.Er());case 6:if(!t.sent){t.next=8;break}return t.abrupt("return",!1);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}},null,this,null,j)},t}(),bo=["cenc"],go=function(t){function n(n){var i;return(i=t.call(this,"au")||this).ou=n,i}return Ut(n,t),n}(qn),mo=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"fu")||this).ou=n,o.vu=i,o.fu=e,o.du=r,o}return Ut(n,t),n}(qn);!function(t){t.wu="mu",t.yu="pu"}(lo||(lo={}));var po=new w([0]).buffer,yo=function(){function t(){this.Au=void 0,this.Au=[]}var n=t.prototype;return n.Tu=function(t){for(var n=0,i=this.Au;n<i.length;n++){if(i[n][0]===t)return!0}return!1},n.Su=function(t){for(var n=0,i=this.Au;n<i.length;n++){var e=i[n];if(e[0]===t)return e[1]}},n.Eu=function(t,n){this.Au.forEach(function(n){return t(n[1],n[0])},n)},n.Iu=function(t,n){this.Au.push([t,n])},n.Ru=function(){vt(this.Au)},mt(t,[{key:"Nu",get:function(){return this.Au.length}}]),t}(),_o=function(){function t(){var t=this;this.Fu=void 0,this.Uu=void 0,this.Hu=void 0,this.Fu=new j(function(n,i){t.Uu=n,t.Hu=i})}var n=t.prototype;return n.Vu=function(t){this.Uu&&(this.Uu(t),this.Os())},n.Xu=function(t){this.Hu&&(this.Hu(t),this.Os())},n.Us=function(){this.Fu.catch(lt),this.Xu(new un)},n.Os=function(){this.Uu=void 0,this.Hu=void 0},t}();function So(t,n){return t===eo?function(t){if(t.byteLength<2*Io.length)return t;if(kn(new DataView(t,0,2*Io.length),!0)===Io)return t;return n=t,Rn('<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">'+zn(n)+'</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>',!0).buffer;var n}(n):n}var Io="<PlayReady";var To=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Wu=void 0,o.Gu=void 0,o.Wu=i,o.Gu=e,o}return Ut(n,t),n}(en),Eo=function(t,n){return(Eo=a.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)a.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function ko(t,n){if("function"!=typeof n&&null!==n)throw new h("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}Eo(t,n),t.prototype=null===n?a.create(n):(i.prototype=n.prototype,new i)}function Ro(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}!function(){function t(t,n){this.Qu=t,this.Yu=n}t.prototype.get=function(t){var n=this.Qu.get(t);if(0===this.Yu||void 0===n)return n;var i=this.Qu.get(t+1)||0,e=n&(1<<8-this.Yu)-1,r=i>>8-this.Yu;return(e<<this.Yu)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Qu.get(c.floor((t+this.Yu)/8));if(void 0!==n)return(n&1<<7-this.Yu-t%8)>0?1:0}},a.defineProperty(t.prototype,"bitLength",{get:function(){return this.Qu.bitLength-this.Yu},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"length",{get:function(){return this.Qu.length},enumerable:!1,configurable:!0})}();function No(t,n,i){return c.min(c.max(t,n),i)}function Oo(t,n){return t>>8-n}function Po(t,n){return t&(1<<n)-1}!function(){function t(t){this.ju=t,this.Ku=0,this.Zu=0}a.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Ku+this.Zu},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"done",{get:function(){return this.Ku===this.ju.length&&0===this.Zu},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Ku,bit:this.Zu}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.ju);return n.seek(this.Ku,this.Zu),n},t.prototype.canReadBits=function(t){return 8*this.Ku+t+this.Zu<=8*this.ju.length},t.prototype.canReadBytes=function(t){return 0===this.Zu?this.Ku+t<=this.ju.length:this.Ku+t<this.ju.length},t.prototype.incBit=function(){this.Zu++,this.Zu>7&&(this.Ku++,this.Zu=0)},t.prototype.seek=function(t,n){this.Ku=t,this.Zu=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new f("Cannot read past end of buffer.");return this.ju.get(this.Ku)>>7-this.Zu&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new f("Cannot read past end of buffer.");if(0===this.Zu)return this.ju.get(this.Ku++);var t=Po(this.ju.get(this.Ku),8-this.Zu),n=Oo(this.ju.get(this.Ku+1),this.Zu);return this.Ku++,t<<this.Zu|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new f("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 f("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new f("Cannot read past end of buffer.");var n=0;if(0===this.Zu&&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 f("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new f("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-c.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 f("Skipping over the buffer edge is not allowed.");var n=this.Zu+t;this.Ku+=n>>3,this.Zu=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new f("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)}}();var Ao=function(t,n){return t===n?0:t<n?-1:t>n?1:d(t)?d(n)?0:1:-1},Do=function(){function t(){this.Ju=[],this.$u=[],this.Te=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 f("The buffer length must be positive.");if(0!==i){if(0===this.$u.length)this.$u.push(0);else{var e=this.$u[this.$u.length-1]+this.Ju[this.Ju.length-1].length;this.$u.push(e)}this.Ju.push(t.subarray(n,n+i)),this.Te+=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.Ju;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.Ju=[],this.$u=[],this.Te=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.$u[n];return this.Ju[n][i]}},a.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.Ju.length<1)return-1;if(this.Ju.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.Ju[0];return"number"==typeof t?Ro(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=Ro(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=c.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.$u,t,Ao)},t.prototype.join=function(){if(1===this.Ju.length)return this.Ju[0];var t=new w(this.length);return this.copyInternal(t,0),t},a.defineProperty(t.prototype,"length",{get:function(){return this.Te},enumerable:!1,configurable:!0}),a.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 f("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new f("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)*c.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=No(n,0,this.length),r=No(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.Ju[u],f=e,h=f-this.$u[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.$u[u],s=this.Ju[u];var a=r-f;return o.pushRange(s,h,a),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.Ju.length-1,e=this.Ju[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.Ju[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),Co=function(){function t(n){this.uo=n||t.BUFFER_CHUNK_SIZE,this.oo=!1,this.ao=new Do,this.ju=new w(this.uo),this.do=0,this._o=0,this.Zu=7}return t.prototype.closeByte=function(){this.ju[this.do++]=this._o,this.do>=this.uo&&this.closeBuffer(),this._o=0,this.Zu=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.do&&(this.ao.pushRange(this.ju,0,this.do),t&&(this.ju=new w(this.uo)),this.do=0)},a.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Zu},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.oo)throw new f("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.oo=!0,this.ao},t.prototype.writeBit=function(t){if(this.oo)throw new f("Cannot write to a closed BitWriter.");this._o|=t<<this.Zu,0===this.Zu?this.closeByte():this.Zu--},t.prototype.writeByte=function(t){if(this.oo)throw new f("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this._o=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.Zu;this._o|=Oo(t,n+1),this.closeByte(),this._o=Po(t,8-n)<<n+1,this.Zu=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.oo)throw new f("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.do+t.length<=this.uo?(this.ju.set(t,this.do),this.do+=t.length,this.do===this.uo&&this.closeBuffer()):(this.closeBuffer(),this.ao.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.Zu;this._o|=Oo(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=Po(t[i-1],8-n),r=Oo(t[i],n+1);this._o=e<<n+1|r,this.closeByte()}this._o=Po(t[t.length-1],8-n)<<n+1,this.Zu=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new f("Received a negative number.");if(n>32)throw new f("The max bitlength that can be provided is 32.");if(t>=c.pow(2,n))throw new f("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 f("The max bitlength that can be provided is 32.");if(c.abs(t)>=c.pow(2,n-1))throw new f("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+c.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new f("Received a negative number.");for(var n=c.floor(c.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 w(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}(),xo=function(){function t(t){this.rb=new Do,this.mo=t}return t.prototype.closeWriter=function(){void 0!==this.mo&&(this.rb=this.rb.concat(this.mo.close()),this.mo=void 0)},a.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.mo&&(this.mo=new Co),this.mo},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}(),Bo=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new f("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(c.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 xo;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=c.pow(2,32),t}();function Fo(t,n){return t instanceof qt?64===n:t<c.pow(2,n)}function Lo(t,n){return c.round(t*c.pow(2,n))}function zo(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}var Uo=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Fo(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return ko(n,t),a.defineProperty(n.prototype,"flags",{get:function(){return this.po},set:function(t){this.po=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new f("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Bo),Mo=(function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}ko(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(Do.from(this.data))}}(Bo),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}());function Wo(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 function(t){var n=t.length;if(n<=qo)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=qo)i.push(String.fromCharCode.apply(String,t.slice(e,e+qo)));return i.join("")}(n)}var qo=16384;function jo(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Vo(t,n,i){var e,r=function(t,n,i){void 0===n&&(n=0);void 0===i&&(i=t.byteLength);return new w(t.buffer,t.byteOffset+n,i-n)}(new w((e=t).buffer,e.byteOffset,e.byteLength),n.offset,n.offset+i);return n.shift(r.byteLength),r}function Ho(t,n,i){return n.offset+i<=t.byteLength}function Xo(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Go(t,n,i){void 0===i&&(i=!1);var e=Xo(t,n,i),r=Xo(t,n,i),o=i?r:e,u=i?e:r;return qt.fromBits(u,o,!0)}function Yo(t,n){var i=jo(t,n);if(i)return String.fromCharCode(i)}function Ko(t,n,i){for(var e="",r=0;r<i;r++)e+=Yo(t,n);return e}function Qo(t,n){var i,e=jo(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&jo(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&jo(t,n))+(63&jo(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&jo(t,n))+64*(63&jo(t,n))+(63&jo(t,n))),i}function $o(t,n){return function(t,n,i){var e=[];(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)&&n.shift(3);for(;n.offset<t.byteLength;){var r=Qo(t,n);if(void 0===r)break;if(i&&0===r)break;e.push(r)}return Wo(e)}(t,n,!0)}var Jo=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 Mo(this.offset<<3)},t}(),Zo=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return jo(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 Xo(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=Xo(t,n,i),r=Xo(t,n,i),o=i?r:e,u=i?e:r;return qt.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Go(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Vo(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(Xo(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Ko(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return $o(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 tu(t,n){return t.type===n}var nu=8;function iu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Ho(t,n,nu)){var e=n.offset+nu;return{complete:!1,neededOffset:e}}var r=Xo(t,n),o=Ko(t,n,4);if(1===r){if(!Ho(t,n,8)){var e=n.offset+8;return n.seek(i),{complete:!1,neededOffset:e}}r=Go(t,n).toNumber()}if("uuid"===o){if(!Ho(t,n,16)){var e=n.offset+16;return n.seek(i),{complete:!1,neededOffset:e}}o=Ko(t,n,16)}var u=n.offset;return{complete:!0,header:{type:o,size:r,headerSize:u-i}}}(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,h,a,c={type:r.type,offset:i,data:new Zo((f=t,h=i,a=u,void 0===h&&(h=0),void 0===a&&(a=f.byteLength),new DataView(f.buffer,f.byteOffset+h,a-h)),new Jo(r.headerSize))};return n.seek(u),{complete:!0,box:c}}!function(t){function n(){return t.call(this,"mdir")||this}ko(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(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 ko(n,t),a.defineProperty(n.prototype,"handlerType",{get:function(){return this.Ao},set:function(t){this.Ao=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}(Uo));var eu=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()},a.defineProperty(t.prototype,"tag",{get:function(){return this.To},set:function(t){if(!Fo(t,8))throw new f("Provided tag does not fit in 8 bits.");this.To=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}(),ru=(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}ko(n,t),a.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.So},set:function(t){if(!Fo(t,8))throw new f("Provided objectTypeIndication does not fit in 8 bits.");this.So=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"streamType",{get:function(){return this.Eo},set:function(t){if(!Fo(t,6))throw new f("Provided streamType does not fit in 6 bits.");this.Eo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Io},set:function(t){if(!Fo(t,24))throw new f("Provided bufferSizeDb does not fit in 24 bits.");this.Io=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.Ro},set:function(t){if(!Fo(t,32))throw new f("Provided maxBitrate does not fit in 32 bits.");this.Ro=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.No},set:function(t){if(!Fo(t,32))throw new f("Provided avgBitrate does not fit in 32 bits.");this.No=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)}}}(eu),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}ko(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(Do.from(this.data))}}(eu),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return ko(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(eu)),ou=(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 ru(r.fixed28BitMode),o}ko(n,t),a.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"esId",{get:function(){return this.Do},set:function(t){if(!Fo(t,16))throw new f("Provided esId does not fit in 16 bits.");this.Do=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Co},set:function(t){if(!Fo(t,5))throw new f("Provided streamPriority does not fit in 5 bits.");this.Co=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.Po},set:function(t){if(t&&!Fo(t,16))throw new f("Provided dependsOnEsId does not fit in 16 bits.");this.Po=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.Oo},set:function(t){if(t&&!Fo(t,16))throw new f("Provided ocrEsId does not fit in 16 bits.");this.Oo=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)}}(eu),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return ko(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}(Bo)),uu=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ko(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(ou),su=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return ko(n,t),a.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.Bo},set:function(t){if(!Fo(t,16))throw new f("Provided dataReferenceIndex does not fit in 16 bits.");this.Bo=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}(uu),fu=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 ko(n,t),a.defineProperty(n.prototype,"channelCount",{get:function(){return this.Lo},set:function(t){if(!Fo(t,16))throw new f("Provided channelCount does not fit in 16 bits.");this.Lo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleSize",{get:function(){return this.Mo},set:function(t){if(!Fo(t,16))throw new f("Provided sampleSize does not fit in 16 bits.");this.Mo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleRate",{get:function(){return this.xo},set:function(t){if(!Fo(Lo(t,16),32))throw new f("Provided rate does not fit in 32 bits (fixed 16.16).");this.xo=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(Lo(this.sampleRate,16),32),this.extra&&zo(n.writer,this.extra)},n}(su),hu=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}ko(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Fo},set:function(t){if(!Fo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Fo(t,32)}))throw new f("Not all entries can be represented in 32 bits.");this.Fo=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)}}}(Uo),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}ko(n,t),a.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Uo},set:function(t){if(!Fo(t,32))throw new f("Provided cleanApertureWidthN does not fit in 32 bits.");this.Uo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.Ho},set:function(t){if(!Fo(t,32))throw new f("Provided cleanApertureWidthD does not fit in 32 bits.");this.Ho=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Vo},set:function(t){if(!Fo(t,32))throw new f("Provided cleanApertureHeightN does not fit in 32 bits.");this.Vo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.Xo},set:function(t){if(!Fo(t,32))throw new f("Provided cleanApertureHeightD does not fit in 32 bits.");this.Xo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizOffN",{get:function(){return this.zo},set:function(t){if(!Fo(t,32))throw new f("Provided horizOffN does not fit in 32 bits.");this.zo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizOffD",{get:function(){return this.Wo},set:function(t){if(!Fo(t,32))throw new f("Provided horizOffD does not fit in 32 bits.");this.Wo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"vertOffN",{get:function(){return this.qo},set:function(t){if(!Fo(t,32))throw new f("Provided vertOffN does not fit in 32 bits.");this.qo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Go},set:function(t){if(!Fo(t,32))throw new f("Provided vertOffD does not fit in 32 bits.");this.Go=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)}}(Bo),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}ko(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Fo},set:function(t){if(!Fo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Fo(t.sampleCount,32)||!Fo(t.sampleOffset,32)}))throw new f("Not all entries can be represented in 64 bits.");this.Fo=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)}}}(Uo),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}ko(n,t),a.defineProperty(n.prototype,"location",{get:function(){return this.Qo},set:function(t){this.flags=void 0===t?1:0,this.Qo=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))}}(Uo),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}ko(n,t),a.defineProperty(n.prototype,"location",{get:function(){return this.Qo},set:function(t){if(1&this.flags)throw new f("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.Qo=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))}}(Uo),function(t){function n(){return t.call(this,"dinf")||this}ko(n,t)}(uu),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Fo(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return ko(n,t),a.defineProperty(n.prototype,"flags",{get:function(){return this.po},set:function(t){this.po=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new f("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(ou)),au=(function(t){function n(){return t.call(this,"dref",0,0)||this}ko(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)}}(hu),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 ko(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"entries",{get:function(){return this.Fo},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Fo(e.segmentDuration,this.bitSize))throw new f("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Fo(e.mediaTime,this.bitSize))throw new f("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Fo(e.mediaRateInteger,16))throw new f("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Fo(e.mediaRateFraction,16))throw new f("Provided mediaRateFraction does not fit in 16 bits.")}this.Fo=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}(Uo)),cu=(function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ko(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)}}}(au),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ko(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)}}}(au),function(t){function n(){return t.call(this,"edts")||this}ko(n,t)}(uu),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 ko(n,t),a.defineProperty(n.prototype,"majorBrand",{get:function(){return this.Yo},set:function(t){if(4!==t.length)throw new f("the provided major brand does not conform to the 4 character requirement");this.Yo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"minorVersion",{get:function(){return this.jo},set:function(t){if(!Fo(t,32))throw new f("the provided minor version does not fit in 32 bits.");this.jo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.Ko},set:function(t){if(t.some(function(t){return 4!==t.length}))throw new f("Some of the compatible brands do not conform to the 4 character requirement");this.Ko=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}(Bo)),vu=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}ko(n,t)}(cu),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}ko(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(Do.from(this.data))}}(Bo),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 ko(n,t),a.defineProperty(n.prototype,"creationTime",{get:function(){return this.Zo},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Zo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Jo},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"timescale",{get:function(){return this.$o},set:function(t){if(!Fo(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.$o=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.nh},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.nh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"language",{get:function(){return this.ih},set:function(t){if(!function(t){return/^[a-z]{3}$/.test(t)}(t))throw new f("Expected an ISO-639-2/T language code");this.ih=t},enumerable:!1,configurable:!0}),a.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}(Uo));(function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}ko(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)}})(vu),function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}ko(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)}}(vu);var lu;(function(t){function n(){return t.call(this,"mdia")||this}ko(n,t)})(uu),function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new Do,n}ko(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(Bo),function(t){function n(){return t.call(this,"minf")||this}ko(n,t)}(uu),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}ko(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())}}(hu);!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"}(lu||(lu={}));var du,wu,bu={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function gu(t,n){n.writer.writeUInt(Lo(t.a,16),32),n.writer.writeUInt(Lo(t.b,16),32),n.writer.writeUInt(Lo(0,30),32),n.writer.writeUInt(Lo(t.c,16),32),n.writer.writeUInt(Lo(t.d,16),32),n.writer.writeUInt(Lo(0,30),32),n.writer.writeUInt(Lo(t.x,16),32),n.writer.writeUInt(Lo(t.y,16),32),n.writer.writeUInt(Lo(1,30),32)}function mu(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:du.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:wu.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:wu.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:wu.UNKNOWN,2)}function pu(t,n){var i,e,r;n.writer.writeUInt(0,4),mu(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"}(du||(du={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(wu||(wu={}));var yu=function(){return function(){}}(),_u=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 ko(n,t),a.defineProperty(n.prototype,"systemId",{get:function(){return this.eh},set:function(t){if(16!==t.length)throw new f("Provided systemId length is not 16.");this.eh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"data",{get:function(){return this.Wi},set:function(t){if(!Fo(t.length,32))throw new f("Provided data length does not fit in 32 bits.");this.Wi=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(Do.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(Do.from(this.data))},n}(Uo),Su=function(t){function n(n,i){return t.call(this,0,n,i)||this}return ko(n,t),n}(_u),Iu=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return ko(n,t),a.defineProperty(n.prototype,"kIds",{get:function(){return this.rh},set:function(t){if(!Fo(t.length,32))throw new f("Provided kIds length cannot fit in 32 bits.");if(t.some(function(t){return 16!==t.length}))throw new f("Not all provided key ids are 16 bytes long.");this.rh=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(Do.from(e))}},n}(_u);var Tu=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 ko(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.sh},set:function(t){if(!Fo(t,this.bitSize))throw new f("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.sh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Uo),Eu=(function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ko(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)}}(Tu),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ko(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)}}(Tu),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}ko(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.uh},set:function(t){if(!Fo(t,32))throw new f("Provided track id does not fit in 32 bits.");this.uh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.oh},set:function(t){if(!Fo(t,32))throw new f("Provided default sample description index does not fit in 32 bits.");this.oh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.hh},set:function(t){if(!Fo(t,32))throw new f("Provided default sample duration does not fit in 32 bits.");this.hh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ah},set:function(t){if(!Fo(t,32))throw new f("Provided default sample size does not fit in 32 bits.");this.ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.fh},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Fo(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Fo(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.fh=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),pu(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)}}(Uo),function(t){function n(){return t.call(this,"mvex")||this}ko(n,t)}(uu),function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,h,a=this;return(a=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,a.modificationTime=i.modification,a.timescale=i.scale,a.duration=i.duration,a.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,a.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,a.matrix=null!==(h=r.matrix)&&void 0!==h?h:bu,a.vh=e,a}return ko(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"creationTime",{get:function(){return this.Zo},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Zo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Jo},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"timescale",{get:function(){return this.$o},set:function(t){if(!Fo(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.$o=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.nh},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.nh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"rate",{get:function(){return this.dh},set:function(t){if(!Fo(Lo(t,16),32))throw new f("Provided rate does not fit in 32 bits (fixed 16.16).");this.dh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"volume",{get:function(){return this.lh},set:function(t){if(!Fo(Lo(t,8),16))throw new f("Provided volume does not fit in 16 bits (fixed 8.8).");this.lh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"matrix",{get:function(){return this._h},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new f("(u, v, w) does not match the required (0, 0, 1)");this._h=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.vh},set:function(t){if(0===t)throw new f("NextTrackId cannot be 0.");if(!Fo(t,32))throw new f("NextTrackId cannot exceed 32 bits.");this.vh=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(Lo(this.rate,16),32),n.writer.writeUInt(Lo(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),gu(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}(Uo));(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}ko(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)}})(Eu),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}ko(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)}}(Eu);var ku=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,h,a,c=this;return(c=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).creationTime=i.creation,c.modificationTime=i.modification,c.trackId=e,c.duration=i.duration,c.volume=r,c.width=o,c.height=u,c.layer=null!==(f=s.layer)&&void 0!==f?f:0,c.alternateGroup=null!==(h=s.alternateGroup)&&void 0!==h?h:0,c.matrix=null!==(a=s.matrix)&&void 0!==a?a:bu,c}return ko(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"creationTime",{get:function(){return this.Zo},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Zo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Jo},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"trackId",{get:function(){return this.uh},set:function(t){if(0===t)throw new f("trackId cannot be 0.");if(!Fo(t,32))throw new f("trackId cannot exceed 32 bits.");this.uh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.nh},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.nh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"volume",{get:function(){return this.lh},set:function(t){if(!Fo(Lo(t,8),16))throw new f("Provided volume does not fit in 16 bits (fixed 8.8).");this.lh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"width",{get:function(){return this.wh},set:function(t){if(!Fo(Lo(t,16),32))throw new f("Provided width does not fit in 32 bits (fixed 16.16).");this.wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"height",{get:function(){return this.gh},set:function(t){if(!Fo(Lo(t,16),32))throw new f("Provided height does not fit in 32 bits (fixed 16.16).");this.gh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"layer",{get:function(){return this.yh},set:function(t){if(!Fo(t,16))throw new f("Provided layer does not fit in 16 bits.");this.yh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.kh},set:function(t){if(!Fo(t,16))throw new f("Provided alternateGroup does not fit in 16 bits.");this.kh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"matrix",{get:function(){return this._h},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new f("(u, v, w) does not match the required (0, 0, 1)");this._h=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(Lo(this.volume,8),16),n.writer.writeUInt(0,16),gu(this.matrix,n),n.writer.writeUInt(Lo(this.width,16),32),n.writer.writeUInt(Lo(this.height,16),32)},n}(Uo),Ru=(function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}ko(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)}}(ku),function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}ko(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)}}(ku),function(t){function n(){return t.call(this,"trak")||this}ko(n,t)}(uu),function(t){function n(){return t.call(this,"moov")||this}ko(n,t)}(uu),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 ko(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.ph},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.ph=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Uo));(function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ko(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)}})(Ru),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ko(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)}}(Ru);!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}ko(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.uh},set:function(t){if(!Fo(t,32))throw new f("Provided track id does not fit in 32 bits.");this.uh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.Ah},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new f("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new f("The base data offset present flag is not set.");if(t&&!Fo(t,64))throw new f("Provided baseDataOffset does not fit in 32 bits.");this.Ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.Th},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new f("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new f("The sample description index flag is not set.");if(t&&!Fo(t,32))throw new f("Provided sampleDescriptionIndex does not fit in 32 bits.");this.Th=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.hh},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new f("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new f("The default sample duration present flag is not set.");if(t&&!Fo(t,32))throw new f("Provided defaultSampleDuration does not fit in 32 bits.");this.hh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ah},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new f("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new f("The default sample size present flag is not set.");if(t&&!Fo(t,32))throw new f("Provided defaultSampleSize does not fit in 32 bits.");this.ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.fh},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new f("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new f("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Fo(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Fo(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.fh=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&&pu(this.defaultSampleFlags,n)}}(Uo);(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}ko(n,t),a.defineProperty(n.prototype,"dataOffset",{get:function(){return this.Sh},set:function(t){if(t&&!Fo(t,32))throw new f("Provided data offset does not fit in 32 bits.");this.Sh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.Eh},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Fo(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Fo(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.Eh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"samples",{get:function(){return this.Ih},set:function(t){var n,i;if(!Fo(t.length,32))throw new f("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 f("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new f("The sample duration present flag is not set.");if(o.duration&&!Fo(o.duration,32))throw new f("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new f("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new f("The sample size present flag is not set.");if(o.size&&!Fo(o.size,32))throw new f("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new f("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new f("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Fo(o.flags.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Fo(o.flags.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new f("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new f("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Fo(o.compositionTimeOffset,32))throw new f("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.Ih=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&&pu(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&&pu(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}}})(Uo),function(t){function n(){return t.call(this,"traf")||this}ko(n,t)}(uu),function(t){function n(){return t.call(this,"moof")||this}ko(n,t)}(uu),function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}ko(n,t),a.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.Rh},set:function(t){if(!Fo(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.Rh=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)}}(Uo);var Nu=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return ko(n,t),a.defineProperty(n.prototype,"codingName",{get:function(){return this.Nh},set:function(t){if(4!==t.length)throw new f("Provided coding name was not 4 characters long.");this.Nh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Bo),Ou=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}ko(n,t),a.defineProperty(n.prototype,"hSpacing",{get:function(){return this.Dh},set:function(t){if(!Fo(t,32))throw new f("Provided hSpacing does not fit in 32 bits.");this.Dh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"vSpacing",{get:function(){return this.Ch},set:function(t){if(!Fo(t,32))throw new f("Provided vSpacing does not fit in 32 bits.");this.Ch=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)}}(Bo),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}ko(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())}}(uu),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new Nu(n),r}ko(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())}}(Bo),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 ko(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"entries",{get:function(){return this.Fo},set:function(t){var n=this;if(!Fo(t.length,32))throw new f("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!Fo(t,n.bitSize)}))throw new f("Not all provided entries fit in ".concat(this.bitSize," bits."));this.Fo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.Ph},set:function(t){if(void 0===t)this.flags=0;else{if(!Fo(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!Fo(t.auxInfoTypeParameter,32))throw new f("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Ph=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}(Uo)),Pu=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}ko(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)}}}(Ou),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}ko(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)}}}(Ou),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}ko(n,t),a.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.Oh},set:function(t){if(!Fo(t,8))throw new f("Provided defaultSampleInfoSize does not fit in a single byte.");this.Oh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.Bh},set:function(t){if(!Fo(t.length,32))throw new f("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!Fo(t,8)}))throw new f("Not all provided sampleInfoSizes fit in a byte.");this.Bh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.Ph},set:function(t){if(void 0===t)this.flags=0;else{if(!Fo(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!Fo(t.auxInfoTypeParameter,32))throw new f("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Ph=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 f("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)}}}(Uo),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}ko(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++){mu(e[i],n)}}}(Uo),function(t){function n(n){return t.call(this,"stsd",n,0)||this}ko(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)}}(hu),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 ko(n,t),a.defineProperty(n.prototype,"groupingType",{get:function(){return this.Lh},set:function(t){if(4!==t.length)throw new f("The provided groupingType does not equal 4 characters.");this.Lh=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}(Uo)),Au=(function(t){function n(n,i){return t.call(this,0,n,i)||this}ko(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(Pu),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}ko(n,t),a.defineProperty(n.prototype,"defaultLength",{get:function(){return this.Mh},set:function(t){if(!Fo(t,32))throw new f("The provided defaultLength does not fit in 32 bits.");this.Mh=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)}}(Pu),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new f("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}ko(n,t),a.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.oh},set:function(t){if(!Fo(t,32))throw new f("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.oh=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)}}(Pu),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}ko(n,t),a.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.Fh},set:function(t){if(!Fo(t.length,32))throw new f("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!Fo(t,32)}))throw new f("Not all sampleSizes can be represented in 32 bits.");this.Fh=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)}}}(Uo),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}ko(n,t),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ah},set:function(t){if(!Fo(t,32))throw new f("Provided defaultSampleSize does not fit in 32 bits.");this.ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"samples",{get:function(){return this.Ih},set:function(t){if(!Fo(t,32))throw new f("Number of allowed samples cannot fit in 32 bits.");this.Ih=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)}}(Uo),function(t){function n(){return t.call(this,"stbl")||this}ko(n,t)}(uu),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}ko(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Fo},set:function(t){if(!Fo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Fo(t.firstChunk,32)||!Fo(t.sampleDescriptionIndex,32)||!Fo(t.samplesPerChunk,32)}))throw new f("Not all entries can be represented in 96 bits.");this.Fo=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)}}}(Uo),function(t){function n(){return t.call(this,"schi")||this}ko(n,t)}(uu),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}ko(n,t),a.defineProperty(n.prototype,"schemeType",{get:function(){return this.Uh},set:function(t){if(4!==t.length)throw new f("The provided schemeType does not have a length of 4.");this.Uh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.Hh},set:function(t){if(!Fo(t,32))throw new f("The provided schemeVersion does not fit in 23 bits.");this.Hh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"schemeUri",{get:function(){return this.Vh},set:function(t){if(t&&4!==t.length)throw new f("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.Vh=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))}}(Uo),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 ko(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"referenceId",{get:function(){return this.Xh},set:function(t){if(!Fo(t,32))throw new f("Provided referenceId does not fit in 32 bits.");this.Xh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"timescale",{get:function(){return this.$o},set:function(t){if(!Fo(t,32))throw new f("Provided timescale does not fit in 32 bits.");this.$o=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.Wh},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.Wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"firstOffset",{get:function(){return this.qh},set:function(t){if(!Fo(t,this.bitSize))throw new f("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.qh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"references",{get:function(){return this.Gh},set:function(t){if(!Fo(t.length,16))throw new f("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(!Fo(e.referencedSize,31))throw new f("Provided referenced size does not fit in 31 bits.");if(!Fo(e.subsegmentDuration,32))throw new f("Provided subsegment duration does not fit in 31 bits.");if(!Fo(e.sapType,3))throw new f("Provided SAP type does not fit in 3 bits.");if(!Fo(e.sapDeltaTime,28))throw new f("Provided SAP delta time does not fit in 28 bits.")}this.Gh=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}(Uo)),Du=(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}ko(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)}}(Au),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}ko(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)}}(Au),function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}ko(n,t)}(cu),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}ko(n,t),a.defineProperty(n.prototype,"balance",{get:function(){return this.Qh},set:function(t){if(t<-1||t>1)throw new f("Provided balance does not fit in the allowed range [-1, 1].");if(!Fo(Lo(t,8),16))throw new f("Provided balance does not fit in 16 bits (fixed 8.8).");this.Qh=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(Lo(this.balance,8),16),n.writer.writeUInt(0,16)}}(Uo),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}ko(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Fo},set:function(t){if(!Fo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Fo(t,32)}))throw new f("Not all entries can be represented in 32 bits.");this.Fo=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)}}}(Uo),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}ko(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Fo},set:function(t){if(!Fo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Fo(t.sampleCount,32)||!Fo(t.sampleDelta,32)}))throw new f("Not all entries can be represented in 64 bits.");this.Fo=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)}}}(Uo),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}ko(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.uh},set:function(t){if(!Fo(t,32))throw new f("The provided trackId does not fit in 32 bits.");this.uh=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)}}(hu),function(t){function n(){return t.call(this,"udta")||this}ko(n,t)}(uu),{red:0,green:0,blue:0}),Cu=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=Du);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}ko(n,t),a.defineProperty(n.prototype,"opColor",{get:function(){return this.Yh},set:function(t){if(!Fo(t.red,16)||!Fo(t.green,16)||!Fo(t.blue,16))throw new f("Not all colors could be represented in 16 bits.");this.Yh=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)}}(Uo),function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,h,a,c=this;return(c=t.call(this,n,i)||this).width=e.width,c.height=e.height,c.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,c.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,c.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",c.frameCount=null!==(h=r.frameCount)&&void 0!==h?h:1,c.depth=null!==(a=r.depth)&&void 0!==a?a:24,c.clap=r.clap,c.pasp=r.pasp,c.extra=o,c}return ko(n,t),a.defineProperty(n.prototype,"width",{get:function(){return this.wh},set:function(t){if(!Fo(t,16))throw new f("Provided width does not fit in 16 bits.");this.wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"height",{get:function(){return this.gh},set:function(t){if(!Fo(t,16))throw new f("Provided height does not fit in 16 bits.");this.gh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.jh},set:function(t){if(!Fo(Lo(t,16),32))throw new f("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.jh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.Kh},set:function(t){if(!Fo(Lo(t,16),32))throw new f("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.Kh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"compressorName",{get:function(){return this.Zh},set:function(t){if(t.length>31)throw new f("The provided compressorName should at most be 31 characters long.");this.Zh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"frameCount",{get:function(){return this.Jh},set:function(t){if(!Fo(t,16))throw new f("Provided frameCount does not fit in 16 bits.");this.Jh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"depth",{get:function(){return this.$h},set:function(t){if(!Fo(t,16))throw new f("Provided depth does not fit in 16 bits.");this.$h=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(Lo(this.horizontalResolution,16),32),n.writer.writeUInt(Lo(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&&zo(n.writer,this.extra)},n}(su)),xu=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}ko(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof w?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof w?n.concat(Do.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Uo),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}ko(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())}}(fu),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}ko(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)}}(Cu),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}ko(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)}}(su),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}ko(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Bo),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}a.defineProperty(t.prototype,"version",{get:function(){return this.ea},set:function(t){if(!Fo(t,8))throw new f("Provided version does not fit in 8 bits.");this.ea=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"profileIndication",{get:function(){return this.ra},set:function(t){if(!Fo(t,8))throw new f("Provided profileIndication does not fit in 8 bits.");this.ra=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.ua},set:function(t){if(!Fo(t,8))throw new f("Provided profileCompatibility does not fit in 8 bits.");this.ua=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"levelIndication",{get:function(){return this.oa},set:function(t){if(!Fo(t,8))throw new f("Provided levelIndication does not fit in 8 bits.");this.oa=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"spsSets",{get:function(){return this.va},set:function(t){if(!Fo(t.length,5))throw new f("Provided number of spsSets exceeds the max (32)");this.va=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"ppsSets",{get:function(){return this._a},set:function(t){if(!Fo(t.length,8))throw new f("Provided number of ppsSets exceeds the max (256)");this._a=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(Do.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(Do.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}ko(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())}}(Cu),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}ko(n,t),a.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Io},set:function(t){if(!Fo(t,32))throw new f("Provided bufferSizeDb does not fit in 32 bits.");this.Io=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"max",{get:function(){return this.ma},set:function(t){if(!Fo(t,32))throw new f("Provided max does not fit in 32 bits.");this.ma=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"avg",{get:function(){return this.ya},set:function(t){if(!Fo(t,32))throw new f("Provided avg does not fit in 32 bits.");this.ya=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)}}(Bo),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 f("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 w(0),s}return ko(n,t),a.defineProperty(n.prototype,"isProtected",{get:function(){return this.Aa},set:function(t){if(!Fo(t,8))throw new f("Provided isProtected does not fit in 1 byte.");this.Aa=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.Ta},set:function(t){if(![8,16].includes(t))throw new f("Provided perSampleIvSize does not match any allowed value [8, 16].");this.Ta=t,this.Sa=new w(0)},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"kId",{get:function(){return this.Ea},set:function(t){if(16!==t.length)throw new f("Provided kId length is not 16.");this.Ea=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"constantIv",{get:function(){return this.Sa},set:function(t){if(![8,16].includes(t.length))throw new f("Provided constant IV length does not match any allowed value [8, 16].");this.Sa=t,this.Ta=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),zo(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),zo(t.writer,this.constantIv))},n}(Uo)),Bu=(function(t){function n(n){return t.call(this,0,n)||this}ko(n,t)}(xu),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return ko(n,t),a.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.Ia},set:function(t){if(!Fo(t,4))throw new f("Provided cryptByteBlocks does not fit in 4 bits.");this.Ia=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.Ra},set:function(t){if(!Fo(t,4))throw new f("Provided skipByteBlocks does not fit in 4 bits.");this.Ra=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(xu));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new Bu(n),i}ko(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(yu);function Fu(t){return void 0!==t.iv}function Lu(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}ko(n,t),a.defineProperty(n.prototype,"samples",{get:function(){return this.Ih},set:function(t){var n;if(!Fo(t.length,32))throw new f("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(Fu(r)&&![8,16].includes(r.iv.length))throw new f("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=Lu(r)),!0===n&&!Lu(r)||!1===n&&Lu(r))throw new f("Mix of samples with and without subsamples detected.");if(Lu(r)){if(!Fo(r.subsamples.length,16))throw new f("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(!Fo(s.clearData,16))throw new f("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Fo(s.protectedData,23))throw new f("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.Ih=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];Fu(r)&&(n+=r.iv.length),Lu(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(Fu(r)&&zo(n.writer,r.iv),Lu(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)}})(Uo),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}ko(n,t),a.defineProperty(n.prototype,"timescale",{get:function(){return this.$o},set:function(t){if(!Fo(t,32))throw new f("The provided timescale does not fit in 32 bits.");this.$o=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Na},set:function(t){if(!Fo(t,32))throw new f("The provided presentationTimeDelta does not fit in 32 bits.");this.Na=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"eventDuration",{get:function(){return this.Da},set:function(t){if(!Fo(t,32))throw new f("The provided eventDuration does not fit in 32 bits.");this.Da=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"id",{get:function(){return this.Ca},set:function(t){if(!Fo(t,32))throw new f("The provided id does not fit in 32 bits.");this.Ca=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(Do.from(this.data))}}(Uo);var zu,Uu,Mu=(zu="pssh",Uu=function(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 Iu(i,s,e):new Su(i,s)},function(t){var n,i=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=iu(i,e);if(!r.complete)return;if(tu(r.box,n))return r.box}}(new Zo((n=t,new DataView(n.buffer,n.byteOffset,n.byteLength)),new Jo),zu);if(!i)throw new f("".concat(zu," box not found"));return Uu(i)}),Wu=function(t){function n(n,i){var e;(e=t.call(this)||this).Pa=void 0,e.Oa=!1,e.Ba=void 0,e.La=void 0,e.Ma=function(){e.xa()},e.Fa=function(t){e.Qs(new mo(tn(e),t.messageType,So(e.Ua,t.message)))},e.Ha=function(){e.Oa=!0,e.Pa.Nu>0&&(e.Pa.Ru(),e.Qs(new go(tn(e)))),e.Va.removeEventListener("keystatuseschange",e.Ma),e.Va.removeEventListener("message",e.Fa)},e.Va=n,e.Ua=i,e.Va.addEventListener("keystatuseschange",e.Ma),e.Va.addEventListener("message",e.Fa),e.Pa=new yo;var r=[];return e.Va.closed&&r.push(j.resolve(e.Va.closed)),e.La=new _o,r.push(e.La.Fu),e.Ba=j.race(r).then(e.Ha,e.Ha),e.xa(),e}Ut(n,t);var i=n.prototype;return i.Xa=function(){if(this.Oa)return this.Ba;var t,n,i=[];return i.push(j.resolve(this.Va.close())),i.push((t=1e3,new j(function(i,e){if(void 0!==n&&n.Rs)e(new un);else{var r=J.Qn(function(){void 0!==n&&n.Ls(o),i()},t),o=function(){J.Gn(r),e(new un)};void 0!==n&&n.Bs(o)}}))),this.La.Vu(j.race(i).catch(qu)),this.Oa=!0,this.Ba},i.Wa=function(t,n,i){if(hi.hn){var e=Mu(Dn(n));if(1===e.version)n=new Su(e.systemId,e.data).serialize().join()}return j.resolve(this.Va.generateRequest(t,n)).catch(qu)},i.qa=function(t){return j.resolve(this.Va.load(t)).catch(qu)},i.Ga=function(){return j.resolve(this.Va.remove()).catch(qu)},i.Qa=function(t){return j.resolve(this.Va.update(t)).catch(qu)},i.xa=function(){var t=this;this.Pa.Ru(),this.Va.keyStatuses.forEach(function(n,i){t.Ya(i,n)}),this.Qs(new go(this))},i.Ya=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Dn(t);if(this.Ua===eo&&16===e.byteLength){var r=Pn(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.Ua===eo&&"status-pending"===n&&(n="usable"),this.Pa.Iu(e,n)},mt(n,[{key:"Ka",get:function(){return this.Ba}},{key:"Za",get:function(){return this.Va.expiration}},{key:"Ja",get:function(){return this.Pa}},{key:"$a",get:function(){return this.Va.sessionId}}]),n}(Wn);function qu(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|v(i[1],16))}throw new To(t.message,void 0,n,t)}var ju=function(){function t(t,n,i){this.tc=t,this.nc=n,this.ic=i}var n=t.prototype;return n.ec=function(t){return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Wu(this.tc.createSession(t),this.nc));case 1:case"end":return n.stop()}},null,this,null,j)},n.rc=function(t){return j.resolve(this.tc.setServerCertificate(t))},n.uc=function(t){return j.resolve(t.setMediaKeys(this.tc))},n.hc=function(t){return j.resolve(t.setMediaKeys(null))},t}(),Vu=function(){function t(t,n,i){this.ac=t,this.Ua=n,this.cc=i}var n=t.prototype;return n.fc=function(){var t;return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Z.awrap(this.ac.createMediaKeys());case 2:return t=n.sent,n.abrupt("return",new ju(t,this.Ua,this.cc));case 4:case"end":return n.stop()}},null,this,null,j)},n.vc=function(){return this.cc},mt(t,[{key:"nc",get:function(){return this.ac.keySystem}}]),t}();function Hu(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,_c:e._c},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 Xu(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 Xu(t,n,i,e)}),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Xu(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!ct(n,e.encryptionScheme))&&(!e.robustness&&t(i,(r=e.contentType,o=r.trim(),(u=o.indexOf(";"))<0?o:o.substr(0,u).trim()))));var r,o,u}function Gu(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 Yu(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Ku))||!(!t.videoCapabilities||!t.videoCapabilities.some(Ku))}function Ku(t){return!t.robustness}function Qu(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(no({},r,{robustness:n}))}return i}var $u,Ju,Zu=function(){function t(){}return t.prototype.As=function(t,n){var i,r,o,u,s,f,h,a;return Z.async(function(c){for(;;)switch(c.prev=c.next){case 0:for(n=n.filter(function(t){return!t._c}),i=0,r=n;i<r.length;i++)(o=r[i]).audioCapabilities&&(o.audioCapabilities=Gu(o.audioCapabilities)),o.videoCapabilities&&(o.videoCapabilities=Gu(o.videoCapabilities));if("com.widevine.alpha"!==t||!n.some(Yu)){c.next=14;break}return u=n.map(function(t){return i="SW_SECURE_CRYPTO",no({},n=t,{videoCapabilities:n.videoCapabilities?Qu(n.videoCapabilities,i):void 0,audioCapabilities:n.audioCapabilities?Qu(n.audioCapabilities,i):void 0});var n,i}),c.prev=4,c.next=7,Z.awrap(e.requestMediaKeySystemAccess(t,u));case 7:return s=c.sent,f=s.getConfiguration(),c.abrupt("return",new Vu(s,t,f));case 12:c.prev=12,c.t0=c.catch(4);case 14:return c.next=16,Z.awrap(e.requestMediaKeySystemAccess(t,n));case 16:return h=c.sent,a=h.getConfiguration(),c.abrupt("return",new Vu(h,t,a));case 19:case"end":return c.stop()}},null,null,[[4,12]],j)},t.wc=function(){return void 0!==e&&"function"==typeof e.requestMediaKeySystemAccess},t}(),ts=function(){function t(){}return t.prototype.As=function(t,n){try{return j.resolve(function(t,n){if(!ns())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.wc=function(){return ns()},t}();function ns(){return void 0!==Ar.MSMediaKeys}!function(t){t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.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"}($u||($u={})),function(t){t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN"}(Ju||(Ju={})),function(t){(Ju||(Ju={})).fromCode=function(t){var n=c.floor(t/1e3);if(n in Ju)return n;throw new h("Invalid error code: "+t)}}();var is=function(){function t(){}return t.prototype.As=function(t,n){try{return j.resolve(function(t,n){if(t!==uo)throw new h(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!es())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.wc=function(){return es()},t}();function es(){return void 0!==Ar.WebKitMediaKeys}var rs,os=function(){function t(t){this.xc=t}return t.prototype.As=function(t,n){var i,e,r;return Z.async(function(o){for(;;)switch(o.prev=o.next){case 0:i=0,e=this.xc;case 1:if(!(i<e.length)){o.next=14;break}return r=e[i],o.prev=3,o.next=6,Z.awrap(r.As(t,n));case 6:return o.abrupt("return",o.sent);case 9:o.prev=9,o.t0=o.catch(3);case 11:i++,o.next=1;break;case 14:throw new h("Unsupported key system configuration for "+t);case 15:case"end":return o.stop()}},null,this,[[3,9]],j)},t}(),us=function(t){function n(n){var i;return(i=t.call(this)||this).yc=void 0,i.Cc=void 0,i.gc=void 0,i.oo=!1,i.Fc=void 0,i.Uc=void 0,i.Hc=void 0,i.Vc=void 0,i.Xc=void 0,i.Ua=n,i.gc=new _o,i.Uc="",i.Xc=new _o,i.Hc=new yo,i}Ut(n,t);var i=n.prototype;return i.zc=function(){this.Cc&&(this.Sc("usable"),this.Cc.Vu(void 0),this.Cc=void 0)},i.Wc=function(t){var n=new To("Unknown CDM error",t.errorCode,t.systemCode);this.Cc?(this.Cc.Xu(n),this.Cc=void 0):this.yc?(this.yc.Xu(n),this.yc=void 0):n.Wu===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.Sc("output-restricted"):1===n.Gu?this.Sc("expired"):this.Sc("internal-error")},i.qc=function(t){0!==t.message.byteLength&&(this.yc&&(this.yc.Vu(void 0),this.yc=void 0),this.Qs(new mo(this,"license-request",So(this.Ua,Cn(t.message).buffer),t.defaultURL||void 0)))},i.Gc=function(t){this.Vc||(this.Vc=t,this.Xc.Vu(t))},i.Xa=function(){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:this.throwIfClosed(),this.oo=!0,this.gc.Vu(void 0);case 3:case"end":return t.stop()}},null,this,null,j)},i.Wa=function(t,n){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.throwIfClosed(),this.yc=new _o,this.Fc=Dn(n),t.t0=this.Vc,t.t0){t.next=8;break}return t.next=7,Z.awrap(this.Xc.Fu);case 7:t.t0=t.sent;case 8:return t.t0.webkitGenerateKeyRequest(this.Ua,this.Fc),t.next=12,Z.awrap(this.yc.Fu);case 12:case"end":return t.stop()}},null,this,null,j)},i.qa=function(t){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:return this.throwIfClosed(),t.abrupt("return",!1);case 2:case"end":return t.stop()}},null,this,null,j)},i.Ga=function(){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:this.throwIfClosed();case 1:case"end":return t.stop()}},null,this,null,j)},i.Qa=function(t){return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(this.throwIfClosed(),this.Cc=new _o,n.t0=this.Vc,n.t0){n.next=7;break}return n.next=6,Z.awrap(this.Xc.Fu);case 6:n.t0=n.sent;case 7:return n.t0.webkitAddKey(this.Ua,Dn(t),this.Fc,this.$a),n.next=11,Z.awrap(this.Cc.Fu);case 11:case"end":return n.stop()}},null,this,null,j)},i.throwIfClosed=function(){if(this.oo)throw new h("Already closing or closed.")},i.Sc=function(t){this.Hc.Ru(),this.Hc.Iu(po,t),this.Qs(new go(this))},mt(n,[{key:"Ja",get:function(){return this.Hc}},{key:"$a",get:function(){return this.Uc},set:function(t){this.Uc=t}},{key:"Ka",get:function(){return this.gc.Fu}},{key:"Za",get:function(){return NaN}}]),n}(Wn),ss=function(){function t(t,n){var i=this;this.Vc=void 0,this.Qc=yt(),this.Yc=[],this.Tc=function(t){var n=i.jc(t.sessionId);n&&n.zc()},this.Kc=function(t){var n=i.jc(t.sessionId);n&&n.Wc(t)},this.Zc=function(t){var n=i.jc(t.sessionId);n&&n.qc(t)},this.nc=t,this.ic=n}var n=t.prototype;return n.uc=function(t){return this.Vc=t,this.Vc.addEventListener("webkitkeyadded",this.Tc),this.Vc.addEventListener("webkitkeyerror",this.Kc),this.Vc.addEventListener("webkitkeymessage",this.Zc),this.Qc.forEach(function(n,i){return n.Gc(t)}),this.Yc.forEach(function(n){return n.Gc(t)}),j.resolve()},n.hc=function(t){return t.removeEventListener("webkitkeyadded",this.Tc),t.removeEventListener("webkitkeyerror",this.Kc),t.removeEventListener("webkitkeymessage",this.Zc),this.Vc=void 0,j.resolve()},n.ec=function(t,n,i){var e;return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:return e=new us(this.nc),this.Vc&&e.Gc(this.Vc),this.Yc.push(e),t.abrupt("return",e);case 4:case"end":return t.stop()}},null,this,null,j)},n.rc=function(t){return j.resolve(!1)},n.jc=function(t){if(t){var n=this.Qc.get(t);return n||((n=this.Yc.shift())?(n.$a=t,this.Qc.set(t,n),n):void 0)}},t}(),fs=function(){function t(t,n){this.nc=t,this.Jc=n}var n=t.prototype;return n.fc=function(){return j.resolve(new ss(this.nc,this.Jc))},n.vc=function(){return this.Jc},t}(),hs=function(){function t(){}return t.prototype.As=function(t,n){try{return j.resolve(as(t,n))}catch(t){return j.reject(t)}},t.wc=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function as(t,n){if(!hs.wc())throw new h("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Hu(cs,bo,t,e);if(r)return new fs(t,r)}throw new h("Unsupported key system configuration for "+t)}function cs(t,n){var i=Fr();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function vs(){return rs||(rs=function(){var t=[];is.wc()&&t.push(new is);Zu.wc()&&t.push(new Zu);ts.wc()&&t.push(new ts);hs.wc()&&t.push(new hs);return new os(t)}()),rs}var ls=function(){function t(){this.$c=yt()}var n=t.prototype;return n.Ru=function(t){this.$c.delete(t)},n.tf=function(){this.$c.clear()},n.Su=function(t){return this.$c.get(t)},n.nf=function(t,n){this.$c.set(t,n)},t}(),ds=function(){function t(){}return t.if=function(){return t.qn||(t.qn=ws.wc()?new ws:new ls),t.qn},t.Ru=function(n){t.if().Ru(n)},t.tf=function(){t.if().tf()},t.Su=function(n){return t.if().Su(n)},t.nf=function(n,i){t.if().nf(n,i)},t}();ds.qn=void 0;var ws=function(n){function i(){return n.apply(this,arguments)||this}Ut(i,n),i.wc=function(){try{return t.sessionStorage.setItem("foobar","foobar"),t.sessionStorage.removeItem("foobar"),!0}catch(t){return!1}};var e=i.prototype;return e.Ru=function(n){t.sessionStorage.removeItem(n)},e.tf=function(){t.sessionStorage.clear()},e.Su=function(n){return t.sessionStorage[n]},e.nf=function(n,i){t.sessionStorage[n]=i},i}(ds);var bs=function(){var n,i=t.Blob;if(i)try{return new i,n=i,function(t,i){return new n(t,i)}}catch(t){}var e,r=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;if(r)return e=r,function(t,n){var i=new e;if(t)for(var r=0;r<t.length;r++){var o=t[r];i.append(o)}return i.getBlob(n&&n.type||"")}}();function gs(t,n,e){var r=bs([n],{type:"application/octet-stream"}),o=URL.createObjectURL(r),u=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,e),s=i.createElement("a");s.href=o,s.download=u,i.body.appendChild(s),s.click(),i.body.removeChild(s),URL.revokeObjectURL(o)}var ms,ps;!function(t){t.ef="rf",t.sf="uf",t.hf="contentprotectionerror",t.cf="contentprotectionsuccess",t.vf="currentsourcechange",t.df="destroy",t.lf="durationchange",t._f="emptied",t.wu="encrypted",t.wf="ended",t.gf="mf",t.yf="loadstart",t.kf="manifestupdate",t.pf="nosupportedrepresentationfound",t.bf="offline",t.Af="online",t.Tf="pause",t.Sf="play",t.Ef="progress",t.If="ratechange",t.Rf="representationchange",t.Nf="resize",t.Df="seeked",t.Cf="seeking",t.Pf="segmentnotfound",t.Of="Bf",t.Lf="Mf",t.xf="sourcechange",t.Ff="timeupdate",t.Uf="volumechange",t.Hf="Vf",t.Xf="metricschange"}(ms||(ms={})),function(t){t.zf="arraybuffer",t.Wf="json",t.qf="stream",t.Zn="text"}(ps||(ps={}));var ys=function(){function t(n){var i=this;this.Kr=void 0,this.Kr={},n instanceof t?n.asList().forEach(function(t){var n=t[0],e=t[1];i.append(n,e)}):Array.isArray(n)?n.forEach(function(t){i.append(t[0],t[1])}):n&&a.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=_s(i),e=Ss(e);var r=i.toLowerCase();if(this.Kr.hasOwnProperty(r)){var o=this.Kr[r],u=o[1];o[1]=u?u+", "+e:e}else this.Kr[r]=[i,e]},n.delete=function(t){var n=_s(t).toLowerCase();delete this.Kr[n]},n.get=function(t){var n=_s(t).toLowerCase();return this.Kr.hasOwnProperty(n)?this.Kr[n][1]:null},n.has=function(t){var n=_s(t).toLowerCase();return this.Kr.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=_s(i)).toLowerCase();this.Kr[e]=[i,Ss(n)]},n.forEach=function(t,n){for(var i in this.Kr)this.Kr.hasOwnProperty(i)&&t.call(n,this.Kr[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.Kr)if(this.Kr.hasOwnProperty(n)){var i=this.Kr[n],e=i[0],r=i[1];t.push([e,r])}return t},n.Gf=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.Qf=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.Yf=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function _s(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new h("Invalid character in header field name");return n}function Ss(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var Is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(t){return"Symbol("+t+")"};function Ts(){}var Es=void 0!==t?t:void 0!==n?n:"undefined"!=typeof global?global:void 0;function ks(t){return"object"==typeof t&&null!==t||"function"==typeof t}var Rs=Ts,Ns=j,Os=j.prototype.then,Ps=j.resolve.bind(Ns),As=j.reject.bind(Ns);function Ds(t){return new Ns(t)}function Cs(t){return Ps(t)}function xs(t){return As(t)}function Bs(t,n,i){return Os.call(t,n,i)}function Fs(t,n,i){Bs(Bs(t,n,i),void 0,Rs)}function Ls(t,n){Fs(t,n)}function zs(t,n){Fs(t,void 0,n)}function Us(t,n,i){return Bs(t,n,i)}function Ms(t){Bs(t,void 0,Rs)}var Ws=function(){var t=Es&&Es.queueMicrotask;if("function"==typeof t)return t;var n=Cs(void 0);return function(t){return Bs(n,t)}}();function qs(t,n,i){if("function"!=typeof t)throw new h("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function js(t,n,i){try{return Cs(qs(t,n,i))}catch(t){return xs(t)}}var Vs=function(){function t(){this.jf=0,this.Kf=0,this.Se={Zf:[],Jf:void 0},this.$f=this.Se,this.jf=0,this.Kf=0}return a.defineProperty(t.prototype,"length",{get:function(){return this.Kf},enumerable:!1,configurable:!0}),t.prototype.push=function(t){var n=this.$f,i=n;16383===n.Zf.length&&(i={Zf:[],Jf:void 0}),n.Zf.push(t),i!==n&&(this.$f=i,n.Jf=i),++this.Kf},t.prototype.shift=function(){var t=this.Se,n=t,i=this.jf,e=i+1,r=t.Zf,o=r[i];return 16384===e&&(n=t.Jf,e=0),--this.Kf,this.jf=e,t!==n&&(this.Se=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.jf,i=this.Se,e=i.Zf;!(n===e.length&&void 0===i.Jf||n===e.length&&(n=0,0===(e=(i=i.Jf).Zf).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Se,n=this.jf;return t.Zf[n]},t}();function Hs(t,n){t.tv=n,n.ev=t,"readable"===n.we?Ks(t):"closed"===n.we?function(t){Ks(t),Js(t)}(t):Qs(t,n.rv)}function Xs(t,n){return Ya(t.tv,n)}function Gs(t){"readable"===t.tv.we?$s(t,new h("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){Qs(t,n)}(t,new h("Reader was released and can no longer be used to monitor the stream's closedness")),t.tv.ev=void 0,t.tv=void 0}function Ys(t){return new h("Cannot "+t+" a stream using a released reader")}function Ks(t){t.Ba=Ds(function(n,i){t.uv=n,t.ov=i})}function Qs(t,n){Ks(t),$s(t,n)}function $s(t,n){void 0!==t.ov&&(Ms(t.Ba),t.ov(n),t.uv=void 0,t.ov=void 0)}function Js(t){void 0!==t.uv&&(t.uv(void 0),t.uv=void 0,t.ov=void 0)}var Zs=Is("[[AbortSteps]]"),tf=Is("[[ErrorSteps]]"),nf=Is("[[CancelSteps]]"),ef=Is("[[PullSteps]]"),rf=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},of=c.trunc||function(t){return t<0?c.ceil(t):c.floor(t)};function uf(t,n){if(void 0!==t&&("object"!=typeof(i=t)&&"function"!=typeof i))throw new h(n+" is not an object.");var i}function sf(t,n){if("function"!=typeof t)throw new h(n+" is not a function.")}function ff(t,n){if(!function(t){return"object"==typeof t&&null!==t||"function"==typeof t}(t))throw new h(n+" is not an object.")}function hf(t,n,i){if(void 0===t)throw new h("Parameter "+n+" is required in '"+i+"'.")}function af(t,n,i){if(void 0===t)throw new h(n+" is required in '"+i+"'.")}function cf(t){return Number(t)}function vf(t){return 0===t?0:t}function lf(t,n){var i=Number.MAX_SAFE_INTEGER,e=Number(t);if(e=vf(e),!rf(e))throw new h(n+" is not a finite number");if((e=function(t){return vf(of(t))}(e))<0||e>i)throw new h(n+" is outside the accepted range of 0 to "+i+", inclusive");return rf(e)&&0!==e?e:0}function df(t,n){if(!Xa(t))throw new h(n+" is not a ReadableStream.")}function wf(t){return new Sf(t)}function bf(t,n){t.ev.hv.push(n)}function gf(t,n,i){var e=t.ev.hv.shift();i?e.fv():e.vv(n)}function mf(t){return t.ev.hv.length}function pf(t){var n=t.ev;return void 0!==n&&!!If(n)}var yf,_f,Sf=function(){function t(t){if(hf(t,1,"ReadableStreamDefaultReader"),df(t,"First parameter"),Ga(t))throw new h("This stream has already been locked for exclusive reading by another reader");Hs(this,t),this.hv=new Vs}return a.defineProperty(t.prototype,"closed",{get:function(){return If(this)?this.Ba:xs(Ef("closed"))},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),If(this)?void 0===this.tv?xs(Ys("cancel")):Xs(this,t):xs(Ef("cancel"))},t.prototype.read=function(){if(!If(this))return xs(Ef("read"));if(void 0===this.tv)return xs(Ys("read from"));var t,n,i=Ds(function(i,e){t=i,n=e});return Tf(this,{vv:function(n){return t({value:n,done:!1})},fv:function(){return t({value:void 0,done:!0})},_v:function(t){return n(t)}}),i},t.prototype.releaseLock=function(){if(!If(this))throw Ef("releaseLock");if(void 0!==this.tv){if(this.hv.length>0)throw new h("Tried to release a reader lock when that reader has pending read() calls un-settled");Gs(this)}},t}();function If(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"hv")&&t instanceof Sf)}function Tf(t,n){var i=t.tv;i.wv=!0,"closed"===i.we?n.fv():"errored"===i.we?n._v(i.rv):i.mv[ef](n)}function Ef(t){return new h("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}a.defineProperties(Sf.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(Sf.prototype,Is.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof Is.asyncIterator&&((yf={})[Is.asyncIterator]=function(){return this},_f=yf,a.defineProperty(_f,Is.asyncIterator,{enumerable:!1}));var kf=function(){function t(t,n){this.yv=void 0,this.pv=!1,this.ev=t,this.bv=n}return t.prototype.next=function(){var t=this,n=function(){return t.Av()};return this.yv=this.yv?Us(this.yv,n,n):n(),this.yv},t.prototype.return=function(t){var n=this,i=function(){return n.Tv(t)};return this.yv?Us(this.yv,i,i):i()},t.prototype.Av=function(){var t=this;if(this.pv)return j.resolve({value:void 0,done:!0});var n,i,e=this.ev;if(void 0===e.tv)return xs(Ys("iterate"));var r=Ds(function(t,e){n=t,i=e});return Tf(e,{vv:function(i){t.yv=void 0,Ws(function(){return n({value:i,done:!1})})},fv:function(){t.yv=void 0,t.pv=!0,Gs(e),n({value:void 0,done:!0})},_v:function(n){t.yv=void 0,t.pv=!0,Gs(e),i(n)}}),r},t.prototype.Tv=function(t){if(this.pv)return j.resolve({value:t,done:!0});this.pv=!0;var n=this.ev;if(void 0===n.tv)return xs(Ys("finish iterating"));if(!this.bv){var i=Xs(n,t);return Gs(n),Us(i,function(){return{value:t,done:!0}})}return Gs(n),Cs({value:t,done:!0})},t}(),Rf={next:function(){return Nf(this)?this.Sv.next():xs(Of("next"))},return:function(t){return Nf(this)?this.Sv.return(t):xs(Of("return"))}};function Nf(t){if(!ks(t))return!1;if(!a.prototype.hasOwnProperty.call(t,"Sv"))return!1;try{return t.Sv instanceof kf}catch(t){return!1}}function Of(t){return new h("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}void 0!==_f&&a.setPrototypeOf(Rf,_f);var Pf=Number.isNaN||function(t){return t!=t};function Af(t){return t.slice()}function Df(t,n,i,e,r){new w(t).set(new w(i,e,r),n)}function Cf(t){return t}function xf(t,n,i){if(t.slice)return t.slice(n,i);var e=i-n,r=new ArrayBuffer(e);return Df(r,0,t,n,e),r}function Bf(t){var n=xf(t.buffer,t.byteOffset,t.byteOffset+t.byteLength);return new w(n)}function Ff(t){var n=t.Ev.shift();return t.Iv-=n.size,t.Iv<0&&(t.Iv=0),n.value}function Lf(t,n,i){if("number"!=typeof(e=i)||Pf(e)||e<0||i===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var e;t.Ev.push({value:n,size:i}),t.Iv+=i}function zf(t){t.Ev=new Vs,t.Iv=0}var Uf=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"view",{get:function(){if(!qf(this))throw ah("view");return this.Rv},enumerable:!1,configurable:!0}),t.prototype.respond=function(t){if(!qf(this))throw ah("respond");if(hf(t,1,"respond"),t=lf(t,"First parameter"),void 0===this.Nv)throw new h("This BYOB request has been invalidated");this.Rv.buffer,sh(this.Nv,t)},t.prototype.respondWithNewView=function(t){if(!qf(this))throw ah("respondWithNewView");if(hf(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new h("You can only respond with array buffer views");if(void 0===this.Nv)throw new h("This BYOB request has been invalidated");t.buffer,fh(this.Nv,t)},t}();a.defineProperties(Uf.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(Uf.prototype,Is.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Mf=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"byobRequest",{get:function(){if(!Wf(this))throw ch("byobRequest");return oh(this)},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Wf(this))throw ch("desiredSize");return uh(this)},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(!Wf(this))throw ch("close");if(this.Dv)throw new h("The stream has already been closed; do not close it again!");var t=this.Cv.we;if("readable"!==t)throw new h("The stream (in "+t+" state) is not in the readable state and cannot be closed");ih(this)},t.prototype.enqueue=function(t){if(!Wf(this))throw ch("enqueue");if(hf(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new h("chunk must be an array buffer view");if(0===t.byteLength)throw new h("chunk must have non-zero byteLength");if(0===t.buffer.byteLength)throw new h("chunk's buffer must have non-zero byteLength");if(this.Dv)throw new h("stream is closed or draining");var n=this.Cv.we;if("readable"!==n)throw new h("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");eh(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Wf(this))throw ch("error");rh(this,t)},t.prototype[nf]=function(t){Vf(this),zf(this);var n=this.Pv(t);return nh(this),n},t.prototype[ef]=function(t){var n=this.Cv;if(this.Iv>0){var i=this.Ev.shift();this.Iv-=i.byteLength,Qf(this);var e=new w(i.buffer,i.byteOffset,i.byteLength);t.vv(e)}else{var r=this.Ov;if(void 0!==r){var o=void 0;try{o=new ArrayBuffer(r)}catch(n){return void t._v(n)}var u={buffer:o,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:w,readerType:"default"};this.Bv.push(u)}bf(n,t),jf(this)}},t}();function Wf(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"Cv")&&t instanceof Mf)}function qf(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"Nv")&&t instanceof Uf)}function jf(t){(function(t){var n=t.Cv;if("readable"!==n.we)return!1;if(t.Dv)return!1;if(!t.Lv)return!1;if(pf(n)&&mf(n)>0)return!0;if(wh(n)&&dh(n)>0)return!0;if(uh(t)>0)return!0;return!1})(t)&&(t.Mv?t.xv=!0:(t.Mv=!0,Fs(t.Fv(),function(){t.Mv=!1,t.xv&&(t.xv=!1,jf(t))},function(n){rh(t,n)})))}function Vf(t){$f(t),t.Bv=new Vs}function Hf(t,n){var i=!1;"closed"===t.we&&(i=!0);var e=Xf(n);"default"===n.readerType?gf(t,e,i):function(t,n,i){var e=t.ev.Uv.shift();i?e.fv(n):e.vv(n)}(t,e,i)}function Xf(t){var n=t.bytesFilled,i=t.elementSize;return new t.viewConstructor(t.buffer,t.byteOffset,n/i)}function Gf(t,n,i,e){t.Ev.push({buffer:n,byteOffset:i,byteLength:e}),t.Iv+=e}function Yf(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=c.min(t.Iv,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.Ev;s>0;){var a=h.peek(),v=c.min(s,a.byteLength),l=n.byteOffset+n.bytesFilled;Df(n.buffer,l,a.buffer,a.byteOffset,v),a.byteLength===v?h.shift():(a.byteOffset+=v,a.byteLength-=v),t.Iv-=v,Kf(t,v,n),s-=v}return f}function Kf(t,n,i){i.bytesFilled+=n}function Qf(t){0===t.Iv&&t.Dv?(nh(t),Ka(t.Cv)):jf(t)}function $f(t){null!==t.Hv&&(t.Hv.Nv=void 0,t.Hv.Rv=null,t.Hv=null)}function Jf(t){for(;t.Bv.length>0;){if(0===t.Iv)return;var n=t.Bv.peek();Yf(t,n)&&(th(t),Hf(t.Cv,n))}}function Zf(t,n){var i=t.Bv.peek();$f(t),"closed"===t.Cv.we?function(t,n){var i=t.Cv;if(wh(i))for(;dh(i)>0;)Hf(i,th(t))}(t):function(t,n,i){if(Kf(0,n,i),!(i.bytesFilled<i.elementSize)){th(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=xf(i.buffer,r-e,r);Gf(t,o,0,o.byteLength)}i.bytesFilled-=e,Hf(t.Cv,i),Jf(t)}}(t,n,i),jf(t)}function th(t){return t.Bv.shift()}function nh(t){t.Fv=void 0,t.Pv=void 0}function ih(t){var n=t.Cv;if(!t.Dv&&"readable"===n.we)if(t.Iv>0)t.Dv=!0;else{if(t.Bv.length>0)if(t.Bv.peek().bytesFilled>0){var i=new h("Insufficient bytes to fill elements in the given buffer");throw rh(t,i),i}nh(t),Ka(n)}}function eh(t,n){var i=t.Cv;if(!t.Dv&&"readable"===i.we){var e=n.buffer,r=n.byteOffset,o=n.byteLength,u=Cf(e);if(t.Bv.length>0){var s=t.Bv.peek();s.buffer,0,s.buffer=Cf(s.buffer)}if($f(t),pf(i))if(0===mf(i))Gf(t,u,r,o);else t.Bv.length>0&&th(t),gf(i,new w(u,r,o),!1);else wh(i)?(Gf(t,u,r,o),Jf(t)):Gf(t,u,r,o);jf(t)}}function rh(t,n){var i=t.Cv;"readable"===i.we&&(Vf(t),zf(t),nh(t),Qa(i,n))}function oh(t){if(null===t.Hv&&t.Bv.length>0){var n=t.Bv.peek(),i=new w(n.buffer,n.byteOffset+n.bytesFilled,n.byteLength-n.bytesFilled),e=a.create(Uf.prototype);!function(t,n,i){t.Nv=n,t.Rv=i}(e,t,i),t.Hv=e}return t.Hv}function uh(t){var n=t.Cv.we;return"errored"===n?null:"closed"===n?0:t.Vv-t.Iv}function sh(t,n){var i=t.Bv.peek();if("closed"===t.Cv.we){if(0!==n)throw new h("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===n)throw new h("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range")}i.buffer=Cf(i.buffer),Zf(t,n)}function fh(t,n){var i=t.Bv.peek();if("closed"===t.Cv.we){if(0!==n.byteLength)throw new h("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===n.byteLength)throw new h("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.bufferByteLength!==n.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(i.bytesFilled+n.byteLength>i.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var e=n.byteLength;i.buffer=Cf(n.buffer),Zf(t,e)}function hh(t,n,i,e,r,o,u){n.Cv=t,n.xv=!1,n.Mv=!1,n.Hv=null,n.Ev=n.Iv=void 0,zf(n),n.Dv=!1,n.Lv=!1,n.Vv=o,n.Fv=e,n.Pv=r,n.Ov=u,n.Bv=new Vs,t.mv=n,Fs(Cs(i()),function(){n.Lv=!0,jf(n)},function(t){rh(n,t)})}function ah(t){return new h("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function ch(t){return new h("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function vh(t){return new bh(t)}function lh(t,n){t.ev.Uv.push(n)}function dh(t){return t.ev.Uv.length}function wh(t){var n=t.ev;return void 0!==n&&!!gh(n)}a.defineProperties(Mf.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(Mf.prototype,Is.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var bh=function(){function t(t){if(hf(t,1,"ReadableStreamBYOBReader"),df(t,"First parameter"),Ga(t))throw new h("This stream has already been locked for exclusive reading by another reader");if(!Wf(t.mv))throw new h("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Hs(this,t),this.Uv=new Vs}return a.defineProperty(t.prototype,"closed",{get:function(){return gh(this)?this.Ba:xs(ph("closed"))},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),gh(this)?void 0===this.tv?xs(Ys("cancel")):Xs(this,t):xs(ph("cancel"))},t.prototype.read=function(t){if(!gh(this))return xs(ph("read"));if(!ArrayBuffer.isView(t))return xs(new h("view must be an array buffer view"));if(0===t.byteLength)return xs(new h("view must have non-zero byteLength"));if(0===t.buffer.byteLength)return xs(new h("view's buffer must have non-zero byteLength"));if(t.buffer,void 0===this.tv)return xs(Ys("read from"));var n,i,e=Ds(function(t,e){n=t,i=e});return mh(this,t,{vv:function(t){return n({value:t,done:!1})},fv:function(t){return n({value:t,done:!0})},_v:function(t){return i(t)}}),e},t.prototype.releaseLock=function(){if(!gh(this))throw ph("releaseLock");if(void 0!==this.tv){if(this.Uv.length>0)throw new h("Tried to release a reader lock when that reader has pending read() calls un-settled");Gs(this)}},t}();function gh(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"Uv")&&t instanceof bh)}function mh(t,n,i){var e=t.tv;e.wv=!0,"errored"===e.we?i._v(e.rv):function(t,n,i){var e=t.Cv,r=1;n.constructor!==DataView&&(r=n.constructor.BYTES_PER_ELEMENT);var o=n.constructor,u=Cf(n.buffer),s={buffer:u,bufferByteLength:u.byteLength,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:r,viewConstructor:o,readerType:"byob"};if(t.Bv.length>0)return t.Bv.push(s),void lh(e,i);if("closed"!==e.we){if(t.Iv>0){if(Yf(t,s)){var f=Xf(s);return Qf(t),void i.vv(f)}if(t.Dv){var a=new h("Insufficient bytes to fill elements in the given buffer");return rh(t,a),void i._v(a)}}t.Bv.push(s),lh(e,i),jf(t)}else{var c=new o(s.buffer,s.byteOffset,0);i.fv(c)}}(e.mv,n,i)}function ph(t){return new h("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}function yh(t,n){var i=t.highWaterMark;if(void 0===i)return n;if(Pf(i)||i<0)throw new RangeError("Invalid highWaterMark");return i}function _h(t){var n=t.size;return n||function(){return 1}}function Sh(t,n){uf(t,n);var i=null==t?void 0:t.highWaterMark,e=null==t?void 0:t.size;return{highWaterMark:void 0===i?void 0:cf(i),size:void 0===e?void 0:Ih(e,n+" has member 'size' that")}}function Ih(t,n){return sf(t,n),function(n){return cf(t(n))}}function Th(t,n,i){return sf(t,i),function(i){return js(t,n,[i])}}function Eh(t,n,i){return sf(t,i),function(){return js(t,n,[])}}function kh(t,n,i){return sf(t,i),function(i){return qs(t,n,[i])}}function Rh(t,n,i){return sf(t,i),function(i,e){return js(t,n,[i,e])}}function Nh(t,n){if(!Ch(t))throw new h(n+" is not a WritableStream.")}a.defineProperties(bh.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(bh.prototype,Is.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var Oh="function"==typeof AbortController;var Ph=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),void 0===t?t=null:ff(t,"First parameter");var i=Sh(n,"Second parameter"),e=function(t,n){uf(t,n);var i=null==t?void 0:t.abort,e=null==t?void 0:t.close,r=null==t?void 0:t.start,o=null==t?void 0:t.type,u=null==t?void 0:t.write;return{abort:void 0===i?void 0:Th(i,t,n+" has member 'abort' that"),close:void 0===e?void 0:Eh(e,t,n+" has member 'close' that"),start:void 0===r?void 0:kh(r,t,n+" has member 'start' that"),write:void 0===u?void 0:Rh(u,t,n+" has member 'write' that"),type:o}}(t,"First parameter");if(Dh(this),void 0!==e.type)throw new RangeError("Invalid type is specified");var r=_h(i);!function(t,n,i,e){var r=a.create($h.prototype),o=function(){},u=function(){return Cs(void 0)},s=function(){return Cs(void 0)},f=function(){return Cs(void 0)};void 0!==n.start&&(o=function(){return n.start(r)});void 0!==n.write&&(u=function(t){return n.write(t,r)});void 0!==n.close&&(s=function(){return n.close()});void 0!==n.abort&&(f=function(t){return n.abort(t)});Zh(t,r,o,u,s,f,i,e)}(this,e,yh(i,1),r)}return a.defineProperty(t.prototype,"locked",{get:function(){if(!Ch(this))throw ua("locked");return xh(this)},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){return void 0===t&&(t=void 0),Ch(this)?xh(this)?xs(new h("Cannot abort a stream that already has a writer")):Bh(this,t):xs(ua("abort"))},t.prototype.close=function(){return Ch(this)?xh(this)?xs(new h("Cannot close a stream that already has a writer")):Mh(this)?xs(new h("Cannot close an already-closing stream")):Fh(this):xs(ua("close"))},t.prototype.getWriter=function(){if(!Ch(this))throw ua("getWriter");return Ah(this)},t}();function Ah(t){return new jh(t)}function Dh(t){t.we="writable",t.rv=void 0,t.mo=void 0,t.Xv=void 0,t.zv=new Vs,t.Wv=void 0,t.qv=void 0,t.Gv=void 0,t.Qv=void 0,t.Yv=!1}function Ch(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"Xv")&&t instanceof Ph)}function xh(t){return void 0!==t.mo}function Bh(t,n){var i;if("closed"===t.we||"errored"===t.we)return Cs(void 0);t.Xv.Kv=n,null===(i=t.Xv.Zv)||void 0===i||i.abort();var e=t.we;if("closed"===e||"errored"===e)return Cs(void 0);if(void 0!==t.Qv)return t.Qv.Jv;var r=!1;"erroring"===e&&(r=!0,n=void 0);var o=Ds(function(i,e){t.Qv={Jv:void 0,Uu:i,Hu:e,$v:n,td:r}});return t.Qv.Jv=o,r||zh(t,n),o}function Fh(t){var n=t.we;if("closed"===n||"errored"===n)return xs(new h("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i,e=Ds(function(n,i){var e={Uu:n,Hu:i};t.qv=e}),r=t.mo;return void 0!==r&&t.Yv&&"writable"===n&&ma(r),Lf(i=t.Xv,Qh,0),ia(i),e}function Lh(t,n){"writable"!==t.we?Uh(t):zh(t,n)}function zh(t,n){var i=t.Xv;t.we="erroring",t.rv=n;var e=t.mo;void 0!==e&&Gh(e,n),!function(t){if(void 0===t.Wv&&void 0===t.Gv)return!1;return!0}(t)&&i.Lv&&Uh(t)}function Uh(t){t.we="errored",t.Xv[tf]();var n=t.rv;if(t.zv.forEach(function(t){t.Hu(n)}),t.zv=new Vs,void 0!==t.Qv){var i=t.Qv;if(t.Qv=void 0,i.td)return i.Hu(n),void Wh(t);Fs(t.Xv[Zs](i.$v),function(){i.Uu(),Wh(t)},function(n){i.Hu(n),Wh(t)})}else Wh(t)}function Mh(t){return void 0!==t.qv||void 0!==t.Gv}function Wh(t){void 0!==t.qv&&(t.qv.Hu(t.rv),t.qv=void 0);var n=t.mo;void 0!==n&&va(n,t.rv)}function qh(t,n){var i=t.mo;void 0!==i&&n!==t.Yv&&(n?function(t){da(t)}(i):ma(i)),t.Yv=n}a.defineProperties(Ph.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(Ph.prototype,Is.toStringTag,{value:"WritableStream",configurable:!0});var jh=function(){function t(t){if(hf(t,1,"WritableStreamDefaultWriter"),Nh(t,"First parameter"),xh(t))throw new h("This stream has already been locked for exclusive writing by another writer");this.ed=t,t.mo=this;var n,i=t.we;if("writable"===i)!Mh(t)&&t.Yv?da(this):ba(this),aa(this);else if("erroring"===i)wa(this,t.rv),aa(this);else if("closed"===i)ba(this),aa(n=this),la(n);else{var e=t.rv;wa(this,e),ca(this,e)}}return a.defineProperty(t.prototype,"closed",{get:function(){return Vh(this)?this.Ba:xs(fa("closed"))},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Vh(this))throw fa("desiredSize");if(void 0===this.ed)throw ha("desiredSize");return function(t){var n=t.ed,i=n.we;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return na(n.Xv)}(this)},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"ready",{get:function(){return Vh(this)?this.rd:xs(fa("ready"))},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){return void 0===t&&(t=void 0),Vh(this)?void 0===this.ed?xs(ha("abort")):function(t,n){return Bh(t.ed,n)}(this,t):xs(fa("abort"))},t.prototype.close=function(){if(!Vh(this))return xs(fa("close"));var t=this.ed;return void 0===t?xs(ha("close")):Mh(t)?xs(new h("Cannot close an already-closing stream")):Hh(this)},t.prototype.releaseLock=function(){if(!Vh(this))throw fa("releaseLock");void 0!==this.ed&&Yh(this)},t.prototype.write=function(t){return void 0===t&&(t=void 0),Vh(this)?void 0===this.ed?xs(ha("write to")):Kh(this,t):xs(fa("write"))},t}();function Vh(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"ed")&&t instanceof jh)}function Hh(t){return Fh(t.ed)}function Xh(t,n){"pending"===t.ud?va(t,n):function(t,n){ca(t,n)}(t,n)}function Gh(t,n){"pending"===t.od?ga(t,n):function(t,n){wa(t,n)}(t,n)}function Yh(t){var n=t.ed,i=new h("Writer was released and can no longer be used to monitor the stream's closedness");Gh(t,i),Xh(t,i),n.mo=void 0,t.ed=void 0}function Kh(t,n){var i=t.ed,e=i.Xv,r=function(t,n){try{return t.hd(n)}catch(n){return ea(t,n),1}}(e,n);if(i!==t.ed)return xs(ha("write to"));var o=i.we;if("errored"===o)return xs(i.rv);if(Mh(i)||"closed"===o)return xs(new h("The stream is closing or closed and cannot be written to"));if("erroring"===o)return xs(i.rv);var u=function(t){return Ds(function(n,i){var e={Uu:n,Hu:i};t.zv.push(e)})}(i);return function(t,n,i){try{Lf(t,n,i)}catch(n){return void ea(t,n)}var e=t.fd;if(!Mh(e)&&"writable"===e.we){var r=ra(t);qh(e,r)}ia(t)}(e,n,r),u}a.defineProperties(jh.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(jh.prototype,Is.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var Qh={},$h=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"abortReason",{get:function(){if(!Jh(this))throw sa("abortReason");return this.Kv},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"signal",{get:function(){if(!Jh(this))throw sa("signal");if(void 0===this.Zv)throw new h("WritableStreamDefaultController.prototype.signal is not supported");return this.Zv.signal},enumerable:!1,configurable:!0}),t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Jh(this))throw sa("error");"writable"===this.fd.we&&oa(this,t)},t.prototype[Zs]=function(t){var n=this.vd(t);return ta(this),n},t.prototype[tf]=function(){zf(this)},t}();function Jh(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"fd")&&t instanceof $h)}function Zh(t,n,i,e,r,o,u,s){n.fd=t,t.Xv=n,n.Ev=void 0,n.Iv=void 0,zf(n),n.Kv=void 0,n.Zv=function(){if(Oh)return new AbortController}(),n.Lv=!1,n.hd=s,n.Vv=u,n.dd=e,n.ld=r,n.vd=o;var f=ra(n);qh(t,f),Fs(Cs(i()),function(){n.Lv=!0,ia(n)},function(i){n.Lv=!0,Lh(t,i)})}function ta(t){t.dd=void 0,t.ld=void 0,t.vd=void 0,t.hd=void 0}function na(t){return t.Vv-t.Iv}function ia(t){var n=t.fd;if(t.Lv&&void 0===n.Wv)if("erroring"!==n.we){if(0!==t.Ev.length){var i=t.Ev.peek().value;i===Qh?function(t){var n=t.fd;(function(t){t.Gv=t.qv,t.qv=void 0})(n),Ff(t);var i=t.ld();ta(t),Fs(i,function(){!function(t){t.Gv.Uu(void 0),t.Gv=void 0,"erroring"===t.we&&(t.rv=void 0,void 0!==t.Qv&&(t.Qv.Uu(),t.Qv=void 0)),t.we="closed";var n=t.mo;void 0!==n&&la(n)}(n)},function(t){!function(t,n){t.Gv.Hu(n),t.Gv=void 0,void 0!==t.Qv&&(t.Qv.Hu(n),t.Qv=void 0),Lh(t,n)}(n,t)})}(t):function(t,n){var i=t.fd;(function(t){t.Wv=t.zv.shift()})(i),Fs(t.dd(n),function(){!function(t){t.Wv.Uu(void 0),t.Wv=void 0}(i);var n=i.we;if(Ff(t),!Mh(i)&&"writable"===n){var e=ra(t);qh(i,e)}ia(t)},function(n){"writable"===i.we&&ta(t),function(t,n){t.Wv.Hu(n),t.Wv=void 0,Lh(t,n)}(i,n)})}(t,i)}}else Uh(n)}function ea(t,n){"writable"===t.fd.we&&oa(t,n)}function ra(t){return na(t)<=0}function oa(t,n){var i=t.fd;ta(t),zh(i,n)}function ua(t){return new h("WritableStream.prototype."+t+" can only be used on a WritableStream")}function sa(t){return new h("WritableStreamDefaultController.prototype."+t+" can only be used on a WritableStreamDefaultController")}function fa(t){return new h("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function ha(t){return new h("Cannot "+t+" a stream using a released writer")}function aa(t){t.Ba=Ds(function(n,i){t.uv=n,t.ov=i,t.ud="pending"})}function ca(t,n){aa(t),va(t,n)}function va(t,n){void 0!==t.ov&&(Ms(t.Ba),t.ov(n),t.uv=void 0,t.ov=void 0,t.ud="rejected")}function la(t){void 0!==t.uv&&(t.uv(void 0),t.uv=void 0,t.ov=void 0,t.ud="resolved")}function da(t){t.rd=Ds(function(n,i){t._d=n,t.wd=i}),t.od="pending"}function wa(t,n){da(t),ga(t,n)}function ba(t){da(t),ma(t)}function ga(t,n){void 0!==t.wd&&(Ms(t.rd),t.wd(n),t._d=void 0,t.wd=void 0,t.od="rejected")}function ma(t){void 0!==t._d&&(t._d(void 0),t._d=void 0,t.wd=void 0,t.od="fulfilled")}a.defineProperties($h.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty($h.prototype,Is.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var pa="undefined"!=typeof DOMException?DOMException:void 0;var ya,_a=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(pa)?pa:((ya=function(t,n){this.message=t||"",this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=a.create(f.prototype),a.defineProperty(ya.prototype,"constructor",{value:ya,writable:!0,configurable:!0}),ya);function Sa(t,n,i,e,r,o){var u=wf(t),s=Ah(n);t.wv=!0;var f=!1,a=Cs(void 0);return Ds(function(c,v){var l,d,w,b;if(void 0!==o){if(l=function(){var i=new _a("Aborted","AbortError"),o=[];e||o.push(function(){return"writable"===n.we?Bh(n,i):Cs(void 0)}),r||o.push(function(){return"readable"===t.we?Ya(t,i):Cs(void 0)}),y(function(){return j.all(o.map(function(t){return t()}))},!0,i)},o.aborted)return void l();o.addEventListener("abort",l)}if(p(t,u.Ba,function(t){e?_(!0,t):y(function(){return Bh(n,t)},!0,t)}),p(n,s.Ba,function(n){r?_(!0,n):y(function(){return Ya(t,n)},!0,n)}),d=t,w=u.Ba,b=function(){i?_():y(function(){return function(t){var n=t.ed,i=n.we;return Mh(n)||"closed"===i?Cs(void 0):"errored"===i?xs(n.rv):Hh(t)}(s)})},"closed"===d.we?b():Ls(w,b),Mh(n)||"closed"===n.we){var g=new h("the destination writable stream closed before all data could be piped to it");r?_(!0,g):y(function(){return Ya(t,g)},!0,g)}function m(){var t=a;return Bs(a,function(){return t!==a?m():void 0})}function p(t,n,i){"errored"===t.we?i(t.rv):zs(n,i)}function y(t,i,e){function r(){Fs(t(),function(){return S(i,e)},function(t){return S(!0,t)})}f||(f=!0,"writable"!==n.we||Mh(n)?r():Ls(m(),r))}function _(t,i){f||(f=!0,"writable"!==n.we||Mh(n)?S(t,i):Ls(m(),function(){return S(t,i)}))}function S(t,n){Yh(s),Gs(u),void 0!==o&&o.removeEventListener("abort",l),t?v(n):c(void 0)}Ms(Ds(function(t,n){!function i(e){e?t():Bs(f?Cs(!0):Bs(s.rd,function(){return Ds(function(t,n){Tf(u,{vv:function(n){a=Bs(Kh(s,n),void 0,Ts),t(!1)},fv:function(){return t(!0)},_v:n})})}),i,n)}(!1)}))})}var Ia=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Ta(this))throw xa("desiredSize");return Aa(this)},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(!Ta(this))throw xa("close");if(!Da(this))throw new h("The stream is not in a state that permits close");Na(this)},t.prototype.enqueue=function(t){if(void 0===t&&(t=void 0),!Ta(this))throw xa("enqueue");if(!Da(this))throw new h("The stream is not in a state that permits enqueue");return Oa(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Ta(this))throw xa("error");Pa(this,t)},t.prototype[nf]=function(t){zf(this);var n=this.Pv(t);return Ra(this),n},t.prototype[ef]=function(t){var n=this.md;if(this.Ev.length>0){var i=Ff(this);this.Dv&&0===this.Ev.length?(Ra(this),Ka(n)):Ea(this),t.vv(i)}else bf(n,t),Ea(this)},t}();function Ta(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"md")&&t instanceof Ia)}function Ea(t){ka(t)&&(t.Mv?t.xv=!0:(t.Mv=!0,Fs(t.Fv(),function(){t.Mv=!1,t.xv&&(t.xv=!1,Ea(t))},function(n){Pa(t,n)})))}function ka(t){var n=t.md;return!!Da(t)&&(!!t.Lv&&(!!(Ga(n)&&mf(n)>0)||Aa(t)>0))}function Ra(t){t.Fv=void 0,t.Pv=void 0,t.hd=void 0}function Na(t){if(Da(t)){var n=t.md;t.Dv=!0,0===t.Ev.length&&(Ra(t),Ka(n))}}function Oa(t,n){if(Da(t)){var i=t.md;if(Ga(i)&&mf(i)>0)gf(i,n,!1);else{var e=void 0;try{e=t.hd(n)}catch(n){throw Pa(t,n),n}try{Lf(t,n,e)}catch(n){throw Pa(t,n),n}}Ea(t)}}function Pa(t,n){var i=t.md;"readable"===i.we&&(zf(t),Ra(t),Qa(i,n))}function Aa(t){var n=t.md.we;return"errored"===n?null:"closed"===n?0:t.Vv-t.Iv}function Da(t){var n=t.md.we;return!t.Dv&&"readable"===n}function Ca(t,n,i,e,r,o,u){n.md=t,n.Ev=void 0,n.Iv=void 0,zf(n),n.Lv=!1,n.Dv=!1,n.xv=!1,n.Mv=!1,n.hd=u,n.Vv=o,n.Fv=e,n.Pv=r,t.mv=n,Fs(Cs(i()),function(){n.Lv=!0,Ea(n)},function(t){Pa(n,t)})}function xa(t){return new h("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}function Ba(t,n){return Wf(t.mv)?function(t){var n,i,e,r,o,u=wf(t),s=!1,f=!1,h=!1,a=!1,c=!1,v=Ds(function(t){o=t});function l(t){zs(t.Ba,function(n){t===u&&(rh(e.mv,n),rh(r.mv,n),a&&c||o(void 0))})}function d(){gh(u)&&(Gs(u),l(u=wf(t)));var n={vv:function(n){Ws(function(){f=!1,h=!1;var i=n,u=n;if(!a&&!c)try{u=Bf(n)}catch(n){return rh(e.mv,n),rh(r.mv,n),void o(Ya(t,n))}a||eh(e.mv,i),c||eh(r.mv,u),s=!1,f?b():h&&g()})},fv:function(){s=!1,a||ih(e.mv),c||ih(r.mv),e.mv.Bv.length>0&&sh(e.mv,0),r.mv.Bv.length>0&&sh(r.mv,0),a&&c||o(void 0)},_v:function(){s=!1}};Tf(u,n)}function w(n,i){If(u)&&(Gs(u),l(u=vh(t)));var v=i?r:e,d=i?e:r,w={vv:function(n){Ws(function(){f=!1,h=!1;var e=i?c:a,r=i?a:c;if(r)e||fh(v.mv,n);else{var u=void 0;try{u=Bf(n)}catch(n){return rh(v.mv,n),rh(d.mv,n),void o(Ya(t,n))}e||fh(v.mv,n),eh(d.mv,u)}s=!1,f?b():h&&g()})},fv:function(t){s=!1;var n=i?c:a,e=i?a:c;n||ih(v.mv),e||ih(d.mv),void 0!==t&&(n||fh(v.mv,t),!e&&d.mv.Bv.length>0&&sh(d.mv,0)),n&&e||o(void 0)},_v:function(){s=!1}};mh(u,n,w)}function b(){if(s)return f=!0,Cs(void 0);s=!0;var t=oh(e.mv);return null===t?d():w(t.Rv,!1),Cs(void 0)}function g(){if(s)return h=!0,Cs(void 0);s=!0;var t=oh(r.mv);return null===t?d():w(t.Rv,!0),Cs(void 0)}function m(){}return e=Va(m,b,function(e){if(a=!0,n=e,c){var r=Af([n,i]),u=Ya(t,r);o(u)}return v}),r=Va(m,g,function(e){if(c=!0,i=e,a){var r=Af([n,i]),u=Ya(t,r);o(u)}return v}),l(u),[e,r]}(t):function(t,n){var i,e,r,o,u,s=wf(t),f=!1,h=!1,a=!1,c=!1,v=Ds(function(t){u=t});function l(){if(f)return h=!0,Cs(void 0);f=!0;var t={vv:function(t){Ws(function(){h=!1;var n=t,i=t;a||Oa(r.mv,n),c||Oa(o.mv,i),f=!1,h&&l()})},fv:function(){f=!1,a||Na(r.mv),c||Na(o.mv),a&&c||u(void 0)},_v:function(){f=!1}};return Tf(s,t),Cs(void 0)}function d(){}return r=ja(d,l,function(n){if(a=!0,i=n,c){var r=Af([i,e]),o=Ya(t,r);u(o)}return v}),o=ja(d,l,function(n){if(c=!0,e=n,a){var r=Af([i,e]),o=Ya(t,r);u(o)}return v}),zs(s.Ba,function(t){Pa(r.mv,t),Pa(o.mv,t),a&&c||u(void 0)}),[r,o]}(t)}function Fa(t,n,i){return sf(t,i),function(i){return js(t,n,[i])}}function La(t,n,i){return sf(t,i),function(i){return js(t,n,[i])}}function za(t,n,i){return sf(t,i),function(i){return qs(t,n,[i])}}function Ua(t,n){if("bytes"!==(t=""+t))throw new h(n+" '"+t+"' is not a valid enumeration value for ReadableStreamType");return t}function Ma(t,n){if("byob"!==(t=""+t))throw new h(n+" '"+t+"' is not a valid enumeration value for ReadableStreamReaderMode");return t}function Wa(t,n){uf(t,n);var i=null==t?void 0:t.preventAbort,e=null==t?void 0:t.preventCancel,r=null==t?void 0:t.preventClose,o=null==t?void 0:t.signal;return void 0!==o&&function(t,n){if(!function(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}(t))throw new h(n+" is not an AbortSignal.")}(o,n+" has member 'signal' that"),{preventAbort:Boolean(i),preventCancel:Boolean(e),preventClose:Boolean(r),signal:o}}a.defineProperties(Ia.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(Ia.prototype,Is.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var qa=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),void 0===t?t=null:ff(t,"First parameter");var i=Sh(n,"Second parameter"),e=function(t,n){uf(t,n);var i=t,e=null==i?void 0:i.autoAllocateChunkSize,r=null==i?void 0:i.cancel,o=null==i?void 0:i.pull,u=null==i?void 0:i.start,s=null==i?void 0:i.type;return{autoAllocateChunkSize:void 0===e?void 0:lf(e,n+" has member 'autoAllocateChunkSize' that"),cancel:void 0===r?void 0:Fa(r,i,n+" has member 'cancel' that"),pull:void 0===o?void 0:La(o,i,n+" has member 'pull' that"),start:void 0===u?void 0:za(u,i,n+" has member 'start' that"),type:void 0===s?void 0:Ua(s,n+" has member 'type' that")}}(t,"First parameter");if(Ha(this),"bytes"===e.type){if(void 0!==i.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(t,n,i){var e=a.create(Mf.prototype),r=function(){},o=function(){return Cs(void 0)},u=function(){return Cs(void 0)};void 0!==n.start&&(r=function(){return n.start(e)}),void 0!==n.pull&&(o=function(){return n.pull(e)}),void 0!==n.cancel&&(u=function(t){return n.cancel(t)});var s=n.autoAllocateChunkSize;if(0===s)throw new h("autoAllocateChunkSize must be greater than 0");hh(t,e,r,o,u,i,s)}(this,e,yh(i,0))}else{var r=_h(i);!function(t,n,i,e){var r=a.create(Ia.prototype),o=function(){},u=function(){return Cs(void 0)},s=function(){return Cs(void 0)};void 0!==n.start&&(o=function(){return n.start(r)}),void 0!==n.pull&&(u=function(){return n.pull(r)}),void 0!==n.cancel&&(s=function(t){return n.cancel(t)}),Ca(t,r,o,u,s,i,e)}(this,e,yh(i,1),r)}}return a.defineProperty(t.prototype,"locked",{get:function(){if(!Xa(this))throw $a("locked");return Ga(this)},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),Xa(this)?Ga(this)?xs(new h("Cannot cancel a stream that already has a reader")):Ya(this,t):xs($a("cancel"))},t.prototype.getReader=function(t){if(void 0===t&&(t=void 0),!Xa(this))throw $a("getReader");return void 0===function(t,n){uf(t,n);var i=null==t?void 0:t.mode;return{mode:void 0===i?void 0:Ma(i,n+" has member 'mode' that")}}(t,"First parameter").mode?wf(this):vh(this)},t.prototype.pipeThrough=function(t,n){if(void 0===n&&(n={}),!Xa(this))throw $a("pipeThrough");hf(t,1,"pipeThrough");var i=function(t,n){uf(t,n);var i=null==t?void 0:t.readable;af(i,"readable","ReadableWritablePair"),df(i,n+" has member 'readable' that");var e=null==t?void 0:t.writable;return af(e,"writable","ReadableWritablePair"),Nh(e,n+" has member 'writable' that"),{readable:i,writable:e}}(t,"First parameter"),e=Wa(n,"Second parameter");if(Ga(this))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(xh(i.writable))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Ms(Sa(this,i.writable,e.preventClose,e.preventAbort,e.preventCancel,e.signal)),i.readable},t.prototype.pipeTo=function(t,n){if(void 0===n&&(n={}),!Xa(this))return xs($a("pipeTo"));if(void 0===t)return xs("Parameter 1 is required in 'pipeTo'.");if(!Ch(t))return xs(new h("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var i;try{i=Wa(n,"Second parameter")}catch(t){return xs(t)}return Ga(this)?xs(new h("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):xh(t)?xs(new h("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Sa(this,t,i.preventClose,i.preventAbort,i.preventCancel,i.signal)},t.prototype.tee=function(){if(!Xa(this))throw $a("tee");return Af(Ba(this))},t.prototype.values=function(t){if(void 0===t&&(t=void 0),!Xa(this))throw $a("values");var n,i,e,r,o,u=function(t,n){uf(t,n);var i=null==t?void 0:t.preventCancel;return{preventCancel:Boolean(i)}}(t,"First parameter");return n=this,i=u.preventCancel,e=wf(n),r=new kf(e,i),(o=a.create(Rf)).Sv=r,o},t}();function ja(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=a.create(qa.prototype);return Ha(o),Ca(o,a.create(Ia.prototype),t,n,i,e,r),o}function Va(t,n,i){var e=a.create(qa.prototype);return Ha(e),hh(e,a.create(Mf.prototype),t,n,i,0,void 0),e}function Ha(t){t.we="readable",t.ev=void 0,t.rv=void 0,t.wv=!1}function Xa(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"mv")&&t instanceof qa)}function Ga(t){return void 0!==t.ev}function Ya(t,n){if(t.wv=!0,"closed"===t.we)return Cs(void 0);if("errored"===t.we)return xs(t.rv);Ka(t);var i=t.ev;return void 0!==i&&gh(i)&&(i.Uv.forEach(function(t){t.fv(void 0)}),i.Uv=new Vs),Us(t.mv[nf](n),Ts)}function Ka(t){t.we="closed";var n=t.ev;void 0!==n&&(Js(n),If(n)&&(n.hv.forEach(function(t){t.fv()}),n.hv=new Vs))}function Qa(t,n){t.we="errored",t.rv=n;var i=t.ev;void 0!==i&&($s(i,n),If(i)?(i.hv.forEach(function(t){t._v(n)}),i.hv=new Vs):(i.Uv.forEach(function(t){t._v(n)}),i.Uv=new Vs))}function $a(t){return new h("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}function Ja(t,n){uf(t,n);var i=null==t?void 0:t.highWaterMark;return af(i,"highWaterMark","QueuingStrategyInit"),{highWaterMark:cf(i)}}a.defineProperties(qa.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(qa.prototype,Is.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof Is.asyncIterator&&a.defineProperty(qa.prototype,Is.asyncIterator,{value:qa.prototype.values,writable:!0,configurable:!0});var Za=function(t){return t.byteLength};try{a.defineProperty(Za,"name",{value:"size",configurable:!0})}catch(q){}var tc=function(){function t(t){hf(t,1,"ByteLengthQueuingStrategy"),t=Ja(t,"First parameter"),this.yd=t.highWaterMark}return a.defineProperty(t.prototype,"highWaterMark",{get:function(){if(!ic(this))throw nc("highWaterMark");return this.yd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"size",{get:function(){if(!ic(this))throw nc("size");return Za},enumerable:!1,configurable:!0}),t}();function nc(t){return new h("ByteLengthQueuingStrategy.prototype."+t+" can only be used on a ByteLengthQueuingStrategy")}function ic(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"yd")&&t instanceof tc)}a.defineProperties(tc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(tc.prototype,Is.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var ec=function(){return 1};try{a.defineProperty(ec,"name",{value:"size",configurable:!0})}catch(q){}var rc=function(){function t(t){hf(t,1,"CountQueuingStrategy"),t=Ja(t,"First parameter"),this.kd=t.highWaterMark}return a.defineProperty(t.prototype,"highWaterMark",{get:function(){if(!uc(this))throw oc("highWaterMark");return this.kd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"size",{get:function(){if(!uc(this))throw oc("size");return ec},enumerable:!1,configurable:!0}),t}();function oc(t){return new h("CountQueuingStrategy.prototype."+t+" can only be used on a CountQueuingStrategy")}function uc(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"kd")&&t instanceof rc)}function sc(t,n,i){return sf(t,i),function(i){return js(t,n,[i])}}function fc(t,n,i){return sf(t,i),function(i){return qs(t,n,[i])}}function hc(t,n,i){return sf(t,i),function(i,e){return js(t,n,[i,e])}}a.defineProperties(rc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(rc.prototype,Is.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var ac=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={}),void 0===t&&(t=null);var e=Sh(n,"Second parameter"),r=Sh(i,"Third parameter"),o=function(t,n){uf(t,n);var i=null==t?void 0:t.flush,e=null==t?void 0:t.readableType,r=null==t?void 0:t.start,o=null==t?void 0:t.transform,u=null==t?void 0:t.writableType;return{flush:void 0===i?void 0:sc(i,t,n+" has member 'flush' that"),readableType:e,start:void 0===r?void 0:fc(r,t,n+" has member 'start' that"),transform:void 0===o?void 0:hc(o,t,n+" has member 'transform' that"),writableType:u}}(t,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");var u,s=yh(r,0),f=_h(r),h=yh(e,1),c=_h(e);!function(t,n,i,e,r,o){function u(){return n}t.pd=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=a.create(Ph.prototype);return Dh(u),Zh(u,a.create($h.prototype),t,n,i,e,r,o),u}(u,function(n){return function(t,n){var i=t.bd;if(t.Yv){var e=t.Td;return Us(e,function(){var e=t.pd,r=e.we;if("erroring"===r)throw e.rv;return yc(i,n)})}return yc(i,n)}(t,n)},function(){return function(t){var n=t.Sd,i=t.bd,e=i.Ed();return mc(i),Us(e,function(){if("errored"===n.we)throw n.rv;Na(n.mv)},function(i){throw vc(t,i),n.rv})}(t)},function(n){return function(t,n){return vc(t,n),Cs(void 0)}(t,n)},i,e),t.Sd=ja(u,function(){return function(t){return dc(t,!1),t.Td}(t)},function(n){return lc(t,n),Cs(void 0)},r,o),t.Yv=void 0,t.Td=void 0,t.Id=void 0,dc(t,!0),t.bd=void 0}(this,Ds(function(t){u=t}),h,c,s,f),function(t,n){var i=a.create(bc.prototype),e=function(t){try{return pc(i,t),Cs(void 0)}catch(t){return xs(t)}},r=function(){return Cs(void 0)};void 0!==n.transform&&(e=function(t){return n.transform(t,i)});void 0!==n.flush&&(r=function(){return n.flush(i)});!function(t,n,i,e){n.Rd=t,t.bd=n,n.Nd=i,n.Ed=e}(t,i,e,r)}(this,o),void 0!==o.start?u(o.start(this.bd)):u(void 0)}return a.defineProperty(t.prototype,"readable",{get:function(){if(!cc(this))throw Sc("readable");return this.Sd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"writable",{get:function(){if(!cc(this))throw Sc("writable");return this.pd},enumerable:!1,configurable:!0}),t}();function cc(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"bd")&&t instanceof ac)}function vc(t,n){Pa(t.Sd.mv,n),lc(t,n)}function lc(t,n){mc(t.bd),ea(t.pd.Xv,n),t.Yv&&dc(t,!1)}function dc(t,n){void 0!==t.Td&&t.Id(),t.Td=Ds(function(n){t.Id=n}),t.Yv=n}a.defineProperties(ac.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(ac.prototype,Is.toStringTag,{value:"TransformStream",configurable:!0});var wc,bc=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!gc(this))throw _c("desiredSize");return Aa(this.Rd.Sd.mv)},enumerable:!1,configurable:!0}),t.prototype.enqueue=function(t){if(void 0===t&&(t=void 0),!gc(this))throw _c("enqueue");pc(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!gc(this))throw _c("error");var n;n=t,vc(this.Rd,n)},t.prototype.terminate=function(){if(!gc(this))throw _c("terminate");!function(t){var n=t.Rd;Na(n.Sd.mv);var i=new h("TransformStream terminated");lc(n,i)}(this)},t}();function gc(t){return!!ks(t)&&(!!a.prototype.hasOwnProperty.call(t,"Rd")&&t instanceof bc)}function mc(t){t.Nd=void 0,t.Ed=void 0}function pc(t,n){var i=t.Rd,e=i.Sd.mv;if(!Da(e))throw new h("Readable side is not in a state that permits enqueue");try{Oa(e,n)}catch(t){throw lc(i,t),i.Sd.rv}(function(t){return!ka(t)})(e)!==i.Yv&&dc(i,!0)}function yc(t,n){return Us(t.Nd(n),void 0,function(n){throw vc(t.Rd,n),n})}function _c(t){return new h("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function Sc(t){return new h("TransformStream.prototype."+t+" can only be used on a TransformStream")}function Ic(t){return n=[t],new qa({start:function(t){for(var i=0;i<n.length;i++){var e=n[i];t.enqueue(e)}t.close()}});var n}function Tc(t){return Ic(new w(t))}function Ec(t,n){return function(t,n){var i=n,e=t.getReader(),r=new _o,o=function(){u();var t=new un;e.cancel(t).catch(lt),r.Xu(t)},u=function(){i&&(i.Ls(o),i=void 0)};i&&(i.Rs?o():i.Bs(o));var s=[];return j.resolve(e.read()).then(function t(n){return n.done?(u(),j.resolve(s)):(s.push(n.value),j.resolve(e.read()).then(t))}).then(function(t){u(),r.Vu(t)},function(t){u(),r.Xu(t)}),r.Fu}(t,n).then(function(t){return Ln(t).buffer})}function kc(t,n){var i=n,e=new ac,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.Us()};return u.closed.then(s,s),t.then(function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(lt)},function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(lt)}),r}function Rc(t){return Nn(new w(t))}function Nc(t){return On(t).buffer}a.defineProperties(bc.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Is.toStringTag&&a.defineProperty(bc.prototype,Is.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),function(t){t[t.qf=0]="qf",t[t.Cd=1]="Cd"}(wc||(wc={}));var Oc="content-type",Pc="text/plain;charset=UTF-8",Ac=function(){function t(){}var n=t.prototype;return n.Pd=function(t){return this.Od(t).then(JSON.parse)},n.Bd=function(t,n){switch(t){case ps.zf:return this.Ld(n);case ps.Wf:return this.Pd(n);case ps.qf:return this.Md();case ps.Zn:return this.Od(n);default:throw new h}},t}();function Dc(t,n,i){if(t instanceof Ac)return t;if(t instanceof qa)return function(t,n){return new xc({us:wc.qf,Md:t,xd:Cc(n)})}(t,i);var e=Cc(i),r=j.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{us:ps.Zn,Fd:t,xd:n||Pc};if(t instanceof ArrayBuffer||Fn(t))return{us:ps.zf,Fd:Wc(t),xd:n};if(et(i=t)&&i.constructor&&i.constructor===a||it(t))return{us:ps.Wf,Fd:t,xd:n};throw new h("Unsupported BodyInit type")}return{us:ps.Zn,Fd:null,xd:n};var i}(t,e)});return new xc({us:wc.Cd,Fu:r,Ud:n})}function Cc(t){return(t.get(Oc)||"").toLowerCase()}var xc=function(t){function n(n){var i;return(i=t.call(this)||this).Hd=!1,i.Vd=void 0,i.Xd=new _o,i.Xd.Fu.catch(lt),i.zd(n),i}Ut(n,t);var i=n.prototype;return i.Wd=function(){return this.Xd.Fu},i.Od=function(t){return this.qd(Bc,t)},i.Pd=function(t){return this.qd(Lc,t)},i.Ld=function(t){return this.qd(Uc,t)},i.Md=function(){return this.Gd((t=this.Vd).us===wc.qf?t.Md:kc(t.Fu.then(Mc).then(Tc),t.Ud));var t},i.qd=function(t,n){if(this.Hd)return j.reject(new h("Already used"));this.Hd=!0;var i=t(this.Vd,n);return this.Xd.Vu(i.then(lt)),i},i.Gd=function(t){if(this.Hd)throw new h("Already used");if(t.locked)throw new h("Body stream is locked");this.Hd=!0;var n=new ac,i=j.resolve(t.pipeTo(n.writable));return this.Xd.Vu(i),n.readable},i.zd=function(t){this.Vd=t,t.us===wc.Cd&&t.Fu.catch(lt)},i.Qd=function(){if(this.Hd)throw new h("Already used");var t=function(t){if(t.us===wc.qf){var n=t.Md.tee(),i=n[0],e=n[1];return[{us:t.us,Md:i,xd:t.xd},{us:t.us,Md:e,xd:t.xd}]}var r=t.Ud.Vs(),o=r[0],u=r[1];return[{us:t.us,Fu:t.Fu,Ud:o},{us:t.us,Fu:t.Fu,Ud:u}]}(this.Vd),i=t[0],e=t[1];return this.zd(i),new n(e)},mt(n,[{key:"Yd",get:function(){return this.Hd}}]),n}(Ac);function Bc(t,n){return t.us===wc.qf?Ec(t.Md,n).then(Rc):(n&&t.Ud.Hs(n),fn(t.Fu.then(Fc),t.Ud))}function Fc(t){switch(t.us){case ps.Zn:return j.resolve(t.Fd||"");case ps.zf:return j.resolve(t.Fd).then(Rc);case ps.Wf:return j.resolve(t.Fd).then(JSON.stringify)}}function Lc(t,n){return t.us===wc.qf?Bc(t,n).then(JSON.parse):(n&&t.Ud.Hs(n),fn(t.Fu.then(zc),t.Ud))}function zc(t){return t.us===ps.Wf?j.resolve(t.Fd):Fc(t).then(JSON.parse)}function Uc(t,n){return t.us===wc.qf?Ec(t.Md,n):(n&&t.Ud.Hs(n),fn(t.Fu.then(Mc),t.Ud))}function Mc(t){switch(t.us){case ps.zf:return j.resolve(t.Fd);case ps.Zn:case ps.Wf:return Fc(t).then(Nc)}}function Wc(t){return t instanceof ArrayBuffer?t:Cn(An(t)).buffer}function qc(t){return t.jd>=200&&t.jd<=299||304===t.jd}var jc,Vc,Hc,Xc,Gc=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.Kd,o=i.Zd,u=i.jd,s=i.Jd,f=i.$d):(r=[],o=ps.Zn,u=200,s="OK",f=!1);var h=n.il,a=new ys(n.Kd||r),c=n.Zd||o,v=n.ul||(i&&i.il===h?i.ul:h.ol),l=i?i.hl:null,d=Dc(void 0!==n.Hi?n.Hi:l,n.Ud||new on,a);return(e=t.call(this,d)||this).Kd=void 0,e.il=void 0,e.ul=void 0,e.Zd=void 0,e.jd=void 0,e.Jd=void 0,e.$d=void 0,e.Kd=a,e.il=h,e.ul=v,e.Zd=c,e.jd=void 0!==n.jd?n.jd:u,e.Jd=void 0!==n.Jd?String(n.Jd):s,e.$d=n.$d||f,e}Ut(n,t);var i=n.prototype;return i.Hi=function(t){return this.Bd(this.Zd,t)},i.Bu=function(){return new n({Hi:this.Qd(),il:this.il},this)},n}(function(t){function n(n){var i;return(i=t.call(this)||this).hl=void 0,i.hl=n,i}Ut(n,t);var i=n.prototype;return i.Wd=function(){return this.hl.Wd()},i.Od=function(t){return this.hl.Od(t)},i.Pd=function(t){return this.hl.Pd(t)},i.Ld=function(t){return this.hl.Ld(t)},i.Md=function(){return this.hl.Md()},i.Qd=function(){return this.hl.Qd()},mt(n,[{key:"Yd",get:function(){return this.hl.Yd}}]),n}(Ac));!function(t){t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT"}(jc||(jc={})),function(t){t.al="",t.cl="manifest",t.fl="segment",t.vl="content-protection"}(Vc||(Vc={})),function(t){t.al="",t.dl="initialization-segment",t.ll="fairplay-license",t._l="fairplay-certificate",t.wl="widevine-license",t.yl="widevine-certificate",t.bl="playready-license",t.Al="clearkey-license",t.Tl="aes128-key"}(Hc||(Hc={})),function(t){t.al="",t.Sl="audio",t.El="video",t.Zn="text",t.Il="image"}(Xc||(Xc={}));var Yc=function(t,n){this.Fd=void 0,this.Kd=void 0,this.Rl=void 0,this.Zd=void 0,this.Nl=void 0,this.Xs=void 0,this.us=void 0,this.Dl=void 0,this.Cl=void 0,this.ol=void 0,this.Pl=void 0,this.Ol=void 0;var i,e,r,o,u,s,f,h,a,c,v,l=t.ol;n?(i=n.Fd,e=n.Kd,r=n.Rl,o=n.Zd,u=n.Nl,s=n.Xs,f=n.us,h=n.Dl,a=n.Cl,c=n.Pl,v=n.Ol):(i=null,e={},r=jc.GET,o=ps.Zn,u=0,f=Vc.al,h=Hc.al,a=Xc.al,c=!1),this.ol=l,this.Fd=t.Fd||i,this.Kd=new ys(t.Kd||e),this.Rl=t.Rl||r,this.Zd=t.Zd||o,this.Nl=void 0!==t.Nl?Number(t.Nl)||0:u,this.Xs=t.Xs||s||(new on).Xs,this.us=t.us||f,this.Dl=t.Dl||h,this.Cl=t.Cl||a,this.Pl=void 0!==t.Pl?Boolean(t.Pl):c,this.Ol=t.Ol||v},Kc=function(){function t(){}var n=t.prototype;return n.il=function(t){var n=function(t){return new Gc({Hi:null,Kd:{},il:t,ul:t.ol,Zd:t.Zd,jd:0,Jd:ms.bf})}(new Yc(t));return j.resolve(n)},n.Bl=function(t){},n.Ll=function(){},t}();var Qc,$c=function(){function t(t,n){void 0===n&&(n=!0),this.Ml=void 0,this.xl=void 0,this.Ml=t,this.xl=n}var n=t.prototype;return n.il=function(t){var n=this.Fl(t);return this.Ml.il(n)},n.Bl=function(t){return this.Ml.Bl(this.Ul(t))},n.Fl=function(n){var i=new Yc(n);if(!this.xl){var e=t.Hl(i.ol);i=new Yc({ol:e},i)}return i},n.Ul=function(n){var i=n.ol;return this.xl||(i=t.Hl(i)),{ol:i,Fd:n.Fd}},t.Hl=function(t){return J.Ur&&dn(t,"http://")?t.replace(":","s:"):t},n.Ll=function(){this.Ml.Ll()},mt(t,null,[{key:"Vl",get:function(){return t.Xl||(t.Xl=new t(new Kc)),t.Xl}}]),t}();$c.Xl=void 0,function(t){t.zl="HttpOpenError",t.Wl="HttpResponseError",t.ql="HttpTimeoutError"}(Qc||(Qc={}));var Jc=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).Gl=void 0,r.Gl=n,r}return Ut(n,t),mt(n,[{key:"il",get:function(){return this.Gl}}]),n}(en);var Zc=function(t){function n(n,i){return t.call(this,n,"Error while opening "+n.ol+". Invalid URL.",i)||this}return Ut(n,t),mt(n,[{key:"name",get:function(){return Qc.zl}}]),n}(Jc);var tv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.il,null!=e?e:function(t){return"Error while loading "+t.il.ol+", status code "+t.jd}(n),i)||this).Ql=void 0,r.Ql=n,r}return Ut(n,t),mt(n,[{key:"name",get:function(){return Qc.Wl}},{key:"Yl",get:function(){return this.Ql}}]),n}(Jc);var nv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.ol+" timed out after "+t.Nl+" seconds."}(n),i)||this}return Ut(n,t),mt(n,[{key:"name",get:function(){return Qc.ql}}]),n}(Jc),iv=function(t,n){return(iv=a.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(t,n)};function ev(t,n){function i(){this.constructor=t}iv(t,n),t.prototype=null===n?a.create(n):(i.prototype=n.prototype,new i)}var rv="object"==typeof n?n:"object"==typeof t?t:"object"==typeof global?global:null;var ov=function(){var t=rv.Blob;if(t)try{return new t,function(t,n){return new rv.Blob(t,n)}}catch(t){}var n,i=rv.BlobBuilder||rv.WebKitBlobBuilder||rv.MozBlobBuilder||rv.MSBlobBuilder;return i?(n=i,function(t,i){var e=new n;if(t)for(var r=0,o=t;r<o.length;r++){var u=o[r];e.append(u)}return e.getBlob(i&&i.type||"")}):null}(),uv="function"==typeof qa?qa:void 0;function sv(t){return t&&"function"==typeof t.getReader}function fv(t){if("function"!=typeof t)return!1;try{var n=!1,i=new t({start:function(){n=!0}});return!!n&&sv(i)}catch(t){return!1}}var hv=function(){function t(t,n){this.ev=t,this.jl=n}return t.prototype.pull=function(t){var n=this;return this.ev.read().then(function(i){n.jl&&n.jl(i),i.done?t.close():t.enqueue(i.value)})},t.prototype.cancel=function(t){return this.ev.cancel(t)},t}();function av(t,n){return n.constructor===t?n:new t(new hv(n.getReader()),{highWaterMark:0})}var cv=function(){function t(t,n){this.Kl=t,this.Zl=n}return t.prototype.pull=function(t){return this.Kl().then(function(n){t.enqueue(new w(n)),t.close()})},t.prototype.cancel=function(t){this.Zl&&this.Zl(t)},t}();function vv(t,n,i){return new t(new cv(n,i),{highWaterMark:0})}var lv={searchParams:"URLSearchParams"in rv,iterable:"Symbol"in rv&&"iterator"in Symbol,blob:"FileReader"in rv&&!!ov,formData:"FormData"in rv,arrayBuffer:"ArrayBuffer"in rv,stream:fv(uv),streamRequest:"Request"in rv&&"body"in rv.Request.prototype,streamResponse:"Response"in rv&&"body"in rv.Response.prototype,abort:"AbortController"in rv&&"Request"in rv&&"signal"in rv.Request.prototype,encoding:"TextEncoder"in rv&&"TextDecoder"in rv,url:"URL"in rv&&function(t){try{return new rv.URL(t).toString()===t}catch(t){return!1}}("http://example.com/"),firefox:"navigator"in rv&&/Firefox\//.test(rv.navigator.userAgent)};function dv(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new h("Invalid character in header field name");return t}function wv(t){return"string"!=typeof t&&(t=String(t)),t}function bv(t){var n={next:function(){var n=t.shift();return{done:void 0===n,value:n}}};return lv.iterable&&(n[Symbol.iterator]=function(){return n}),n}var gv=function(){function t(t){var n=this;this.Kr={};var i,e=function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)};(i=t)&&"function"==typeof i.forEach?t.forEach(e):!function(t){return lv.iterable&&t&&t[Symbol.iterator]}(t)?t&&a.getOwnPropertyNames(t).forEach(function(i){n.append(i,t[i])}):Array.from(t).forEach(e)}return t.prototype.append=function(t,n){t=dv(t),n=wv(n);var i=t.toLowerCase();if(this.Kr.hasOwnProperty(i)){var e=this.Kr[i],r=e[1];e[1]=r?r+", "+n:n}else this.Kr[i]=[t,n]},t.prototype.delete=function(t){var n=dv(t).toLowerCase();delete this.Kr[n]},t.prototype.get=function(t){var n=dv(t).toLowerCase();return this.Kr.hasOwnProperty(n)?this.Kr[n][1]:null},t.prototype.has=function(t){var n=dv(t).toLowerCase();return this.Kr.hasOwnProperty(n)},t.prototype.set=function(t,n){var i=(t=dv(t)).toLowerCase();this.Kr[i]=[t,wv(n)]},t.prototype.forEach=function(t,n){for(var i in this.Kr)this.Kr.hasOwnProperty(i)&&t.call(n,this.Kr[i][1],i,this)},t.prototype.keys=function(){var t=[];return this.forEach(function(n,i){t.push(i)}),bv(t)},t.prototype.values=function(){var t=[];return this.forEach(function(n){t.push(n)}),bv(t)},t.prototype.entries=function(){var t=[];return this.forEach(function(n,i){t.push([i,n])}),bv(t)},t.prototype.asList=function(){var t=[];for(var n in this.Kr)if(this.Kr.hasOwnProperty(n)){var i=this.Kr[n],e=i[0],r=i[1];t.push([e,r])}return t},t}();function mv(){}lv.iterable&&(gv.prototype[Symbol.iterator]=gv.prototype.entries);var pv,yv,_v,Sv=c.min,Iv=String.fromCharCode,Tv=16384;function Ev(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 function(t){for(var n=t.length,i=[],e=0;e<n;e+=Tv){var r=Sv(e+Tv,n);i.push(Iv.apply(null,t.slice(e,r)))}return i.join("")}(n)}function kv(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Rv(t,n){return t>>n&63|128}function Nv(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(kv(t),n.push(t>>12&15|224),n.push(Rv(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Rv(t,12)),n.push(Rv(t,6))),n.push(63&t|128)):n.push(t)}function Ov(){if(_v>=yv)throw new f("Invalid byte index");var t=255&pv[_v];if(_v++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function Pv(){var t,n;if(_v>yv)throw new f("Invalid byte index");if(_v===yv)return!1;if(t=255&pv[_v],_v++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ov())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ov()<<6|Ov())>=2048)return kv(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ov()<<12|Ov()<<6|Ov())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}var Av=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"];function Dv(t){return t&&URLSearchParams.prototype.isPrototypeOf(t)}function Cv(t){return t&&ArrayBuffer.prototype.isPrototypeOf(t)}function xv(t){return t&&DataView.prototype.isPrototypeOf(t)}var Bv,Fv=ArrayBuffer.isView||function(t){return t&&(Av.indexOf(a.prototype.toString.call(t))>-1||xv(t))};function Lv(t){if(t.bodyUsed)return j.reject(new h("Already used"));t.bodyUsed=!0}function zv(t){return new j(function(n,i){t.onload=function(){n(t.result)},t.onerror=function(){i(t.error)}})}function Uv(t){return lv.encoding?new rv.TextDecoder("utf-8").decode(new w(t)):Ev(function(t){yv=(pv=t).length,_v=0;for(var n,i=[];!1!==(n=Pv());)i.push(n);return i}(new w(t)))}function Mv(t){return lv.encoding?(new rv.TextEncoder).encode(t).buffer:new w(function(t){for(var n=[],i=0,e=t;i<e.length;i++)Nv(e[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))).buffer}function Wv(t){var n=t.getReader(),i=[],e=function(t){var r=t.done,o=t.value;return r?j.resolve(i):(i.push(o),n.read().then(e))};return n.read().then(e)}function qv(t){return Wv(t).then(function(t){return function(t){for(var n=0,i=0,e=t;i<e.length;i++)n+=(f=e[i]).byteLength;for(var r=new w(n),o=0,u=0,s=t;u<s.length;u++){var f=s[u];r.set(f,o),o+=f.byteLength}return r}(t).buffer})}function jv(t){return t.slice?t.slice(0):Vv(new w(t))}function Vv(t){if(t.slice)return t.slice(0).buffer;var n=new w(t.byteLength);return n.set(new w(t.buffer,t.byteOffset,t.byteLength)),n.buffer}function Hv(t){var n=new FormData;return t.trim().split("&").forEach(function(t){if(t){var i=t.split("="),e=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");n.append(decodeURIComponent(e),decodeURIComponent(r))}}),n}function Xv(t){var n=t;if(n.bodyUsed)throw new h("Already used");if(n.Jl===Bv.$l){if(!n.t_.tee)throw new f("could not clone ReadableStream body");var i=n.t_.tee(),e=i[0],r=i[1];return n.body=e,n.t_=e,n.n_=e,r}return n.Jl===Bv.zf?jv(n.t_):n.Jl===Bv.Cd?n.t_.then(Xv):n.n_}!function(t){t[t.Zn=0]="Zn",t[t.i_=1]="i_",t[t.e_=2]="e_",t[t.zf=3]="zf",t[t.$l=4]="$l",t[t.Cd=5]="Cd"}(Bv||(Bv={}));var Gv=function(){function t(n,i){this.bodyUsed=!1;var e,r,o,u=this;if(this.n_=n||null,n)if("string"==typeof n)this.Jl=Bv.Zn,this.t_=n;else if((o=n)&&"function"==typeof o.then)this.Jl=Bv.Cd,this.t_=j.resolve(n).then(function(n){return new t(n,i)}),this.t_.catch(mv);else if(lv.blob&&function(t){return t&&Blob.prototype.isPrototypeOf(t)}(n))this.Jl=Bv.i_,this.t_=n;else if(lv.formData&&function(t){return t&&FormData.prototype.isPrototypeOf(t)}(n))this.Jl=Bv.e_,this.t_=n;else if(lv.searchParams&&Dv(n))this.Jl=Bv.Zn,this.t_=n.toString();else if(lv.arrayBuffer&&(Cv(n)||Fv(n)))xv(n)&&(this.n_=new w((r=n).buffer,r.byteOffset,r.byteLength)),this.Jl=Bv.zf,this.t_=Cv(e=n)?jv(e):Vv(e);else{if(!lv.stream||!sv(n))throw new f("unsupported BodyInit type");n=av(uv,n),this.Jl=Bv.$l,this.t_=n,this.n_=n}else this.Jl=Bv.Zn,this.t_="";this.r_="",i.has("content-type")?this.r_=(i.get("content-type")||"").toLowerCase():("string"==typeof n?this.r_="text/plain;charset=UTF-8":u.Jl===Bv.i_&&u.t_.type?this.r_=u.t_.type:lv.searchParams&&Dv(n)&&(this.r_="application/x-www-form-urlencoded;charset=UTF-8"),this.r_&&i.set("content-type",this.r_)),lv.stream&&(null==n?this.body=null:u.Jl===Bv.$l?this.body=u.t_:this.body=vv(uv,function(){return u.arrayBuffer()},function(){u.bodyUsed=!0}))}return t.prototype.text=function(){var t,n,i,e=Lv(this);return e||(this.Jl===Bv.i_?(t=this.t_,n=new FileReader,i=zv(n),n.readAsText(t),i):this.Jl===Bv.zf?j.resolve(this.t_).then(Uv):this.Jl===Bv.$l?qv(this.t_).then(Uv):this.Jl===Bv.Cd?this.t_.then(function(t){return t.text()}):this.Jl===Bv.e_?j.reject(new f("could not read FormData body as text")):j.resolve(this.t_))},t.prototype.json=function(){return this.text().then(JSON.parse)},t}();lv.blob&&(Gv.prototype.blob=function(){var t,n,i=Lv(this);return i||(this.Jl===Bv.i_?j.resolve(this.t_):this.Jl===Bv.zf?j.resolve(ov([this.t_],{type:this.r_})):this.Jl===Bv.$l?(t=this.t_,n=this.r_,Wv(t).then(function(t){return ov(t,{type:n||""})})):this.Jl===Bv.Cd?this.t_.then(function(t){return t.blob()}):this.Jl===Bv.e_?j.reject(new f("could not read FormData body as Blob")):j.resolve(ov([this.t_],{type:this.r_})))}),lv.arrayBuffer&&(Gv.prototype.arrayBuffer=function(){var t,n,i;return this.Jl===Bv.zf?Lv(this)||j.resolve(this.t_):this.Jl===Bv.i_?Lv(this)||(t=this.t_,n=new FileReader,i=zv(n),n.readAsArrayBuffer(t),i):this.Jl===Bv.$l?qv(this.t_):this.Jl===Bv.Cd?Lv(this)||this.t_.then(function(t){return t.arrayBuffer()}):this.Jl===Bv.e_?j.reject(new f("could not read FormData body as ArrayBuffer")):j.resolve(this.t_).then(Mv)}),lv.formData&&(Gv.prototype.formData=function(){return this.Jl===Bv.e_?Lv(this)||j.resolve(this.t_):this.text().then(Hv)});var Yv=[301,302,303,307,308],Kv=function(t){function n(n,i){var e=this,r=new gv((i=i||{}).headers);return(e=t.call(this,n||null,r)||this).type="default",e.status=void 0===i.status?200:i.status,e.ok=e.status>=200&&e.status<300,e.statusText=void 0!==i.statusText?String(i.statusText):"",e.headers=r,e.url=i.url||"",e}return ev(n,t),n.prototype.clone=function(){return new n(Xv(this),{status:this.status,statusText:this.statusText,headers:new gv(this.headers),url:this.url})},n.error=function(){var t=new n(null,{status:0,statusText:""});return t.type="error",t},n.redirect=function(t,i){if(-1===Yv.indexOf(i))throw new RangeError("Invalid status code");return new n(null,{status:i,headers:{location:t}})},n}(Gv);var Qv,$v=function(t,n){return t(n={exports:{}},n.exports),n.exports}(function(t,n){function e(t,n){if(!(t instanceof n))throw new h("Cannot call a class as a function")}function o(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),a.defineProperty(t,e.key,e)}}function u(t,n,i){return n&&o(t.prototype,n),i&&o(t,i),t}function s(t){return(s=a.setPrototypeOf?a.getPrototypeOf:function(t){return t.__proto__||a.getPrototypeOf(t)})(t)}function f(t,n){return(f=a.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,n,i){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,n,i){var e=function(t,n){for(;!a.prototype.hasOwnProperty.call(t,n)&&null!==(t=s(t)););return t}(t,n);if(e){var r=a.getOwnPropertyDescriptor(e,n);return r.get?r.get.call(i):r.value}})(t,n,i||t)}a.defineProperty(n,"__esModule",{value:!0});var l=function(){function t(){e(this,t),a.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return u(t,[{key:"addEventListener",value:function(t,n){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(n)}},{key:"removeEventListener",value:function(t,n){if(t in this.listeners)for(var i=this.listeners[t],e=0,r=i.length;e<r;e++)if(i[e]===n)return void i.splice(e,1)}},{key:"dispatchEvent",value:function(t){var n=this;if(t.type in this.listeners){for(var i=function(i){r(function(){return i.call(n,t)})},e=this.listeners[t.type],o=0,u=e.length;o<u;o++)i(e[o]);return!t.defaultPrevented}}}]),t}(),d=function(t){function n(){var t,i,r;return e(this,n),i=this,(t=!(r=s(n).call(this))||"object"!=typeof r&&"function"!=typeof r?c(i):r).listeners||l.call(c(t)),a.defineProperty(c(t),"aborted",{value:!1,writable:!0,configurable:!0}),a.defineProperty(c(t),"onabort",{value:null,writable:!0,configurable:!0}),t}return function(t,n){if("function"!=typeof n&&null!==n)throw new h("Super expression must either be null or a function");t.prototype=a.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&f(t,n)}(n,l),u(n,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(t){"abort"===t.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,t)),v(s(n.prototype),"dispatchEvent",this).call(this,t)}}]),n}(),w=function(){function t(){e(this,t),a.defineProperty(this,"signal",{value:new d,writable:!0,configurable:!0})}return u(t,[{key:"abort",value:function(){var t;try{t=new Event("abort")}catch(n){void 0!==i?i.createEvent?(t=i.createEvent("Event")).initEvent("abort",!1,!1):(t=i.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),t}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(w.prototype[Symbol.toStringTag]="AbortController",d.prototype[Symbol.toStringTag]="AbortSignal"),n.AbortSignal=d,n.AbortController=w,n.default=w});(Qv=$v)&&Qv.__esModule&&a.prototype.hasOwnProperty.call(Qv,"default")&&Qv.default;$v.AbortSignal;var Jv=$v.AbortController,Zv=rv.DOMException;try{new Zv}catch(t){(Zv=function(t,n){f.call(this,t),this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=a.create(f.prototype),Zv.prototype.constructor=Zv}var tl=Jv;function nl(t,n){if(!t.signal.aborted)if(n.aborted)t.abort();else{var i=function(){n.removeEventListener("abort",i),t.signal.removeEventListener("abort",i),t.abort()};n.addEventListener("abort",i),t.signal.addEventListener("abort",i)}}function il(t,n,i){return new j(function(e,r){if(n.signal.aborted)return t.catch(mv),r(el());var o=function(){n.signal.removeEventListener("abort",o),r(el())};n.signal.addEventListener("abort",o),t.then(function(t){n.signal.removeEventListener("abort",o),e(t),i&&n.abort()},function(t){n.signal.removeEventListener("abort",o),r(t),i&&n.abort()})})}function el(){return new Zv("Aborted","AbortError")}var rl,ol="moz-chunked-arraybuffer";function ul(t){try{var n=new b;return n.open("GET","https://test"),n.responseType=t,n.responseType===t}catch(t){}return!1}!function(t){t[t.UNSENT=0]="UNSENT",t[t.OPENED=1]="OPENED",t[t.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",t[t.LOADING=3]="LOADING",t[t.DONE=4]="DONE"}(rl||(rl={}));var sl=function(){function t(t,n){var i=this;this.s_=!1,this.Gl=t,this.u_=n,this.o_=new b,this.h_=new j(function(t,n){i.a_=t,i.c_=n})}return t.prototype.send=function(){var t=this;return this.f_().then(function(n){return t.v_(n,t.u_),t.h_})},t.prototype.f_=function(){var t=this.Gl;return t.Jl===Bv.$l?t.arrayBuffer():j.resolve(t.n_)},t.prototype.d_=function(t){this.Gl.onprogress&&this.Gl.onprogress(t.loaded,t.lengthComputable?t.total:void 0)},t.prototype.l_=function(t){this.c_(t)},t.prototype.__=function(){this.l_(new h("Network request failed"))},t.prototype.w_=function(){this.l_(new h("Network request failed"))},t.prototype.g_=function(){this.l_(el())},t.prototype.v_=function(t,n){var i=this,e=this.Gl,r=this.o_,o=function(){return i.m_()};if(e.signal.aborted)return this.g_();r.onreadystatechange=function(){if(r.readyState>=rl.HEADERS_RECEIVED&&!i.s_){var t=function(t){var n=new gv;return t.replace(/\r?\n[\t ]+/g," ").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}(r.getAllResponseHeaders()||""),n={status:r.status,statusText:r.statusText,headers:t,url:r.responseURL||t.get("X-Request-URL")};i.s_=!0,i.y_(n)}},r.onprogress=function(t){return i.d_(t)},r.onload=function(){return i.k_()},r.onerror=function(){return i.__()},r.ontimeout=function(){return i.w_()},r.onabort=function(){return i.g_()},r.open(e.method,e.url,!0),r.withCredentials="include"===e.credentials,"responseType"in r&&n&&(r.responseType=n),e.headers.forEach(function(t,n){r.setRequestHeader(n,t)}),e.signal.addEventListener("abort",o),r.onloadend=function(){e.signal.removeEventListener("abort",o)},t?r.send(t):r.send()},t.prototype.m_=function(){this.g_(),this.o_.abort()},t}(),fl=function(t){function n(n,i){var e=t.call(this,n,i)||this;return e.p_=void 0,e.b_=void 0,e}return ev(n,t),n.prototype.y_=function(t){var n=this;this.p_=new j(function(t,i){n.b_=t,n.A_=i}),this.a_(new Kv(this.p_,t))},n.prototype.k_=function(){var t=this.o_.response;if(null==t){var n=this.u_;""===n||"text"===n?t=this.o_.responseText:"document"===n?t=this.o_.responseXML:"arraybuffer"===n?t=new ArrayBuffer(0):"blob"===n&&(t=ov([]))}this.b_(t)},n.prototype.l_=function(n){t.prototype.l_.call(this,n),this.A_&&this.A_(n)},n}(sl),hl=function(t){function n(n){var i=t.call(this,n,ol)||this;return i.T_=void 0,i.S_=void 0,i.E_=!1,i}return ev(n,t),n.prototype.y_=function(t){var n=this;this.T_=new uv({start:function(t){n.S_=t},cancel:function(){n.E_=!0,n.m_()}}),this.a_(new Kv(this.T_,t))},n.prototype.d_=function(n){this.E_||this.S_.enqueue(new w(this.o_.response)),t.prototype.d_.call(this,n)},n.prototype.k_=function(){this.S_.close()},n.prototype.l_=function(n){t.prototype.l_.call(this,n),this.S_&&!this.E_&&(this.E_=!0,this.S_.error(n))},n}(sl),al=function(){var t=lv.firefox&&ul(ol);return al=function(){return t},t},cl=function(){var t;return t=lv.arrayBuffer&&ul("arraybuffer")?"arraybuffer":lv.blob&&ul("blob")?"blob":"",cl=function(){return t},t};function vl(t){return(lv.stream&&al()?new hl(t):new fl(t,cl())).send()}var ll=rv.fetch,dl=rv.Request,wl=(rv.Response,rv.AbortController);var bl=["http:","https:"];var gl=function(){try{if(lv.streamRequest){var t=new dl("about:blank",{body:"",method:"POST"}).body;if(t&&fv(t.constructor))return t.constructor}}catch(t){}}();function ml(t,n,i){var e;if(lv.stream){var r=void 0;if(lv.streamResponse){var o=t.body;r=o&&av(uv,o)}else r=vv(uv,function(){return il(t.arrayBuffer(),n,!0)},function(){n.abort()});r&&i&&(r=function(t,n,i){var e=0;return function(t,n,i){return new t(new hv(n.getReader(),i),{highWaterMark:0})}(uv,t,function(t){var r=t.done,o=t.value;r?i=void 0===i?e:i:e+=o.byteLength,n(e,i)})}(r,i,pl(t.headers))),e=r}else{var u=il(t.arrayBuffer(),n,!0);i&&(u=function(t,n,i){return j.resolve().then(function(){return n(0,i),t}).then(function(t){var e=t.byteLength;return n(e,i=void 0===i?e:i),t})}(u,i,pl(t.headers))),e=u}return new Kv(e,t)}function pl(t){return t.has("content-length")?Number(t.get("content-length")):void 0}function yl(t){var n=new tl;return t.signal&&nl(n,t.signal),function(t,n){var i,e,r=t;if(i=r.Jl===Bv.$l?lv.streamRequest&&gl?j.resolve(av(gl,r.t_)):il(t.arrayBuffer(),n,!1):il(j.resolve(t.n_),n,!1),lv.abort){var o=new wl;nl(o,n.signal),e=o.signal}return i.then(function(n){return new dl(t.url,{body:n||void 0,credentials:t.credentials,headers:(i=t.headers,(i instanceof gv?i:new gv(i)).asList()),method:t.method,mode:t.mode,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:e});var i})}(t,n).then(function(i){return ll(i).then(function(i){return ml(i,n,t.onprogress)})})}var _l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];var Sl=function(t){function n(i,e){var r,o,u,s,f,a,c,v,l,d=this,w=(e=e||{}).body||null;if(i instanceof n){if(i.bodyUsed)throw new h("Already used");r=i.url,o=i.credentials,e.headers||(u=new gv(i.headers)),s=i.method,f=i.mode,a=i.referrer,c=i.referrerPolicy,v=i.signal,l=i.onprogress,w||null==i.n_||(w=i.n_,i.bodyUsed=!0)}else r=String(i),o="same-origin",s="GET",f="cors",a="about:client",c="",v=null,l=null;if(!e.headers&&u||(u=new gv(e.headers)),e&&(a="about:client",c=""),(d=t.call(this,w,u)||this).url=r,d.headers=u,d.credentials=e.credentials||o,d.method=function(t){var n=t.toUpperCase();return _l.indexOf(n)>-1?n:t}(e.method||s),d.mode=e.mode||f,d.signal=e.signal||v||(new tl).signal,d.referrer=void 0!==e.referrer?e.referrer:a,d.referrerPolicy=void 0!==e.referrerPolicy?e.referrerPolicy:c,d.onprogress=e.onprogress||l,("GET"===d.method||"HEAD"===d.method)&&w)throw new h("Body not allowed for GET or HEAD requests");return d}return ev(n,t),n.prototype.clone=function(){return new n(this,{body:Xv(this)})},n}(Gv),Il="function"==typeof ll&&lv.stream&&lv.streamResponse&&lv.url;function Tl(t,n){return new j(function(i){var e=new Sl(t,n);i((Il&&function(t){try{return bl.indexOf(new rv.URL(t,rv.location.href).protocol)>=0}catch(t){return!1}}(e.url)?yl:vl)(e))})}Tl.polyfill=!0;var El=function(){function t(t){this.Yl=void 0,this.Gl=void 0,this.Zv=new on,this.Ql=void 0,this.I_=!1,this.Gl=t,this.Zv.Hs(t.Xs),this.Yl=this.R_()}var n=t.prototype;return n.R_=function(){var t,n,i,e,o,u,s,f,h=this;return Z.async(function(a){for(;;)switch(a.prev=a.next){case 0:(t=this.Gl).Nl&&r(function(){h.I_=!0,h.Zv.Us()},t.Nl),a.prev=2,n=Tl(t.ol,{method:t.Rl,headers:t.Kd.Gf(),body:t.Fd,credentials:t.Pl?"include":"same-origin",signal:Nl(this.Zv.Xs),onprogress:t.Ol}),a.next=9;break;case 6:throw a.prev=6,a.t0=a.catch(2),new Zc(t,a.t0);case 9:return a.prev=9,a.next=12,Z.awrap(n);case 12:i=a.sent,a.next=20;break;case 15:throw a.prev=15,a.t1=a.catch(9),sn(e=this.N_(a.t1))&&this.Zv.Us(),e;case 20:if(o=i.url||t.ol,u=0===i.status&&"file:"===(c=o,J.Pr(c).protocol)?200:i.status,s=new kl(this,i,this.Zv),f=new Gc({Hi:s,il:t,Zd:t.Zd,Kd:new ys(i.headers.asList()),jd:u,Jd:i.statusText,ul:o}),this.Ql=f,!qc(f)){a.next=29;break}return a.abrupt("return",f);case 29:throw new tv(f);case 30:case"end":return a.stop()}var c},null,this,[[2,6],[9,15]],j)},n.N_=function(t){return sn(t)?this.I_?new nv(this.Gl):new un(t.message,t):this.Ql?new tv(this.Ql,t):new Zc(this.Gl,t)},t}(),kl=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).D_=void 0,r.C_=void 0,r.Zv=void 0,r.Xd=new _o,r.D_=n,r.C_=i,r.Zv=e,r.Xd.Fu.catch(lt),r}Ut(n,t);var i=n.prototype;return i.Wd=function(){return this.Xd.Fu},i.Od=function(t){return this.qd(this.C_.text(),t)},i.Ld=function(t){return this.qd(this.C_.arrayBuffer(),t)},i.Md=function(){var t=this.C_.body;return t?this.Gd(t):kc(this.Ld().then(Tc),this.Zv)},i.Qd=function(){var t=this.C_.clone(),i=this.Zv.Vs(),e=i[0],r=i[1];return this.Zv=e,new n(this.D_,t,r)},i.qd=function(t,n){var i=this;n&&this.Zv.Hs(n);var e=j.resolve(t).catch(function(t){throw i.D_.N_(t)});return e=fn(e,this.Zv),this.Xd.Vu(e.then(lt)),e},i.Gd=function(t){var n=this,i=new ac,e=j.resolve(t.pipeTo(i.writable,{preventAbort:!0})).catch(function(t){var e=n.D_.N_(t);throw i.writable.abort(e).catch(lt),e});return e=fn(e,this.Zv),this.Xd.Vu(e.then(lt)),i.readable},mt(n,[{key:"Yd",get:function(){return this.C_.bodyUsed}}]),n}(Ac),Rl="abort";function Nl(t){var n=new tl;if(t.Rs)n.abort();else if(!t.Ns){var i=function(){e(),n.abort()},e=function e(){n.signal.removeEventListener(Rl,i),t.Ls(i),t.xs(e)};n.signal.addEventListener(Rl,i),t.Bs(i),t.Ms(e)}return n.signal}var Ol=function(){function t(){}var n=t.prototype;return n.il=function(t){return new El(t).Yl},n.Bl=function(t){var n=t.xd?{"Content-type":t.xd}:void 0;this.il(new Yc({Rl:jc.POST,ol:t.ol,Fd:t.Fd,Kd:n})).then(lt,lt)},n.Ll=function(){},t}(),Pl=function(n){function i(){for(var i,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(i=n.call.apply(n,[this].concat(r))||this).P_=void 0,i.O_=function(){if(hi.hn)return!1;try{return"body"in t.Response.prototype}catch(t){return!1}}(),i.B_=hi.xn,i.L_=void 0,i}return Ut(i,n),mt(i,[{key:"Sr",get:function(){return this.P_||(this.P_=new wo(vs())),this.P_}},{key:"M_",get:function(){return this.O_}},{key:"x_",get:function(){return this.B_}},{key:"F_",get:function(){return!1}},{key:"U_",get:function(){return ds.if()}},{key:"H_",get:function(){return{V_:gs}}},{key:"X_",get:function(){return e.connection&&e.connection.effectiveType||"default"}},{key:"z_",get:function(){return e.connection&&e.connection.type||"unknown"}},{key:"W_",get:function(){return this.L_||(this.L_=new $c(new Ol)),this.L_}}]),i}(Zr);tt(new Pl),tt(new Pl);var Al=t;Al.addEventListener("install",function(t){t.waitUntil(Al.skipWaiting())}),Al.addEventListener("activate",function(t){t.waitUntil(Al.clients.claim())}),Jn.mr.Ny(Al)}()}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:this);
30
+ !function(t){!function(){"use strict";var n=t.window,i=t.document,e=(t.location,t.navigator),r=t.setTimeout,o=t.clearTimeout,u=t.setInterval,s=t.clearInterval,f=t.Error,h=t.TypeError,a=(t.SyntaxError,t.Object),c=t.Math,v=t.parseInt,l=t.parseFloat,d=t.isNaN,w=t.Uint8Array,b=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);var g=r;function m(t){return Boolean(t&&void 0!==t.length)}function p(){}function y(t){if(!(this instanceof y))throw new h("Promises must be constructed via new");if("function"!=typeof t)throw new h("not a function");this.we=0,this.me=!1,this.ye=void 0,this.ke=[],k(t,this)}function _(t,n){for(;3===t.we;)t=t.ye;0!==t.we?(t.me=!0,y.pe(function(){var i=1===t.we?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.ye)}catch(t){return void I(n.promise,t)}S(n.promise,e)}else(1===t.we?S:I)(n.promise,t.ye)})):t.ke.push(n)}function S(t,n){try{if(n===t)throw new h("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var i=n.then;if(n instanceof y)return t.we=3,t.ye=n,void T(t);if("function"==typeof i)return void k((e=i,r=n,function(){e.apply(r,arguments)}),t)}t.we=1,t.ye=n,T(t)}catch(n){I(t,n)}var e,r}function I(t,n){t.we=2,t.ye=n,T(t)}function T(t){2===t.we&&0===t.ke.length&&y.pe(function(){t.me||y.Ae(t.ye)});for(var n=0,i=t.ke.length;n<i;n++)_(t,t.ke[n]);t.ke=null}function E(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function k(t,n){var i=!1;try{t(function(t){i||(i=!0,S(n,t))},function(t){i||(i=!0,I(n,t))})}catch(t){if(i)return;i=!0,I(n,t)}}y.prototype.catch=function(t){return this.then(null,t)},y.prototype.then=function(t,n){var i=new this.constructor(p);return _(this,new E(t,n,i)),i},y.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)})})},y.all=function(t){return new y(function(n,i){if(!m(t))return i(new h("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var s=u.then;if("function"==typeof s)return void s.call(u,function(n){o(t,n)},i)}e[t]=u,0==--r&&n(e)}catch(t){i(t)}}for(var u=0;u<e.length;u++)o(u,e[u])})},y.allSettled=function(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new h(typeof 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"==typeof 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])})},y.resolve=function(t){return t&&"object"==typeof t&&t.constructor===y?t:new y(function(n){n(t)})},y.reject=function(t){return new y(function(n,i){i(t)})},y.race=function(t){return new y(function(n,i){if(!m(t))return i(new h("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)y.resolve(t[e]).then(n,i)})},y.pe="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){g(t,0)},y.Ae=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var R=function(){var n=t.Promise;if(void 0!==n)try{if(-1!==n.toString().indexOf("[native code]"))return n}catch(t){}}(),N=e?e.userAgent:"",O=N.match(/Firefox\/([0-9]+)/i),P=null!=O,A=O?Number(O[1]):0,D=N.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),C=null!=D,x=D?Number(D[3]):0,B=function(){function t(t){this.Te=0,this.Se=0,this.Wi=[],this.Ee=t}return t.prototype.Ie=function(t){var n=this.length();this.Re(n+1);var i=this.Se+n&this.Ee-1;this.Wi[i]=t,this.Te=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.Ee<n)this.Ie(t);else{var i=this.Se+n-1,e=this.Ee-1;this.Wi[i&e]=t,this.Te=n}},t.prototype.shift=function(){var t=this.Se,n=this.Wi[t];return this.Wi[t]=void 0,this.Se=t+1&this.Ee-1,this.Te--,n},t.prototype.length=function(){return this.Te},t.prototype.Re=function(t){this.Ee<t&&this.Ne(this.Ee<<1)},t.prototype.Ne=function(t){var n=this.Ee;this.Ee=t;var i=this.Se+this.Te&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.Wi,0,n,i)},t}();var F="unhandledrejection",L=t.PromiseRejectionEvent,z=t.CustomEvent;function U(t){return new L(F,{reason:t,promise:R.reject(t).catch(function(){}),cancelable:!0})}function M(t){var n=new z(F,{detail:{reason:t},cancelable:!0});return a.defineProperty(n,"reason",{value:t}),n}function W(t){var n=i.createEvent("CustomEvent");return n.initCustomEvent(F,!1,!0,{reason:t}),n}var q,j,V,H,X,G,Y=function(t){return(Y=function(){try{var t=R.resolve(),n=new L(F,{reason:"error",promise:t});return F===n.type&&"error"===n.reason}catch(t){}return!1}()?U:function(){try{var t=new z(F,{detail:{reason:"error"}});return F===t.type&&"error"===t.detail.reason}catch(t){}return!1}()?M:W)(t)};if(R&&!(P&&A<60||C&&x<15))j=R,function(){};else{j=y;var K=null!==(q=function(){var n=t.queueMicrotask;if("function"==typeof n)return function(t){return n(t)};var i=R;if(i&&"function"==typeof i.resolve){var e=i.resolve();return function(t){return e.then(t)}}}())&&void 0!==q?q:y.pe,Q=(V=K,H=new B(16),X=!1,{De:function(t){H.push(t),X||(X=!0,V(G))},Ce:G=function(){for(;H.length()>0;)H.shift()();X=!1}});Q.Ce,y.pe=Q.De,y.Ae=function(n){try{var i=Y(n);if(!t.dispatchEvent(i)||i.defaultPrevented)return}catch(t){}r(function(){throw new f("Unhandled promise rejection: ".concat(n))},0)}}function $(t,n,i){return t(i={path:n,exports:{},require:function(t,n){return function(){throw new f("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&i.path)}},i.exports),i.exports}var J,Z=$(function(t){!function(t){var n,i=a.prototype,e=i.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",u=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,n,i,e){var r=n&&n.prototype instanceof p?n:p,o=a.create(r.prototype),u=new A(e||[]);return o.qr=function(t,n,i){var e=l;return function(r,o){if(e===b)throw new f("Generator is already running");if(e===g){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var u=i.delegate;if(u){var s=N(u,i);if(s){if(s===m)continue;return s}}if("next"===i.method)i.sent=i.Gr=i.arg;else if("throw"===i.method){if(e===l)throw e=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);e=b;var h=v(t,n,i);if("normal"===h.type){if(e=i.done?g:w,h.arg===m)continue;return{value:h.arg,done:i.done}}"throw"===h.type&&(e=g,i.method="throw",i.arg=h.arg)}}}(t,i,u),o}function v(t,n,i){try{return{type:"normal",arg:t.call(n,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l="suspendedStart",w="suspendedYield",b="executing",g="completed",m={};function p(){}function y(){}function _(){}var S={};S[o]=function(){return this};var I=a.getPrototypeOf,T=I&&I(I(D([])));T&&T!==i&&e.call(T,o)&&(S=T);var E=_.prototype=p.prototype=a.create(S);function k(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this.qr(n,t)}})}function R(t){var n;this.qr=function(i,r){function o(){return new j(function(n,o){!function n(i,r,o,u){var s=v(t[i],t,r);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==typeof h&&e.call(h,"Qr")?j.resolve(h.Qr).then(function(t){n("next",t,o,u)},function(t){n("throw",t,o,u)}):j.resolve(h).then(function(t){f.value=t,o(f)},function(t){return n("throw",t,o,u)})}u(s.arg)}(i,r,n,o)})}return n=n?n.then(o,o):o()}}function N(t,i){var e=t.iterator[i.method];if(e===n){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=n,N(t,i),"throw"===i.method))return m;i.method="throw",i.arg=new h("The iterator does not provide a 'throw' method")}return m}var r=v(e,t.iterator,i.arg);if("throw"===r.type)return i.method="throw",i.arg=r.arg,i.delegate=null,m;var o=r.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=n),i.delegate=null,m):o:(i.method="throw",i.arg=new h("iterator result is not an object"),i.delegate=null,m)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function P(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function D(t){if(t){var i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!d(t.length)){var r=-1,u=function i(){for(;++r<t.length;)if(e.call(t,r))return i.value=t[r],i.done=!1,i;return i.value=n,i.done=!0,i};return u.next=u}}return{next:C}}function C(){return{value:n,done:!0}}y.prototype=E.constructor=_,_.constructor=y,_[s]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return a.setPrototypeOf?a.setPrototypeOf(t,_):(t.__proto__=_,s in t||(t[s]="GeneratorFunction")),t.prototype=a.create(E),t},t.awrap=function(t){return{Qr:t}},k(R.prototype),R.prototype[u]=function(){return this},t.AsyncIterator=R,t.async=function(n,i,e,r){var o=new R(c(n,i,e,r));return t.isGeneratorFunction(i)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(E),E[s]="Generator",E[o]=function(){return this},E.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var i in t)n.push(i);return n.reverse(),function i(){for(;n.length;){var e=n.pop();if(e in t)return i.value=e,i.done=!1,i}return i.done=!0,i}},t.values=D,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this.Gr=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!t)for(var i in this)"t"===i.charAt(0)&&e.call(this,i)&&!d(+i.slice(1))&&(this[i]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function r(e,r){return s.type="throw",s.arg=t,i.next=e,r&&(i.method="next",i.arg=n),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],s=u.completion;if("root"===u.tryLoc)return r("end");if(u.tryLoc<=this.prev){var h=e.call(u,"catchLoc"),a=e.call(u,"finallyLoc");if(h&&a){if(this.prev<u.catchLoc)return r(u.catchLoc,!0);if(this.prev<u.finallyLoc)return r(u.finallyLoc)}else if(h){if(this.prev<u.catchLoc)return r(u.catchLoc,!0)}else{if(!a)throw new f("try statement without catch or finally");if(this.prev<u.finallyLoc)return r(u.finallyLoc)}}}},abrupt:function(t,n){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&e.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),m},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),P(i),m}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc===t){var e=i.completion;if("throw"===e.type){var r=e.arg;P(i)}return r}}throw new f("illegal catch attempt")},delegateYield:function(t,i,e){return this.delegate={iterator:D(t),resultName:i,nextLoc:e},"next"===this.method&&(this.arg=n),m}}}(t.exports)});function tt(t){J=t}var nt={}.toString;var it=Array.isArray||function(t){return"[object Array]"===nt.call(t)};function et(t){return"object"==typeof t&&null!==t}var rt,ot=9007199254740991,ut=c.pow(2,-52);function st(t,n){for(var i=t,e=n;0!==e;){var r=i%e;i=e,e=r}return i<0?-i:i}!function(t){t[t.Es=0]="Es",t[t.Is=1]="Is",t[t.Rs=-1]="Rs"}(rt||(rt={}));var ft=function(t,n){return function(t,n){if(t===n)return!0;var i=c.abs(t-n);return i<ut||i<c.max(c.abs(t),c.abs(n))*ut}(t,n)?rt.Es:function(t,n){return t===n?rt.Es:t<n?rt.Rs:t>n?rt.Is:d(t)?d(n)?rt.Es:rt.Is:rt.Rs}(t,n)};function ht(t,n,i){for(var e=0;e<t.length;e+=1){var r=t[e];if(n.call(i,r,e,t))return e}return-1}function at(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){t.splice(n,1)}(t,i),!0)}function ct(t,n){return-1!==t.indexOf(n)}function vt(t){t.length=0}var lt=function(){};function dt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=16*c.random()|0;return("x"===t?n:3&n|8).toString(16)})}var wt,bt="https://theo.proxy";function gt(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),a.defineProperty(t,e.key,e)}}function mt(t,n,i){return n&&gt(t.prototype,n),i&&gt(t,i),a.defineProperty(t,"prototype",{writable:!1}),t}function pt(){var t=a.create(null);return t.__=void 0,delete t.__,t}function yt(){return new It}!function(t){t.El="audio",t.Il="video",t.WA="metadata"}(wt||(wt={}));var _t,St,It=("undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0)||(_t=function(){function t(t,n){this.data=void 0,this.keys=void 0,this.index=0,this.selector=void 0,this.data=t,this.selector=n,this.keys=a.keys(t)}var n=t.prototype;return n.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}(),function(){function t(){this.data=pt(),this.size=0}var n=t.prototype;return n.get=function(t){return this.data[t]},n.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},n.has=function(t){return t in this.data},n.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},n.clear=function(){this.data=pt(),this.size=0},n.keys=function(){return new _t(this.data,function(t,n){return n})},n.values=function(){return new _t(this.data,function(t,n){return t[n]})},n.entries=function(){return new _t(this.data,function(t,n){return[n,t[n]]})},n.forEach=function(t){for(var n in this.data)t(this.data[n],n)},t}());!function(t){t.vl="#EXTINF",t.Ekt="#EXT-X-MAP",t.LO="#EXTM3U",t.i="#EXT-X-VERSION",t.o="#EXT-X-TARGETDURATION",t.I6="#EXT-X-START",t.s="#EXT-X-INDEPENDENT-SEGMENTS",t.Gf="#EXT-X-STREAM-INF",t.h="#EXT-X-MEDIA-SEQUENCE",t.m="#EXT-X-ENDLIST",t.MO="#EXT-X-MEDIA",t.p="#EXT-X-DISCONTINUITY",t.S="#EXT-X-DISCONTINUITY-SEQUENCE",t.I="#EXT-X-PLAYLIST-TYPE"}(St||(St={}));var Tt,Et=function(){function t(t,n){this.hs=St.vl,this.T=void 0,this.k=void 0,this.T=t,this.k=n}return t.prototype.dR=function(){return this.hs+":"+this.T+",\n"+this.k},t}(),kt=function(){function t(){this.hs=St.LO}return t.prototype.dR=function(){return this.hs},t}(),Rt=function(){function t(t){this.hs=St.i,this.yT=void 0,this.yT=t}return t.prototype.dR=function(){return this.hs+":"+this.yT},t}(),Nt=function(){function t(t){this.hs=St.o,this.Rpt=void 0,this.Rpt=t}return t.prototype.dR=function(){return this.hs+":"+this.Rpt},t}(),Ot=function(){function t(t){this.hs=St.I6,this.pAt=void 0,this.pAt=t}return t.prototype.dR=function(){return this.hs+":TIME-OFFSET="+this.pAt},t}(),Pt=function(){function t(){this.hs=St.s}return t.prototype.dR=function(){return this.hs},t}(),At=function(){function t(t){this.hs=St.Gf,this.AN=1,this.k=void 0,this.k=t}return t.prototype.dR=function(){return this.hs+":BANDWIDTH="+this.AN+',AUDIO="audio"\n'+this.k},t}(),Dt=function(){function t(t){this.hs=St.h,this.sE=void 0,this.sE=t}return t.prototype.dR=function(){return this.hs+":"+this.sE},t}(),Ct=function(){function t(){this.hs=St.p}return t.prototype.dR=function(){return this.hs},t}(),xt=function(){function t(t){this.hs=St.S,this.sE=void 0,this.sE=t}return t.prototype.dR=function(){return this.hs+":"+this.sE},t}();!function(t){t.Dkt="VOD",t.DDt="EVENT"}(Tt||(Tt={}));var Bt=function(){function t(t){this.hs=St.MO,this.k=void 0,this.k=t}return t.prototype.dR=function(){var t=yt();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.k+'"');var n=[];return t.forEach(function(t,i){return n.push(i+"="+t)}),this.hs+":"+n.join(",")},t}(),Ft=function(){function t(t){this.Uo=[],this.Uo=t}return t.prototype.O=function(){for(var t="",n=0,i=this.Uo;n<i.length;n++){t+=i[n].dR()+"\n"}return t},mt(t,[{key:"cS",get:function(){return this.Uo}}]),t}(),Lt=function(){function t(){this.Uo=[];for(var t=[new kt,new Rt(8)],n=0;n<t.length;n++){var i=t[n];this.P(i)}}var n=t.prototype;return n.P=function(t){this.Uo.push(t)},n.Bs=function(){this.Uo.length=0},mt(t,[{key:"cS",get:function(){return new Ft(this.Uo)}}]),t}();function zt(t,n){return(zt=a.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Ut(t,n){t.prototype=a.create(n.prototype),t.prototype.constructor=t,zt(t,n)}var Mt=function(){function t(){}var n=t.prototype;return n.yp=function(t){return this.kp()*t},n.pp=function(t){return this.bp(t)>0},n.Ap=function(t){return this.bp(t)>=0},n.Tp=function(t,n){return this.Ep(t).Sp(n)},n.ap=function(t){return 0===this.bp(t)},n.Ip=function(t){return this.bp(t)<0},n.Sp=function(t){return this.bp(t)<=0},n.Rp=function(){return this.Np()?this.Dp():this},n.Cp=function(t){return this.Ek(t.Dp())},n.Ep=function(t){return this.Cp(t).Rp()},t}();function Wt(t,n){return t.Pp()?n.Pp()?rt.Es:rt.Is:n.Pp()?rt.Rs:t.Op()?n.Op()&&t.Np()===n.Np()?rt.Es:t.Np()?rt.Rs:rt.Is:n.Np()?rt.Is:rt.Rs}var qt=$(function(t,n){var i=function(t){a.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new w([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(t){}function i(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function e(t){return!0===(t&&t.Yn)}function r(t){var n=c.clz32(t&-t);return t?31-n:n}i.prototype.Yn,a.defineProperty(i.prototype,"Yn",{value:!0}),i.isLong=e;var o={},u={};function s(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=u[t])?e:(i=l(t,0,!0),r&&(u[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=o[t])?e:(i=l(t,t<0?-1:0,!1),r&&(o[t]=i),i)}function h(t,n){if(d(t))return n?T:I;if(n){if(t<0)return T;if(t>=y)return O}else{if(t<=-_)return P;if(t+1>=_)return N}return t<0?h(-t,n).neg():l(t%p|0,t/p|0,n)}function l(t,n,e){return new i(t,n,e)}i.fromInt=s,i.fromNumber=h,i.fromBits=l;var b=c.pow;function g(t,n,i){if(0===t.length)throw f("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?T:I;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw f("interior hyphen");if(0===e)return g(t.substring(1),n,i).neg();for(var r=h(b(i,8)),o=I,u=0;u<t.length;u+=8){var s=c.min(8,t.length-u),a=v(t.substring(u,u+s),i);if(s<8){var l=h(b(i,s));o=o.mul(l).add(h(a))}else o=(o=o.mul(r)).add(h(a))}return o.unsigned=n,o}function m(t,n){return"number"==typeof t?h(t,n):"string"==typeof t?g(t,n):l(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}i.fromString=g,i.fromValue=m;var p=4294967296,y=p*p,_=y/2,S=s(1<<24),I=s(0);i.ZERO=I;var T=s(0,!0);i.UZERO=T;var E=s(1);i.ONE=E;var k=s(1,!0);i.UONE=k;var R=s(-1);i.NEG_ONE=R;var N=l(-1,2147483647,!1);i.MAX_VALUE=N;var O=l(-1,-1,!0);i.MAX_UNSIGNED_VALUE=O;var P=l(0,-2147483648,!1);i.MIN_VALUE=P;var A=i.prototype;A.toInt=function(){return this.unsigned?this.low>>>0:this.low},A.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},A.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(P)){var n=h(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=h(b(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}},A.getHighBits=function(){return this.high},A.getHighBitsUnsigned=function(){return this.high>>>0},A.getLowBits=function(){return this.low},A.getLowBitsUnsigned=function(){return this.low>>>0},A.getNumBitsAbs=function(){if(this.isNegative())return this.eq(P)?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},A.isZero=function(){return 0===this.high&&0===this.low},A.eqz=A.isZero,A.isNegative=function(){return!this.unsigned&&this.high<0},A.isPositive=function(){return this.unsigned||this.high>=0},A.isOdd=function(){return 1==(1&this.low)},A.isEven=function(){return 0==(1&this.low)},A.equals=function(t){return e(t)||(t=m(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},A.eq=A.equals,A.notEquals=function(t){return!this.eq(t)},A.neq=A.notEquals,A.ne=A.notEquals,A.lessThan=function(t){return this.comp(t)<0},A.lt=A.lessThan,A.lessThanOrEqual=function(t){return this.comp(t)<=0},A.lte=A.lessThanOrEqual,A.le=A.lessThanOrEqual,A.greaterThan=function(t){return this.comp(t)>0},A.gt=A.greaterThan,A.greaterThanOrEqual=function(t){return this.comp(t)>=0},A.gte=A.greaterThanOrEqual,A.ge=A.greaterThanOrEqual,A.compare=function(t){if(e(t)||(t=m(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},A.comp=A.compare,A.negate=function(){return!this.unsigned&&this.eq(P)?P:this.not().add(E)},A.neg=A.negate,A.add=function(t){e(t)||(t=m(t));var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,o=65535&this.low,u=t.high>>>16,s=65535&t.high,f=t.low>>>16,h=0,a=0,c=0,v=0;return c+=(v+=o+(65535&t.low))>>>16,a+=(c+=r+f)>>>16,h+=(a+=i+s)>>>16,h+=n+u,l((c&=65535)<<16|(v&=65535),(h&=65535)<<16|(a&=65535),this.unsigned)},A.subtract=function(t){return e(t)||(t=m(t)),this.add(t.neg())},A.sub=A.subtract,A.multiply=function(t){if(this.isZero())return this;if(e(t)||(t=m(t)),n)return l(n.mul(this.low,this.high,t.low,t.high),n.get_high(),this.unsigned);if(t.isZero())return this.unsigned?T:I;if(this.eq(P))return t.isOdd()?P:I;if(t.eq(P))return this.isOdd()?P:I;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(S)&&t.lt(S))return h(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,o=this.low>>>16,u=65535&this.low,s=t.high>>>16,f=65535&t.high,a=t.low>>>16,c=65535&t.low,v=0,d=0,w=0,b=0;return w+=(b+=u*c)>>>16,d+=(w+=o*c)>>>16,w&=65535,d+=(w+=u*a)>>>16,v+=(d+=r*c)>>>16,d&=65535,v+=(d+=o*a)>>>16,d&=65535,v+=(d+=u*f)>>>16,v+=i*c+r*a+o*f+u*s,l((w&=65535)<<16|(b&=65535),(v&=65535)<<16|(d&=65535),this.unsigned)},A.mul=A.multiply,A.divide=function(t){if(e(t)||(t=m(t)),t.isZero())throw f("division by zero");var i,r,o;if(n)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?l((this.unsigned?n.div_u:n.div_s)(this.low,this.high,t.low,t.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?T:I;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return T;if(t.gt(this.shru(1)))return k;o=T}else{if(this.eq(P))return t.eq(E)||t.eq(R)?P:t.eq(P)?E:(i=this.shr(1).div(t).shl(1)).eq(I)?t.isNegative()?E:R:(r=this.sub(t.mul(i)),o=i.add(r.div(t)));if(t.eq(P))return this.unsigned?T:I;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();o=I}for(r=this;r.gte(t);){i=c.max(1,c.floor(r.toNumber()/t.toNumber()));for(var u=c.ceil(c.log(i)/c.LN2),s=u<=48?1:b(2,u-48),a=h(i),v=a.mul(t);v.isNegative()||v.gt(r);)v=(a=h(i-=s,this.unsigned)).mul(t);a.isZero()&&(a=E),o=o.add(a),r=r.sub(v)}return o},A.div=A.divide,A.modulo=function(t){return e(t)||(t=m(t)),n?l((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,t.low,t.high),n.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},A.mod=A.modulo,A.rem=A.modulo,A.not=function(){return l(~this.low,~this.high,this.unsigned)},A.countLeadingZeros=function(){return this.high?c.clz32(this.high):c.clz32(this.low)+32},A.clz=A.countLeadingZeros,A.countTrailingZeros=function(){return this.low?r(this.low):r(this.high)+32},A.ctz=A.countTrailingZeros,A.and=function(t){return e(t)||(t=m(t)),l(this.low&t.low,this.high&t.high,this.unsigned)},A.or=function(t){return e(t)||(t=m(t)),l(this.low|t.low,this.high|t.high,this.unsigned)},A.xor=function(t){return e(t)||(t=m(t)),l(this.low^t.low,this.high^t.high,this.unsigned)},A.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?l(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):l(0,this.low<<t-32,this.unsigned)},A.shl=A.shiftLeft,A.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?l(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):l(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},A.shr=A.shiftRight,A.shiftRightUnsigned=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?l(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):l(32===t?this.high:this.high>>>t-32,0,this.unsigned)},A.shru=A.shiftRightUnsigned,A.shr_u=A.shiftRightUnsigned,A.rotateLeft=function(t){var n;return e(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?l(this.high,this.low,this.unsigned):t<32?(n=32-t,l(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),l(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},A.rotl=A.rotateLeft,A.rotateRight=function(t){var n;return e(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?l(this.high,this.low,this.unsigned):t<32?(n=32-t,l(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),l(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},A.rotr=A.rotateRight,A.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},A.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},A.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},A.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]},A.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]},i.fromBytes=function(t,n,e){return e?i.fromBytesLE(t,n):i.fromBytesBE(t,n)},i.fromBytesLE=function(t,n){return new i(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},i.fromBytesBE=function(t,n){return new i(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var D=i;return t.default=D,"default"in t?t.default:t}({});t.exports=i}),jt=function(){function t(t,n){this.Bp=void 0,this.Lp=void 0,this.Bp=t,this.Lp=n}t.Mp=function(n,i,e){return e?new t(n.toUnsigned(),i.toUnsigned()):new t(n.toSigned(),i.toSigned())},t.xp=function(n){return n.unsigned?new t(n,qt.UZERO):new t(n,n.isNegative()?qt.NEG_ONE:qt.ZERO)},t.Fp=function(n,i){if(d(n))return i?t.Up:t.Hp;if(i){if(n<0)return t.Up;if(n>=3.402823669209385e38)return t.Vp}else{if(n<=-1.7014118346046923e38)return t.Xp;if(n+1>=1.7014118346046923e38)return t.zp}return n<0?t.Fp(-n,i).Dp():t.Mp(qt.fromNumber(n%0x10000000000000000),qt.fromNumber(n/0x10000000000000000),i)};var n=t.prototype;return n.Wp=function(){return this.Lp.unsigned},n.qp=function(){return this.Bp.isZero()&&this.Lp.isZero()},n.Np=function(){return this.Lp.isNegative()},n.Gp=function(){return this.Wp()?t.Mp(this.Bp,this.Lp,!1):this},n.Qp=function(){return this.Wp()?this:t.Mp(this.Bp,this.Lp,!0)},n.Yp=function(){return this.Bp},n.kp=function(){return this.Np()?-this.Dp().kp():0x10000000000000000*this.Lp.toNumber()+this.Bp.toUnsigned().toNumber()},n.jp=function(){return this.Bp.toInt()},n.ap=function(t){return(this.Wp()===t.Wp()||this.Lp.getHighBits()>>>31!=1||t.Lp.getHighBits()>>>31!=1)&&(this.Lp.toUnsigned().eq(t.Lp.toUnsigned())&&this.Bp.toUnsigned().eq(t.Bp.toUnsigned()))},n.bp=function(t){if(this.ap(t))return rt.Es;var n=this.Np(),i=t.Np();if(n&&!i)return rt.Rs;if(!n&&i)return rt.Is;if(!this.Wp())return this.Cp(t).Np()?rt.Rs:rt.Is;var e=this.Qp(),r=t.Qp(),o=r.Lp.comp(e.Lp);return o>0||0===o&&r.Bp.gt(e.Bp)?rt.Rs:rt.Is},n.Ip=function(t){return this.bp(t)<0},n.Sp=function(t){return this.bp(t)<=0},n.Kp=function(t){return this.bp(t)>0},n.Zp=function(t){return this.bp(t)>=0},n.Jp=function(){return new t(this.Bp.not(),this.Lp.not())},n.$p=function(n){return new t(this.Bp.and(n.Bp),this.Lp.and(n.Lp))},n.ib=function(n){return new t(this.Bp.or(n.Bp),this.Lp.or(n.Lp))},n.eb=function(n){var i=127&n;return 0===i?this:i<64?t.Mp(this.Bp.shl(i),this.Lp.shl(i).or(this.Bp.shru(64-i)),this.Wp()):t.Mp(qt.ZERO,this.Bp.shl(i-64),this.Wp())},n.sb=function(n){var i=127&n;return 0===i?this:i<64?t.Mp(this.Bp.shru(i).or(this.Lp.shl(64-i)),this.Lp.shr(i),this.Wp()):t.Mp(this.Lp.shr(i-64),this.Lp.isNegative()?qt.NEG_ONE:qt.ZERO,this.Wp())},n.ub=function(n){var i=127&n;return 0===i?this:i<64?t.Mp(this.Bp.shru(i).or(this.Lp.shl(64-i)),this.Lp.shru(i),this.Wp()):64===i?t.Mp(this.Lp,qt.ZERO,this.Wp()):t.Mp(this.Lp.shru(i-64),qt.ZERO,this.Wp())},n.Ek=function(n){var i=this.Lp.high>>>16,e=65535&this.Lp.high,r=this.Lp.low>>>16,o=65535&this.Lp.low,u=this.Bp.high>>>16,s=65535&this.Bp.high,f=this.Bp.low>>>16,h=65535&this.Bp.low,a=n.Lp.high>>>16,c=65535&n.Lp.high,v=n.Lp.low>>>16,l=65535&n.Lp.low,d=n.Bp.high>>>16,w=65535&n.Bp.high,b=n.Bp.low>>>16,g=0,m=0,p=0,y=0,_=0,S=0,I=0,T=0;I+=(T+=h+(65535&n.Bp.low))>>>16,T&=65535,S+=(I+=f+b)>>>16,I&=65535,_+=(S+=s+w)>>>16,S&=65535,y+=(_+=u+d)>>>16,_&=65535,p+=(y+=o+l)>>>16,y&=65535,m+=(p+=r+v)>>>16,p&=65535,g+=(m+=e+c)>>>16,m&=65535,g+=i+a,g&=65535;var E=this.Wp(),k=qt.fromBits(p<<16|y,g<<16|m,E),R=qt.fromBits(I<<16|T,_<<16|S,E);return t.Mp(R,k,E)},n.Cp=function(t){return this.Ek(t.Dp())},n.Dp=function(){return this.Jp().Ek(t.ob)},n.hb=function(n){if(this.qp()||n.qp())return this.Wp()?t.Up:t.Hp;if(this.Np())return n.Np()?this.Dp().hb(n.Dp()):this.Dp().hb(n).Dp();if(n.Np())return this.hb(n.Dp()).Dp();if(this.Lp.isZero()&&0===this.Bp.high&&n.Lp.isZero()&&0===n.Bp.high)return t.xp(this.Bp.multiply(n.Bp));var i=qt.fromBits(4294967295,0,!0),e=this.Bp.and(i),r=this.Bp.shru(32),o=this.Lp.and(i),u=this.Lp.shru(32),s=n.Bp.and(i),f=n.Bp.shru(32),h=n.Lp.and(i),a=n.Lp.shru(32),c=qt.UZERO,v=qt.UZERO,l=qt.UZERO,d=qt.UZERO;c=c.add(e.mul(s)),v=v.add(c.shru(32)),c=c.and(i),v=v.add(r.mul(s)),l=l.add(v.shru(32)),v=(v=v.and(i)).add(e.mul(f)),l=l.add(v.shru(32)),v=v.and(i),l=l.add(o.mul(s)),d=d.add(l.shru(32)),l=(l=l.and(i)).add(r.mul(f)),d=d.add(l.shru(32)),l=(l=l.and(i)).add(e.mul(h)),d=d.add(l.shru(32)),l=l.and(i),d=d.add(u.mul(s)).add(o.mul(f)).add(r.mul(h)).add(e.mul(a)).and(i);var w=qt.fromBits(c.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0),b=qt.fromBits(l.getLowBitsUnsigned(),d.getLowBitsUnsigned(),!0);return t.Mp(w,b,this.Wp())},n.cb=function(n){var i,e,r=n;if(r.qp())throw new RangeError("division by zero");if(this.qp())return this.Wp()?[t.Up,t.Up]:[t.Hp,t.Hp];if(this.Wp()){if(r.Wp()||(r=r.Qp()),r.Kp(this))return[t.Up,this];if(r.Kp(this.ub(1)))return[e=t.fb,i=this.Cp(r)];e=t.Up}else{if(this.ap(t.Xp)){if(r.ap(t.ob)||r.ap(t.vb))return[t.Xp,t.Hp];if(r.ap(t.Xp))return[t.ob,t.Hp];var o=this.sb(1)._b(r).eb(1);return o.ap(t.Hp)?e=r.Np()?t.ob:t.vb:(i=this.Cp(r.hb(o)),e=o.Ek(i._b(r))),[e,i=this.Cp(r.hb(e))]}if(r.ap(t.Xp))return this.Wp()?[t.Up,this]:[t.Hp,this];if(this.Np()){if(r.Np())return this.Dp().cb(r.Dp());var u=this.Dp().cb(r);return e=u[0],i=u[1],[e.Dp(),i.Dp()]}if(r.Np()){var s=this.cb(r.Dp());return e=s[0],i=s[1],[e.Dp(),i.Dp()]}e=t.Hp}for(i=this;i.Zp(r);){for(var f=c.max(1,c.floor(i.kp()/r.kp())),h=c.ceil(c.log(f)/c.LN2),a=h<=48?1:c.pow(2,h-48),v=t.Fp(f),l=v.hb(r);l.Np()||l.Kp(i);)f-=a,l=(v=t.Fp(f,this.Wp())).hb(r);v.qp()&&(v=t.ob),e=e.Ek(v),i=i.Cp(l)}return[e,i]},n._b=function(t){return this.cb(t)[0]},n.gb=function(t){return this.cb(t)[1]},n.toString=function(n){var i=n||10;if(i<2||i>36)throw new RangeError("radix");if(this.qp())return"0";if(this.Np()){if(this.ap(t.Xp)){var e=t.Fp(i),r=this._b(e),o=r.hb(e).Cp(this);return r.toString(i)+o.jp().toString(i)}return"-"+this.Dp().toString(i)}for(var u=t.Fp(c.pow(i,6),this.Wp()),s=this,f="";;){var h=s._b(u),a=(s.Cp(h.hb(u)).jp()>>>0).toString(i);if((s=h).qp())return a+f;for(;a.length<6;)a="0"+a;f=String(a)+f}},t}();jt.Hp=jt.xp(qt.ZERO),jt.Up=jt.xp(qt.UZERO),jt.ob=jt.xp(qt.ONE),jt.fb=jt.xp(qt.UONE),jt.vb=jt.xp(qt.NEG_ONE),jt.zp=jt.Mp(qt.NEG_ONE,qt.MAX_VALUE,!1),jt.Vp=jt.Mp(qt.MAX_UNSIGNED_VALUE,qt.MAX_UNSIGNED_VALUE,!0),jt.Xp=jt.Mp(qt.ZERO,qt.MIN_VALUE,!1);var Vt=function(){function t(t,n){void 0===n&&(n=1),this.wb=void 0,this.mb=void 0,this.wb=t,this.mb=n}t.yb=function(n){return new t(c.ceil(n.wb),n.mb)},t.kb=function(n){return new t(c.floor(n.wb),n.mb)},t.pb=function(t,n){return t.Ap(n)?t:n},t.bb=function(t,n){return t.Sp(n)?t:n};var n=t.prototype;return n.Ek=function(n){return this.mb>=n.mb?new t(this.wb+n.Ab(this.mb).wb,this.mb):new t(this.Ab(n.mb).wb+n.wb,n.mb)},n.pp=function(t){return t.Ip(this)},n.Ap=function(t){return t.Sp(this)},n.Ep=function(n){return this.mb>=n.mb?new t(c.abs(this.wb-n.Ab(this.mb).wb),this.mb):n.Ep(this)},n.Tp=function(t,n){return this.Ep(t).Sp(n)},n.bp=function(t){return i=t,(n=this).mb>=i.mb?ft(n.wb,i.Ab(n.mb).wb):ft(n.Ab(i.mb).wb,i.wb);var n,i},n.ap=function(t){return 0===this.bp(t)},n.Ip=function(t){return this.bp(t)<0},n.Sp=function(t){return this.bp(t)<=0},n.Ab=function(n){return new t(this.wb*(n/this.mb),n)},n.Cp=function(n){return this.mb>=n.mb?new t(this.wb-n.Ab(this.mb).wb,this.mb):new t(this.Ab(n.mb).wb-n.wb,n.mb)},n.Tb=function(n){return new t(this.wb*n,this.mb)},mt(t,[{key:"Op",get:function(){return!isFinite(this.wb)}},{key:"Sb",get:function(){return this.wb/this.mb}}]),t}();Vt.Eb=new Vt(1/6,1),Vt.Hp=new Vt(0),Vt.Ib=new Vt(1/0),Vt.Rb=1e6;var Ht=function(t){function n(n,i){var e;return(e=t.call(this)||this).wi=void 0,e.mb=void 0,e.wi=n.toSigned(),e.mb=i>>>0,e}Ut(n,t),n.Nb=function(t,i){return void 0===i&&(i=1e6),n.Fp(t*i,i)},n.Fp=function(t,i){return d(t)?n.Db:t===1/0?n.Cb:t===-1/0?n.Pb:new n(qt.fromNumber(t),i)},n.xp=function(t,i){return new n(t,i)},n.Ob=function(t){return n.Nb(t.Sb,1e6)},n.Bb=function(t){return new n(qt.fromNumber(t.getTime()),1e3)},n.pb=function(t,n){return t.Ap(n)?t:n},n.bb=function(t,n){return t.Sp(n)?t:n},n.Lb=function(t,i,e){return n.pb(i,n.bb(e,t))};var i=n.prototype;return i.Np=function(){return this.wi.isNegative()},i.qp=function(){return 0!==this.mb&&this.wi.isZero()},i.Op=function(){return 0===this.mb&&!this.wi.isZero()},i.Pp=function(){return 0===this.mb&&this.wi.isZero()},i.kp=function(){if(0===this.mb)return this.wi.isZero()?NaN:this.wi.isNegative()?-1/0:1/0;var t=this.wi.divide(this.mb),n=this.wi.subtract(t.multiply(this.mb));return t.toNumber()+n.toNumber()/this.mb},i.Yp=function(){if(0===this.mb)throw new f("Failed to convert timestamp");return this.wi},i.Mb=function(){return new Date(0===this.mb?NaN:this.Ab(1e3).wi.toNumber())},i.xb=function(){return new Vt(0===this.mb?this.kp():this.wi.toNumber(),this.mb)},i.Ab=function(t,i){void 0===i&&(i=Yt.Fb);var e=this.mb;if(e===t)return this;if(0===e)return this;var r=st(e,t);return new n(function(t,n,i){var e=t.cb(n),r=e[0],o=e[1];if(o.qp())return r;if(i===Yt.Fb)return o.Np()?r.Cp(jt.ob):r;if(i===Yt.Ub)return o.Np()?r:r.Ek(jt.ob);var u=o.hb(jt.Fp(2));return u.Np()?u.Dp().Ip(n)?r:r.Cp(jt.ob):u.Ip(n)?r:r.Ek(jt.ob)}(jt.xp(this.wi).hb(jt.Fp(t/r)),jt.Fp(e/r),i).Yp(),t)},i.bp=function(t){if(this===t)return rt.Es;if(0===this.mb||0===t.mb)return Wt(this,t);if(this.qp())return t.qp()?rt.Es:t.Np()?rt.Is:rt.Rs;if(t.qp())return this.Np()?rt.Rs:rt.Is;var n=c.min(this.mb,t.mb),i=this.Ab(n,Yt.Hb).wi,e=t.Ab(n,Yt.Hb).wi;return i.compare(e)},i.Dp=function(){return 0===this.mb?Xt(this):new n(this.wi.negate(),this.mb)},i.Ek=function(t){if(0===this.mb||0===t.mb)return Gt(this,t);if(this.qp())return t;if(t.qp())return this;var i=c.max(this.mb,t.mb),e=this.Ab(i,Yt.Hb),r=t.Ab(i,Yt.Hb);return new n(e.wi.add(r.wi),i)},i.hb=function(t){if(this.Pp()||d(t))return n.Db;if(this.Op()||!isFinite(t)){if(this.qp()||0===t)return n.Db;var i=this.Np()?n.Pb:n.Cb;return t<0?i.Dp():i}return this.qp()?this:new n(0===t?qt.ZERO:this.wi.multiply(t),this.mb)},i._b=function(t){if(this.Pp()||d(t))return n.Db;if(this.Op())return isFinite(t)?0===t?1/t<0?this.Dp():this:t<0?this.Dp():this:n.Db;if(!isFinite(t))return new n(qt.ZERO,this.mb);if(this.qp())return 0===t?n.Db:new n(qt.ZERO,this.mb);if(0===t){var i=this.Np()?n.Pb:n.Cb;return 1/t<0?i.Dp():i}return new n(this.wi.divide(t),this.mb)},i.Vb=function(){return[this.wi.low,this.wi.high,this.mb]},n}(Mt);function Xt(t){return t.Pp()?t:t.Np()?Ht.Cb:Ht.Pb}function Gt(t,n){return t.Pp()||n.Pp()?Ht.Db:t.Op()&&n.Op()?t.Np()===n.Np()?t:Ht.Db:t.Op()?t:n}Ht.Hp=new Ht(qt.ZERO,1e6),Ht.Db=new Ht(qt.ZERO,0),Ht.Cb=new Ht(qt.ONE,0),Ht.Pb=new Ht(qt.NEG_ONE,0);var Yt,Kt=function(t){function n(n,i){var e;return(e=t.call(this)||this).wi=void 0,e.mb=void 0,e.wi=BigInt.asIntN(64,n),e.mb=i>>>0,e}Ut(n,t),n.Nb=function(t,i){return void 0===i&&(i=1e6),n.Fp(t*i,i)},n.Fp=function(t,i){return d(t)?n.Db:t===1/0?n.Cb:t===-1/0?n.Pb:new n(BigInt(c.floor(t)),i)},n.xp=function(t,i){return new n(BigInt(t.high)<<BigInt(32)|BigInt(t.low>>>0),i)},n.Ob=function(t){return n.Nb(t.Sb,1e6)},n.Bb=function(t){return n.Fp(t.getTime(),1e3)},n.pb=function(t,n){return t.Ap(n)?t:n},n.bb=function(t,n){return t.Sp(n)?t:n},n.Lb=function(t,i,e){return n.pb(i,n.bb(e,t))};var i=n.prototype;return i.Np=function(){return this.wi<BigInt(0)},i.qp=function(){return 0!==this.mb&&this.wi===BigInt(0)},i.Op=function(){return 0===this.mb&&this.wi!==BigInt(0)},i.Pp=function(){return 0===this.mb&&this.wi===BigInt(0)},i.kp=function(){if(0===this.mb)return this.wi===BigInt(0)?NaN:this.wi<BigInt(0)?-1/0:1/0;var t=this.wi/BigInt(this.mb),n=this.wi-t*BigInt(this.mb);return Number(t)+Number(n)/this.mb},i.Yp=function(){if(0===this.mb)throw new f("Failed to convert timestamp");return this.Xb()},i.Xb=function(){var t=this.wi&BigInt(4294967295),n=this.wi>>BigInt(32)&BigInt(4294967295);return qt.fromBits(Number(t),Number(n))},i.Mb=function(){return new Date(0===this.mb?NaN:Number(this.Ab(1e3).wi))},i.xb=function(){return new Vt(0===this.mb?this.kp():Number(this.wi),this.mb)},i.Ab=function(t,i){void 0===i&&(i=Yt.Fb);var e=this.mb;if(e===t)return this;if(0===e)return this;var r=st(e,t);return new n(function(t,n,i){var e=t/n,r=t-e*n;if(r===BigInt(0))return e;if(i===Yt.Fb)return r<BigInt(0)?e-BigInt(1):e;if(i===Yt.Ub)return r<BigInt(0)?e:e+BigInt(1);var o=r*BigInt(2);return o<BigInt(0)?-o<n?e:e-BigInt(1):o<n?e:e+BigInt(1)}(this.wi*BigInt(t/r),BigInt(e/r),i),t)},i.bp=function(t){if(this===t)return rt.Es;if(0===this.mb||0===t.mb)return Wt(this,t);if(this.qp())return t.qp()?rt.Es:t.Np()?rt.Is:rt.Rs;if(t.qp())return this.Np()?rt.Rs:rt.Is;var n=c.min(this.mb,t.mb),i=this.Ab(n,Yt.Hb).wi,e=t.Ab(n,Yt.Hb).wi;return i>e?rt.Is:i<e?rt.Rs:rt.Es},i.Dp=function(){return 0===this.mb?Qt(this):new n(-this.wi,this.mb)},i.Ek=function(t){if(0===this.mb||0===t.mb)return $t(this,t);if(this.qp())return t;if(t.qp())return this;var i=c.max(this.mb,t.mb),e=this.Ab(i,Yt.Hb),r=t.Ab(i,Yt.Hb);return new n(e.wi+r.wi,i)},i.hb=function(t){if(this.Pp()||d(t))return n.Db;if(this.Op()||!isFinite(t)){if(this.qp()||0===t)return n.Db;var i=this.Np()?n.Pb:n.Cb;return t<0?i.Dp():i}return this.qp()?this:new n(0===t?BigInt(0):this.wi*BigInt(t),this.mb)},i._b=function(t){if(this.Pp()||d(t))return n.Db;if(this.Op())return isFinite(t)?0===t?1/t<0?this.Dp():this:t<0?this.Dp():this:n.Db;if(!isFinite(t))return new n(BigInt(0),this.mb);if(this.qp())return 0===t?n.Db:new n(BigInt(0),this.mb);if(0===t){var i=this.Np()?n.Pb:n.Cb;return 1/t<0?i.Dp():i}return new n(this.wi/BigInt(t),this.mb)},i.Vb=function(){var t=this.Xb();return[t.low,t.high,this.mb]},mt(n,null,[{key:"Hp",get:function(){return n.zb||(n.zb=new n(BigInt(0),1e6)),n.zb}},{key:"Db",get:function(){return n.Wb||(n.Wb=new n(BigInt(0),0)),n.Wb}},{key:"Cb",get:function(){return n.qb||(n.qb=new n(BigInt(1),0)),n.qb}},{key:"Pb",get:function(){return n.Gb||(n.Gb=new n(BigInt(-1),0)),n.Gb}}]),n}(Mt);function Qt(t){return t.Pp()?t:t.Np()?Kt.Cb:Kt.Pb}function $t(t,n){return t.Pp()||n.Pp()?Kt.Db:t.Op()&&n.Op()?t.Np()===n.Np()?t:Kt.Db:t.Op()?t:n}Kt.zb=void 0,Kt.Wb=void 0,Kt.qb=void 0,Kt.Gb=void 0,function(t){t[t.Fb=0]="Fb",t[t.Ub=1]="Ub",t[t.Hb=2]="Hb"}(Yt||(Yt={}));var Jt=function(){try{return"function"==typeof BigInt&&"bigint"==typeof BigInt(0)}catch(t){return!1}}()?Kt:Ht;function Zt(t){return Jt.xp(qt.fromBits(t[0],t[1],!1),t[2])}function tn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var nn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];f.apply(this,n)};(nn.prototype=a.create(f.prototype)).constructor=nn;var en=function(t){function n(n,i){var e;return(e=t.call(this)||this).cause=void 0,e.message=n||"Unknown error",e.cause=i,f.captureStackTrace&&f.captureStackTrace(tn(e),e.constructor),e}return Ut(n,t),mt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(nn),rn=function(){function t(){this.Ns=!1,this.Ds=!1,this.Cs=[],this.Ps=[]}var n=t.prototype;return n.Os=function(){if(!this.Ns&&!this.Ds){this.Ns=!0;for(var t=0,n=this.Cs.slice();t<n.length;t++){(0,n[t])()}this.Bs()}},n.Bs=function(){if(!this.Ds){this.Ds=!0;for(var t=0,n=this.Ps.slice();t<n.length;t++){(0,n[t])()}vt(this.Cs),vt(this.Ps)}},n.Ls=function(t){this.Ds||this.Cs.push(t)},n.Ms=function(t){this.Ds||at(this.Cs,t)},n.xs=function(t){this.Ds||this.Ps.push(t)},n.Fs=function(t){this.Ds||at(this.Ps,t)},t}(),on=function(){function t(){this.Us=new rn}var n=t.prototype;return n.Hs=function(){this.Us.Os()},n.Bs=function(){this.Us.Bs()},n.Vs=function(t){var n=this.Us;if(!n.Ns)if(t.Ns)n.Os();else if(!n.Ds&&!t.Ds){var i=function(){e(),n.Os()},e=function e(){t.Ms(i),t.Fs(e),n.Ms(i),n.Fs(e)};t.Ls(i),t.xs(e),n.Ls(i),n.xs(e)}},n.Xs=function(){var n=new t,i=new t,e=n.zs,r=i.zs,o=this.Us,u=function(){e.Ns&&r.Ds||r.Ns&&e.Ds?o.Os():e.Ds&&r.Ds&&o.Bs()};e.Ls(u),r.Ls(u),e.xs(u),r.xs(u),n.Vs(o),i.Vs(o);return o.xs(function(){e.Ms(u),r.Ms(u),e.Fs(u),r.Fs(u)}),[n,i]},mt(t,[{key:"zs",get:function(){return this.Us}}]),t}(),un=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Ut(n,t),mt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(en);function sn(t){return t instanceof f&&"AbortError"===t.name}function fn(t,n){return t.then(function(t){return n.Bs(),t},function(t){throw n.Bs(),t})}var hn;j.resolve();!function(t){t.mK="HELLO",t.yK="HI_THERE",t.kK="INITIALIZE",t.pK="APPEND_INIT",t.bK="APPEND_DATA",t.AK="ACK",t.TK="REMOVE",t.SK="DESTROY_SESSION"}(hn||(hn={}));var an="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),cn=16383;function vn(t,n,i){for(var e,r,o,u=[],s=n;s<i;s+=3)u.push((e=t[s],r=t[s+1],o=t[s+2],an[e>>2]+an[(3&e)<<4|r>>4]+an[(15&r)<<2|o>>6]+an[63&o]));return u.join("")}var ln=function(){function t(t){void 0===t&&(t=0),this.Ou=t}var n=t.prototype;return n.Pu=function(t){this.Ou+=t},n.Bu=function(t){this.Ou=t},n.Lu=function(){return new t(this.Cu)},mt(t,[{key:"Cu",get:function(){return this.Ou}}]),t}();function dn(t,n){return null!=t&&t.substr(0,n.length)===n}var wn=16384;function bn(t){var n=t.length;if(n<=wn)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=wn)i.push(String.fromCharCode.apply(String,t.slice(e,e+wn)));return i.join("")}function gn(t){return 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 bn(n)}(t)}function mn(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function pn(t,n){return t>>n&63|128}function yn(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(mn(t),n.push(t>>12&15|224),n.push(pn(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(pn(t,12)),n.push(pn(t,6))),n.push(63&t|128)):n.push(t)}function _n(t,n){if(n.Cu>=t.length)throw new f("Invalid byte index");var i=255&t[n.Cu];if(n.Pu(1),128==(192&i))return 63&i;throw new f("Invalid continuation byte")}function Sn(t,n){var i=n.Cu;if(i>t.length)throw new f("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Pu(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|_n(t,n);if(r>=128)return r;throw new f("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|_n(t,n)<<6|_n(t,n);if(o>=2048)return mn(o),o;throw new f("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|_n(t,n)<<12|_n(t,n)<<6|_n(t,n);if(u>=65536&&u<=1114111)return u}throw new f("Invalid UTF-8 detected")}var In=65279;function Tn(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Cu,i);return n.Pu(2),e}function En(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Cu,i,e),n.Pu(2)}function kn(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Cu+2<=t.byteLength;){var o=Tn(t,n,i);if(e&&!o)break;r.push(o)}return bn(r)}(Pn(t),new xn,n,!1)}function Rn(t,n){void 0===n&&(n=!1);var i=new w(2*t.length);return function(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1)En(t,n,i.charCodeAt(o),e)}(Pn(i),new xn,t,n),i}function Nn(t){return gn(function(t,n){var i,e=[],r=new xn;if(!n){if(!1===(i=Sn(t,r)))return e;i===In||e.push(i)}for(;!1!==(i=Sn(t,r));)e.push(i);return e}(An(t)))}function On(t){return new w(function(t){for(var n=[],i=0;i<t.length;i++)yn(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 Pn(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function An(t){return new w(t.buffer,t.byteOffset,t.byteLength)}function Dn(t){return t instanceof ArrayBuffer?new w(t):An(t)}function Cn(t){if(t.slice)return t.slice(0);var n=new w(t.byteLength);return n.set(t,0),n}var xn=function(){function t(t){void 0===t&&(t=0),this.Ou=t}var n=t.prototype;return n.Pu=function(t){this.Ou+=t},n.Bu=function(t){this.Ou=t},n.Lu=function(){return new t(this.Cu)},n.Fu=function(){return new ln(this.Cu<<3)},mt(t,[{key:"Cu",get:function(){return this.Ou}}]),t}(),Bn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],Fn=ArrayBuffer.isView||function(t){return t&&ct(Bn,nt.call(t))};function Ln(t){var n=t.reduce(function(t,n){return t+n.byteLength},0);return function(t,n){for(var i=new w(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 zn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=cn)e.push(vn(t,o,c.min(r,o+cn)));if(1===i){var u=t[n-1];e.push(an[u>>2]+an[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(an[s>>2]+an[(3&s)<<4|f>>4]+an[(15&f)<<2]+"=")}return e.join("")}(new w(t))}function Un(t){return t&&"function"!=typeof t?t.slice():t}function Mn(t,n,i){if(i)if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var Wn=function(){function t(t){var n=this;this.Ws=pt(),this.qs=void 0,this.Gs=void 0,this.Qs=function(t){n.Ys(t)},this.Gs=t||this}var n=t.prototype;return n.js=function(t,n){if("function"==typeof n)if("string"==typeof t)this.Ks(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.Ks(e,n)}},n.Ks=function(t,n){var i=this.Ws[t];i?"function"==typeof i?this.Ws[t]=[i,n]:i.push(n):this.Ws[t]=n},n.Zs=function(t){if("function"==typeof t){var n=this.qs;n?"function"==typeof n?this.qs=[n,t]:n.push(t):this.qs=t}},n.Js=function(){this.Ws=pt(),this.qs=void 0},n.Ys=function(t){var n=Un(this.Ws[t.type]),i=Un(this.qs);Mn(this.Gs,t,n),Mn(this.Gs,t,i)},n.$s=function(t,n){if("function"==typeof n)if("string"==typeof t)this.tu(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.tu(e,n)}},n.tu=function(t,n){var i=this.Ws[t];i&&("function"==typeof i?i===n&&(this.Ws[t]=void 0):at(i,n))},n.nu=function(t){if("string"==typeof t)this.Ws[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.Ws[i]=void 0}},n.uu=function(t){var n=this.qs;n&&("function"==typeof n?n===t&&(this.qs=void 0):at(n,t))},n.ou=function(t,n){var i=this;return new j(function(e,r){if(n&&n.Ns)return r(new un);var o=function(t){s(),e(t)},u=function(){s(),r(new un)},s=function(){i.$s(t,o),n&&n.Ms(u)};i.js(t,o),n&&n.Ls(u)})},t}(),qn=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},jn=function(t){function n(n){var i;return(i=t.call(this,"append")||this).Hi=void 0,i.Hi=n,i}return Ut(n,t),n}(qn),Vn=function(t){function n(n){var i;return(i=t.call(this)||this).Kw=void 0,i.Lct=0,i.Wi=new w(0),i.ao=!1,i.A=!1,i.D=void 0,i.Kw=n,i}Ut(n,t);var i=n.prototype;return i.$V=function(t,n){this.C&&0===this.Wi.length&&(this.Wi=this.D.slice()),this.Lct+=n.kp(),this.Wi=Ln([this.Wi,t]),this.Ys(new jn(t))},i.Wa=function(){this.Za||(this.Ys(new qn("close")),this.ao=!0)},mt(n,[{key:"Vm",get:function(){return this.Lct}},{key:"Hi",get:function(){return this.Wi}},{key:"Za",get:function(){return this.ao}},{key:"C",get:function(){return this.A},set:function(t){this.A=t}},{key:"B",get:function(){return this.D},set:function(t){this.D=t}}]),n}(Wn),Hn=function(){function t(t){this.L=!1,this.W=void 0,this.H=void 0,this.DEFAULT_SEGMENT_DURATION_IN_SECONDS=1.1,this.Yg="sync-seg-"+dt(),this.X=this.DEFAULT_SEGMENT_DURATION_IN_SECONDS,this.tt=t;for(var n=0,i=this.tt;n<i.length;n++){var e=i[n];if(e.match(/video/))this.W=new Vn(this.it(e));else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");this.H=new Vn(this.it(e))}}}var n=t.prototype;return n.it=function(t){for(var n=0,i=this.tt;n<i.length;n++){if(i[n]===t)return this.X}},n.Wa=function(){this.W&&this.W.Wa(),this.H&&this.H.Wa()},mt(t,[{key:"et",get:function(){return this.L},set:function(t){this.L=t}},{key:"rt",get:function(){var t,n;return Boolean((null==(t=this.W)?void 0:t.C)||(null==(n=this.H)?void 0:n.C))}}]),t}(),Xn=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).qk=void 0,i.qk=n,i}return Ut(n,t),n}(qn),Gn=function(t){function n(n){var i;return(i=t.call(this)||this).st=[],i.ht=void 0,i.pt=[],i.tn=yt(),i.nn=yt(),i.en=0,i.rn=0,i.tt=n,i.ht=new Hn(i.tt),i.ht.H&&(i.ht.H.C=!0),i.ht.W&&(i.ht.W.C=!0),i.pt.push(new Hn(i.tt)),i}Ut(n,t);var i=n.prototype;return i.sn=function(){var t=[].concat(this.st,[this.ht],this.pt);return this.st.length=0,t},i.$V=function(t){this.an(t),this.ln(t),this.bn(t)},i.iX=function(t){this.an(t)},i.Qa=function(t){this.an(t),this.bn(t)},i.Bs=function(){this.ht.Wa(),this.pt.forEach(function(t){return t.Wa()}),this.st.length=0},i.ln=function(t){var n=Zt(t.startPts),i=Zt(t.totalDuration);this.nn.set(t.mimeType,n.Ek(i))},i.gn=function(){this.ht.Wa(),this.st.push(this.ht);var t=this.pt.shift(),n=this.mn();t?(this.ht=t,this.pt.push(n)):this.ht=n},i.mn=function(){var t=new Hn(this.tt);return t.H&&(t.H.B=this.ht.H.B),t.W&&(t.W.B=this.ht.W.B),t},i.kn=function(t){var i=!this.ht.H||0===this.ht.H.Vm,e=!this.ht.W||0===this.ht.W.Vm,r=this.ht.H&&this.ht.H.C,o=this.ht.W&&this.ht.W.C,u=e&&(i&&!this.ht.et||r),s=i&&(e&&!this.ht.et||o);("audio"===n.ti(t)&&!s||"video"===n.ti(t)&&!u)&&(this.gn(),this.gn())},i.an=function(t){var n=t.mimeType,i=t.kind,e=this.tn.get(n);void 0===e&&(i!==hn.pK&&i!==hn.bK||(e=[],this.tn.set(n,e))),void 0!==e&&e.push(t)},i.bn=function(t){for(var n=this.ii(t),i=0;i<n.length;i++){var e=n[i];switch(e.kind){case hn.pK:this.ui(e),this.en=0,this.rn=0;break;case hn.TK:this.si(e);break;case hn.bK:this.fi(e)}}},i.ui=function(t){var n=t.mimeType,i=t.segment;this.kn(n),n.match(/video/)?(this.ht.W.B=i,this.pt.forEach(function(t){t.W.B=i})):(this.ht.H.B=i,this.pt.forEach(function(t){t.H.B=i})),this.ht.H&&(this.ht.H.C=!0),this.ht.W&&(this.ht.W.C=!0)},i.fi=function(t){var n=t.mimeType.match(/audio/),i=Zt(t.totalDuration);if(n?this.ht.H.$V(t.segment,i):this.ht.W.$V(t.segment,i),n||1===this.tt.length){this.en+=i.kp();var e=this.ht.it(t.mimeType);this.en>=this.rn+e&&(this.rn+=e,this.gn())}},i.si=function(t){this.nn.set(t.mimeType,void 0),this.kn(t.mimeType),this.ht.H&&(this.ht.H.C=!0),this.ht.W&&(this.ht.W.C=!0),this.st.length=0,this.Ys(new Xn(Zt(t.endTime)))},i.ii=function(t){var n=this;if(t.kind===hn.TK)return this.hi(t);var i=[];return this.tn.forEach(function(t){if(t&&t.length>0){var e=ht(t,function(t){return t.kind===hn.TK});-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!ct(i,u)){var s=n.hi(u);if(s.length>0)i.push.apply(i,s);else if(u.kind===hn.bK)break}}}}),i},i.hi=function(t){for(var i,e=this.tn.get(t.mimeType),r=0,o=this.tt;r<o.length;r++){var u=o[r];if(u!==t.mimeType){i=u;break}}if(!i)return e.splice(0,e.indexOf(t)+1);if(t.kind===hn.pK)return[];var s=this.nn.get(i);if(void 0===s)return[];if(t.kind===hn.TK){var f=this.vi(i);if(f.length>0){var h=e.splice(0,e.indexOf(t));return e.splice(0,1),[].concat(h,f,[t])}return[]}if(n.li(t,s)){var a=e.splice(0,e.indexOf(t));e.splice(0,1);var c=this.bi(t,a,i);return[].concat(a,c,[t])}return[]},i.bi=function(t,i,e){var r=this.tn.get(e);if(!r)return[];var o=Zt(t.startPts),u=Zt(t.totalDuration),s=o.Ek(u),f=ht(r,function(t){return t.kind===hn.TK}),h=f-1;-1===f&&(h=r.length-1);for(var a=h+1,c=0;c<=h&&a===h+1;c++){var v=r[c];v.kind!==hn.bK||n.li(v,s)||(a=c)}var l=-1;return-1!==ht(i,function(t){return t.kind===hn.pK})&&(l=ht(r,function(t){return t.kind===hn.pK})),l>a&&(a=l+1),a>0?(r[a-1].kind===hn.pK&&(a-=1),r.splice(0,a)):[]},i.vi=function(t){var n=this.tn.get(t);if(n){var i=ht(n,function(t){return t.kind===hn.TK});if(i>=0)return n.splice(0,i+1)}return[]},n.li=function(t,n){var i=n,e=Zt(t.startPts);return i.Ap(e)},i.mi=function(){var t="[MEDIABUFFER] endPTS: ";this.nn.forEach(function(i,e){t=t.concat(n.ti(e)+" = "+(null==i?void 0:i.kp())+" ")}),J.gr(t)},i.pi=function(){var t=this;J.gr("[MEDIABUFFER] unsyncedMessageMap:"),this.tn.forEach(function(i,e){void 0!==i&&t.yi(n.ti(e),i)})},i.yi=function(t,i){var e=t+": [";null==i||i.forEach(function(t){e=e.concat(" "+t.kind+"("+n.ti(t.mimeType)+")")}),e=e.concat(" ]"),J.gr(e)},n.ti=function(t){return t.match(/audio/)?"audio":"video"},n}(Wn);var Yn=function(){function t(t,n,i){var e=this;this.ki=[],this.te=yt(),this.ie=0,this.cet=void 0,this.ee=void 0,this.se=function(t){if(t.qk.Ap(Jt.Nb(ot)))for(;e.ki.length>0;)e.he()},this.ae=n,this.ce=i,this.ee=[new kt,new Rt(8),new Nt(1),new Pt,new Ot(0)],this.cet=t,this.cet.js("remove",this.se)}var n=t.prototype;return n.Rtt=function(t,n){var i=this.te.get(t);if(i)if(n===wt.Il){var e=i.W;if(e)return e}else{var r=i.H;if(r)return r}throw new f(t+" segment not available!")},n.Bs=function(){this.ki.length=0,this.ae.sE=0,this.te.clear(),this.ie=0},n.cS=function(){return this.ve(),new Ft([].concat(this.ee,[this.ae,this.ce],this.ki))},n.ve=function(){for(var t=this.cet.sn(),n=0;n<t.length;n++){var i=t[n];if(!this.te.has(i.Yg)){i.et=!0;var e=i.X;i.rt&&this.ki.push(new Ct),this.te.set(i.Yg,i),this.ki.push(new Et(e,i.Yg)),this.ie+=e}}this.de()},n.de=function(){for(;this.ie>300;)this.he()},n.he=function(){var t=this.ki.shift();void 0!==t&&(t.hs===St.vl?(this.be(t),this.ie-=t.T,this.ae.sE++):function(t){return t.hs===St.p}(t)&&this.ce.sE++)},n.be=function(t){this.te.delete(t.k)},t}(),Kn=function(){function t(t){this.O$t=void 0,this.tr=void 0,this.nr=void 0,this.tt=t,this.O$t=new Lt,this.tr=new Gn(this.tt);for(var n=0,i=this.tt;n<i.length;n++){var e=i[n];if(this.nr=new Yn(this.tr,new Dt(0),new xt(0)),e.match(/video/)){var r=new At("video/index.m3u8");this.O$t.P(r)}else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");var o=new Bt("audio/index.m3u8");this.O$t.P(o)}}}var n=t.prototype;return n.er=function(t){if("master.m3u8"===t){if(this.O$t)return this.O$t.cS;throw new f("Master playlist not ready yet")}if(this.nr)return this.nr.cS();throw new f("Media playlist not ready yet")},n.Rtt=function(n){var i=n.split("/")[1];return this.nr.Rtt(i,t.ur(n))},n.iX=function(t){this.tr.iX(t)},n.$V=function(t){this.tr.$V(t)},n.Eit=function(t){this.tr.Qa(t)},n.Bs=function(){this.tr.Bs(),this.O$t.Bs(),this.nr&&this.nr.Bs()},t.ur=function(t){return t.match(/video/)?wt.Il:wt.El},t}();var Qn,$n=function(){function n(t,n){var i=this;this.int=void 0,this.mNt=function(t){var n,e,r;return Z.async(function(o){for(;;)switch(o.prev=o.next){case 0:n=t.data,o.t0=n.kind,o.next=o.t0===hn.kK?4:o.t0===hn.pK?7:o.t0===hn.bK?9:o.t0===hn.TK?11:13;break;case 4:return e=n.mediaBufferConfigs,i.int=new Kn(e),o.abrupt("break",13);case 7:return i.int.iX(n),o.abrupt("break",13);case 9:return i.int.$V(n),o.abrupt("break",13);case 11:return i.int.Eit(n),o.abrupt("break",13);case 13:r={kind:hn.AK},i.sr.postMessage(r);case 15:case"end":return o.stop()}},null,null,null,j)},this.sr=t,this.hr=n,this.sr.onmessage=this.mNt}var i=n.prototype;return i.ar=function(t){return this.int.er(t)},i.cr=function(n){if(this.int){if(n.match(/m3u8/)){var i=this.ar(n);return new Response(i.O(),{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}var e={"Content-Type":n.match(/video/)?"video/mp4":"audio/mp4"},r=function(t){return{start:function(n){var i,e;return Z.async(function(r){for(;;)switch(r.prev=r.next){case 0:if(n.enqueue(t.Hi),!t.Za){r.next=6;break}return n.close(),r.abrupt("return");case 6:i=function(t){n.enqueue(t.Hi)},t.js("append",i),e=function e(){n.close(),t.$s("append",i),t.$s("close",e)},t.js("close",e);case 10:case"end":return r.stop()}},null,null,null,j)}}}(this.Stt(n)),o=new t.ReadableStream(r);return new Response(o,{headers:e})}throw new f("Stream not active.")},i.Stt=function(t){return this.int.Rtt(t)},i.close=function(){this.sr.close(),this.int&&this.int.Bs()},n}(),Jn=function(){function t(){var t=this;this.Hq=yt(),this.JRt=void 0,this.mNt=function(n){var i=n.data;switch(i.kind){case hn.mK:t.vr().catch(lt);var e=i.port,r=dt(),o=new $n(e,n.source.id);t.Hq.set(r,o);e.addEventListener("message",function n(i){i.data.kind===hn.SK&&(t.lr(r),e.removeEventListener("message",n))});var u={kind:hn.yK,sessionId:r};e.postMessage(u)}},this.br=function(n){if(dn(n.request.url,bt)){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/");if(void 0!==e&&void 0!==r){var o=t.Hq.get(e);if(o)try{var u=o.cr(r);n.respondWith(u)}catch(t){n.respondWith(j.resolve(new Response(void 0,{headers:{message:"Segment not found"},status:404,statusText:"Not Found"})))}else n.respondWith(j.resolve(new Response(void 0,{headers:{message:"Given session ["+e+"] not found"},status:404,statusText:"Not Found"})))}else n.respondWith(j.resolve(new Response(void 0,{headers:{message:"No session ["+e+"] or resource ["+r+"] provided"},status:404,statusText:"Not Found"})))}}}var n=t.prototype;return n.Wy=function(t){this.JRt=t,t.addEventListener("message",this.mNt),t.addEventListener("fetch",this.br)},n.lr=function(t){var n=this.Hq.get(t);n&&n.close(),this.Hq.delete(t)},n.vr=function(){var t,n,i=this;return Z.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z.awrap(this.JRt.clients.matchAll());case 2:t=e.sent,n=t.map(function(t){return t.id}),this.Hq.forEach(function(t,e){ct(n,t.hr)||i.lr(e)});case 5:case"end":return e.stop()}},null,this,null,j)},t}();Jn.mr=new Jn,function(t){t.l="web",t.g="android",t.R="android-tv",t.N="ios",t.M="tvos",t.F="chromecast"}(Qn||(Qn={}));var Zn=e?e.userAgent:"",ti=Zn.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),ni=Zn.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),ii=Zn.match(/Android ([0-9\.]+)/i),ei=Zn.match(/Windows NT ([0-9\.]+)/i),ri=Zn.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),oi=Zn.match(/Firefox\/([0-9\.]+)/i),ui=Zn.match(/OPR\/(\d+\.\d+)/i),si=Zn.match(/Tizen ([0-9\.]+)/i),fi=function(){function n(){this.U=Boolean("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch||e&&e.msMaxTouchPoints),this.V=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Zn)||/(macintosh|mac(?=_powerpc)\s)/i.test(Zn),this.q=/Windows NT/i.test(Zn),this.G=ei?l(ei[1]):0,this.Y=/Android/i.test(Zn),this.j=ii?l(ii[1]):0,this.K=/windows phone (8|8\.1)/i.test(Zn),this.Z=/iPhone/i.test(Zn),this.J=/iPad/i.test(Zn),this.nt=this.V&&this.U&&!this.J,this.ut=/iPod/i.test(Zn),this.ot=/Mobile Safari/i.test(Zn),this.ct=/EOSSTB/i.test(Zn),this.ft=(this.Z||this.J||this.nt||this.ut)&&!this.K,this.vt=this.K||this.ft||this.Y||this.ot,this.dt=/CriOS/i.test(Zn),this._t=Boolean(t.chrome&&/google/i.test(e.vendor))||this.dt,this.wt=this._t&&/Edg\//i.test(e.userAgent),this.yt=ni?v(ni[1],10):0,this.kt=Boolean(t.chrome||/Chrome/i.test(Zn)||/CriOS/i.test(Zn)),this.bt=ti?v(ti[1],10):0,this.At=/SMART-TV.*Tizen/i.test(Zn),this.Tt=si?l(si[1]):0,this.St=/webos|web0s/i.test(Zn),this.Et=/Edge\/\d+/i.test(Zn),this.It=/Trident/i.test(Zn),this.Rt=this.It&&!t.ActiveXObject&&"ActiveXObject"in t,this.Nt=/Vivaldi/i.test(Zn),this.Dt=/Firefox/i.test(Zn)&&!/Seamonkey/i.test(Zn),this.Ct=oi?l(oi[1]):0,this.Pt=/Safari/i.test(Zn)&&!/Chrome/i.test(Zn)&&!this.K&&!this.At,this.Ot=ri?l(ri[2]):0,this.Bt=Boolean(ui),this.Lt=ui?l(ui[1]):0,this.Mt=/CrKey/.test(Zn),this.xt=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(Zn),this.Ft="web"===Qn.R,this.Ut="web"===Qn.g,this.Ht=this.Ut||this.Ft,this.Vt="web"===Qn.N,this.Xt="web"===Qn.M,this.zt="web"===Qn.F}return mt(n,[{key:"Wt",get:function(){return this.U}},{key:"qt",get:function(){return this.V}},{key:"Gt",get:function(){return this.q}},{key:"Qt",get:function(){return this.G}},{key:"Yt",get:function(){return this.Y}},{key:"jt",get:function(){return this.j}},{key:"Kt",get:function(){return this.K}},{key:"Zt",get:function(){return this.Z}},{key:"Jt",get:function(){return this.J}},{key:"$t",get:function(){return this.nt}},{key:"in",get:function(){return this.ut}},{key:"un",get:function(){return this.ft}},{key:"hn",get:function(){return this.ct}},{key:"cn",get:function(){return this.ot}},{key:"fn",get:function(){return this.vt}},{key:"vn",get:function(){return this.dt}},{key:"dn",get:function(){return this._t}},{key:"_n",get:function(){return this.bt}},{key:"wn",get:function(){return this.wt}},{key:"yn",get:function(){return this.yt}},{key:"pn",get:function(){return this.At}},{key:"An",get:function(){return this.Tt}},{key:"Tn",get:function(){return this.St}},{key:"Sn",get:function(){return this.Et}},{key:"En",get:function(){return this.It}},{key:"In",get:function(){return this.Rt}},{key:"Rn",get:function(){return this.Nt}},{key:"Nn",get:function(){return this.Dt}},{key:"Dn",get:function(){return this.Ct}},{key:"Cn",get:function(){return this.Pt}},{key:"Pn",get:function(){return this.Ot}},{key:"On",get:function(){return this.Bt}},{key:"Bn",get:function(){return this.Lt}},{key:"Ln",get:function(){return this.Mt}},{key:"Mn",get:function(){return this.xt}},{key:"xn",get:function(){if(!(this.Tn||this.pn))return!1;var t=this._n;return void 0===t||Number(t)<56}},{key:"Fn",get:function(){return this.Ft}},{key:"Un",get:function(){return this.Ut}},{key:"Hn",get:function(){return this.Ht}},{key:"Vn",get:function(){return this.Vt}},{key:"Xn",get:function(){return this.Xt}},{key:"zn",get:function(){return this.zt}},{key:"Wn",get:function(){return this.kt}}]),n}();fi.qn=new fi;var hi=fi.qn,ai=!(hi.En&&!hi.In),ci=t.console;function vi(t){if(et(t))try{return JSON.stringify(t)}catch(t){}return t}function li(t){return t.map(vi).join(" ")}function di(t){var n=ci&&ci[t];return n?n.bind&&ai?n.bind(ci):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];ci[t](li(i))}:void 0}var wi,bi=di("log")||lt,gi=di("warn")||bi.bind(void 0,"WARNING:"),mi=di("error")||bi.bind(void 0,"ERROR:"),pi=(wi=ci&&ci.assert)?wi.bind&&ai?wi.bind(ci):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];ci.assert(t,li(i))}:function(t){if(!t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];mi.apply(void 0,["Assertion failed:"].concat(i))}};function yi(){return Date.now()||(new Date).getTime()}var _i;qt.fromNumber(ot);!function(t){t[t.Kn=1]="Kn",t[t.Jn=2]="Jn",t[t.Zn=3]="Zn",t[t.$n=4]="$n",t[t.ni=9]="ni"}(_i||(_i={}));var Si=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Ut(n,t),n}(en),Ii=function(){function t(){}return t.prototype.ei=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Si(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Si;return new Pi(n)},t}(),Ti=function(){function t(t){this.ri=void 0,this.ri=t}var n=t.prototype;return n.oi=function(t){return this.ri.isEqualNode(t.ri)},n.ai=function(n){return new t(this.ri.cloneNode(n))},mt(t,[{key:"jn",get:function(){return _i.Jn}},{key:"ci",get:function(){var t;return null!=(t=this.ri.localName)?t:Ci(this.ri.nodeName)}},{key:"di",get:function(){return this.ri.nodeName}},{key:"_i",get:function(){var t;return null!=(t=this.ri.namespaceURI)?t:void 0}},{key:"gi",get:function(){var t;return null!=(t=this.ri.prefix)?t:void 0}},{key:"wi",get:function(){return this.ri.nodeValue}}]),t}(),Ei=function(){function t(t){this.Ai=void 0,this.Ti=void 0,this.Ai=t}var n=t.prototype;return n.Si=function(t){return this.Ei.filter(function(n){return Ai(n)&&n.Ii===t})},n.Ri=function(t,n){return this.Ei.filter(function(i){return Ai(i)&&i.ci===n&&i._i===t})},n.Ni=function(t){this.Ai.appendChild(t.Di),this.Ti&&this.Ti.push(t)},n.oi=function(t){return this.Ai.isEqualNode(t.Di)},mt(t,[{key:"Ei",get:function(){return void 0===this.Ti&&(this.Ti=function(t){for(var n=[],i=0;i<t.length;i++){var e=Di(t.item(i));e&&n.push(e)}return n}(this.Ai.childNodes)),this.Ti}},{key:"Ci",get:function(){return this.Ei.filter(Ai)}},{key:"Di",get:function(){return this.Ai}}]),t}(),ki=function(t){function n(n){return t.call(this,n)||this}Ut(n,t);var i=n.prototype;return i.Pi=function(t){if(this.Ai.hasAttribute(t))return this.Ai.getAttribute(t)},i.Oi=function(t,n){if(this.Ai.hasAttributeNS(t,n))return this.Ai.getAttributeNS(t,n)},i.Bi=function(t){this.Ai.removeAttribute(t)},i.Li=function(t,n){this.Ai.removeAttributeNS(t,n)},i.Mi=function(t,n){this.Ai.setAttribute(t,n)},i.xi=function(t,n,i){this.Ai.setAttributeNS(t,n,i)},i.ai=function(t){return new n(this.Ai.cloneNode(t))},mt(n,[{key:"jn",get:function(){return _i.Kn}},{key:"ci",get:function(){var t;return null!=(t=this.Ai.localName)?t:Ci(this.Ai.nodeName)}},{key:"_i",get:function(){var t;return null!=(t=this.Ai.namespaceURI)?t:void 0}},{key:"gi",get:function(){var t;return null!=(t=this.Ai.prefix)?t:void 0}},{key:"Ii",get:function(){return this.Ai.nodeName}},{key:"Fi",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Ti(t.item(i)));return n}(this.Ai.attributes)}},{key:"Ui",get:function(){return this.Ai.textContent}}]),n}(Ei),Ri=function(){function t(t){this.Ai=void 0,this.Ai=t}return t.prototype.oi=function(t){return this.Hi===t.Hi},mt(t,[{key:"Hi",get:function(){return this.Ai.nodeValue}},{key:"Di",get:function(){return this.Ai}}]),t}(),Ni=function(t){function n(n){return t.call(this,n)||this}return Ut(n,t),n.prototype.ai=function(t){return new n(this.Ai.cloneNode(t))},mt(n,[{key:"jn",get:function(){return _i.Zn}}]),n}(Ri),Oi=function(t){function n(n){return t.call(this,n)||this}return Ut(n,t),n.prototype.ai=function(t){return new n(this.Ai.cloneNode(t))},mt(n,[{key:"jn",get:function(){return _i.$n}}]),n}(Ri),Pi=function(t){function n(n){return t.call(this,n)||this}return Ut(n,t),n.prototype.ai=function(t){return new n(this.Ai.cloneNode(t))},mt(n,[{key:"jn",get:function(){return _i.ni}},{key:"Vi",get:function(){return new ki(this.Ai.documentElement)}}]),n}(Ei);function Ai(t){return function(t){return t.jn===_i.Kn}(t)}function Di(t){switch(t.nodeType){case _i.Kn:return new ki(t);case _i.Zn:return new Ni(t);case _i.$n:return new Oi(t)}}function Ci(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}function xi(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),a.defineProperty(t,e.key,e)}}function Bi(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){Fi(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Fi(i,null,t.length,t),t}function Fi(t,n,i,e){var r,o,u,s,f,h=t.length,a=0,c=2*i;for(r=0;r<h;r+=c)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[a++]=t[s++]:e[a++]=t[f++];else if(s<o)e[a++]=t[s++];else{if(!(f<u))break;e[a++]=t[f++]}}var Li=/[a-zA-Z]/,zi=/[0-9]/,Ui=/[0-9a-fA-F]/,Mi=/^0x/i,Wi=/^[0-9]+$/,qi=/^[0-9a-fA-F]+$/,ji=/^[0-7]+$/,Vi=a.prototype.toString,Hi=Array.isArray||function(t){return"[object Array]"===Vi.call(t)},Xi="undefined"!=typeof Symbol&&"symbol"==typeof Symbol.iterator;function Gi(t){return Hi(t)?t:Array.from(t)}function Yi(t){return t>=65&&t<=90}function Ki(t){return Yi(t)||function(t){return t>=97&&t<=122}(t)}function Qi(t){return t>=48&&t<=57}function $i(t){return Qi(t)||Ki(t)}function Ji(t){return Qi(t)||t>=65&&t<=70||t>=97&&t<=102}function Zi(t){return Yi(t)?t+32:t}function te(t){return Qi(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 ie=c.min,ee=String.fromCharCode,re=16384;function oe(t){for(var n=t.length,i=[],e=0;e<n;e+=re){var r=ie(e+re,n);i.push(ee.apply(null,t.slice(e,r)))}return i.join("")}var ue=/[^\0-\x7E]/,se=/[\x2E\u3002\uFF0E\uFF61]/g,fe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},he=c.floor,ae=String.fromCharCode;function ce(t){throw new RangeError(fe[t])}function ve(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 le,de,we,be=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},ge=function(t,n,i){var e=0;for(t=i?he(t/700):t>>1,t+=he(t/n);t>455;e+=36)t=he(t/35);return he(e+36*t/(t+38))},me=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(se,".")).split("."),n).join(".");return e+r}(t,function(t){return ue.test(t)?"xn--"+function(t){for(var n=[],i=(t=ve(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(ae(f))}var h=n.length,a=h;for(h&&n.push("-");a<i;){for(var c=2147483647,v=0,l=t;v<l.length;v++){var d=l[v];d>=e&&d<c&&(c=d)}var w=a+1;c-e>he((2147483647-r)/w)&&ce("overflow"),r+=(c-e)*w,e=c;for(var b=0,g=t;b<g.length;b++){var m=g[b];if(m<e&&++r>2147483647&&ce("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-_,I=36-_;n.push(ae(be(_+S%I,0))),p=he(S/I)}n.push(ae(be(p,0))),o=ge(r,w,a==h),r=0,++a}}++r,++e}return n.join("")}(t):t})};function pe(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 oe(n)}function ye(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function _e(t,n){return t>>n&63|128}function Se(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(ye(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 Ie(t){for(var n=[],i=0;i<t.length;i++){Se(t[i],n)}return n}function Te(){if(we>=de)throw new f("Invalid byte index");var t=255&le[we];if(we++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function Ee(){var t,n;if(we>de)throw new f("Invalid byte index");if(we===de)return!1;if(t=255&le[we],we++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Te())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Te()<<6|Te())>=2048)return ye(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Te()<<12|Te()<<6|Te())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}function ke(t){return[37,ne(t>>4),ne(15&t)]}function Re(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Ne(t){return Re(t)||32===t||34===t||60===t||62===t||96===t}function Oe(t){return Ne(t)||35===t||63===t||123===t||125===t}function Pe(t){return Oe(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Ae(t){return t<33||t>126||34===t||35===t||60===t||62===t}function De(t){return Ae(t)||39===t}function Ce(t,n){if(!n(t))return[t];for(var i=Ie([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,ke(o))}return e}function xe(t,n){for(var i=[],e=0,r=ve(t);e<r.length;e++){var o=r[e];i.push.apply(i,Ce(o,n))}return pe(i)}function Be(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&&Ji(t[e+1])&&Ji(t[e+2])){var o=te(t[e+1])<<4|te(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Ie(t))}function Fe(t){return pe(function(t){le=t.slice(),de=le.length,we=0;for(var n,i=[];!1!==(n=Ee());)i.push(n);return i}(Be(ve(t))))}function Le(t){var n,i,e,r,o=t.length,u=[0,0,0,0,0,0,0,0],s=0,f=null,a=0;if(a<o&&":"===t[a]){if(!(a+1<o&&":"===t[a+1]))throw new h;a+=2,f=s+=1}for(;a<o;){if(8===s)throw new h("Too many groups");if(":"!==t[a]){for(var c=0,l=0;l<4&&a<o&&Ui.test(t[a]);)c=c<<4|v(t[a],16),a+=1,l+=1;if("."===t[a]){if(0===l)throw new h;if(a-=l,s>6)throw new h;for(var d=0;a<o;){var w=null;if(d>0){if(!("."===t[a]&&d<4))throw new h;a+=1}if(!zi.test(t[a]))throw new h;for(;a<o&&zi.test(t[a]);){var b=v(t[a],10);if(null===w)w=b;else{if(0===w)throw new h;if((w=10*w+b)>255)throw new h}a+=1}u[s]=u[s]<<8|w,2!==(d+=1)&&4!==d||(s+=1)}if(4!==d)throw new h;break}if(":"===t[a]){if((a+=1)===o)throw new h}else if(a<o)throw new h;u[s]=c,s+=1}else{if(null!==f)throw new h("Too many :: groups");a+=1,f=s+=1}}if(null!==f){var g=s-f;for(s=7;0!==s&&g>0;)e=f+g-1,r=void 0,r=(n=u)[i=s],n[i]=n[e],n[e]=r,s-=1,g-=1}else if(8!==s)throw new h;return u}function ze(t){var n=10,i=Wi;return Mi.test(t)?(t=t.slice(2),n=16,i=qi):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ji),""===t?0:i.test(t)?v(t,n):void 0}var Ue={Xi:4},Me=/[\0\t\n\r #%/:?@\[\\\]]/,We=/[\0\t\n\r #/:?@\[\\\]]/;function qe(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new h("Invalid IPv6 address");return{Xi:2,zi:Le(t.slice(1,-1))}}if(!n)return function(t){if(We.test(t))throw new h("Invalid code point in opaque host");var n=xe(t,Re);return""===n?Ue:{Xi:3,Wi:n}}(t);var i=function(t){return function(t){return me(t.toLowerCase())}(t)}(Fe(t));if(Me.test(i))throw new h("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=ze(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new h;if(i[i.length-1]>=c.pow(256,5-i.length))throw new h;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*c.pow(256,3-f);return s}}(i);return void 0!==e?{Xi:1,zi:e}:""===i?Ue:{Xi:0,qi:i}}function je(t){switch(t.Xi){case 0:return t.qi;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.zi);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.zi)+"]";case 3:return t.Wi;case 4:return""}}var Ve=/\+/g;function He(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(Ve," "),s=s.replace(Ve," ");var f=Fe(u),h=Fe(s);i.push([f,h])}}return i}function Xe(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=Ge(Ie(ve(e[0])))+"="+Ge(Ie(ve(e[1])))}return n}function Ge(t){for(var n,i=[],e=0;e<t.length;e++){var r=t[e];32===r?i.push(43):42===(n=r)||45===n||46===n||95===n||$i(n)?i.push(r):i.push.apply(i,ke(r))}return oe(i)}var Ye=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function Ke(t){var n=""+t,i=Ye.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if($e(o))if(Je(o)||r===i-1)e.push(Qe);else{var u=t.charCodeAt(r+1);Je(u)?(e.push(o,u),r++):e.push(Qe)}else e.push(o)}return t.slice(0,n)+oe(e)}(n,i.index):n}var Qe=65533,$e=function(t){return 55296==(63488&t)},Je=function(t){return 0!=(1024&t)};function Ze(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function tr(t){t.Gi.length=0}function nr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Gi,He(n))}function ir(t){if(t.Qi){var n=Xe(t.Gi);""===n&&(n=null),t.Qi.Qi.Yi=n}}var er=function(){function t(t){if(void 0===t&&(t=void 0),this.Qi=null,null==t)this.Gi=[];else if("object"==typeof t||"function"==typeof t)if((o=t)instanceof er&&Hi(o.Gi)&&(!Xi||o[Symbol.iterator]===rr))this.Gi=t.Gi.slice();else if(function(t){return null!=t&&(!!Hi(t)||!!Xi&&"function"==typeof t[Symbol.iterator])}(t)){this.Gi=[];for(var n=0,i=Gi(t);n<i.length;n++){var e=Gi(i[n]);if(2!==e.length)throw new h("Invalid name-value pair");this.Gi.push([Ke(e[0]),Ke(e[1])])}}else for(var r in this.Gi=[],t)a.prototype.hasOwnProperty.call(t,r)&&this.Gi.push([Ke(r),Ke(t[r])]);else(t=Ke(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Gi=He(t);var o}var n=t.prototype;return n.append=function(t,n){t=Ke(t),n=Ke(n),this.Gi.push([t,n]),ir(this)},n.delete=function(t){t=Ke(t);for(var n=this.Gi,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}ir(this)},n.get=function(t){t=Ke(t);for(var n=this.Gi,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=Ke(t);for(var n=this.Gi,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=Ke(t);for(var n=this.Gi,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=Ke(t),n=Ke(n);for(var i=this.Gi,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]),ir(this)},n.sort=function(){Bi(this.Gi,Ze),ir(this)},n.toString=function(){return Xe(this.Gi)},n.entries=function(){return new fr(this.Gi,or)},n.keys=function(){return new fr(this.Gi,ur)},n.values=function(){return new fr(this.Gi,sr)},n.forEach=function(t){var n=this;this.Gi.forEach(function(i){return t(i[1],i[0],n)})},t}(),rr=er.prototype.entries;Xi&&(er.prototype[Symbol.iterator]=rr);var or=function(t){return[t[0],t[1]]},ur=function(t){return t[0]},sr=function(t){return t[1]},fr=function(){function t(t,n){this.ji=0,this.Gi=t,this.Ki=n}return t.prototype.next=function(){return this.ji<this.Gi.length?{done:!1,value:this.Ki(this.Gi[this.ji++])}:{done:!0,value:void 0}},t}(),hr="null";var ar=a.create(null);ar.ftp=21,ar.file=0,ar.gopher=70,ar.http=80,ar.https=443,ar.ws=80,ar.wss=443;var cr=/^(?:\.|%2e)$/i,vr=/^(?:\.|%2e){2}$/i;function lr(t){return cr.test(t)}function dr(t){return vr.test(t)}function wr(t){return void 0!==ar[t]}function br(t){return wr(t.Zi)}function gr(t){return""!==t.Ji||""!==t.$i}function mr(t){var n=t.length;if(!(n>=2))return!1;if(!yr(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 pr(t){return 2===t.length&&Li.test(t[0])&&(":"===t[1]||"|"===t[1])}function yr(t){return 2===t.length&&pr(oe(t))}function _r(t){return pr(t)&&":"===t[1]}function Sr(t){var n=t.re;0!==n.length&&("file"===t.Zi&&1===n.length&&_r(n[0])||n.pop())}function Ir(t){return null===t.ue||Ue===t.ue||t.oe||"file"===t.Zi}var Tr=-1,Er=/\t|\n|\r/g,kr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Rr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Or,t=t.replace(kr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,a=ve(t=t.replace(Er,"")),c=a.length,l=0;l<=c;){var d=l<c?a[l]:Tr;switch(r){case 0:if(!Ki(d)){if(null===e){o.length=0,r=2;continue}throw new h("Invalid scheme")}o.push(Zi(d)),r=1;break;case 1:if($i(d)||43===d||45===d||46===d)o.push(Zi(d));else{if(58!==d){if(null===e){o.length=0,r=2,l=0;continue}throw new h("Invalid scheme")}var w=pe(o);if(null!==e){if(wr(i.Zi)&&!wr(w))return;if(!wr(i.Zi)&&wr(w))return;if((gr(i)||null!==i.fe)&&"file"===w)return;if("file"===i.Zi&&(i.ue===Ue||null===i.ue))return}if(i.Zi=w,null!==e)return void(br(i)&&i.fe===ar[i.Zi]&&(i.fe=null));o.length=0,"file"===i.Zi?r=13:br(i)&&n&&n.Zi===i.Zi?r=3:br(i)?r=7:47===a[l+1]?(r=4,l+=1):(i.oe=!0,i.re.push(""),r=18)}break;case 2:if(!n||n.oe&&35!==d)throw new h("Invalid scheme");n.oe&&35===d?(i.Zi=n.Zi,i.re=n.re.slice(),i.Yi=n.Yi,i._e="",i.oe=!0,r=20):"file"!==n.Zi?(r=5,l-=1):(r=13,l-=1);break;case 3:47===d&&47===a[l+1]?r=8:(r=5,l-=1);break;case 4:47===d?r=9:(r=17,l-=1);break;case 5:i.Zi=n.Zi,Tr===d?(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,i.re=n.re.slice(),i.Yi=n.Yi):47===d?r=6:63===d?(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,i.re=n.re.slice(),i.Yi="",r=19):35===d?(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,i.re=n.re.slice(),i.Yi=n.Yi,i._e="",r=20):92===d&&br(i)?r=6:(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,i.re=n.re.slice(),i.re.pop(),r=17,l-=1);break;case 6:!br(i)||47!==d&&92!==d?47===d?r=9:(i.Ji=n.Ji,i.$i=n.$i,i.ue=n.ue,i.fe=n.fe,r=17,l-=1):r=8;break;case 7:if(47!==d||47!==a[l+1]){r=8;continue}r=8,l+=1;break;case 8:47!==d&&92!==d&&(r=9,l-=1);break;case 9:if(64===d){u&&o.unshift(37,52,48),u=!0;for(var b=0;b<o.length;b++){var g=o[b];if(58!==g||f){var m=pe(Ce(g,Pe));f?i.$i+=m:i.Ji+=m}else f=!0}o.length=0}else if(Tr===d||47===d||63===d||35===d||br(i)&&92===d){if(u&&0===o.length)throw new h("Invalid host");l-=o.length+1,o.length=0,r=10}else o.push(d);break;case 10:case 11:if(null!==e&&"file"===i.Zi)l-=1,r=15;else if(58!==d||s)if(Tr===d||47===d||63===d||35===d||br(i)&&92===d){if(l-=1,br(i)&&0===o.length)throw new h("Invalid host");if(null!==e&&0===o.length&&(gr(i)||null!==i.fe))return;var p=qe(pe(o),br(i));if(i.ue=p,o.length=0,r=16,null!==e)return}else 91===d?s=!0:93===d&&(s=!1),o.push(d);else{if(0===o.length)throw new h("Invalid host");var y=qe(pe(o),br(i));if(i.ue=y,o.length=0,r=12,11===e)return}break;case 12:if(Qi(d))o.push(d);else{if(!(Tr===d||47===d||63===d||35===d||br(i)&&92===d||null!==e))throw new h("Invalid port");if(0!==o.length){var _=v(pe(o),10);if(_>65535)throw new h("Invalid port");i.fe=_===ar[i.Zi]?null:_,o.length=0}if(null!==e)return;r=16,l-=1}break;case 13:i.Zi="file",47===d||92===d?r=14:n&&"file"===n.Zi?Tr===d?(i.ue=n.ue,i.re=n.re.slice(),i.Yi=n.Yi):63===d?(i.ue=n.ue,i.re=n.re.slice(),i.Yi="",r=19):35===d?(i.ue=n.ue,i.re=n.re.slice(),i.Yi=n.Yi,i._e="",r=20):(mr(a.slice(l))||(i.ue=n.ue,i.re=n.re.slice(),Sr(i)),r=17,l-=1):(r=17,l-=1);break;case 14:47===d||92===d?r=15:(n&&"file"===n.Zi&&!mr(a.slice(l))&&(_r(n.re[0])?i.re.push(n.re[0]):i.ue=n.ue),r=17,l-=1);break;case 15:if(Tr===d||47===d||92===d||63===d||35===d)if(l-=1,null===e&&yr(o))r=17;else if(0===o.length){if(i.ue=Ue,null!==e)return;r=16}else{var S=qe(pe(o),br(i));if(0===S.Xi&&"localhost"===S.qi&&(S=Ue),i.ue=S,null!==e)return;o.length=0,r=16}else o.push(d);break;case 16:br(i)?(r=17,47!==d&&92!==d&&(l-=1)):null===e&&63===d?(i.Yi="",r=19):null===e&&35===d?(i._e="",r=20):Tr!==d&&(r=17,47!==d&&(l-=1));break;case 17:if(Tr===d||47===d||br(i)&&92===d||null===e&&(63===d||35===d)){var I=pe(o);if(dr(I)?(Sr(i),47===d||br(i)&&92===d||i.re.push("")):!lr(I)||47===d||br(i)&&92===d?lr(I)||("file"===i.Zi&&0===i.re.length&&yr(o)&&(Ue!==i.ue&&null!==i.ue&&(i.ue=Ue),o[1]=58,I=pe(o)),i.re.push(I)):i.re.push(""),o.length=0,"file"===i.Zi&&(Tr===d||63===d||35===d))for(;i.re.length>1&&""===i.re[0];)i.re.shift();63===d?(i.Yi="",r=19):35===d&&(i._e="",r=20)}else o.push.apply(o,Ce(d,Oe));break;case 18:63===d?(i.Yi="",r=19):35===d?(i._e="",r=20):Tr!==d&&(i.re[0]+=pe(Ce(d,Re)));break;case 19:null===e&&35===d?(i._e="",r=20):Tr!==d&&(i.Yi+=pe(Ce(d,br(i)?De:Ae)));break;case 20:Tr===d||0===d||(i._e+=pe(Ce(d,Ne)))}l++}return i}function Nr(t,n,i,e){try{Rr(t,n,i,e)}catch(t){}}var Or=function(){this.Zi="",this.Ji="",this.$i="",this.ue=null,this.fe=null,this.re=[],this.Yi=null,this._e=null,this.oe=!1};function Pr(t){switch(t.Zi){case"blob":var n;try{n=Rr(t.re[0],null)}catch(t){return hr}return Pr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return i=t.Zi,e=t.ue,r=t.fe,i+"://"+je(e)+(null===r?"":":"+r);case"file":default:return hr}var i,e,r}var Ar,Dr,Cr=function(){function t(t,n){var i,e,r=null;if(null!=n)if(null!=(i=n)&&i instanceof Cr&&"object"==typeof i.Qi)r=n.Qi;else try{r=Rr(String(n),null)}catch(t){throw new h("Invalid base URL: "+t.message)}try{e=Rr(String(t),r)}catch(t){throw new h("Invalid URL: "+t.message)}var o=e.Yi;this.Qi=e,this.Yi=function(t){var n=new er;return null!==t&&nr(n,t),n}(o),this.Yi.Qi=this}var n,i,e,r=t.prototype;return r.toString=function(){return this.href},r.toJSON=function(){return this.href},n=t,(i=[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Zi+":";if(null!==t.ue?(i+="//",gr(t)&&(i+=t.Ji,""!==t.$i&&(i+=":"+t.$i),i+="@"),i+=je(t.ue),null!==t.fe&&(i+=":"+t.fe)):null===t.ue&&"file"===t.Zi&&(i+="//"),t.oe)i+=t.re[0];else for(var e=0,r=t.re;e<r.length;e++)i+="/"+r[e];return null!==t.Yi&&(i+="?"+t.Yi),n||null===t._e||(i+="#"+t._e),i}(this.Qi)},set:function(t){var n;try{n=Rr(String(t),null)}catch(t){throw new h("Invalid URL: "+t.message)}this.Qi=n,tr(this.Yi);var i=this.Qi.Yi;null!==i&&nr(this.Yi,i)}},{key:"origin",get:function(){return Pr(this.Qi)}},{key:"protocol",get:function(){return this.Qi.Zi+":"},set:function(t){Nr(t+":",null,this.Qi,0)}},{key:"username",get:function(){return this.Qi.Ji},set:function(t){Ir(this.Qi)||(this.Qi.Ji=xe(t,Pe))}},{key:"password",get:function(){return this.Qi.$i},set:function(t){Ir(this.Qi)||(this.Qi.$i=xe(t,Pe))}},{key:"host",get:function(){var t=this.Qi,n=t.ue;if(null===n)return"";var i=t.fe,e=je(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Qi.oe||Nr(t,null,this.Qi,10)}},{key:"hostname",get:function(){var t=this.Qi.ue;return null===t?"":je(t)},set:function(t){this.Qi.oe||Nr(t,null,this.Qi,11)}},{key:"port",get:function(){var t=this.Qi.fe;return null===t?"":""+t},set:function(t){Ir(this.Qi)||(""===t?this.Qi.fe=null:Nr(t,null,this.Qi,12))}},{key:"pathname",get:function(){var t=this.Qi.re;return this.Qi.oe?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Qi.oe||(this.Qi.re.length=0,Nr(t,null,this.Qi,16))}},{key:"search",get:function(){var t=this.Qi.Yi;return null===t||""===t?"":"?"+t},set:function(t){t=Ke(t);var n=this.Qi;if(""===t)return n.Yi=null,void tr(this.Yi);"?"===t[0]&&(t=t.slice(1)),n.Yi="",Nr(t,null,n,19),nr(this.Yi,t)}},{key:"searchParams",get:function(){return this.Yi}},{key:"hash",get:function(){var t=this.Qi._e;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Qi._e="",Nr(t,null,this.Qi,20)):this.Qi._e=null}}])&&xi(n.prototype,i),e&&xi(n,e),t}();function xr(t){return t.document&&t.document.baseURI||t.location.href||""}function Br(){return void 0!==i?i.createElement("video"):void 0}function Fr(){return Dr||(Dr=Br()),Dr}var Lr=!!("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch)||!(!e||!e.msMaxTouchPoints),zr=Fr(),Ur=!(!zr||!zr.webkitShowPlaybackTargetPicker),Mr=function(){function t(){this.Pe=void 0,this.Oe=!1,this.Wt=Lr,this.fn=!1,this.Be=!0,this.Le=!0}var i=t.prototype;return i.Me=function(){return 0},i.xe=function(t,n){return!0},i.Fe=function(t){return t>=1/6*2},mt(t,[{key:"Ue",get:function(){return void 0===this.Pe&&(this.Pe=this.Me()),this.Pe}},{key:"He",get:function(){return n.devicePixelRatio||1}},{key:"Ve",get:function(){return Ur}},{key:"Xe",get:function(){return!1}},{key:"ze",get:function(){return!0}},{key:"We",get:function(){return hi.Cn||hi.un}},{key:"qe",get:function(){return!0}},{key:"Ge",get:function(){return!0}},{key:"Qe",get:function(){return!1}},{key:"Ye",get:function(){}},{key:"je",get:function(){return!0}},{key:"Ke",get:function(){return!1}}]),t}(),Wr=function(){var t=Br();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(hi.$t)return!1;var t=Br();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var qr=function(t){function n(n){var i;return(i=t.call(this)||this).Ze=void 0,i.Ze=n,i.Ze&&(i.Oe=i.Ze.Oe,i.Wt=i.Ze.Wt,i.Be=Wr&&i.Ze.Be),i}Ut(n,t);var i=n.prototype;return i.Me=function(){return this.Ze?this.Ze.Ue:t.prototype.Me.call(this)},i.xe=function(n,i){return this.Ze?this.Ze.xe(n,i):t.prototype.xe.call(this,n,i)},i.Fe=function(n){return this.Ze?this.Ze.Fe(n):t.prototype.Fe.call(this,n)},mt(n,[{key:"Ye",get:function(){var t;return null==(t=this.Ze)?void 0:t.Ye}},{key:"je",get:function(){var t,n;return null==(t=null==(n=this.Ze)?void 0:n.je)||t}}]),n}(Mr),jr=function(t){function n(n){var i;return(i=t.call(this,n)||this).Oe=!0,i.fn=!0,i}return Ut(n,t),mt(n,[{key:"Qe",get:function(){return hi.un}}]),n}(qr),Vr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.Me=function(){if(!Ar.MediaSource)return 1},mt(n,[{key:"Qe",get:function(){return!0}}]),n}(jr),Hr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.xe=function(n,i){return t.prototype.xe.call(this,n,i)},mt(n,[{key:"Xe",get:function(){return hi.An<3}},{key:"ze",get:function(){return hi.An>=3}},{key:"Ke",get:function(){return hi.An<3}}]),n}(qr),Xr=function(t){function n(){return t.call(this)||this}return Ut(n,t),n}(Mr),Gr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.xe=function(t,n){if(t&&t.Je&&n&&n.Je){var i=Yr(t.Je,"mp4a.40.2")&&Yr(n.Je,"mp4a.40.5"),e=Yr(t.Je,"mp4a.40.5")&&Yr(n.Je,"mp4a.40.2"),r=Yr(t.Je,"mp4a.40.2")&&Yr(n.Je,"mp4a.40.34"),o=Yr(t.Je,"mp4a.40.34")&&Yr(n.Je,"mp4a.40.2"),u=Yr(t.Je,"mp4a.40.5")&&Yr(n.Je,"mp4a.40.34"),s=Yr(t.Je,"mp4a.40.34")&&Yr(n.Je,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},mt(n,[{key:"Ye",get:function(){if(hi.qt)return 4096}}]),n}(Xr);function Yr(t,n){return t.indexOf(n)>-1}var Kr,Qr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.Fe=function(t){return t>=2},n}(Xr),$r=function(t){function n(){var n;return(n=t.call(this)||this).Oe=hi.Pn>=11,n.Be=hi.Cn&&!(hi.un&&hi.Pn<10),n}return Ut(n,t),n}(Xr),Jr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),mt(n,[{key:"qe",get:function(){return!1}}]),n}(qr),Zr=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),mt(n,[{key:"je",get:function(){return!hi.Gt||(hi.wn?92!==hi.yn:hi._n>=100)}}]),n}(Xr),to=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),mt(n,[{key:"Qe",get:function(){return!0}}]),n}(qr),no=function(){function n(){var n;this.$e=void 0,this.ir=new Ii,this.rr=new io,this.dr=(n=function(){if(hi.Nn)return new Gr;if(hi.Sn||hi.En)return new Qr;if(hi.Cn)return new $r;if(hi.dn)return new Zr;return new Xr}(),hi.un?new Vr(n):hi.fn?new jr(n):hi.pn?new Hr(n):hi.Tn?new Jr(n):hi.qt?new to(n):new qr(n)),this._r=function(){if(t.URL)try{var n=new t.URL("b","http://a");return n.pathname="c d","http://a/c%20d"===n.href}catch(t){}return!1}(),t.performance&&t.performance.now?this.$e=function(){return t.performance.now()}:this.$e=yi}var i=n.prototype;return i.gr=function(){bi.apply(void 0,arguments)},i.wr=function(){gi.apply(void 0,arguments)},i.yr=function(){mi.apply(void 0,arguments)},i.pr=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];pi.apply(void 0,[t].concat(i))},i.Qn=function(t,n){return r(t,n)},i.Ar=function(t,n){return u(t,n)},i.Gn=function(t){o(t)},i.Tr=function(t){s(t)},i.ei=function(t){return this.ir.ei(t)},i.Sr=function(){return this.Er.Sr()},i.Ir=function(){return this.Er.Ir()},i.Rr=function(){return this.Er.Rr()},i.Nr=function(){return this.Er.Nr()},i.Dr=function(){return this.Er.Dr()},i.Cr=function(t,n){return this.Er.Cr(t,n)},i.Pr=function(t){return this.Er.Pr(t)},i.Or=function(t,n){var i;return void 0===n&&(n=xr(Ar)),i="object"!=typeof n||n instanceof Cr?n:n.href,new Cr(t,i)},i.Br=function(n,i){if(void 0===i&&(i=xr(Ar)),this._r){var e="string"==typeof i?i:i.toString();return new t.URL(n,e).href}return this.Or(n,i).href},mt(n,[{key:"Lr",get:function(){return this.rr}},{key:"Mr",get:function(){return this.dr}},{key:"xr",get:function(){return{Fr:e&&e.userAgent.match(/Android /i)?"Android":"other",Ur:Boolean(e&&e.userAgent.match(/Android 8.0.0/i))}}},{key:"Hr",get:function(){return t&&t.location&&"https:"===t.location.protocol}},{key:"Vr",get:function(){return"languages"in e?e.languages.slice():[e.language]}}]),n}(),io=function(){function t(){}return mt(t,[{key:"Xr",get:function(){return e.oscpu}},{key:"Mr",get:function(){return e.platform}},{key:"zr",get:function(){return e.vendor}},{key:"Wr",get:function(){return e.vendorSub}}]),t}();function eo(){return(eo=a.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)a.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t}).apply(this,arguments)}!function(t){t.Jr="9a04f079-9840-4286-ab92-e65be0885f95",t.$r="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",t.ns="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",t.rs="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"}(Kr||(Kr={}));var ro,oo=Kr.Jr,uo="urn:uuid:"+oo,so="com.microsoft.playready",fo=Kr.$r,ho="urn:uuid:"+fo,ao=Kr.ns,co="urn:uuid:"+ao,vo=Kr.rs,lo="urn:uuid:"+vo,wo="com.apple.fps.1_0";!function(t){t.Jr="playready",t.$r="widevine",t.rs="fairplay",t.ns="clearkey",t.us="aes128"}(ro||(ro={}));var bo={hs:ro.Jr,fs:so,vs:"cenc",ds:oo,ls:uo,_s:"PlayReady"},go={hs:ro.$r,fs:"com.widevine.alpha",vs:"cenc",ds:fo,ls:ho,_s:"Widevine"},mo={hs:ro.rs,fs:wo,vs:"skd",ds:vo,ls:lo,_s:"FairPlay"},po=(ro.rs,{hs:ro.ns,fs:"org.w3.clearkey",vs:"cenc",ds:ao,ls:co,_s:"ClearKey"}),yo=hi.dn&&hi._n>=42||hi.Nn&&hi.Dn>=38||hi.Sn||hi.In||hi.On&&hi.Bn>=29;function _o(t,n){return e="audio",null!=(i=t)&&-1!==i.indexOf(e)?{initDataTypes:["cenc"],audioCapabilities:[eo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[eo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]};var i,e}var So,Io=function(){function t(t){this.gs=void 0,this.ys=yt(),this.As=void 0,this.gs=t}var n=t.prototype;return n.Dr=function(){return this.Pr(go)},n.Ir=function(){return this.Pr(po)},n.Nr=function(){return this.Pr(bo)},n.Rr=function(){return this.Pr(mo)},n.Pr=function(t){var n=t.ls,i=this.ys.get(n);if(i)return i;var e=this.Cr(t,'video/mp4; codecs="avc1.42000a"');return this.ys.set(n,e),e},n.Cr=function(t,n){return Z.async(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,Z.awrap(this.gs.Ts(t.fs,[_o(n,!0)]));case 3:return i.abrupt("return",!0);case 6:return i.prev=6,i.t0=i.catch(0),i.prev=8,i.next=11,Z.awrap(this.gs.Ts(t.fs,[_o(n,!1)]));case 11:return i.abrupt("return",!0);case 14:return i.prev=14,i.t1=i.catch(8),i.abrupt("return",!1);case 17:case"end":return i.stop()}},null,this,[[0,6],[8,14]],j)},n.Sr=function(){return this.As||(this.As=this.Ss()),this.As},n.Ss=function(){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:if("https:"!==(void 0).protocol){t.next=2;break}case 2:if(yo){t.next=4;break}return t.abrupt("return",!1);case 4:return t.next=6,Z.awrap(this.Ir());case 6:if(!t.sent){t.next=8;break}return t.abrupt("return",!1);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}},null,this,null,j)},t}(),To=["cenc"],Eo=function(t){function n(n){var i;return(i=t.call(this,"fu")||this).au=n,i}return Ut(n,t),n}(qn),ko=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"vu")||this).au=n,o.du=i,o.vu=e,o._u=r,o}return Ut(n,t),n}(qn);!function(t){t.mu="yu",t.pu="bu"}(So||(So={}));var Ro=new w([0]).buffer,No=function(){function t(){this.Tu=void 0,this.Tu=[]}var n=t.prototype;return n.Su=function(t){for(var n=0,i=this.Tu;n<i.length;n++){if(i[n][0]===t)return!0}return!1},n.Eu=function(t){for(var n=0,i=this.Tu;n<i.length;n++){var e=i[n];if(e[0]===t)return e[1]}},n.Iu=function(t,n){this.Tu.forEach(function(n){return t(n[1],n[0])},n)},n.Ru=function(t,n){this.Tu.push([t,n])},n.Nu=function(){vt(this.Tu)},mt(t,[{key:"Du",get:function(){return this.Tu.length}}]),t}(),Oo=function(){function t(){var t=this;this.Uu=void 0,this.Hu=void 0,this.Vu=void 0,this.Uu=new j(function(n,i){t.Hu=n,t.Vu=i})}var n=t.prototype;return n.Xu=function(t){this.Hu&&(this.Hu(t),this.Bs())},n.Wu=function(t){this.Vu&&(this.Vu(t),this.Bs())},n.Hs=function(){this.Uu.catch(lt),this.Wu(new un)},n.Bs=function(){this.Hu=void 0,this.Vu=void 0},t}();function Po(t,n){return t===so?function(t){if(t.byteLength<2*Ao.length)return t;if(kn(new DataView(t,0,2*Ao.length),!0)===Ao)return t;return n=t,Rn('<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">'+zn(n)+'</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>',!0).buffer;var n}(n):n}var Ao="<PlayReady";var Do=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Gu=void 0,o.Qu=void 0,o.Gu=i,o.Qu=e,o}return Ut(n,t),n}(en),Co=function(t,n){return(Co=a.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)a.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function xo(t,n){if("function"!=typeof n&&null!==n)throw new h("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}Co(t,n),t.prototype=null===n?a.create(n):(i.prototype=n.prototype,new i)}function Bo(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}!function(){function t(t,n){this.Yu=t,this.ju=n}t.prototype.get=function(t){var n=this.Yu.get(t);if(0===this.ju||void 0===n)return n;var i=this.Yu.get(t+1)||0,e=n&(1<<8-this.ju)-1,r=i>>8-this.ju;return(e<<this.ju)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Yu.get(c.floor((t+this.ju)/8));if(void 0!==n)return(n&1<<7-this.ju-t%8)>0?1:0}},a.defineProperty(t.prototype,"bitLength",{get:function(){return this.Yu.bitLength-this.ju},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"length",{get:function(){return this.Yu.length},enumerable:!1,configurable:!0})}();function Fo(t,n,i){return c.min(c.max(t,n),i)}function Lo(t,n){return t>>8-n}function zo(t,n){return t&(1<<n)-1}!function(){function t(t){this.Ku=t,this.Zu=0,this.Ju=0}a.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Zu+this.Ju},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"done",{get:function(){return this.Zu===this.Ku.length&&0===this.Ju},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Zu,bit:this.Ju}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.Ku);return n.seek(this.Zu,this.Ju),n},t.prototype.canReadBits=function(t){return 8*this.Zu+t+this.Ju<=8*this.Ku.length},t.prototype.canReadBytes=function(t){return 0===this.Ju?this.Zu+t<=this.Ku.length:this.Zu+t<this.Ku.length},t.prototype.incBit=function(){this.Ju++,this.Ju>7&&(this.Zu++,this.Ju=0)},t.prototype.seek=function(t,n){this.Zu=t,this.Ju=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new f("Cannot read past end of buffer.");return this.Ku.get(this.Zu)>>7-this.Ju&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new f("Cannot read past end of buffer.");if(0===this.Ju)return this.Ku.get(this.Zu++);var t=zo(this.Ku.get(this.Zu),8-this.Ju),n=Lo(this.Ku.get(this.Zu+1),this.Ju);return this.Zu++,t<<this.Ju|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new f("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 f("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new f("Cannot read past end of buffer.");var n=0;if(0===this.Ju&&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 f("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new f("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-c.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 f("Skipping over the buffer edge is not allowed.");var n=this.Ju+t;this.Zu+=n>>3,this.Ju=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new f("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)}}();var Uo=function(t,n){return t===n?0:t<n?-1:t>n?1:d(t)?d(n)?0:1:-1},Mo=function(){function t(){this.$u=[],this.uo=[],this.Te=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 f("The buffer length must be positive.");if(0!==i){if(0===this.uo.length)this.uo.push(0);else{var e=this.uo[this.uo.length-1]+this.$u[this.$u.length-1].length;this.uo.push(e)}this.$u.push(t.subarray(n,n+i)),this.Te+=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.$u;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.$u=[],this.uo=[],this.Te=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.uo[n];return this.$u[n][i]}},a.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.$u.length<1)return-1;if(this.$u.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.$u[0];return"number"==typeof t?Bo(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=Bo(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=c.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.uo,t,Uo)},t.prototype.join=function(){if(1===this.$u.length)return this.$u[0];var t=new w(this.length);return this.copyInternal(t,0),t},a.defineProperty(t.prototype,"length",{get:function(){return this.Te},enumerable:!1,configurable:!0}),a.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 f("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new f("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)*c.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=Fo(n,0,this.length),r=Fo(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.$u[u],f=e,h=f-this.uo[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.uo[u],s=this.$u[u];var a=r-f;return o.pushRange(s,h,a),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.$u.length-1,e=this.$u[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.$u[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),Wo=function(){function t(n){this.oo=n||t.BUFFER_CHUNK_SIZE,this.ao=!1,this.do=new Mo,this.Ku=new w(this.oo),this._o=0,this.mo=0,this.Ju=7}return t.prototype.closeByte=function(){this.Ku[this._o++]=this.mo,this._o>=this.oo&&this.closeBuffer(),this.mo=0,this.Ju=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this._o&&(this.do.pushRange(this.Ku,0,this._o),t&&(this.Ku=new w(this.oo)),this._o=0)},a.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Ju},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.ao)throw new f("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.ao=!0,this.do},t.prototype.writeBit=function(t){if(this.ao)throw new f("Cannot write to a closed BitWriter.");this.mo|=t<<this.Ju,0===this.Ju?this.closeByte():this.Ju--},t.prototype.writeByte=function(t){if(this.ao)throw new f("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.mo=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.Ju;this.mo|=Lo(t,n+1),this.closeByte(),this.mo=zo(t,8-n)<<n+1,this.Ju=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.ao)throw new f("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this._o+t.length<=this.oo?(this.Ku.set(t,this._o),this._o+=t.length,this._o===this.oo&&this.closeBuffer()):(this.closeBuffer(),this.do.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.Ju;this.mo|=Lo(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=zo(t[i-1],8-n),r=Lo(t[i],n+1);this.mo=e<<n+1|r,this.closeByte()}this.mo=zo(t[t.length-1],8-n)<<n+1,this.Ju=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new f("Received a negative number.");if(n>32)throw new f("The max bitlength that can be provided is 32.");if(t>=c.pow(2,n))throw new f("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 f("The max bitlength that can be provided is 32.");if(c.abs(t)>=c.pow(2,n-1))throw new f("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+c.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new f("Received a negative number.");for(var n=c.floor(c.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 w(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}(),qo=function(){function t(t){this.rb=new Mo,this.po=t}return t.prototype.closeWriter=function(){void 0!==this.po&&(this.rb=this.rb.concat(this.po.close()),this.po=void 0)},a.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.po&&(this.po=new Wo),this.po},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}(),jo=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new f("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(c.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 qo;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=c.pow(2,32),t}();function Vo(t,n){return t instanceof qt?64===n:t<c.pow(2,n)}function Ho(t,n){return c.round(t*c.pow(2,n))}function Xo(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}var Go=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Vo(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return xo(n,t),a.defineProperty(n.prototype,"flags",{get:function(){return this.Ao},set:function(t){this.Ao=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new f("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(jo),Yo=(function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}xo(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(Mo.from(this.data))}}(jo),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}());function Ko(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 function(t){var n=t.length;if(n<=Qo)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Qo)i.push(String.fromCharCode.apply(String,t.slice(e,e+Qo)));return i.join("")}(n)}var Qo=16384;function $o(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Jo(t,n,i){var e,r=function(t,n,i){void 0===n&&(n=0);void 0===i&&(i=t.byteLength);return new w(t.buffer,t.byteOffset+n,i-n)}(new w((e=t).buffer,e.byteOffset,e.byteLength),n.offset,n.offset+i);return n.shift(r.byteLength),r}function Zo(t,n,i){return n.offset+i<=t.byteLength}function tu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function nu(t,n,i){void 0===i&&(i=!1);var e=tu(t,n,i),r=tu(t,n,i),o=i?r:e,u=i?e:r;return qt.fromBits(u,o,!0)}function iu(t,n){var i=$o(t,n);if(i)return String.fromCharCode(i)}function eu(t,n,i){for(var e="",r=0;r<i;r++)e+=iu(t,n);return e}function ru(t,n){var i,e=$o(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&$o(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&$o(t,n))+(63&$o(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&$o(t,n))+64*(63&$o(t,n))+(63&$o(t,n))),i}function ou(t,n){return function(t,n,i){var e=[];(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)&&n.shift(3);for(;n.offset<t.byteLength;){var r=ru(t,n);if(void 0===r)break;if(i&&0===r)break;e.push(r)}return Ko(e)}(t,n,!0)}var uu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Yo(this.offset<<3)},t}(),su=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return $o(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 tu(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=tu(t,n,i),r=tu(t,n,i),o=i?r:e,u=i?e:r;return qt.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return nu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Jo(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(tu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return eu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return ou(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 fu(t,n){return t.type===n}var hu=8;function au(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Zo(t,n,hu)){var e=n.offset+hu;return{complete:!1,neededOffset:e}}var r=tu(t,n),o=eu(t,n,4);if(1===r){if(!Zo(t,n,8)){var e=n.offset+8;return n.seek(i),{complete:!1,neededOffset:e}}r=nu(t,n).toNumber()}if("uuid"===o){if(!Zo(t,n,16)){var e=n.offset+16;return n.seek(i),{complete:!1,neededOffset:e}}o=eu(t,n,16)}var u=n.offset;return{complete:!0,header:{type:o,size:r,headerSize:u-i}}}(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,h,a,c={type:r.type,offset:i,data:new su((f=t,h=i,a=u,void 0===h&&(h=0),void 0===a&&(a=f.byteLength),new DataView(f.buffer,f.byteOffset+h,a-h)),new uu(r.headerSize))};return n.seek(u),{complete:!0,box:c}}!function(t){function n(){return t.call(this,"mdir")||this}xo(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(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 xo(n,t),a.defineProperty(n.prototype,"handlerType",{get:function(){return this.To},set:function(t){this.To=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}(Go));var cu=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()},a.defineProperty(t.prototype,"tag",{get:function(){return this.So},set:function(t){if(!Vo(t,8))throw new f("Provided tag does not fit in 8 bits.");this.So=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}(),vu=(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}xo(n,t),a.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.Eo},set:function(t){if(!Vo(t,8))throw new f("Provided objectTypeIndication does not fit in 8 bits.");this.Eo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"streamType",{get:function(){return this.Io},set:function(t){if(!Vo(t,6))throw new f("Provided streamType does not fit in 6 bits.");this.Io=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ro},set:function(t){if(!Vo(t,24))throw new f("Provided bufferSizeDb does not fit in 24 bits.");this.Ro=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.No},set:function(t){if(!Vo(t,32))throw new f("Provided maxBitrate does not fit in 32 bits.");this.No=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.Do},set:function(t){if(!Vo(t,32))throw new f("Provided avgBitrate does not fit in 32 bits.");this.Do=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)}}}(cu),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}xo(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(Mo.from(this.data))}}(cu),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return xo(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(cu)),lu=(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 vu(r.fixed28BitMode),o}xo(n,t),a.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"esId",{get:function(){return this.Co},set:function(t){if(!Vo(t,16))throw new f("Provided esId does not fit in 16 bits.");this.Co=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Po},set:function(t){if(!Vo(t,5))throw new f("Provided streamPriority does not fit in 5 bits.");this.Po=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.Oo},set:function(t){if(t&&!Vo(t,16))throw new f("Provided dependsOnEsId does not fit in 16 bits.");this.Oo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.Bo},set:function(t){if(t&&!Vo(t,16))throw new f("Provided ocrEsId does not fit in 16 bits.");this.Bo=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)}}(cu),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return xo(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}(jo)),du=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return xo(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(lu),wu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return xo(n,t),a.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.Lo},set:function(t){if(!Vo(t,16))throw new f("Provided dataReferenceIndex does not fit in 16 bits.");this.Lo=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}(du),bu=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 xo(n,t),a.defineProperty(n.prototype,"channelCount",{get:function(){return this.Mo},set:function(t){if(!Vo(t,16))throw new f("Provided channelCount does not fit in 16 bits.");this.Mo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleSize",{get:function(){return this.xo},set:function(t){if(!Vo(t,16))throw new f("Provided sampleSize does not fit in 16 bits.");this.xo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Fo},set:function(t){if(!Vo(Ho(t,16),32))throw new f("Provided rate does not fit in 32 bits (fixed 16.16).");this.Fo=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(Ho(this.sampleRate,16),32),this.extra&&Xo(n.writer,this.extra)},n}(wu),gu=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}xo(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!Vo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Vo(t,32)}))throw new f("Not all entries can be represented in 32 bits.");this.Uo=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)}}}(Go),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}xo(n,t),a.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Ho},set:function(t){if(!Vo(t,32))throw new f("Provided cleanApertureWidthN does not fit in 32 bits.");this.Ho=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.Vo},set:function(t){if(!Vo(t,32))throw new f("Provided cleanApertureWidthD does not fit in 32 bits.");this.Vo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Xo},set:function(t){if(!Vo(t,32))throw new f("Provided cleanApertureHeightN does not fit in 32 bits.");this.Xo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.zo},set:function(t){if(!Vo(t,32))throw new f("Provided cleanApertureHeightD does not fit in 32 bits.");this.zo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Wo},set:function(t){if(!Vo(t,32))throw new f("Provided horizOffN does not fit in 32 bits.");this.Wo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizOffD",{get:function(){return this.qo},set:function(t){if(!Vo(t,32))throw new f("Provided horizOffD does not fit in 32 bits.");this.qo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"vertOffN",{get:function(){return this.Go},set:function(t){if(!Vo(t,32))throw new f("Provided vertOffN does not fit in 32 bits.");this.Go=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Qo},set:function(t){if(!Vo(t,32))throw new f("Provided vertOffD does not fit in 32 bits.");this.Qo=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)}}(jo),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}xo(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!Vo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Vo(t.sampleCount,32)||!Vo(t.sampleOffset,32)}))throw new f("Not all entries can be represented in 64 bits.");this.Uo=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)}}}(Go),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}xo(n,t),a.defineProperty(n.prototype,"location",{get:function(){return this.Yo},set:function(t){this.flags=void 0===t?1:0,this.Yo=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))}}(Go),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}xo(n,t),a.defineProperty(n.prototype,"location",{get:function(){return this.Yo},set:function(t){if(1&this.flags)throw new f("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.Yo=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))}}(Go),function(t){function n(){return t.call(this,"dinf")||this}xo(n,t)}(du),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Vo(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return xo(n,t),a.defineProperty(n.prototype,"flags",{get:function(){return this.Ao},set:function(t){this.Ao=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new f("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(lu)),mu=(function(t){function n(){return t.call(this,"dref",0,0)||this}xo(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)}}(gu),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 xo(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Vo(e.segmentDuration,this.bitSize))throw new f("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Vo(e.mediaTime,this.bitSize))throw new f("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Vo(e.mediaRateInteger,16))throw new f("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Vo(e.mediaRateFraction,16))throw new f("Provided mediaRateFraction does not fit in 16 bits.")}this.Uo=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}(Go)),pu=(function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}xo(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)}}}(mu),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}xo(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)}}}(mu),function(t){function n(){return t.call(this,"edts")||this}xo(n,t)}(du),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 xo(n,t),a.defineProperty(n.prototype,"majorBrand",{get:function(){return this.jo},set:function(t){if(4!==t.length)throw new f("the provided major brand does not conform to the 4 character requirement");this.jo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"minorVersion",{get:function(){return this.Ko},set:function(t){if(!Vo(t,32))throw new f("the provided minor version does not fit in 32 bits.");this.Ko=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.Zo},set:function(t){if(t.some(function(t){return 4!==t.length}))throw new f("Some of the compatible brands do not conform to the 4 character requirement");this.Zo=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}(jo)),yu=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}xo(n,t)}(pu),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}xo(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(Mo.from(this.data))}}(jo),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 xo(n,t),a.defineProperty(n.prototype,"creationTime",{get:function(){return this.Jo},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"modificationTime",{get:function(){return this.$o},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$o=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"timescale",{get:function(){return this.nh},set:function(t){if(!Vo(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.nh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.ih},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.ih=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"language",{get:function(){return this.eh},set:function(t){if(!function(t){return/^[a-z]{3}$/.test(t)}(t))throw new f("Expected an ISO-639-2/T language code");this.eh=t},enumerable:!1,configurable:!0}),a.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}(Go));(function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}xo(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)}})(yu),function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}xo(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)}}(yu);var _u;(function(t){function n(){return t.call(this,"mdia")||this}xo(n,t)})(du),function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new Mo,n}xo(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(jo),function(t){function n(){return t.call(this,"minf")||this}xo(n,t)}(du),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}xo(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())}}(gu);!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"}(_u||(_u={}));var Su,Iu,Tu={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Eu(t,n){n.writer.writeUInt(Ho(t.a,16),32),n.writer.writeUInt(Ho(t.b,16),32),n.writer.writeUInt(Ho(0,30),32),n.writer.writeUInt(Ho(t.c,16),32),n.writer.writeUInt(Ho(t.d,16),32),n.writer.writeUInt(Ho(0,30),32),n.writer.writeUInt(Ho(t.x,16),32),n.writer.writeUInt(Ho(t.y,16),32),n.writer.writeUInt(Ho(1,30),32)}function ku(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Su.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Iu.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Iu.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Iu.UNKNOWN,2)}function Ru(t,n){var i,e,r;n.writer.writeUInt(0,4),ku(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"}(Su||(Su={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Iu||(Iu={}));var Nu=function(){return function(){}}(),Ou=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 xo(n,t),a.defineProperty(n.prototype,"systemId",{get:function(){return this.rh},set:function(t){if(16!==t.length)throw new f("Provided systemId length is not 16.");this.rh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"data",{get:function(){return this.Wi},set:function(t){if(!Vo(t.length,32))throw new f("Provided data length does not fit in 32 bits.");this.Wi=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(Mo.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(Mo.from(this.data))},n}(Go),Pu=function(t){function n(n,i){return t.call(this,0,n,i)||this}return xo(n,t),n}(Ou),Au=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return xo(n,t),a.defineProperty(n.prototype,"kIds",{get:function(){return this.sh},set:function(t){if(!Vo(t.length,32))throw new f("Provided kIds length cannot fit in 32 bits.");if(t.some(function(t){return 16!==t.length}))throw new f("Not all provided key ids are 16 bytes long.");this.sh=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(Mo.from(e))}},n}(Ou);var Du=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 xo(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.uh},set:function(t){if(!Vo(t,this.bitSize))throw new f("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.uh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Go),Cu=(function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}xo(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)}}(Du),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}xo(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)}}(Du),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}xo(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.oh},set:function(t){if(!Vo(t,32))throw new f("Provided track id does not fit in 32 bits.");this.oh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.hh},set:function(t){if(!Vo(t,32))throw new f("Provided default sample description index does not fit in 32 bits.");this.hh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.ah},set:function(t){if(!Vo(t,32))throw new f("Provided default sample duration does not fit in 32 bits.");this.ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.fh},set:function(t){if(!Vo(t,32))throw new f("Provided default sample size does not fit in 32 bits.");this.fh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.vh},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Vo(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Vo(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.vh=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),Ru(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)}}(Go),function(t){function n(){return t.call(this,"mvex")||this}xo(n,t)}(du),function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,h,a=this;return(a=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,a.modificationTime=i.modification,a.timescale=i.scale,a.duration=i.duration,a.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,a.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,a.matrix=null!==(h=r.matrix)&&void 0!==h?h:Tu,a.dh=e,a}return xo(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"creationTime",{get:function(){return this.Jo},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"modificationTime",{get:function(){return this.$o},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$o=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"timescale",{get:function(){return this.nh},set:function(t){if(!Vo(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.nh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.ih},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.ih=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"rate",{get:function(){return this.lh},set:function(t){if(!Vo(Ho(t,16),32))throw new f("Provided rate does not fit in 32 bits (fixed 16.16).");this.lh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"volume",{get:function(){return this._h},set:function(t){if(!Vo(Ho(t,8),16))throw new f("Provided volume does not fit in 16 bits (fixed 8.8).");this._h=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"matrix",{get:function(){return this.gh},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new f("(u, v, w) does not match the required (0, 0, 1)");this.gh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.dh},set:function(t){if(0===t)throw new f("NextTrackId cannot be 0.");if(!Vo(t,32))throw new f("NextTrackId cannot exceed 32 bits.");this.dh=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(Ho(this.rate,16),32),n.writer.writeUInt(Ho(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Eu(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}(Go));(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}xo(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)}})(Cu),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}xo(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)}}(Cu);var xu=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,h,a,c=this;return(c=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).creationTime=i.creation,c.modificationTime=i.modification,c.trackId=e,c.duration=i.duration,c.volume=r,c.width=o,c.height=u,c.layer=null!==(f=s.layer)&&void 0!==f?f:0,c.alternateGroup=null!==(h=s.alternateGroup)&&void 0!==h?h:0,c.matrix=null!==(a=s.matrix)&&void 0!==a?a:Tu,c}return xo(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"creationTime",{get:function(){return this.Jo},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"modificationTime",{get:function(){return this.$o},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$o=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"trackId",{get:function(){return this.oh},set:function(t){if(0===t)throw new f("trackId cannot be 0.");if(!Vo(t,32))throw new f("trackId cannot exceed 32 bits.");this.oh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.ih},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.ih=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"volume",{get:function(){return this._h},set:function(t){if(!Vo(Ho(t,8),16))throw new f("Provided volume does not fit in 16 bits (fixed 8.8).");this._h=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"width",{get:function(){return this.wh},set:function(t){if(!Vo(Ho(t,16),32))throw new f("Provided width does not fit in 32 bits (fixed 16.16).");this.wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"height",{get:function(){return this.yh},set:function(t){if(!Vo(Ho(t,16),32))throw new f("Provided height does not fit in 32 bits (fixed 16.16).");this.yh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"layer",{get:function(){return this.kh},set:function(t){if(!Vo(t,16))throw new f("Provided layer does not fit in 16 bits.");this.kh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.ph},set:function(t){if(!Vo(t,16))throw new f("Provided alternateGroup does not fit in 16 bits.");this.ph=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"matrix",{get:function(){return this.gh},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new f("(u, v, w) does not match the required (0, 0, 1)");this.gh=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(Ho(this.volume,8),16),n.writer.writeUInt(0,16),Eu(this.matrix,n),n.writer.writeUInt(Ho(this.width,16),32),n.writer.writeUInt(Ho(this.height,16),32)},n}(Go),Bu=(function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}xo(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)}}(xu),function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}xo(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)}}(xu),function(t){function n(){return t.call(this,"trak")||this}xo(n,t)}(du),function(t){function n(){return t.call(this,"moov")||this}xo(n,t)}(du),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 xo(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.Ah},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.Ah=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Go));(function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}xo(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)}})(Bu),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}xo(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)}}(Bu);!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}xo(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.oh},set:function(t){if(!Vo(t,32))throw new f("Provided track id does not fit in 32 bits.");this.oh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.Th},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new f("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new f("The base data offset present flag is not set.");if(t&&!Vo(t,64))throw new f("Provided baseDataOffset does not fit in 32 bits.");this.Th=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.Sh},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new f("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new f("The sample description index flag is not set.");if(t&&!Vo(t,32))throw new f("Provided sampleDescriptionIndex does not fit in 32 bits.");this.Sh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.ah},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new f("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new f("The default sample duration present flag is not set.");if(t&&!Vo(t,32))throw new f("Provided defaultSampleDuration does not fit in 32 bits.");this.ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.fh},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new f("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new f("The default sample size present flag is not set.");if(t&&!Vo(t,32))throw new f("Provided defaultSampleSize does not fit in 32 bits.");this.fh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.vh},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new f("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new f("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Vo(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Vo(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.vh=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&&Ru(this.defaultSampleFlags,n)}}(Go);(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}xo(n,t),a.defineProperty(n.prototype,"dataOffset",{get:function(){return this.Eh},set:function(t){if(t&&!Vo(t,32))throw new f("Provided data offset does not fit in 32 bits.");this.Eh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.Ih},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Vo(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Vo(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.Ih=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"samples",{get:function(){return this.Rh},set:function(t){var n,i;if(!Vo(t.length,32))throw new f("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 f("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new f("The sample duration present flag is not set.");if(o.duration&&!Vo(o.duration,32))throw new f("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new f("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new f("The sample size present flag is not set.");if(o.size&&!Vo(o.size,32))throw new f("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new f("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new f("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Vo(o.flags.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Vo(o.flags.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new f("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new f("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Vo(o.compositionTimeOffset,32))throw new f("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.Rh=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&&Ru(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&&Ru(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}}})(Go),function(t){function n(){return t.call(this,"traf")||this}xo(n,t)}(du),function(t){function n(){return t.call(this,"moof")||this}xo(n,t)}(du),function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}xo(n,t),a.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.Nh},set:function(t){if(!Vo(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.Nh=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)}}(Go);var Fu=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return xo(n,t),a.defineProperty(n.prototype,"codingName",{get:function(){return this.Dh},set:function(t){if(4!==t.length)throw new f("Provided coding name was not 4 characters long.");this.Dh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(jo),Lu=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}xo(n,t),a.defineProperty(n.prototype,"hSpacing",{get:function(){return this.Ch},set:function(t){if(!Vo(t,32))throw new f("Provided hSpacing does not fit in 32 bits.");this.Ch=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"vSpacing",{get:function(){return this.Ph},set:function(t){if(!Vo(t,32))throw new f("Provided vSpacing does not fit in 32 bits.");this.Ph=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)}}(jo),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}xo(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())}}(du),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new Fu(n),r}xo(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())}}(jo),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 xo(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){var n=this;if(!Vo(t.length,32))throw new f("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!Vo(t,n.bitSize)}))throw new f("Not all provided entries fit in ".concat(this.bitSize," bits."));this.Uo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.Oh},set:function(t){if(void 0===t)this.flags=0;else{if(!Vo(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!Vo(t.auxInfoTypeParameter,32))throw new f("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Oh=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}(Go)),zu=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}xo(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)}}}(Lu),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}xo(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)}}}(Lu),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}xo(n,t),a.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.Bh},set:function(t){if(!Vo(t,8))throw new f("Provided defaultSampleInfoSize does not fit in a single byte.");this.Bh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.Lh},set:function(t){if(!Vo(t.length,32))throw new f("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!Vo(t,8)}))throw new f("Not all provided sampleInfoSizes fit in a byte.");this.Lh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.Oh},set:function(t){if(void 0===t)this.flags=0;else{if(!Vo(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!Vo(t.auxInfoTypeParameter,32))throw new f("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Oh=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 f("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)}}}(Go),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}xo(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++){ku(e[i],n)}}}(Go),function(t){function n(n){return t.call(this,"stsd",n,0)||this}xo(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)}}(gu),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 xo(n,t),a.defineProperty(n.prototype,"groupingType",{get:function(){return this.Mh},set:function(t){if(4!==t.length)throw new f("The provided groupingType does not equal 4 characters.");this.Mh=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}(Go)),Uu=(function(t){function n(n,i){return t.call(this,0,n,i)||this}xo(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(zu),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}xo(n,t),a.defineProperty(n.prototype,"defaultLength",{get:function(){return this.Fh},set:function(t){if(!Vo(t,32))throw new f("The provided defaultLength does not fit in 32 bits.");this.Fh=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)}}(zu),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new f("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}xo(n,t),a.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.hh},set:function(t){if(!Vo(t,32))throw new f("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.hh=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)}}(zu),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}xo(n,t),a.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.Uh},set:function(t){if(!Vo(t.length,32))throw new f("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!Vo(t,32)}))throw new f("Not all sampleSizes can be represented in 32 bits.");this.Uh=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)}}}(Go),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}xo(n,t),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.fh},set:function(t){if(!Vo(t,32))throw new f("Provided defaultSampleSize does not fit in 32 bits.");this.fh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"samples",{get:function(){return this.Rh},set:function(t){if(!Vo(t,32))throw new f("Number of allowed samples cannot fit in 32 bits.");this.Rh=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)}}(Go),function(t){function n(){return t.call(this,"stbl")||this}xo(n,t)}(du),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}xo(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!Vo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Vo(t.firstChunk,32)||!Vo(t.sampleDescriptionIndex,32)||!Vo(t.samplesPerChunk,32)}))throw new f("Not all entries can be represented in 96 bits.");this.Uo=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)}}}(Go),function(t){function n(){return t.call(this,"schi")||this}xo(n,t)}(du),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}xo(n,t),a.defineProperty(n.prototype,"schemeType",{get:function(){return this.Hh},set:function(t){if(4!==t.length)throw new f("The provided schemeType does not have a length of 4.");this.Hh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.Vh},set:function(t){if(!Vo(t,32))throw new f("The provided schemeVersion does not fit in 23 bits.");this.Vh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"schemeUri",{get:function(){return this.Xh},set:function(t){if(t&&4!==t.length)throw new f("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.Xh=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))}}(Go),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 xo(n,t),a.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"referenceId",{get:function(){return this.Wh},set:function(t){if(!Vo(t,32))throw new f("Provided referenceId does not fit in 32 bits.");this.Wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"timescale",{get:function(){return this.nh},set:function(t){if(!Vo(t,32))throw new f("Provided timescale does not fit in 32 bits.");this.nh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.qh},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.qh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"firstOffset",{get:function(){return this.Gh},set:function(t){if(!Vo(t,this.bitSize))throw new f("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.Gh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"references",{get:function(){return this.Qh},set:function(t){if(!Vo(t.length,16))throw new f("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(!Vo(e.referencedSize,31))throw new f("Provided referenced size does not fit in 31 bits.");if(!Vo(e.subsegmentDuration,32))throw new f("Provided subsegment duration does not fit in 31 bits.");if(!Vo(e.sapType,3))throw new f("Provided SAP type does not fit in 3 bits.");if(!Vo(e.sapDeltaTime,28))throw new f("Provided SAP delta time does not fit in 28 bits.")}this.Qh=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}(Go)),Mu=(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}xo(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)}}(Uu),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}xo(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)}}(Uu),function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}xo(n,t)}(pu),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}xo(n,t),a.defineProperty(n.prototype,"balance",{get:function(){return this.Yh},set:function(t){if(t<-1||t>1)throw new f("Provided balance does not fit in the allowed range [-1, 1].");if(!Vo(Ho(t,8),16))throw new f("Provided balance does not fit in 16 bits (fixed 8.8).");this.Yh=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(Ho(this.balance,8),16),n.writer.writeUInt(0,16)}}(Go),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}xo(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!Vo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Vo(t,32)}))throw new f("Not all entries can be represented in 32 bits.");this.Uo=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)}}}(Go),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}xo(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!Vo(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Vo(t.sampleCount,32)||!Vo(t.sampleDelta,32)}))throw new f("Not all entries can be represented in 64 bits.");this.Uo=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)}}}(Go),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}xo(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.oh},set:function(t){if(!Vo(t,32))throw new f("The provided trackId does not fit in 32 bits.");this.oh=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)}}(gu),function(t){function n(){return t.call(this,"udta")||this}xo(n,t)}(du),{red:0,green:0,blue:0}),Wu=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=Mu);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}xo(n,t),a.defineProperty(n.prototype,"opColor",{get:function(){return this.jh},set:function(t){if(!Vo(t.red,16)||!Vo(t.green,16)||!Vo(t.blue,16))throw new f("Not all colors could be represented in 16 bits.");this.jh=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)}}(Go),function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,h,a,c=this;return(c=t.call(this,n,i)||this).width=e.width,c.height=e.height,c.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,c.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,c.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",c.frameCount=null!==(h=r.frameCount)&&void 0!==h?h:1,c.depth=null!==(a=r.depth)&&void 0!==a?a:24,c.clap=r.clap,c.pasp=r.pasp,c.extra=o,c}return xo(n,t),a.defineProperty(n.prototype,"width",{get:function(){return this.wh},set:function(t){if(!Vo(t,16))throw new f("Provided width does not fit in 16 bits.");this.wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"height",{get:function(){return this.yh},set:function(t){if(!Vo(t,16))throw new f("Provided height does not fit in 16 bits.");this.yh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.Kh},set:function(t){if(!Vo(Ho(t,16),32))throw new f("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.Kh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.Zh},set:function(t){if(!Vo(Ho(t,16),32))throw new f("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.Zh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"compressorName",{get:function(){return this.Jh},set:function(t){if(t.length>31)throw new f("The provided compressorName should at most be 31 characters long.");this.Jh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"frameCount",{get:function(){return this.$h},set:function(t){if(!Vo(t,16))throw new f("Provided frameCount does not fit in 16 bits.");this.$h=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"depth",{get:function(){return this.ea},set:function(t){if(!Vo(t,16))throw new f("Provided depth does not fit in 16 bits.");this.ea=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(Ho(this.horizontalResolution,16),32),n.writer.writeUInt(Ho(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&&Xo(n.writer,this.extra)},n}(wu)),qu=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}xo(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof w?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof w?n.concat(Mo.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Go),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}xo(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())}}(bu),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}xo(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)}}(Wu),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}xo(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)}}(wu),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}xo(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(jo),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}a.defineProperty(t.prototype,"version",{get:function(){return this.ra},set:function(t){if(!Vo(t,8))throw new f("Provided version does not fit in 8 bits.");this.ra=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"profileIndication",{get:function(){return this.ua},set:function(t){if(!Vo(t,8))throw new f("Provided profileIndication does not fit in 8 bits.");this.ua=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.oa},set:function(t){if(!Vo(t,8))throw new f("Provided profileCompatibility does not fit in 8 bits.");this.oa=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"levelIndication",{get:function(){return this.va},set:function(t){if(!Vo(t,8))throw new f("Provided levelIndication does not fit in 8 bits.");this.va=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"spsSets",{get:function(){return this._a},set:function(t){if(!Vo(t.length,5))throw new f("Provided number of spsSets exceeds the max (32)");this._a=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"ppsSets",{get:function(){return this.ma},set:function(t){if(!Vo(t.length,8))throw new f("Provided number of ppsSets exceeds the max (256)");this.ma=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(Mo.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(Mo.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}xo(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())}}(Wu),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}xo(n,t),a.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ro},set:function(t){if(!Vo(t,32))throw new f("Provided bufferSizeDb does not fit in 32 bits.");this.Ro=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"max",{get:function(){return this.ya},set:function(t){if(!Vo(t,32))throw new f("Provided max does not fit in 32 bits.");this.ya=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"avg",{get:function(){return this.Aa},set:function(t){if(!Vo(t,32))throw new f("Provided avg does not fit in 32 bits.");this.Aa=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)}}(jo),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 f("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 w(0),s}return xo(n,t),a.defineProperty(n.prototype,"isProtected",{get:function(){return this.Ta},set:function(t){if(!Vo(t,8))throw new f("Provided isProtected does not fit in 1 byte.");this.Ta=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.Sa},set:function(t){if(![8,16].includes(t))throw new f("Provided perSampleIvSize does not match any allowed value [8, 16].");this.Sa=t,this.Ea=new w(0)},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"kId",{get:function(){return this.Ia},set:function(t){if(16!==t.length)throw new f("Provided kId length is not 16.");this.Ia=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"constantIv",{get:function(){return this.Ea},set:function(t){if(![8,16].includes(t.length))throw new f("Provided constant IV length does not match any allowed value [8, 16].");this.Ea=t,this.Sa=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),Xo(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Xo(t.writer,this.constantIv))},n}(Go)),ju=(function(t){function n(n){return t.call(this,0,n)||this}xo(n,t)}(qu),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return xo(n,t),a.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.Ra},set:function(t){if(!Vo(t,4))throw new f("Provided cryptByteBlocks does not fit in 4 bits.");this.Ra=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.Na},set:function(t){if(!Vo(t,4))throw new f("Provided skipByteBlocks does not fit in 4 bits.");this.Na=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(qu));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new ju(n),i}xo(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Nu);function Vu(t){return void 0!==t.iv}function Hu(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}xo(n,t),a.defineProperty(n.prototype,"samples",{get:function(){return this.Rh},set:function(t){var n;if(!Vo(t.length,32))throw new f("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(Vu(r)&&![8,16].includes(r.iv.length))throw new f("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=Hu(r)),!0===n&&!Hu(r)||!1===n&&Hu(r))throw new f("Mix of samples with and without subsamples detected.");if(Hu(r)){if(!Vo(r.subsamples.length,16))throw new f("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(!Vo(s.clearData,16))throw new f("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Vo(s.protectedData,23))throw new f("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.Rh=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];Vu(r)&&(n+=r.iv.length),Hu(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(Vu(r)&&Xo(n.writer,r.iv),Hu(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)}})(Go),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}xo(n,t),a.defineProperty(n.prototype,"timescale",{get:function(){return this.nh},set:function(t){if(!Vo(t,32))throw new f("The provided timescale does not fit in 32 bits.");this.nh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Da},set:function(t){if(!Vo(t,32))throw new f("The provided presentationTimeDelta does not fit in 32 bits.");this.Da=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"eventDuration",{get:function(){return this.Ca},set:function(t){if(!Vo(t,32))throw new f("The provided eventDuration does not fit in 32 bits.");this.Ca=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"id",{get:function(){return this.Pa},set:function(t){if(!Vo(t,32))throw new f("The provided id does not fit in 32 bits.");this.Pa=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(Mo.from(this.data))}}(Go);var Xu,Gu,Yu=(Xu="pssh",Gu=function(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 Au(i,s,e):new Pu(i,s)},function(t){var n,i=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=au(i,e);if(!r.complete)return;if(fu(r.box,n))return r.box}}(new su((n=t,new DataView(n.buffer,n.byteOffset,n.byteLength)),new uu),Xu);if(!i)throw new f("".concat(Xu," box not found"));return Gu(i)}),Ku=function(t){function n(n,i){var e;(e=t.call(this)||this).Oa=void 0,e.Ba=!1,e.La=void 0,e.Ma=void 0,e.xa=function(){e.Fa()},e.Ua=function(t){e.Ys(new ko(tn(e),t.messageType,Po(e.Ha,t.message)))},e.Va=function(){e.Ba=!0,e.Oa.Du>0&&(e.Oa.Nu(),e.Ys(new Eo(tn(e)))),e.Xa.removeEventListener("keystatuseschange",e.xa),e.Xa.removeEventListener("message",e.Ua)},e.Xa=n,e.Ha=i,e.Xa.addEventListener("keystatuseschange",e.xa),e.Xa.addEventListener("message",e.Ua),e.Oa=new No;var r=[];return e.Xa.closed&&r.push(j.resolve(e.Xa.closed)),e.Ma=new Oo,r.push(e.Ma.Uu),e.La=j.race(r).then(e.Va,e.Va),e.Fa(),e}Ut(n,t);var i=n.prototype;return i.Wa=function(){if(this.Ba)return this.La;var t,n,i=[];return i.push(j.resolve(this.Xa.close())),i.push((t=1e3,new j(function(i,e){if(void 0!==n&&n.Ns)e(new un);else{var r=J.Qn(function(){void 0!==n&&n.Ms(o),i()},t),o=function(){J.Gn(r),e(new un)};void 0!==n&&n.Ls(o)}}))),this.Ma.Xu(j.race(i).catch(Qu)),this.Ba=!0,this.La},i.qa=function(t,n,i){if(hi.hn){var e=Yu(Dn(n));if(1===e.version)n=new Pu(e.systemId,e.data).serialize().join()}return j.resolve(this.Xa.generateRequest(t,n)).catch(Qu)},i.Ga=function(t){return j.resolve(this.Xa.load(t)).catch(Qu)},i.Qa=function(){return j.resolve(this.Xa.remove()).catch(Qu)},i.Ya=function(t){return j.resolve(this.Xa.update(t)).catch(Qu)},i.Fa=function(){var t=this;this.Oa.Nu(),this.Xa.keyStatuses.forEach(function(n,i){t.Ka(i,n)}),this.Ys(new Eo(this))},i.Ka=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Dn(t);if(this.Ha===so&&16===e.byteLength){var r=Pn(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.Ha===so&&"status-pending"===n&&(n="usable"),this.Oa.Ru(e,n)},mt(n,[{key:"Za",get:function(){return this.La}},{key:"Ja",get:function(){return this.Xa.expiration}},{key:"$a",get:function(){return this.Oa}},{key:"tc",get:function(){return this.Xa.sessionId}}]),n}(Wn);function Qu(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|v(i[1],16))}throw new Do(t.message,void 0,n,t)}var $u=function(){function t(t,n,i){this.nc=t,this.ic=n,this.ec=i}var n=t.prototype;return n.rc=function(t){return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Ku(this.nc.createSession(t),this.ic));case 1:case"end":return n.stop()}},null,this,null,j)},n.uc=function(t){return j.resolve(this.nc.setServerCertificate(t))},n.hc=function(t){return j.resolve(t.setMediaKeys(this.nc))},n.ac=function(t){return j.resolve(t.setMediaKeys(null))},t}(),Ju=function(){function t(t,n,i){this.cc=t,this.Ha=n,this.fc=i}var n=t.prototype;return n.vc=function(){var t;return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Z.awrap(this.cc.createMediaKeys());case 2:return t=n.sent,n.abrupt("return",new $u(t,this.Ha,this.fc));case 4:case"end":return n.stop()}},null,this,null,j)},n.dc=function(){return this.fc},mt(t,[{key:"ic",get:function(){return this.cc.keySystem}}]),t}();function Zu(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,gc:e.gc},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 ts(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 ts(t,n,i,e)}),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function ts(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!ct(n,e.encryptionScheme))&&(!e.robustness&&t(i,(r=e.contentType,o=r.trim(),(u=o.indexOf(";"))<0?o:o.substr(0,u).trim()))));var r,o,u}function ns(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 is(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(es))||!(!t.videoCapabilities||!t.videoCapabilities.some(es))}function es(t){return!t.robustness}function rs(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(eo({},r,{robustness:n}))}return i}var os,us,ss=function(){function t(){}return t.prototype.Ts=function(t,n){var i,r,o,u,s,f,h,a;return Z.async(function(c){for(;;)switch(c.prev=c.next){case 0:for(n=n.filter(function(t){return!t.gc}),i=0,r=n;i<r.length;i++)(o=r[i]).audioCapabilities&&(o.audioCapabilities=ns(o.audioCapabilities)),o.videoCapabilities&&(o.videoCapabilities=ns(o.videoCapabilities));if("com.widevine.alpha"!==t||!n.some(is)){c.next=14;break}return u=n.map(function(t){return i="SW_SECURE_CRYPTO",eo({},n=t,{videoCapabilities:n.videoCapabilities?rs(n.videoCapabilities,i):void 0,audioCapabilities:n.audioCapabilities?rs(n.audioCapabilities,i):void 0});var n,i}),c.prev=4,c.next=7,Z.awrap(e.requestMediaKeySystemAccess(t,u));case 7:return s=c.sent,f=s.getConfiguration(),c.abrupt("return",new Ju(s,t,f));case 12:c.prev=12,c.t0=c.catch(4);case 14:return c.next=16,Z.awrap(e.requestMediaKeySystemAccess(t,n));case 16:return h=c.sent,a=h.getConfiguration(),c.abrupt("return",new Ju(h,t,a));case 19:case"end":return c.stop()}},null,null,[[4,12]],j)},t.wc=function(){return void 0!==e&&"function"==typeof e.requestMediaKeySystemAccess},t}(),fs=function(){function t(){}return t.prototype.Ts=function(t,n){try{return j.resolve(function(t,n){if(!hs())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.wc=function(){return hs()},t}();function hs(){return void 0!==Ar.MSMediaKeys}!function(t){t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.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"}(os||(os={})),function(t){t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN"}(us||(us={})),function(t){(us||(us={})).fromCode=function(t){var n=c.floor(t/1e3);if(n in us)return n;throw new h("Invalid error code: "+t)}}();var as=function(){function t(){}return t.prototype.Ts=function(t,n){try{return j.resolve(function(t,n){if(t!==wo)throw new h(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!cs())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.wc=function(){return cs()},t}();function cs(){return void 0!==Ar.WebKitMediaKeys}var vs,ls=function(){function t(t){this.Fc=t}return t.prototype.Ts=function(t,n){var i,e,r;return Z.async(function(o){for(;;)switch(o.prev=o.next){case 0:i=0,e=this.Fc;case 1:if(!(i<e.length)){o.next=14;break}return r=e[i],o.prev=3,o.next=6,Z.awrap(r.Ts(t,n));case 6:return o.abrupt("return",o.sent);case 9:o.prev=9,o.t0=o.catch(3);case 11:i++,o.next=1;break;case 14:throw new h("Unsupported key system configuration for "+t);case 15:case"end":return o.stop()}},null,this,[[3,9]],j)},t}(),ds=function(t){function n(n){var i;return(i=t.call(this)||this).kc=void 0,i.Pc=void 0,i.mc=void 0,i.ao=!1,i.Uc=void 0,i.Hc=void 0,i.Vc=void 0,i.Xc=void 0,i.zc=void 0,i.Ha=n,i.mc=new Oo,i.Hc="",i.zc=new Oo,i.Vc=new No,i}Ut(n,t);var i=n.prototype;return i.Wc=function(){this.Pc&&(this.Ec("usable"),this.Pc.Xu(void 0),this.Pc=void 0)},i.qc=function(t){var n=new Do("Unknown CDM error",t.errorCode,t.systemCode);this.Pc?(this.Pc.Wu(n),this.Pc=void 0):this.kc?(this.kc.Wu(n),this.kc=void 0):n.Gu===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.Ec("output-restricted"):1===n.Qu?this.Ec("expired"):this.Ec("internal-error")},i.Gc=function(t){0!==t.message.byteLength&&(this.kc&&(this.kc.Xu(void 0),this.kc=void 0),this.Ys(new ko(this,"license-request",Po(this.Ha,Cn(t.message).buffer),t.defaultURL||void 0)))},i.Qc=function(t){this.Xc||(this.Xc=t,this.zc.Xu(t))},i.Wa=function(){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:this.throwIfClosed(),this.ao=!0,this.mc.Xu(void 0);case 3:case"end":return t.stop()}},null,this,null,j)},i.qa=function(t,n){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.throwIfClosed(),this.kc=new Oo,this.Uc=Dn(n),t.t0=this.Xc,t.t0){t.next=8;break}return t.next=7,Z.awrap(this.zc.Uu);case 7:t.t0=t.sent;case 8:return t.t0.webkitGenerateKeyRequest(this.Ha,this.Uc),t.next=12,Z.awrap(this.kc.Uu);case 12:case"end":return t.stop()}},null,this,null,j)},i.Ga=function(t){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:return this.throwIfClosed(),t.abrupt("return",!1);case 2:case"end":return t.stop()}},null,this,null,j)},i.Qa=function(){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:this.throwIfClosed();case 1:case"end":return t.stop()}},null,this,null,j)},i.Ya=function(t){return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(this.throwIfClosed(),this.Pc=new Oo,n.t0=this.Xc,n.t0){n.next=7;break}return n.next=6,Z.awrap(this.zc.Uu);case 6:n.t0=n.sent;case 7:return n.t0.webkitAddKey(this.Ha,Dn(t),this.Uc,this.tc),n.next=11,Z.awrap(this.Pc.Uu);case 11:case"end":return n.stop()}},null,this,null,j)},i.throwIfClosed=function(){if(this.ao)throw new h("Already closing or closed.")},i.Ec=function(t){this.Vc.Nu(),this.Vc.Ru(Ro,t),this.Ys(new Eo(this))},mt(n,[{key:"$a",get:function(){return this.Vc}},{key:"tc",get:function(){return this.Hc},set:function(t){this.Hc=t}},{key:"Za",get:function(){return this.mc.Uu}},{key:"Ja",get:function(){return NaN}}]),n}(Wn),ws=function(){function t(t,n){var i=this;this.Xc=void 0,this.Yc=yt(),this.jc=[],this.Sc=function(t){var n=i.Kc(t.sessionId);n&&n.Wc()},this.Zc=function(t){var n=i.Kc(t.sessionId);n&&n.qc(t)},this.Jc=function(t){var n=i.Kc(t.sessionId);n&&n.Gc(t)},this.ic=t,this.ec=n}var n=t.prototype;return n.hc=function(t){return this.Xc=t,this.Xc.addEventListener("webkitkeyadded",this.Sc),this.Xc.addEventListener("webkitkeyerror",this.Zc),this.Xc.addEventListener("webkitkeymessage",this.Jc),this.Yc.forEach(function(n,i){return n.Qc(t)}),this.jc.forEach(function(n){return n.Qc(t)}),j.resolve()},n.ac=function(t){return t.removeEventListener("webkitkeyadded",this.Sc),t.removeEventListener("webkitkeyerror",this.Zc),t.removeEventListener("webkitkeymessage",this.Jc),this.Xc=void 0,j.resolve()},n.rc=function(t,n,i){var e;return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:return e=new ds(this.ic),this.Xc&&e.Qc(this.Xc),this.jc.push(e),t.abrupt("return",e);case 4:case"end":return t.stop()}},null,this,null,j)},n.uc=function(t){return j.resolve(!1)},n.Kc=function(t){if(t){var n=this.Yc.get(t);return n||((n=this.jc.shift())?(n.tc=t,this.Yc.set(t,n),n):void 0)}},t}(),bs=function(){function t(t,n){this.ic=t,this.$c=n}var n=t.prototype;return n.vc=function(){return j.resolve(new ws(this.ic,this.$c))},n.dc=function(){return this.$c},t}(),gs=function(){function t(){}return t.prototype.Ts=function(t,n){try{return j.resolve(ms(t,n))}catch(t){return j.reject(t)}},t.wc=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function ms(t,n){if(!gs.wc())throw new h("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Zu(ps,To,t,e);if(r)return new bs(t,r)}throw new h("Unsupported key system configuration for "+t)}function ps(t,n){var i=Fr();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function ys(){return vs||(vs=function(){var t=[];as.wc()&&t.push(new as);ss.wc()&&t.push(new ss);fs.wc()&&t.push(new fs);gs.wc()&&t.push(new gs);return new ls(t)}()),vs}var _s=function(){function t(){this.tf=yt()}var n=t.prototype;return n.Nu=function(t){this.tf.delete(t)},n.nf=function(){this.tf.clear()},n.Eu=function(t){return this.tf.get(t)},n.if=function(t,n){this.tf.set(t,n)},t}(),Ss=function(){function t(){}return t.ef=function(){return t.qn||(t.qn=Is.wc()?new Is:new _s),t.qn},t.Nu=function(n){t.ef().Nu(n)},t.nf=function(){t.ef().nf()},t.Eu=function(n){return t.ef().Eu(n)},t.if=function(n,i){t.ef().if(n,i)},t}();Ss.qn=void 0;var Is=function(n){function i(){return n.apply(this,arguments)||this}Ut(i,n),i.wc=function(){try{return t.sessionStorage.setItem("foobar","foobar"),t.sessionStorage.removeItem("foobar"),!0}catch(t){return!1}};var e=i.prototype;return e.Nu=function(n){t.sessionStorage.removeItem(n)},e.nf=function(){t.sessionStorage.clear()},e.Eu=function(n){return t.sessionStorage[n]},e.if=function(n,i){t.sessionStorage[n]=i},i}(Ss);var Ts=function(){var n,i=t.Blob;if(i)try{return new i,n=i,function(t,i){return new n(t,i)}}catch(t){}var e,r=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;if(r)return e=r,function(t,n){var i=new e;if(t)for(var r=0;r<t.length;r++){var o=t[r];i.append(o)}return i.getBlob(n&&n.type||"")}}();function Es(t,n,e){var r=Ts([n],{type:"application/octet-stream"}),o=URL.createObjectURL(r),u=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,e),s=i.createElement("a");s.href=o,s.download=u,i.body.appendChild(s),s.click(),i.body.removeChild(s),URL.revokeObjectURL(o)}var ks,Rs;!function(t){t.rf="sf",t.uf="hf",t.cf="contentprotectionerror",t.vf="contentprotectionsuccess",t.df="currentsourcechange",t.lf="destroy",t._f="durationchange",t.gf="emptied",t.mu="encrypted",t.wf="ended",t.mf="yf",t.kf="loadstart",t.pf="manifestupdate",t.bf="nosupportedrepresentationfound",t.Af="offline",t.Tf="online",t.Sf="pause",t.Ef="play",t.If="progress",t.Rf="ratechange",t.Nf="representationchange",t.Df="resize",t.Cf="seeked",t.Pf="seeking",t.Of="segmentnotfound",t.Bf="Lf",t.Mf="xf",t.Ff="sourcechange",t.Uf="timeupdate",t.Hf="volumechange",t.Vf="Xf",t.zf="metricschange"}(ks||(ks={})),function(t){t.Wf="arraybuffer",t.qf="json",t.Gf="stream",t.Zn="text"}(Rs||(Rs={}));var Ns=function(){function t(n){var i=this;this.Zr=void 0,this.Zr={},n instanceof t?n.asList().forEach(function(t){var n=t[0],e=t[1];i.append(n,e)}):Array.isArray(n)?n.forEach(function(t){i.append(t[0],t[1])}):n&&a.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=Os(i),e=Ps(e);var r=i.toLowerCase();if(this.Zr.hasOwnProperty(r)){var o=this.Zr[r],u=o[1];o[1]=u?u+", "+e:e}else this.Zr[r]=[i,e]},n.delete=function(t){var n=Os(t).toLowerCase();delete this.Zr[n]},n.get=function(t){var n=Os(t).toLowerCase();return this.Zr.hasOwnProperty(n)?this.Zr[n][1]:null},n.has=function(t){var n=Os(t).toLowerCase();return this.Zr.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=Os(i)).toLowerCase();this.Zr[e]=[i,Ps(n)]},n.forEach=function(t,n){for(var i in this.Zr)this.Zr.hasOwnProperty(i)&&t.call(n,this.Zr[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.Zr)if(this.Zr.hasOwnProperty(n)){var i=this.Zr[n],e=i[0],r=i[1];t.push([e,r])}return t},n.Qf=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.Yf=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.jf=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function Os(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new h("Invalid character in header field name");return n}function Ps(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var As="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(t){return"Symbol("+t+")"};function Ds(){}var Cs=void 0!==t?t:void 0!==n?n:"undefined"!=typeof global?global:void 0;function xs(t){return"object"==typeof t&&null!==t||"function"==typeof t}var Bs=Ds,Fs=j,Ls=j.prototype.then,zs=j.resolve.bind(Fs),Us=j.reject.bind(Fs);function Ms(t){return new Fs(t)}function Ws(t){return zs(t)}function qs(t){return Us(t)}function js(t,n,i){return Ls.call(t,n,i)}function Vs(t,n,i){js(js(t,n,i),void 0,Bs)}function Hs(t,n){Vs(t,n)}function Xs(t,n){Vs(t,void 0,n)}function Gs(t,n,i){return js(t,n,i)}function Ys(t){js(t,void 0,Bs)}var Ks=function(){var t=Cs&&Cs.queueMicrotask;if("function"==typeof t)return t;var n=Ws(void 0);return function(t){return js(n,t)}}();function Qs(t,n,i){if("function"!=typeof t)throw new h("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function $s(t,n,i){try{return Ws(Qs(t,n,i))}catch(t){return qs(t)}}var Js=function(){function t(){this.Kf=0,this.Zf=0,this.Se={Jf:[],$f:void 0},this.tv=this.Se,this.Kf=0,this.Zf=0}return a.defineProperty(t.prototype,"length",{get:function(){return this.Zf},enumerable:!1,configurable:!0}),t.prototype.push=function(t){var n=this.tv,i=n;16383===n.Jf.length&&(i={Jf:[],$f:void 0}),n.Jf.push(t),i!==n&&(this.tv=i,n.$f=i),++this.Zf},t.prototype.shift=function(){var t=this.Se,n=t,i=this.Kf,e=i+1,r=t.Jf,o=r[i];return 16384===e&&(n=t.$f,e=0),--this.Zf,this.Kf=e,t!==n&&(this.Se=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.Kf,i=this.Se,e=i.Jf;!(n===e.length&&void 0===i.$f||n===e.length&&(n=0,0===(e=(i=i.$f).Jf).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Se,n=this.Kf;return t.Jf[n]},t}();function Zs(t,n){t.ev=n,n.rv=t,"readable"===n.we?rf(t):"closed"===n.we?function(t){rf(t),sf(t)}(t):of(t,n.uv)}function tf(t,n){return ic(t.ev,n)}function nf(t){"readable"===t.ev.we?uf(t,new h("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){of(t,n)}(t,new h("Reader was released and can no longer be used to monitor the stream's closedness")),t.ev.rv=void 0,t.ev=void 0}function ef(t){return new h("Cannot "+t+" a stream using a released reader")}function rf(t){t.La=Ms(function(n,i){t.ov=n,t.hv=i})}function of(t,n){rf(t),uf(t,n)}function uf(t,n){void 0!==t.hv&&(Ys(t.La),t.hv(n),t.ov=void 0,t.hv=void 0)}function sf(t){void 0!==t.ov&&(t.ov(void 0),t.ov=void 0,t.hv=void 0)}var ff=As("[[AbortSteps]]"),hf=As("[[ErrorSteps]]"),af=As("[[CancelSteps]]"),cf=As("[[PullSteps]]"),vf=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},lf=c.trunc||function(t){return t<0?c.ceil(t):c.floor(t)};function df(t,n){if(void 0!==t&&("object"!=typeof(i=t)&&"function"!=typeof i))throw new h(n+" is not an object.");var i}function wf(t,n){if("function"!=typeof t)throw new h(n+" is not a function.")}function bf(t,n){if(!function(t){return"object"==typeof t&&null!==t||"function"==typeof t}(t))throw new h(n+" is not an object.")}function gf(t,n,i){if(void 0===t)throw new h("Parameter "+n+" is required in '"+i+"'.")}function mf(t,n,i){if(void 0===t)throw new h(n+" is required in '"+i+"'.")}function pf(t){return Number(t)}function yf(t){return 0===t?0:t}function _f(t,n){var i=Number.MAX_SAFE_INTEGER,e=Number(t);if(e=yf(e),!vf(e))throw new h(n+" is not a finite number");if((e=function(t){return yf(lf(t))}(e))<0||e>i)throw new h(n+" is outside the accepted range of 0 to "+i+", inclusive");return vf(e)&&0!==e?e:0}function Sf(t,n){if(!tc(t))throw new h(n+" is not a ReadableStream.")}function If(t){return new Pf(t)}function Tf(t,n){t.rv.fv.push(n)}function Ef(t,n,i){var e=t.rv.fv.shift();i?e.vv():e._v(n)}function kf(t){return t.rv.fv.length}function Rf(t){var n=t.rv;return void 0!==n&&!!Af(n)}var Nf,Of,Pf=function(){function t(t){if(gf(t,1,"ReadableStreamDefaultReader"),Sf(t,"First parameter"),nc(t))throw new h("This stream has already been locked for exclusive reading by another reader");Zs(this,t),this.fv=new Js}return a.defineProperty(t.prototype,"closed",{get:function(){return Af(this)?this.La:qs(Cf("closed"))},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),Af(this)?void 0===this.ev?qs(ef("cancel")):tf(this,t):qs(Cf("cancel"))},t.prototype.read=function(){if(!Af(this))return qs(Cf("read"));if(void 0===this.ev)return qs(ef("read from"));var t,n,i=Ms(function(i,e){t=i,n=e});return Df(this,{_v:function(n){return t({value:n,done:!1})},vv:function(){return t({value:void 0,done:!0})},wv:function(t){return n(t)}}),i},t.prototype.releaseLock=function(){if(!Af(this))throw Cf("releaseLock");if(void 0!==this.ev){if(this.fv.length>0)throw new h("Tried to release a reader lock when that reader has pending read() calls un-settled");nf(this)}},t}();function Af(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"fv")&&t instanceof Pf)}function Df(t,n){var i=t.ev;i.mv=!0,"closed"===i.we?n.vv():"errored"===i.we?n.wv(i.uv):i.yv[cf](n)}function Cf(t){return new h("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}a.defineProperties(Pf.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(Pf.prototype,As.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof As.asyncIterator&&((Nf={})[As.asyncIterator]=function(){return this},Of=Nf,a.defineProperty(Of,As.asyncIterator,{enumerable:!1}));var xf=function(){function t(t,n){this.pv=void 0,this.bv=!1,this.rv=t,this.Av=n}return t.prototype.next=function(){var t=this,n=function(){return t.Tv()};return this.pv=this.pv?Gs(this.pv,n,n):n(),this.pv},t.prototype.return=function(t){var n=this,i=function(){return n.Sv(t)};return this.pv?Gs(this.pv,i,i):i()},t.prototype.Tv=function(){var t=this;if(this.bv)return j.resolve({value:void 0,done:!0});var n,i,e=this.rv;if(void 0===e.ev)return qs(ef("iterate"));var r=Ms(function(t,e){n=t,i=e});return Df(e,{_v:function(i){t.pv=void 0,Ks(function(){return n({value:i,done:!1})})},vv:function(){t.pv=void 0,t.bv=!0,nf(e),n({value:void 0,done:!0})},wv:function(n){t.pv=void 0,t.bv=!0,nf(e),i(n)}}),r},t.prototype.Sv=function(t){if(this.bv)return j.resolve({value:t,done:!0});this.bv=!0;var n=this.rv;if(void 0===n.ev)return qs(ef("finish iterating"));if(!this.Av){var i=tf(n,t);return nf(n),Gs(i,function(){return{value:t,done:!0}})}return nf(n),Ws({value:t,done:!0})},t}(),Bf={next:function(){return Ff(this)?this.Ev.next():qs(Lf("next"))},return:function(t){return Ff(this)?this.Ev.return(t):qs(Lf("return"))}};function Ff(t){if(!xs(t))return!1;if(!a.prototype.hasOwnProperty.call(t,"Ev"))return!1;try{return t.Ev instanceof xf}catch(t){return!1}}function Lf(t){return new h("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}void 0!==Of&&a.setPrototypeOf(Bf,Of);var zf=Number.isNaN||function(t){return t!=t};function Uf(t){return t.slice()}function Mf(t,n,i,e,r){new w(t).set(new w(i,e,r),n)}function Wf(t){return t}function qf(t,n,i){if(t.slice)return t.slice(n,i);var e=i-n,r=new ArrayBuffer(e);return Mf(r,0,t,n,e),r}function jf(t){var n=qf(t.buffer,t.byteOffset,t.byteOffset+t.byteLength);return new w(n)}function Vf(t){var n=t.Iv.shift();return t.Rv-=n.size,t.Rv<0&&(t.Rv=0),n.value}function Hf(t,n,i){if("number"!=typeof(e=i)||zf(e)||e<0||i===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var e;t.Iv.push({value:n,size:i}),t.Rv+=i}function Xf(t){t.Iv=new Js,t.Rv=0}var Gf=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"view",{get:function(){if(!Qf(this))throw mh("view");return this.Nv},enumerable:!1,configurable:!0}),t.prototype.respond=function(t){if(!Qf(this))throw mh("respond");if(gf(t,1,"respond"),t=_f(t,"First parameter"),void 0===this.Dv)throw new h("This BYOB request has been invalidated");this.Nv.buffer,wh(this.Dv,t)},t.prototype.respondWithNewView=function(t){if(!Qf(this))throw mh("respondWithNewView");if(gf(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new h("You can only respond with array buffer views");if(void 0===this.Dv)throw new h("This BYOB request has been invalidated");t.buffer,bh(this.Dv,t)},t}();a.defineProperties(Gf.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(Gf.prototype,As.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Yf=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"byobRequest",{get:function(){if(!Kf(this))throw ph("byobRequest");return lh(this)},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Kf(this))throw ph("desiredSize");return dh(this)},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(!Kf(this))throw ph("close");if(this.Cv)throw new h("The stream has already been closed; do not close it again!");var t=this.Pv.we;if("readable"!==t)throw new h("The stream (in "+t+" state) is not in the readable state and cannot be closed");ah(this)},t.prototype.enqueue=function(t){if(!Kf(this))throw ph("enqueue");if(gf(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new h("chunk must be an array buffer view");if(0===t.byteLength)throw new h("chunk must have non-zero byteLength");if(0===t.buffer.byteLength)throw new h("chunk's buffer must have non-zero byteLength");if(this.Cv)throw new h("stream is closed or draining");var n=this.Pv.we;if("readable"!==n)throw new h("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");ch(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Kf(this))throw ph("error");vh(this,t)},t.prototype[af]=function(t){Jf(this),Xf(this);var n=this.Ov(t);return hh(this),n},t.prototype[cf]=function(t){var n=this.Pv;if(this.Rv>0){var i=this.Iv.shift();this.Rv-=i.byteLength,rh(this);var e=new w(i.buffer,i.byteOffset,i.byteLength);t._v(e)}else{var r=this.Bv;if(void 0!==r){var o=void 0;try{o=new ArrayBuffer(r)}catch(n){return void t.wv(n)}var u={buffer:o,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:w,readerType:"default"};this.Lv.push(u)}Tf(n,t),$f(this)}},t}();function Kf(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"Pv")&&t instanceof Yf)}function Qf(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"Dv")&&t instanceof Gf)}function $f(t){(function(t){var n=t.Pv;if("readable"!==n.we)return!1;if(t.Cv)return!1;if(!t.Mv)return!1;if(Rf(n)&&kf(n)>0)return!0;if(Ih(n)&&Sh(n)>0)return!0;if(dh(t)>0)return!0;return!1})(t)&&(t.xv?t.Fv=!0:(t.xv=!0,Vs(t.Uv(),function(){t.xv=!1,t.Fv&&(t.Fv=!1,$f(t))},function(n){vh(t,n)})))}function Jf(t){oh(t),t.Lv=new Js}function Zf(t,n){var i=!1;"closed"===t.we&&(i=!0);var e=th(n);"default"===n.readerType?Ef(t,e,i):function(t,n,i){var e=t.rv.Hv.shift();i?e.vv(n):e._v(n)}(t,e,i)}function th(t){var n=t.bytesFilled,i=t.elementSize;return new t.viewConstructor(t.buffer,t.byteOffset,n/i)}function nh(t,n,i,e){t.Iv.push({buffer:n,byteOffset:i,byteLength:e}),t.Rv+=e}function ih(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=c.min(t.Rv,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.Iv;s>0;){var a=h.peek(),v=c.min(s,a.byteLength),l=n.byteOffset+n.bytesFilled;Mf(n.buffer,l,a.buffer,a.byteOffset,v),a.byteLength===v?h.shift():(a.byteOffset+=v,a.byteLength-=v),t.Rv-=v,eh(t,v,n),s-=v}return f}function eh(t,n,i){i.bytesFilled+=n}function rh(t){0===t.Rv&&t.Cv?(hh(t),ec(t.Pv)):$f(t)}function oh(t){null!==t.Vv&&(t.Vv.Dv=void 0,t.Vv.Nv=null,t.Vv=null)}function uh(t){for(;t.Lv.length>0;){if(0===t.Rv)return;var n=t.Lv.peek();ih(t,n)&&(fh(t),Zf(t.Pv,n))}}function sh(t,n){var i=t.Lv.peek();oh(t),"closed"===t.Pv.we?function(t,n){var i=t.Pv;if(Ih(i))for(;Sh(i)>0;)Zf(i,fh(t))}(t):function(t,n,i){if(eh(0,n,i),!(i.bytesFilled<i.elementSize)){fh(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=qf(i.buffer,r-e,r);nh(t,o,0,o.byteLength)}i.bytesFilled-=e,Zf(t.Pv,i),uh(t)}}(t,n,i),$f(t)}function fh(t){return t.Lv.shift()}function hh(t){t.Uv=void 0,t.Ov=void 0}function ah(t){var n=t.Pv;if(!t.Cv&&"readable"===n.we)if(t.Rv>0)t.Cv=!0;else{if(t.Lv.length>0)if(t.Lv.peek().bytesFilled>0){var i=new h("Insufficient bytes to fill elements in the given buffer");throw vh(t,i),i}hh(t),ec(n)}}function ch(t,n){var i=t.Pv;if(!t.Cv&&"readable"===i.we){var e=n.buffer,r=n.byteOffset,o=n.byteLength,u=Wf(e);if(t.Lv.length>0){var s=t.Lv.peek();s.buffer,0,s.buffer=Wf(s.buffer)}if(oh(t),Rf(i))if(0===kf(i))nh(t,u,r,o);else t.Lv.length>0&&fh(t),Ef(i,new w(u,r,o),!1);else Ih(i)?(nh(t,u,r,o),uh(t)):nh(t,u,r,o);$f(t)}}function vh(t,n){var i=t.Pv;"readable"===i.we&&(Jf(t),Xf(t),hh(t),rc(i,n))}function lh(t){if(null===t.Vv&&t.Lv.length>0){var n=t.Lv.peek(),i=new w(n.buffer,n.byteOffset+n.bytesFilled,n.byteLength-n.bytesFilled),e=a.create(Gf.prototype);!function(t,n,i){t.Dv=n,t.Nv=i}(e,t,i),t.Vv=e}return t.Vv}function dh(t){var n=t.Pv.we;return"errored"===n?null:"closed"===n?0:t.Xv-t.Rv}function wh(t,n){var i=t.Lv.peek();if("closed"===t.Pv.we){if(0!==n)throw new h("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===n)throw new h("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range")}i.buffer=Wf(i.buffer),sh(t,n)}function bh(t,n){var i=t.Lv.peek();if("closed"===t.Pv.we){if(0!==n.byteLength)throw new h("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===n.byteLength)throw new h("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.bufferByteLength!==n.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(i.bytesFilled+n.byteLength>i.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var e=n.byteLength;i.buffer=Wf(n.buffer),sh(t,e)}function gh(t,n,i,e,r,o,u){n.Pv=t,n.Fv=!1,n.xv=!1,n.Vv=null,n.Iv=n.Rv=void 0,Xf(n),n.Cv=!1,n.Mv=!1,n.Xv=o,n.Uv=e,n.Ov=r,n.Bv=u,n.Lv=new Js,t.yv=n,Vs(Ws(i()),function(){n.Mv=!0,$f(n)},function(t){vh(n,t)})}function mh(t){return new h("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function ph(t){return new h("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function yh(t){return new Th(t)}function _h(t,n){t.rv.Hv.push(n)}function Sh(t){return t.rv.Hv.length}function Ih(t){var n=t.rv;return void 0!==n&&!!Eh(n)}a.defineProperties(Yf.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(Yf.prototype,As.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var Th=function(){function t(t){if(gf(t,1,"ReadableStreamBYOBReader"),Sf(t,"First parameter"),nc(t))throw new h("This stream has already been locked for exclusive reading by another reader");if(!Kf(t.yv))throw new h("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Zs(this,t),this.Hv=new Js}return a.defineProperty(t.prototype,"closed",{get:function(){return Eh(this)?this.La:qs(Rh("closed"))},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),Eh(this)?void 0===this.ev?qs(ef("cancel")):tf(this,t):qs(Rh("cancel"))},t.prototype.read=function(t){if(!Eh(this))return qs(Rh("read"));if(!ArrayBuffer.isView(t))return qs(new h("view must be an array buffer view"));if(0===t.byteLength)return qs(new h("view must have non-zero byteLength"));if(0===t.buffer.byteLength)return qs(new h("view's buffer must have non-zero byteLength"));if(t.buffer,void 0===this.ev)return qs(ef("read from"));var n,i,e=Ms(function(t,e){n=t,i=e});return kh(this,t,{_v:function(t){return n({value:t,done:!1})},vv:function(t){return n({value:t,done:!0})},wv:function(t){return i(t)}}),e},t.prototype.releaseLock=function(){if(!Eh(this))throw Rh("releaseLock");if(void 0!==this.ev){if(this.Hv.length>0)throw new h("Tried to release a reader lock when that reader has pending read() calls un-settled");nf(this)}},t}();function Eh(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"Hv")&&t instanceof Th)}function kh(t,n,i){var e=t.ev;e.mv=!0,"errored"===e.we?i.wv(e.uv):function(t,n,i){var e=t.Pv,r=1;n.constructor!==DataView&&(r=n.constructor.BYTES_PER_ELEMENT);var o=n.constructor,u=Wf(n.buffer),s={buffer:u,bufferByteLength:u.byteLength,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:r,viewConstructor:o,readerType:"byob"};if(t.Lv.length>0)return t.Lv.push(s),void _h(e,i);if("closed"!==e.we){if(t.Rv>0){if(ih(t,s)){var f=th(s);return rh(t),void i._v(f)}if(t.Cv){var a=new h("Insufficient bytes to fill elements in the given buffer");return vh(t,a),void i.wv(a)}}t.Lv.push(s),_h(e,i),$f(t)}else{var c=new o(s.buffer,s.byteOffset,0);i.vv(c)}}(e.yv,n,i)}function Rh(t){return new h("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}function Nh(t,n){var i=t.highWaterMark;if(void 0===i)return n;if(zf(i)||i<0)throw new RangeError("Invalid highWaterMark");return i}function Oh(t){var n=t.size;return n||function(){return 1}}function Ph(t,n){df(t,n);var i=null==t?void 0:t.highWaterMark,e=null==t?void 0:t.size;return{highWaterMark:void 0===i?void 0:pf(i),size:void 0===e?void 0:Ah(e,n+" has member 'size' that")}}function Ah(t,n){return wf(t,n),function(n){return pf(t(n))}}function Dh(t,n,i){return wf(t,i),function(i){return $s(t,n,[i])}}function Ch(t,n,i){return wf(t,i),function(){return $s(t,n,[])}}function xh(t,n,i){return wf(t,i),function(i){return Qs(t,n,[i])}}function Bh(t,n,i){return wf(t,i),function(i,e){return $s(t,n,[i,e])}}function Fh(t,n){if(!Wh(t))throw new h(n+" is not a WritableStream.")}a.defineProperties(Th.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(Th.prototype,As.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var Lh="function"==typeof AbortController;var zh=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),void 0===t?t=null:bf(t,"First parameter");var i=Ph(n,"Second parameter"),e=function(t,n){df(t,n);var i=null==t?void 0:t.abort,e=null==t?void 0:t.close,r=null==t?void 0:t.start,o=null==t?void 0:t.type,u=null==t?void 0:t.write;return{abort:void 0===i?void 0:Dh(i,t,n+" has member 'abort' that"),close:void 0===e?void 0:Ch(e,t,n+" has member 'close' that"),start:void 0===r?void 0:xh(r,t,n+" has member 'start' that"),write:void 0===u?void 0:Bh(u,t,n+" has member 'write' that"),type:o}}(t,"First parameter");if(Mh(this),void 0!==e.type)throw new RangeError("Invalid type is specified");var r=Oh(i);!function(t,n,i,e){var r=a.create(oa.prototype),o=function(){},u=function(){return Ws(void 0)},s=function(){return Ws(void 0)},f=function(){return Ws(void 0)};void 0!==n.start&&(o=function(){return n.start(r)});void 0!==n.write&&(u=function(t){return n.write(t,r)});void 0!==n.close&&(s=function(){return n.close()});void 0!==n.abort&&(f=function(t){return n.abort(t)});sa(t,r,o,u,s,f,i,e)}(this,e,Nh(i,1),r)}return a.defineProperty(t.prototype,"locked",{get:function(){if(!Wh(this))throw da("locked");return qh(this)},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){return void 0===t&&(t=void 0),Wh(this)?qh(this)?qs(new h("Cannot abort a stream that already has a writer")):jh(this,t):qs(da("abort"))},t.prototype.close=function(){return Wh(this)?qh(this)?qs(new h("Cannot close a stream that already has a writer")):Yh(this)?qs(new h("Cannot close an already-closing stream")):Vh(this):qs(da("close"))},t.prototype.getWriter=function(){if(!Wh(this))throw da("getWriter");return Uh(this)},t}();function Uh(t){return new $h(t)}function Mh(t){t.we="writable",t.uv=void 0,t.po=void 0,t.zv=void 0,t.Wv=new Js,t.qv=void 0,t.Gv=void 0,t.Qv=void 0,t.Yv=void 0,t.Kv=!1}function Wh(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"zv")&&t instanceof zh)}function qh(t){return void 0!==t.po}function jh(t,n){var i;if("closed"===t.we||"errored"===t.we)return Ws(void 0);t.zv.Zv=n,null===(i=t.zv.Jv)||void 0===i||i.abort();var e=t.we;if("closed"===e||"errored"===e)return Ws(void 0);if(void 0!==t.Yv)return t.Yv.$v;var r=!1;"erroring"===e&&(r=!0,n=void 0);var o=Ms(function(i,e){t.Yv={$v:void 0,Hu:i,Vu:e,td:n,ed:r}});return t.Yv.$v=o,r||Xh(t,n),o}function Vh(t){var n=t.we;if("closed"===n||"errored"===n)return qs(new h("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i,e=Ms(function(n,i){var e={Hu:n,Vu:i};t.Gv=e}),r=t.po;return void 0!==r&&t.Kv&&"writable"===n&&ka(r),Hf(i=t.zv,ra,0),aa(i),e}function Hh(t,n){"writable"!==t.we?Gh(t):Xh(t,n)}function Xh(t,n){var i=t.zv;t.we="erroring",t.uv=n;var e=t.po;void 0!==e&&na(e,n),!function(t){if(void 0===t.qv&&void 0===t.Qv)return!1;return!0}(t)&&i.Mv&&Gh(t)}function Gh(t){t.we="errored",t.zv[hf]();var n=t.uv;if(t.Wv.forEach(function(t){t.Vu(n)}),t.Wv=new Js,void 0!==t.Yv){var i=t.Yv;if(t.Yv=void 0,i.ed)return i.Vu(n),void Kh(t);Vs(t.zv[ff](i.td),function(){i.Hu(),Kh(t)},function(n){i.Vu(n),Kh(t)})}else Kh(t)}function Yh(t){return void 0!==t.Gv||void 0!==t.Qv}function Kh(t){void 0!==t.Gv&&(t.Gv.Vu(t.uv),t.Gv=void 0);var n=t.po;void 0!==n&&ya(n,t.uv)}function Qh(t,n){var i=t.po;void 0!==i&&n!==t.Kv&&(n?function(t){Sa(t)}(i):ka(i)),t.Kv=n}a.defineProperties(zh.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(zh.prototype,As.toStringTag,{value:"WritableStream",configurable:!0});var $h=function(){function t(t){if(gf(t,1,"WritableStreamDefaultWriter"),Fh(t,"First parameter"),qh(t))throw new h("This stream has already been locked for exclusive writing by another writer");this.rd=t,t.po=this;var n,i=t.we;if("writable"===i)!Yh(t)&&t.Kv?Sa(this):Ta(this),ma(this);else if("erroring"===i)Ia(this,t.uv),ma(this);else if("closed"===i)Ta(this),ma(n=this),_a(n);else{var e=t.uv;Ia(this,e),pa(this,e)}}return a.defineProperty(t.prototype,"closed",{get:function(){return Jh(this)?this.La:qs(ba("closed"))},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Jh(this))throw ba("desiredSize");if(void 0===this.rd)throw ga("desiredSize");return function(t){var n=t.rd,i=n.we;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return ha(n.zv)}(this)},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"ready",{get:function(){return Jh(this)?this.ud:qs(ba("ready"))},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){return void 0===t&&(t=void 0),Jh(this)?void 0===this.rd?qs(ga("abort")):function(t,n){return jh(t.rd,n)}(this,t):qs(ba("abort"))},t.prototype.close=function(){if(!Jh(this))return qs(ba("close"));var t=this.rd;return void 0===t?qs(ga("close")):Yh(t)?qs(new h("Cannot close an already-closing stream")):Zh(this)},t.prototype.releaseLock=function(){if(!Jh(this))throw ba("releaseLock");void 0!==this.rd&&ia(this)},t.prototype.write=function(t){return void 0===t&&(t=void 0),Jh(this)?void 0===this.rd?qs(ga("write to")):ea(this,t):qs(ba("write"))},t}();function Jh(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"rd")&&t instanceof $h)}function Zh(t){return Vh(t.rd)}function ta(t,n){"pending"===t.od?ya(t,n):function(t,n){pa(t,n)}(t,n)}function na(t,n){"pending"===t.hd?Ea(t,n):function(t,n){Ia(t,n)}(t,n)}function ia(t){var n=t.rd,i=new h("Writer was released and can no longer be used to monitor the stream's closedness");na(t,i),ta(t,i),n.po=void 0,t.rd=void 0}function ea(t,n){var i=t.rd,e=i.zv,r=function(t,n){try{return t.fd(n)}catch(n){return ca(t,n),1}}(e,n);if(i!==t.rd)return qs(ga("write to"));var o=i.we;if("errored"===o)return qs(i.uv);if(Yh(i)||"closed"===o)return qs(new h("The stream is closing or closed and cannot be written to"));if("erroring"===o)return qs(i.uv);var u=function(t){return Ms(function(n,i){var e={Hu:n,Vu:i};t.Wv.push(e)})}(i);return function(t,n,i){try{Hf(t,n,i)}catch(n){return void ca(t,n)}var e=t.vd;if(!Yh(e)&&"writable"===e.we){var r=va(t);Qh(e,r)}aa(t)}(e,n,r),u}a.defineProperties($h.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty($h.prototype,As.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var ra={},oa=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"abortReason",{get:function(){if(!ua(this))throw wa("abortReason");return this.Zv},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"signal",{get:function(){if(!ua(this))throw wa("signal");if(void 0===this.Jv)throw new h("WritableStreamDefaultController.prototype.signal is not supported");return this.Jv.signal},enumerable:!1,configurable:!0}),t.prototype.error=function(t){if(void 0===t&&(t=void 0),!ua(this))throw wa("error");"writable"===this.vd.we&&la(this,t)},t.prototype[ff]=function(t){var n=this.dd(t);return fa(this),n},t.prototype[hf]=function(){Xf(this)},t}();function ua(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"vd")&&t instanceof oa)}function sa(t,n,i,e,r,o,u,s){n.vd=t,t.zv=n,n.Iv=void 0,n.Rv=void 0,Xf(n),n.Zv=void 0,n.Jv=function(){if(Lh)return new AbortController}(),n.Mv=!1,n.fd=s,n.Xv=u,n.ld=e,n._d=r,n.dd=o;var f=va(n);Qh(t,f),Vs(Ws(i()),function(){n.Mv=!0,aa(n)},function(i){n.Mv=!0,Hh(t,i)})}function fa(t){t.ld=void 0,t._d=void 0,t.dd=void 0,t.fd=void 0}function ha(t){return t.Xv-t.Rv}function aa(t){var n=t.vd;if(t.Mv&&void 0===n.qv)if("erroring"!==n.we){if(0!==t.Iv.length){var i=t.Iv.peek().value;i===ra?function(t){var n=t.vd;(function(t){t.Qv=t.Gv,t.Gv=void 0})(n),Vf(t);var i=t._d();fa(t),Vs(i,function(){!function(t){t.Qv.Hu(void 0),t.Qv=void 0,"erroring"===t.we&&(t.uv=void 0,void 0!==t.Yv&&(t.Yv.Hu(),t.Yv=void 0)),t.we="closed";var n=t.po;void 0!==n&&_a(n)}(n)},function(t){!function(t,n){t.Qv.Vu(n),t.Qv=void 0,void 0!==t.Yv&&(t.Yv.Vu(n),t.Yv=void 0),Hh(t,n)}(n,t)})}(t):function(t,n){var i=t.vd;(function(t){t.qv=t.Wv.shift()})(i),Vs(t.ld(n),function(){!function(t){t.qv.Hu(void 0),t.qv=void 0}(i);var n=i.we;if(Vf(t),!Yh(i)&&"writable"===n){var e=va(t);Qh(i,e)}aa(t)},function(n){"writable"===i.we&&fa(t),function(t,n){t.qv.Vu(n),t.qv=void 0,Hh(t,n)}(i,n)})}(t,i)}}else Gh(n)}function ca(t,n){"writable"===t.vd.we&&la(t,n)}function va(t){return ha(t)<=0}function la(t,n){var i=t.vd;fa(t),Xh(i,n)}function da(t){return new h("WritableStream.prototype."+t+" can only be used on a WritableStream")}function wa(t){return new h("WritableStreamDefaultController.prototype."+t+" can only be used on a WritableStreamDefaultController")}function ba(t){return new h("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function ga(t){return new h("Cannot "+t+" a stream using a released writer")}function ma(t){t.La=Ms(function(n,i){t.ov=n,t.hv=i,t.od="pending"})}function pa(t,n){ma(t),ya(t,n)}function ya(t,n){void 0!==t.hv&&(Ys(t.La),t.hv(n),t.ov=void 0,t.hv=void 0,t.od="rejected")}function _a(t){void 0!==t.ov&&(t.ov(void 0),t.ov=void 0,t.hv=void 0,t.od="resolved")}function Sa(t){t.ud=Ms(function(n,i){t.wd=n,t.md=i}),t.hd="pending"}function Ia(t,n){Sa(t),Ea(t,n)}function Ta(t){Sa(t),ka(t)}function Ea(t,n){void 0!==t.md&&(Ys(t.ud),t.md(n),t.wd=void 0,t.md=void 0,t.hd="rejected")}function ka(t){void 0!==t.wd&&(t.wd(void 0),t.wd=void 0,t.md=void 0,t.hd="fulfilled")}a.defineProperties(oa.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(oa.prototype,As.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var Ra="undefined"!=typeof DOMException?DOMException:void 0;var Na,Oa=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(Ra)?Ra:((Na=function(t,n){this.message=t||"",this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=a.create(f.prototype),a.defineProperty(Na.prototype,"constructor",{value:Na,writable:!0,configurable:!0}),Na);function Pa(t,n,i,e,r,o){var u=If(t),s=Uh(n);t.mv=!0;var f=!1,a=Ws(void 0);return Ms(function(c,v){var l,d,w,b;if(void 0!==o){if(l=function(){var i=new Oa("Aborted","AbortError"),o=[];e||o.push(function(){return"writable"===n.we?jh(n,i):Ws(void 0)}),r||o.push(function(){return"readable"===t.we?ic(t,i):Ws(void 0)}),y(function(){return j.all(o.map(function(t){return t()}))},!0,i)},o.aborted)return void l();o.addEventListener("abort",l)}if(p(t,u.La,function(t){e?_(!0,t):y(function(){return jh(n,t)},!0,t)}),p(n,s.La,function(n){r?_(!0,n):y(function(){return ic(t,n)},!0,n)}),d=t,w=u.La,b=function(){i?_():y(function(){return function(t){var n=t.rd,i=n.we;return Yh(n)||"closed"===i?Ws(void 0):"errored"===i?qs(n.uv):Zh(t)}(s)})},"closed"===d.we?b():Hs(w,b),Yh(n)||"closed"===n.we){var g=new h("the destination writable stream closed before all data could be piped to it");r?_(!0,g):y(function(){return ic(t,g)},!0,g)}function m(){var t=a;return js(a,function(){return t!==a?m():void 0})}function p(t,n,i){"errored"===t.we?i(t.uv):Xs(n,i)}function y(t,i,e){function r(){Vs(t(),function(){return S(i,e)},function(t){return S(!0,t)})}f||(f=!0,"writable"!==n.we||Yh(n)?r():Hs(m(),r))}function _(t,i){f||(f=!0,"writable"!==n.we||Yh(n)?S(t,i):Hs(m(),function(){return S(t,i)}))}function S(t,n){ia(s),nf(u),void 0!==o&&o.removeEventListener("abort",l),t?v(n):c(void 0)}Ys(Ms(function(t,n){!function i(e){e?t():js(f?Ws(!0):js(s.ud,function(){return Ms(function(t,n){Df(u,{_v:function(n){a=js(ea(s,n),void 0,Ds),t(!1)},vv:function(){return t(!0)},wv:n})})}),i,n)}(!1)}))})}var Aa=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Da(this))throw qa("desiredSize");return Ua(this)},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(!Da(this))throw qa("close");if(!Ma(this))throw new h("The stream is not in a state that permits close");Fa(this)},t.prototype.enqueue=function(t){if(void 0===t&&(t=void 0),!Da(this))throw qa("enqueue");if(!Ma(this))throw new h("The stream is not in a state that permits enqueue");return La(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Da(this))throw qa("error");za(this,t)},t.prototype[af]=function(t){Xf(this);var n=this.Ov(t);return Ba(this),n},t.prototype[cf]=function(t){var n=this.yd;if(this.Iv.length>0){var i=Vf(this);this.Cv&&0===this.Iv.length?(Ba(this),ec(n)):Ca(this),t._v(i)}else Tf(n,t),Ca(this)},t}();function Da(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"yd")&&t instanceof Aa)}function Ca(t){xa(t)&&(t.xv?t.Fv=!0:(t.xv=!0,Vs(t.Uv(),function(){t.xv=!1,t.Fv&&(t.Fv=!1,Ca(t))},function(n){za(t,n)})))}function xa(t){var n=t.yd;return!!Ma(t)&&(!!t.Mv&&(!!(nc(n)&&kf(n)>0)||Ua(t)>0))}function Ba(t){t.Uv=void 0,t.Ov=void 0,t.fd=void 0}function Fa(t){if(Ma(t)){var n=t.yd;t.Cv=!0,0===t.Iv.length&&(Ba(t),ec(n))}}function La(t,n){if(Ma(t)){var i=t.yd;if(nc(i)&&kf(i)>0)Ef(i,n,!1);else{var e=void 0;try{e=t.fd(n)}catch(n){throw za(t,n),n}try{Hf(t,n,e)}catch(n){throw za(t,n),n}}Ca(t)}}function za(t,n){var i=t.yd;"readable"===i.we&&(Xf(t),Ba(t),rc(i,n))}function Ua(t){var n=t.yd.we;return"errored"===n?null:"closed"===n?0:t.Xv-t.Rv}function Ma(t){var n=t.yd.we;return!t.Cv&&"readable"===n}function Wa(t,n,i,e,r,o,u){n.yd=t,n.Iv=void 0,n.Rv=void 0,Xf(n),n.Mv=!1,n.Cv=!1,n.Fv=!1,n.xv=!1,n.fd=u,n.Xv=o,n.Uv=e,n.Ov=r,t.yv=n,Vs(Ws(i()),function(){n.Mv=!0,Ca(n)},function(t){za(n,t)})}function qa(t){return new h("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}function ja(t,n){return Kf(t.yv)?function(t){var n,i,e,r,o,u=If(t),s=!1,f=!1,h=!1,a=!1,c=!1,v=Ms(function(t){o=t});function l(t){Xs(t.La,function(n){t===u&&(vh(e.yv,n),vh(r.yv,n),a&&c||o(void 0))})}function d(){Eh(u)&&(nf(u),l(u=If(t)));var n={_v:function(n){Ks(function(){f=!1,h=!1;var i=n,u=n;if(!a&&!c)try{u=jf(n)}catch(n){return vh(e.yv,n),vh(r.yv,n),void o(ic(t,n))}a||ch(e.yv,i),c||ch(r.yv,u),s=!1,f?b():h&&g()})},vv:function(){s=!1,a||ah(e.yv),c||ah(r.yv),e.yv.Lv.length>0&&wh(e.yv,0),r.yv.Lv.length>0&&wh(r.yv,0),a&&c||o(void 0)},wv:function(){s=!1}};Df(u,n)}function w(n,i){Af(u)&&(nf(u),l(u=yh(t)));var v=i?r:e,d=i?e:r,w={_v:function(n){Ks(function(){f=!1,h=!1;var e=i?c:a,r=i?a:c;if(r)e||bh(v.yv,n);else{var u=void 0;try{u=jf(n)}catch(n){return vh(v.yv,n),vh(d.yv,n),void o(ic(t,n))}e||bh(v.yv,n),ch(d.yv,u)}s=!1,f?b():h&&g()})},vv:function(t){s=!1;var n=i?c:a,e=i?a:c;n||ah(v.yv),e||ah(d.yv),void 0!==t&&(n||bh(v.yv,t),!e&&d.yv.Lv.length>0&&wh(d.yv,0)),n&&e||o(void 0)},wv:function(){s=!1}};kh(u,n,w)}function b(){if(s)return f=!0,Ws(void 0);s=!0;var t=lh(e.yv);return null===t?d():w(t.Nv,!1),Ws(void 0)}function g(){if(s)return h=!0,Ws(void 0);s=!0;var t=lh(r.yv);return null===t?d():w(t.Nv,!0),Ws(void 0)}function m(){}return e=Ja(m,b,function(e){if(a=!0,n=e,c){var r=Uf([n,i]),u=ic(t,r);o(u)}return v}),r=Ja(m,g,function(e){if(c=!0,i=e,a){var r=Uf([n,i]),u=ic(t,r);o(u)}return v}),l(u),[e,r]}(t):function(t,n){var i,e,r,o,u,s=If(t),f=!1,h=!1,a=!1,c=!1,v=Ms(function(t){u=t});function l(){if(f)return h=!0,Ws(void 0);f=!0;var t={_v:function(t){Ks(function(){h=!1;var n=t,i=t;a||La(r.yv,n),c||La(o.yv,i),f=!1,h&&l()})},vv:function(){f=!1,a||Fa(r.yv),c||Fa(o.yv),a&&c||u(void 0)},wv:function(){f=!1}};return Df(s,t),Ws(void 0)}function d(){}return r=$a(d,l,function(n){if(a=!0,i=n,c){var r=Uf([i,e]),o=ic(t,r);u(o)}return v}),o=$a(d,l,function(n){if(c=!0,e=n,a){var r=Uf([i,e]),o=ic(t,r);u(o)}return v}),Xs(s.La,function(t){za(r.yv,t),za(o.yv,t),a&&c||u(void 0)}),[r,o]}(t)}function Va(t,n,i){return wf(t,i),function(i){return $s(t,n,[i])}}function Ha(t,n,i){return wf(t,i),function(i){return $s(t,n,[i])}}function Xa(t,n,i){return wf(t,i),function(i){return Qs(t,n,[i])}}function Ga(t,n){if("bytes"!==(t=""+t))throw new h(n+" '"+t+"' is not a valid enumeration value for ReadableStreamType");return t}function Ya(t,n){if("byob"!==(t=""+t))throw new h(n+" '"+t+"' is not a valid enumeration value for ReadableStreamReaderMode");return t}function Ka(t,n){df(t,n);var i=null==t?void 0:t.preventAbort,e=null==t?void 0:t.preventCancel,r=null==t?void 0:t.preventClose,o=null==t?void 0:t.signal;return void 0!==o&&function(t,n){if(!function(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}(t))throw new h(n+" is not an AbortSignal.")}(o,n+" has member 'signal' that"),{preventAbort:Boolean(i),preventCancel:Boolean(e),preventClose:Boolean(r),signal:o}}a.defineProperties(Aa.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(Aa.prototype,As.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var Qa=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),void 0===t?t=null:bf(t,"First parameter");var i=Ph(n,"Second parameter"),e=function(t,n){df(t,n);var i=t,e=null==i?void 0:i.autoAllocateChunkSize,r=null==i?void 0:i.cancel,o=null==i?void 0:i.pull,u=null==i?void 0:i.start,s=null==i?void 0:i.type;return{autoAllocateChunkSize:void 0===e?void 0:_f(e,n+" has member 'autoAllocateChunkSize' that"),cancel:void 0===r?void 0:Va(r,i,n+" has member 'cancel' that"),pull:void 0===o?void 0:Ha(o,i,n+" has member 'pull' that"),start:void 0===u?void 0:Xa(u,i,n+" has member 'start' that"),type:void 0===s?void 0:Ga(s,n+" has member 'type' that")}}(t,"First parameter");if(Za(this),"bytes"===e.type){if(void 0!==i.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(t,n,i){var e=a.create(Yf.prototype),r=function(){},o=function(){return Ws(void 0)},u=function(){return Ws(void 0)};void 0!==n.start&&(r=function(){return n.start(e)}),void 0!==n.pull&&(o=function(){return n.pull(e)}),void 0!==n.cancel&&(u=function(t){return n.cancel(t)});var s=n.autoAllocateChunkSize;if(0===s)throw new h("autoAllocateChunkSize must be greater than 0");gh(t,e,r,o,u,i,s)}(this,e,Nh(i,0))}else{var r=Oh(i);!function(t,n,i,e){var r=a.create(Aa.prototype),o=function(){},u=function(){return Ws(void 0)},s=function(){return Ws(void 0)};void 0!==n.start&&(o=function(){return n.start(r)}),void 0!==n.pull&&(u=function(){return n.pull(r)}),void 0!==n.cancel&&(s=function(t){return n.cancel(t)}),Wa(t,r,o,u,s,i,e)}(this,e,Nh(i,1),r)}}return a.defineProperty(t.prototype,"locked",{get:function(){if(!tc(this))throw oc("locked");return nc(this)},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),tc(this)?nc(this)?qs(new h("Cannot cancel a stream that already has a reader")):ic(this,t):qs(oc("cancel"))},t.prototype.getReader=function(t){if(void 0===t&&(t=void 0),!tc(this))throw oc("getReader");return void 0===function(t,n){df(t,n);var i=null==t?void 0:t.mode;return{mode:void 0===i?void 0:Ya(i,n+" has member 'mode' that")}}(t,"First parameter").mode?If(this):yh(this)},t.prototype.pipeThrough=function(t,n){if(void 0===n&&(n={}),!tc(this))throw oc("pipeThrough");gf(t,1,"pipeThrough");var i=function(t,n){df(t,n);var i=null==t?void 0:t.readable;mf(i,"readable","ReadableWritablePair"),Sf(i,n+" has member 'readable' that");var e=null==t?void 0:t.writable;return mf(e,"writable","ReadableWritablePair"),Fh(e,n+" has member 'writable' that"),{readable:i,writable:e}}(t,"First parameter"),e=Ka(n,"Second parameter");if(nc(this))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(qh(i.writable))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Ys(Pa(this,i.writable,e.preventClose,e.preventAbort,e.preventCancel,e.signal)),i.readable},t.prototype.pipeTo=function(t,n){if(void 0===n&&(n={}),!tc(this))return qs(oc("pipeTo"));if(void 0===t)return qs("Parameter 1 is required in 'pipeTo'.");if(!Wh(t))return qs(new h("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var i;try{i=Ka(n,"Second parameter")}catch(t){return qs(t)}return nc(this)?qs(new h("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):qh(t)?qs(new h("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Pa(this,t,i.preventClose,i.preventAbort,i.preventCancel,i.signal)},t.prototype.tee=function(){if(!tc(this))throw oc("tee");return Uf(ja(this))},t.prototype.values=function(t){if(void 0===t&&(t=void 0),!tc(this))throw oc("values");var n,i,e,r,o,u=function(t,n){df(t,n);var i=null==t?void 0:t.preventCancel;return{preventCancel:Boolean(i)}}(t,"First parameter");return n=this,i=u.preventCancel,e=If(n),r=new xf(e,i),(o=a.create(Bf)).Ev=r,o},t}();function $a(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=a.create(Qa.prototype);return Za(o),Wa(o,a.create(Aa.prototype),t,n,i,e,r),o}function Ja(t,n,i){var e=a.create(Qa.prototype);return Za(e),gh(e,a.create(Yf.prototype),t,n,i,0,void 0),e}function Za(t){t.we="readable",t.rv=void 0,t.uv=void 0,t.mv=!1}function tc(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"yv")&&t instanceof Qa)}function nc(t){return void 0!==t.rv}function ic(t,n){if(t.mv=!0,"closed"===t.we)return Ws(void 0);if("errored"===t.we)return qs(t.uv);ec(t);var i=t.rv;return void 0!==i&&Eh(i)&&(i.Hv.forEach(function(t){t.vv(void 0)}),i.Hv=new Js),Gs(t.yv[af](n),Ds)}function ec(t){t.we="closed";var n=t.rv;void 0!==n&&(sf(n),Af(n)&&(n.fv.forEach(function(t){t.vv()}),n.fv=new Js))}function rc(t,n){t.we="errored",t.uv=n;var i=t.rv;void 0!==i&&(uf(i,n),Af(i)?(i.fv.forEach(function(t){t.wv(n)}),i.fv=new Js):(i.Hv.forEach(function(t){t.wv(n)}),i.Hv=new Js))}function oc(t){return new h("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}function uc(t,n){df(t,n);var i=null==t?void 0:t.highWaterMark;return mf(i,"highWaterMark","QueuingStrategyInit"),{highWaterMark:pf(i)}}a.defineProperties(Qa.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(Qa.prototype,As.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof As.asyncIterator&&a.defineProperty(Qa.prototype,As.asyncIterator,{value:Qa.prototype.values,writable:!0,configurable:!0});var sc=function(t){return t.byteLength};try{a.defineProperty(sc,"name",{value:"size",configurable:!0})}catch(q){}var fc=function(){function t(t){gf(t,1,"ByteLengthQueuingStrategy"),t=uc(t,"First parameter"),this.kd=t.highWaterMark}return a.defineProperty(t.prototype,"highWaterMark",{get:function(){if(!ac(this))throw hc("highWaterMark");return this.kd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"size",{get:function(){if(!ac(this))throw hc("size");return sc},enumerable:!1,configurable:!0}),t}();function hc(t){return new h("ByteLengthQueuingStrategy.prototype."+t+" can only be used on a ByteLengthQueuingStrategy")}function ac(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"kd")&&t instanceof fc)}a.defineProperties(fc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(fc.prototype,As.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var cc=function(){return 1};try{a.defineProperty(cc,"name",{value:"size",configurable:!0})}catch(q){}var vc=function(){function t(t){gf(t,1,"CountQueuingStrategy"),t=uc(t,"First parameter"),this.pd=t.highWaterMark}return a.defineProperty(t.prototype,"highWaterMark",{get:function(){if(!dc(this))throw lc("highWaterMark");return this.pd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"size",{get:function(){if(!dc(this))throw lc("size");return cc},enumerable:!1,configurable:!0}),t}();function lc(t){return new h("CountQueuingStrategy.prototype."+t+" can only be used on a CountQueuingStrategy")}function dc(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"pd")&&t instanceof vc)}function wc(t,n,i){return wf(t,i),function(i){return $s(t,n,[i])}}function bc(t,n,i){return wf(t,i),function(i){return Qs(t,n,[i])}}function gc(t,n,i){return wf(t,i),function(i,e){return $s(t,n,[i,e])}}a.defineProperties(vc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(vc.prototype,As.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var mc=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={}),void 0===t&&(t=null);var e=Ph(n,"Second parameter"),r=Ph(i,"Third parameter"),o=function(t,n){df(t,n);var i=null==t?void 0:t.flush,e=null==t?void 0:t.readableType,r=null==t?void 0:t.start,o=null==t?void 0:t.transform,u=null==t?void 0:t.writableType;return{flush:void 0===i?void 0:wc(i,t,n+" has member 'flush' that"),readableType:e,start:void 0===r?void 0:bc(r,t,n+" has member 'start' that"),transform:void 0===o?void 0:gc(o,t,n+" has member 'transform' that"),writableType:u}}(t,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");var u,s=Nh(r,0),f=Oh(r),h=Nh(e,1),c=Oh(e);!function(t,n,i,e,r,o){function u(){return n}t.bd=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=a.create(zh.prototype);return Mh(u),sa(u,a.create(oa.prototype),t,n,i,e,r,o),u}(u,function(n){return function(t,n){var i=t.Td;if(t.Kv){var e=t.Sd;return Gs(e,function(){var e=t.bd,r=e.we;if("erroring"===r)throw e.uv;return Nc(i,n)})}return Nc(i,n)}(t,n)},function(){return function(t){var n=t.Ed,i=t.Td,e=i.Id();return kc(i),Gs(e,function(){if("errored"===n.we)throw n.uv;Fa(n.yv)},function(i){throw yc(t,i),n.uv})}(t)},function(n){return function(t,n){return yc(t,n),Ws(void 0)}(t,n)},i,e),t.Ed=$a(u,function(){return function(t){return Sc(t,!1),t.Sd}(t)},function(n){return _c(t,n),Ws(void 0)},r,o),t.Kv=void 0,t.Sd=void 0,t.Rd=void 0,Sc(t,!0),t.Td=void 0}(this,Ms(function(t){u=t}),h,c,s,f),function(t,n){var i=a.create(Tc.prototype),e=function(t){try{return Rc(i,t),Ws(void 0)}catch(t){return qs(t)}},r=function(){return Ws(void 0)};void 0!==n.transform&&(e=function(t){return n.transform(t,i)});void 0!==n.flush&&(r=function(){return n.flush(i)});!function(t,n,i,e){n.Nd=t,t.Td=n,n.Dd=i,n.Id=e}(t,i,e,r)}(this,o),void 0!==o.start?u(o.start(this.Td)):u(void 0)}return a.defineProperty(t.prototype,"readable",{get:function(){if(!pc(this))throw Pc("readable");return this.Ed},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"writable",{get:function(){if(!pc(this))throw Pc("writable");return this.bd},enumerable:!1,configurable:!0}),t}();function pc(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"Td")&&t instanceof mc)}function yc(t,n){za(t.Ed.yv,n),_c(t,n)}function _c(t,n){kc(t.Td),ca(t.bd.zv,n),t.Kv&&Sc(t,!1)}function Sc(t,n){void 0!==t.Sd&&t.Rd(),t.Sd=Ms(function(n){t.Rd=n}),t.Kv=n}a.defineProperties(mc.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(mc.prototype,As.toStringTag,{value:"TransformStream",configurable:!0});var Ic,Tc=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Ec(this))throw Oc("desiredSize");return Ua(this.Nd.Ed.yv)},enumerable:!1,configurable:!0}),t.prototype.enqueue=function(t){if(void 0===t&&(t=void 0),!Ec(this))throw Oc("enqueue");Rc(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Ec(this))throw Oc("error");var n;n=t,yc(this.Nd,n)},t.prototype.terminate=function(){if(!Ec(this))throw Oc("terminate");!function(t){var n=t.Nd;Fa(n.Ed.yv);var i=new h("TransformStream terminated");_c(n,i)}(this)},t}();function Ec(t){return!!xs(t)&&(!!a.prototype.hasOwnProperty.call(t,"Nd")&&t instanceof Tc)}function kc(t){t.Dd=void 0,t.Id=void 0}function Rc(t,n){var i=t.Nd,e=i.Ed.yv;if(!Ma(e))throw new h("Readable side is not in a state that permits enqueue");try{La(e,n)}catch(t){throw _c(i,t),i.Ed.uv}(function(t){return!xa(t)})(e)!==i.Kv&&Sc(i,!0)}function Nc(t,n){return Gs(t.Dd(n),void 0,function(n){throw yc(t.Nd,n),n})}function Oc(t){return new h("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function Pc(t){return new h("TransformStream.prototype."+t+" can only be used on a TransformStream")}function Ac(t){return n=[t],new Qa({start:function(t){for(var i=0;i<n.length;i++){var e=n[i];t.enqueue(e)}t.close()}});var n}function Dc(t){return Ac(new w(t))}function Cc(t,n){return function(t,n){var i=n,e=t.getReader(),r=new Oo,o=function(){u();var t=new un;e.cancel(t).catch(lt),r.Wu(t)},u=function(){i&&(i.Ms(o),i=void 0)};i&&(i.Ns?o():i.Ls(o));var s=[];return j.resolve(e.read()).then(function t(n){return n.done?(u(),j.resolve(s)):(s.push(n.value),j.resolve(e.read()).then(t))}).then(function(t){u(),r.Xu(t)},function(t){u(),r.Wu(t)}),r.Uu}(t,n).then(function(t){return Ln(t).buffer})}function xc(t,n){var i=n,e=new mc,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.Hs()};return u.closed.then(s,s),t.then(function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(lt)},function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(lt)}),r}function Bc(t){return Nn(new w(t))}function Fc(t){return On(t).buffer}a.defineProperties(Tc.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof As.toStringTag&&a.defineProperty(Tc.prototype,As.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),function(t){t[t.Gf=0]="Gf",t[t.Pd=1]="Pd"}(Ic||(Ic={}));var Lc="content-type",zc="text/plain;charset=UTF-8",Uc=function(){function t(){}var n=t.prototype;return n.Od=function(t){return this.Bd(t).then(JSON.parse)},n.Ld=function(t,n){switch(t){case Rs.Wf:return this.Md(n);case Rs.qf:return this.Od(n);case Rs.Gf:return this.xd();case Rs.Zn:return this.Bd(n);default:throw new h}},t}();function Mc(t,n,i){if(t instanceof Uc)return t;if(t instanceof Qa)return function(t,n){return new qc({hs:Ic.Gf,xd:t,Fd:Wc(n)})}(t,i);var e=Wc(i),r=j.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{hs:Rs.Zn,Ud:t,Fd:n||zc};if(t instanceof ArrayBuffer||Fn(t))return{hs:Rs.Wf,Ud:Kc(t),Fd:n};if(et(i=t)&&i.constructor&&i.constructor===a||it(t))return{hs:Rs.qf,Ud:t,Fd:n};throw new h("Unsupported BodyInit type")}return{hs:Rs.Zn,Ud:null,Fd:n};var i}(t,e)});return new qc({hs:Ic.Pd,Uu:r,Hd:n})}function Wc(t){return(t.get(Lc)||"").toLowerCase()}var qc=function(t){function n(n){var i;return(i=t.call(this)||this).Vd=!1,i.Xd=void 0,i.zd=new Oo,i.zd.Uu.catch(lt),i.Wd(n),i}Ut(n,t);var i=n.prototype;return i.qd=function(){return this.zd.Uu},i.Bd=function(t){return this.Gd(jc,t)},i.Od=function(t){return this.Gd(Hc,t)},i.Md=function(t){return this.Gd(Gc,t)},i.xd=function(){return this.Qd((t=this.Xd).hs===Ic.Gf?t.xd:xc(t.Uu.then(Yc).then(Dc),t.Hd));var t},i.Gd=function(t,n){if(this.Vd)return j.reject(new h("Already used"));this.Vd=!0;var i=t(this.Xd,n);return this.zd.Xu(i.then(lt)),i},i.Qd=function(t){if(this.Vd)throw new h("Already used");if(t.locked)throw new h("Body stream is locked");this.Vd=!0;var n=new mc,i=j.resolve(t.pipeTo(n.writable));return this.zd.Xu(i),n.readable},i.Wd=function(t){this.Xd=t,t.hs===Ic.Pd&&t.Uu.catch(lt)},i.Yd=function(){if(this.Vd)throw new h("Already used");var t=function(t){if(t.hs===Ic.Gf){var n=t.xd.tee(),i=n[0],e=n[1];return[{hs:t.hs,xd:i,Fd:t.Fd},{hs:t.hs,xd:e,Fd:t.Fd}]}var r=t.Hd.Xs(),o=r[0],u=r[1];return[{hs:t.hs,Uu:t.Uu,Hd:o},{hs:t.hs,Uu:t.Uu,Hd:u}]}(this.Xd),i=t[0],e=t[1];return this.Wd(i),new n(e)},mt(n,[{key:"jd",get:function(){return this.Vd}}]),n}(Uc);function jc(t,n){return t.hs===Ic.Gf?Cc(t.xd,n).then(Bc):(n&&t.Hd.Vs(n),fn(t.Uu.then(Vc),t.Hd))}function Vc(t){switch(t.hs){case Rs.Zn:return j.resolve(t.Ud||"");case Rs.Wf:return j.resolve(t.Ud).then(Bc);case Rs.qf:return j.resolve(t.Ud).then(JSON.stringify)}}function Hc(t,n){return t.hs===Ic.Gf?jc(t,n).then(JSON.parse):(n&&t.Hd.Vs(n),fn(t.Uu.then(Xc),t.Hd))}function Xc(t){return t.hs===Rs.qf?j.resolve(t.Ud):Vc(t).then(JSON.parse)}function Gc(t,n){return t.hs===Ic.Gf?Cc(t.xd,n):(n&&t.Hd.Vs(n),fn(t.Uu.then(Yc),t.Hd))}function Yc(t){switch(t.hs){case Rs.Wf:return j.resolve(t.Ud);case Rs.Zn:case Rs.qf:return Vc(t).then(Fc)}}function Kc(t){return t instanceof ArrayBuffer?t:Cn(An(t)).buffer}function Qc(t){return t.Kd>=200&&t.Kd<=299||304===t.Kd}var $c,Jc,Zc,tv,nv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.Zd,o=i.Jd,u=i.Kd,s=i.$d,f=i.il):(r=[],o=Rs.Zn,u=200,s="OK",f=!1);var h=n.ul,a=new Ns(n.Zd||r),c=n.Jd||o,v=n.ol||(i&&i.ul===h?i.ol:h.hl),l=i?i.al:null,d=Mc(void 0!==n.Hi?n.Hi:l,n.Hd||new on,a);return(e=t.call(this,d)||this).Zd=void 0,e.ul=void 0,e.ol=void 0,e.Jd=void 0,e.Kd=void 0,e.$d=void 0,e.il=void 0,e.Zd=a,e.ul=h,e.ol=v,e.Jd=c,e.Kd=void 0!==n.Kd?n.Kd:u,e.$d=void 0!==n.$d?String(n.$d):s,e.il=n.il||f,e}Ut(n,t);var i=n.prototype;return i.Hi=function(t){return this.Ld(this.Jd,t)},i.Lu=function(){return new n({Hi:this.Yd(),ul:this.ul},this)},n}(function(t){function n(n){var i;return(i=t.call(this)||this).al=void 0,i.al=n,i}Ut(n,t);var i=n.prototype;return i.qd=function(){return this.al.qd()},i.Bd=function(t){return this.al.Bd(t)},i.Od=function(t){return this.al.Od(t)},i.Md=function(t){return this.al.Md(t)},i.xd=function(){return this.al.xd()},i.Yd=function(){return this.al.Yd()},mt(n,[{key:"jd",get:function(){return this.al.jd}}]),n}(Uc));!function(t){t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT"}($c||($c={})),function(t){t.cl="",t.fl="manifest",t.vl="segment",t.dl="content-protection"}(Jc||(Jc={})),function(t){t.cl="",t.ll="initialization-segment",t._l="fairplay-license",t.wl="fairplay-certificate",t.yl="widevine-license",t.bl="widevine-certificate",t.Al="playready-license",t.Tl="clearkey-license",t.Sl="aes128-key"}(Zc||(Zc={})),function(t){t.cl="",t.El="audio",t.Il="video",t.Zn="text",t.Rl="image"}(tv||(tv={}));var iv=function(t,n){this.Ud=void 0,this.Zd=void 0,this.Nl=void 0,this.Jd=void 0,this.Dl=void 0,this.zs=void 0,this.hs=void 0,this.Cl=void 0,this.Pl=void 0,this.hl=void 0,this.Ol=void 0,this.Bl=void 0;var i,e,r,o,u,s,f,h,a,c,v,l=t.hl;n?(i=n.Ud,e=n.Zd,r=n.Nl,o=n.Jd,u=n.Dl,s=n.zs,f=n.hs,h=n.Cl,a=n.Pl,c=n.Ol,v=n.Bl):(i=null,e={},r=$c.GET,o=Rs.Zn,u=0,f=Jc.cl,h=Zc.cl,a=tv.cl,c=!1),this.hl=l,this.Ud=t.Ud||i,this.Zd=new Ns(t.Zd||e),this.Nl=t.Nl||r,this.Jd=t.Jd||o,this.Dl=void 0!==t.Dl?Number(t.Dl)||0:u,this.zs=t.zs||s||(new on).zs,this.hs=t.hs||f,this.Cl=t.Cl||h,this.Pl=t.Pl||a,this.Ol=void 0!==t.Ol?Boolean(t.Ol):c,this.Bl=t.Bl||v},ev=function(){function t(){}var n=t.prototype;return n.ul=function(t){var n=function(t){return new nv({Hi:null,Zd:{},ul:t,ol:t.hl,Jd:t.Jd,Kd:0,$d:ks.Af})}(new iv(t));return j.resolve(n)},n.Ll=function(t){},n.Ml=function(){},t}();var rv,ov=function(){function t(t,n){void 0===n&&(n=!0),this.xl=void 0,this.Fl=void 0,this.xl=t,this.Fl=n}var n=t.prototype;return n.ul=function(t){var n=this.Ul(t);return this.xl.ul(n)},n.Ll=function(t){return this.xl.Ll(this.Hl(t))},n.Ul=function(n){var i=new iv(n);if(!this.Fl){var e=t.Vl(i.hl);i=new iv({hl:e},i)}return i},n.Hl=function(n){var i=n.hl;return this.Fl||(i=t.Vl(i)),{hl:i,Ud:n.Ud}},t.Vl=function(t){return J.Hr&&dn(t,"http://")?t.replace(":","s:"):t},n.Ml=function(){this.xl.Ml()},mt(t,null,[{key:"Xl",get:function(){return t.zl||(t.zl=new t(new ev)),t.zl}}]),t}();ov.zl=void 0,function(t){t.Wl="HttpOpenError",t.ql="HttpResponseError",t.Gl="HttpTimeoutError"}(rv||(rv={}));var uv=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).Ql=void 0,r.Ql=n,r}return Ut(n,t),mt(n,[{key:"ul",get:function(){return this.Ql}}]),n}(en);var sv=function(t){function n(n,i){return t.call(this,n,"Error while opening "+n.hl+". Invalid URL.",i)||this}return Ut(n,t),mt(n,[{key:"name",get:function(){return rv.Wl}}]),n}(uv);var fv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.ul,null!=e?e:function(t){return"Error while loading "+t.ul.hl+", status code "+t.Kd}(n),i)||this).Yl=void 0,r.Yl=n,r}return Ut(n,t),mt(n,[{key:"name",get:function(){return rv.ql}},{key:"jl",get:function(){return this.Yl}}]),n}(uv);var hv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.hl+" timed out after "+t.Dl+" seconds."}(n),i)||this}return Ut(n,t),mt(n,[{key:"name",get:function(){return rv.Gl}}]),n}(uv),av=function(t,n){return(av=a.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(t,n)};function cv(t,n){function i(){this.constructor=t}av(t,n),t.prototype=null===n?a.create(n):(i.prototype=n.prototype,new i)}var vv="object"==typeof n?n:"object"==typeof t?t:"object"==typeof global?global:null;var lv=function(){var t=vv.Blob;if(t)try{return new t,function(t,n){return new vv.Blob(t,n)}}catch(t){}var n,i=vv.BlobBuilder||vv.WebKitBlobBuilder||vv.MozBlobBuilder||vv.MSBlobBuilder;return i?(n=i,function(t,i){var e=new n;if(t)for(var r=0,o=t;r<o.length;r++){var u=o[r];e.append(u)}return e.getBlob(i&&i.type||"")}):null}(),dv="function"==typeof Qa?Qa:void 0;function wv(t){return t&&"function"==typeof t.getReader}function bv(t){if("function"!=typeof t)return!1;try{var n=!1,i=new t({start:function(){n=!0}});return!!n&&wv(i)}catch(t){return!1}}var gv=function(){function t(t,n){this.rv=t,this.Kl=n}return t.prototype.pull=function(t){var n=this;return this.rv.read().then(function(i){n.Kl&&n.Kl(i),i.done?t.close():t.enqueue(i.value)})},t.prototype.cancel=function(t){return this.rv.cancel(t)},t}();function mv(t,n){return n.constructor===t?n:new t(new gv(n.getReader()),{highWaterMark:0})}var pv=function(){function t(t,n){this.Zl=t,this.Jl=n}return t.prototype.pull=function(t){return this.Zl().then(function(n){t.enqueue(new w(n)),t.close()})},t.prototype.cancel=function(t){this.Jl&&this.Jl(t)},t}();function yv(t,n,i){return new t(new pv(n,i),{highWaterMark:0})}var _v={searchParams:"URLSearchParams"in vv,iterable:"Symbol"in vv&&"iterator"in Symbol,blob:"FileReader"in vv&&!!lv,formData:"FormData"in vv,arrayBuffer:"ArrayBuffer"in vv,stream:bv(dv),streamRequest:"Request"in vv&&"body"in vv.Request.prototype,streamResponse:"Response"in vv&&"body"in vv.Response.prototype,abort:"AbortController"in vv&&"Request"in vv&&"signal"in vv.Request.prototype,encoding:"TextEncoder"in vv&&"TextDecoder"in vv,url:"URL"in vv&&function(t){try{return new vv.URL(t).toString()===t}catch(t){return!1}}("http://example.com/"),firefox:"navigator"in vv&&/Firefox\//.test(vv.navigator.userAgent)};function Sv(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new h("Invalid character in header field name");return t}function Iv(t){return"string"!=typeof t&&(t=String(t)),t}function Tv(t){var n={next:function(){var n=t.shift();return{done:void 0===n,value:n}}};return _v.iterable&&(n[Symbol.iterator]=function(){return n}),n}var Ev=function(){function t(t){var n=this;this.Zr={};var i,e=function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)};(i=t)&&"function"==typeof i.forEach?t.forEach(e):!function(t){return _v.iterable&&t&&t[Symbol.iterator]}(t)?t&&a.getOwnPropertyNames(t).forEach(function(i){n.append(i,t[i])}):Array.from(t).forEach(e)}return t.prototype.append=function(t,n){t=Sv(t),n=Iv(n);var i=t.toLowerCase();if(this.Zr.hasOwnProperty(i)){var e=this.Zr[i],r=e[1];e[1]=r?r+", "+n:n}else this.Zr[i]=[t,n]},t.prototype.delete=function(t){var n=Sv(t).toLowerCase();delete this.Zr[n]},t.prototype.get=function(t){var n=Sv(t).toLowerCase();return this.Zr.hasOwnProperty(n)?this.Zr[n][1]:null},t.prototype.has=function(t){var n=Sv(t).toLowerCase();return this.Zr.hasOwnProperty(n)},t.prototype.set=function(t,n){var i=(t=Sv(t)).toLowerCase();this.Zr[i]=[t,Iv(n)]},t.prototype.forEach=function(t,n){for(var i in this.Zr)this.Zr.hasOwnProperty(i)&&t.call(n,this.Zr[i][1],i,this)},t.prototype.keys=function(){var t=[];return this.forEach(function(n,i){t.push(i)}),Tv(t)},t.prototype.values=function(){var t=[];return this.forEach(function(n){t.push(n)}),Tv(t)},t.prototype.entries=function(){var t=[];return this.forEach(function(n,i){t.push([i,n])}),Tv(t)},t.prototype.asList=function(){var t=[];for(var n in this.Zr)if(this.Zr.hasOwnProperty(n)){var i=this.Zr[n],e=i[0],r=i[1];t.push([e,r])}return t},t}();function kv(){}_v.iterable&&(Ev.prototype[Symbol.iterator]=Ev.prototype.entries);var Rv,Nv,Ov,Pv=c.min,Av=String.fromCharCode,Dv=16384;function Cv(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 function(t){for(var n=t.length,i=[],e=0;e<n;e+=Dv){var r=Pv(e+Dv,n);i.push(Av.apply(null,t.slice(e,r)))}return i.join("")}(n)}function xv(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Bv(t,n){return t>>n&63|128}function Fv(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(xv(t),n.push(t>>12&15|224),n.push(Bv(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Bv(t,12)),n.push(Bv(t,6))),n.push(63&t|128)):n.push(t)}function Lv(){if(Ov>=Nv)throw new f("Invalid byte index");var t=255&Rv[Ov];if(Ov++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function zv(){var t,n;if(Ov>Nv)throw new f("Invalid byte index");if(Ov===Nv)return!1;if(t=255&Rv[Ov],Ov++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Lv())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Lv()<<6|Lv())>=2048)return xv(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Lv()<<12|Lv()<<6|Lv())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}var Uv=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"];function Mv(t){return t&&URLSearchParams.prototype.isPrototypeOf(t)}function Wv(t){return t&&ArrayBuffer.prototype.isPrototypeOf(t)}function qv(t){return t&&DataView.prototype.isPrototypeOf(t)}var jv,Vv=ArrayBuffer.isView||function(t){return t&&(Uv.indexOf(a.prototype.toString.call(t))>-1||qv(t))};function Hv(t){if(t.bodyUsed)return j.reject(new h("Already used"));t.bodyUsed=!0}function Xv(t){return new j(function(n,i){t.onload=function(){n(t.result)},t.onerror=function(){i(t.error)}})}function Gv(t){return _v.encoding?new vv.TextDecoder("utf-8").decode(new w(t)):Cv(function(t){Nv=(Rv=t).length,Ov=0;for(var n,i=[];!1!==(n=zv());)i.push(n);return i}(new w(t)))}function Yv(t){return _v.encoding?(new vv.TextEncoder).encode(t).buffer:new w(function(t){for(var n=[],i=0,e=t;i<e.length;i++)Fv(e[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))).buffer}function Kv(t){var n=t.getReader(),i=[],e=function(t){var r=t.done,o=t.value;return r?j.resolve(i):(i.push(o),n.read().then(e))};return n.read().then(e)}function Qv(t){return Kv(t).then(function(t){return function(t){for(var n=0,i=0,e=t;i<e.length;i++)n+=(f=e[i]).byteLength;for(var r=new w(n),o=0,u=0,s=t;u<s.length;u++){var f=s[u];r.set(f,o),o+=f.byteLength}return r}(t).buffer})}function $v(t){return t.slice?t.slice(0):Jv(new w(t))}function Jv(t){if(t.slice)return t.slice(0).buffer;var n=new w(t.byteLength);return n.set(new w(t.buffer,t.byteOffset,t.byteLength)),n.buffer}function Zv(t){var n=new FormData;return t.trim().split("&").forEach(function(t){if(t){var i=t.split("="),e=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");n.append(decodeURIComponent(e),decodeURIComponent(r))}}),n}function tl(t){var n=t;if(n.bodyUsed)throw new h("Already used");if(n.$l===jv.t_){if(!n.n_.tee)throw new f("could not clone ReadableStream body");var i=n.n_.tee(),e=i[0],r=i[1];return n.body=e,n.n_=e,n.i_=e,r}return n.$l===jv.Wf?$v(n.n_):n.$l===jv.Pd?n.n_.then(tl):n.i_}!function(t){t[t.Zn=0]="Zn",t[t.e_=1]="e_",t[t.r_=2]="r_",t[t.Wf=3]="Wf",t[t.t_=4]="t_",t[t.Pd=5]="Pd"}(jv||(jv={}));var nl=function(){function t(n,i){this.bodyUsed=!1;var e,r,o,u=this;if(this.i_=n||null,n)if("string"==typeof n)this.$l=jv.Zn,this.n_=n;else if((o=n)&&"function"==typeof o.then)this.$l=jv.Pd,this.n_=j.resolve(n).then(function(n){return new t(n,i)}),this.n_.catch(kv);else if(_v.blob&&function(t){return t&&Blob.prototype.isPrototypeOf(t)}(n))this.$l=jv.e_,this.n_=n;else if(_v.formData&&function(t){return t&&FormData.prototype.isPrototypeOf(t)}(n))this.$l=jv.r_,this.n_=n;else if(_v.searchParams&&Mv(n))this.$l=jv.Zn,this.n_=n.toString();else if(_v.arrayBuffer&&(Wv(n)||Vv(n)))qv(n)&&(this.i_=new w((r=n).buffer,r.byteOffset,r.byteLength)),this.$l=jv.Wf,this.n_=Wv(e=n)?$v(e):Jv(e);else{if(!_v.stream||!wv(n))throw new f("unsupported BodyInit type");n=mv(dv,n),this.$l=jv.t_,this.n_=n,this.i_=n}else this.$l=jv.Zn,this.n_="";this.s_="",i.has("content-type")?this.s_=(i.get("content-type")||"").toLowerCase():("string"==typeof n?this.s_="text/plain;charset=UTF-8":u.$l===jv.e_&&u.n_.type?this.s_=u.n_.type:_v.searchParams&&Mv(n)&&(this.s_="application/x-www-form-urlencoded;charset=UTF-8"),this.s_&&i.set("content-type",this.s_)),_v.stream&&(null==n?this.body=null:u.$l===jv.t_?this.body=u.n_:this.body=yv(dv,function(){return u.arrayBuffer()},function(){u.bodyUsed=!0}))}return t.prototype.text=function(){var t,n,i,e=Hv(this);return e||(this.$l===jv.e_?(t=this.n_,n=new FileReader,i=Xv(n),n.readAsText(t),i):this.$l===jv.Wf?j.resolve(this.n_).then(Gv):this.$l===jv.t_?Qv(this.n_).then(Gv):this.$l===jv.Pd?this.n_.then(function(t){return t.text()}):this.$l===jv.r_?j.reject(new f("could not read FormData body as text")):j.resolve(this.n_))},t.prototype.json=function(){return this.text().then(JSON.parse)},t}();_v.blob&&(nl.prototype.blob=function(){var t,n,i=Hv(this);return i||(this.$l===jv.e_?j.resolve(this.n_):this.$l===jv.Wf?j.resolve(lv([this.n_],{type:this.s_})):this.$l===jv.t_?(t=this.n_,n=this.s_,Kv(t).then(function(t){return lv(t,{type:n||""})})):this.$l===jv.Pd?this.n_.then(function(t){return t.blob()}):this.$l===jv.r_?j.reject(new f("could not read FormData body as Blob")):j.resolve(lv([this.n_],{type:this.s_})))}),_v.arrayBuffer&&(nl.prototype.arrayBuffer=function(){var t,n,i;return this.$l===jv.Wf?Hv(this)||j.resolve(this.n_):this.$l===jv.e_?Hv(this)||(t=this.n_,n=new FileReader,i=Xv(n),n.readAsArrayBuffer(t),i):this.$l===jv.t_?Qv(this.n_):this.$l===jv.Pd?Hv(this)||this.n_.then(function(t){return t.arrayBuffer()}):this.$l===jv.r_?j.reject(new f("could not read FormData body as ArrayBuffer")):j.resolve(this.n_).then(Yv)}),_v.formData&&(nl.prototype.formData=function(){return this.$l===jv.r_?Hv(this)||j.resolve(this.n_):this.text().then(Zv)});var il=[301,302,303,307,308],el=function(t){function n(n,i){var e=this,r=new Ev((i=i||{}).headers);return(e=t.call(this,n||null,r)||this).type="default",e.status=void 0===i.status?200:i.status,e.ok=e.status>=200&&e.status<300,e.statusText=void 0!==i.statusText?String(i.statusText):"",e.headers=r,e.url=i.url||"",e}return cv(n,t),n.prototype.clone=function(){return new n(tl(this),{status:this.status,statusText:this.statusText,headers:new Ev(this.headers),url:this.url})},n.error=function(){var t=new n(null,{status:0,statusText:""});return t.type="error",t},n.redirect=function(t,i){if(-1===il.indexOf(i))throw new RangeError("Invalid status code");return new n(null,{status:i,headers:{location:t}})},n}(nl);var rl,ol=function(t,n){return t(n={exports:{}},n.exports),n.exports}(function(t,n){function e(t,n){if(!(t instanceof n))throw new h("Cannot call a class as a function")}function o(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),a.defineProperty(t,e.key,e)}}function u(t,n,i){return n&&o(t.prototype,n),i&&o(t,i),t}function s(t){return(s=a.setPrototypeOf?a.getPrototypeOf:function(t){return t.__proto__||a.getPrototypeOf(t)})(t)}function f(t,n){return(f=a.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,n,i){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,n,i){var e=function(t,n){for(;!a.prototype.hasOwnProperty.call(t,n)&&null!==(t=s(t)););return t}(t,n);if(e){var r=a.getOwnPropertyDescriptor(e,n);return r.get?r.get.call(i):r.value}})(t,n,i||t)}a.defineProperty(n,"__esModule",{value:!0});var l=function(){function t(){e(this,t),a.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return u(t,[{key:"addEventListener",value:function(t,n){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(n)}},{key:"removeEventListener",value:function(t,n){if(t in this.listeners)for(var i=this.listeners[t],e=0,r=i.length;e<r;e++)if(i[e]===n)return void i.splice(e,1)}},{key:"dispatchEvent",value:function(t){var n=this;if(t.type in this.listeners){for(var i=function(i){r(function(){return i.call(n,t)})},e=this.listeners[t.type],o=0,u=e.length;o<u;o++)i(e[o]);return!t.defaultPrevented}}}]),t}(),d=function(t){function n(){var t,i,r;return e(this,n),i=this,(t=!(r=s(n).call(this))||"object"!=typeof r&&"function"!=typeof r?c(i):r).listeners||l.call(c(t)),a.defineProperty(c(t),"aborted",{value:!1,writable:!0,configurable:!0}),a.defineProperty(c(t),"onabort",{value:null,writable:!0,configurable:!0}),t}return function(t,n){if("function"!=typeof n&&null!==n)throw new h("Super expression must either be null or a function");t.prototype=a.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&f(t,n)}(n,l),u(n,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(t){"abort"===t.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,t)),v(s(n.prototype),"dispatchEvent",this).call(this,t)}}]),n}(),w=function(){function t(){e(this,t),a.defineProperty(this,"signal",{value:new d,writable:!0,configurable:!0})}return u(t,[{key:"abort",value:function(){var t;try{t=new Event("abort")}catch(n){void 0!==i?i.createEvent?(t=i.createEvent("Event")).initEvent("abort",!1,!1):(t=i.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),t}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(w.prototype[Symbol.toStringTag]="AbortController",d.prototype[Symbol.toStringTag]="AbortSignal"),n.AbortSignal=d,n.AbortController=w,n.default=w});(rl=ol)&&rl.__esModule&&a.prototype.hasOwnProperty.call(rl,"default")&&rl.default;ol.AbortSignal;var ul=ol.AbortController,sl=vv.DOMException;try{new sl}catch(t){(sl=function(t,n){f.call(this,t),this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=a.create(f.prototype),sl.prototype.constructor=sl}var fl=ul;function hl(t,n){if(!t.signal.aborted)if(n.aborted)t.abort();else{var i=function(){n.removeEventListener("abort",i),t.signal.removeEventListener("abort",i),t.abort()};n.addEventListener("abort",i),t.signal.addEventListener("abort",i)}}function al(t,n,i){return new j(function(e,r){if(n.signal.aborted)return t.catch(kv),r(cl());var o=function(){n.signal.removeEventListener("abort",o),r(cl())};n.signal.addEventListener("abort",o),t.then(function(t){n.signal.removeEventListener("abort",o),e(t),i&&n.abort()},function(t){n.signal.removeEventListener("abort",o),r(t),i&&n.abort()})})}function cl(){return new sl("Aborted","AbortError")}var vl,ll="moz-chunked-arraybuffer";function dl(t){try{var n=new b;return n.open("GET","https://test"),n.responseType=t,n.responseType===t}catch(t){}return!1}!function(t){t[t.UNSENT=0]="UNSENT",t[t.OPENED=1]="OPENED",t[t.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",t[t.LOADING=3]="LOADING",t[t.DONE=4]="DONE"}(vl||(vl={}));var wl=function(){function t(t,n){var i=this;this.u_=!1,this.Ql=t,this.o_=n,this.h_=new b,this.a_=new j(function(t,n){i.c_=t,i.f_=n})}return t.prototype.send=function(){var t=this;return this.v_().then(function(n){return t.d_(n,t.o_),t.a_})},t.prototype.v_=function(){var t=this.Ql;return t.$l===jv.t_?t.arrayBuffer():j.resolve(t.i_)},t.prototype.l_=function(t){this.Ql.onprogress&&this.Ql.onprogress(t.loaded,t.lengthComputable?t.total:void 0)},t.prototype.__=function(t){this.f_(t)},t.prototype.g_=function(){this.__(new h("Network request failed"))},t.prototype.w_=function(){this.__(new h("Network request failed"))},t.prototype.m_=function(){this.__(cl())},t.prototype.d_=function(t,n){var i=this,e=this.Ql,r=this.h_,o=function(){return i.y_()};if(e.signal.aborted)return this.m_();r.onreadystatechange=function(){if(r.readyState>=vl.HEADERS_RECEIVED&&!i.u_){var t=function(t){var n=new Ev;return t.replace(/\r?\n[\t ]+/g," ").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}(r.getAllResponseHeaders()||""),n={status:r.status,statusText:r.statusText,headers:t,url:r.responseURL||t.get("X-Request-URL")};i.u_=!0,i.k_(n)}},r.onprogress=function(t){return i.l_(t)},r.onload=function(){return i.p_()},r.onerror=function(){return i.g_()},r.ontimeout=function(){return i.w_()},r.onabort=function(){return i.m_()},r.open(e.method,e.url,!0),r.withCredentials="include"===e.credentials,"responseType"in r&&n&&(r.responseType=n),e.headers.forEach(function(t,n){r.setRequestHeader(n,t)}),e.signal.addEventListener("abort",o),r.onloadend=function(){e.signal.removeEventListener("abort",o)},t?r.send(t):r.send()},t.prototype.y_=function(){this.m_(),this.h_.abort()},t}(),bl=function(t){function n(n,i){var e=t.call(this,n,i)||this;return e.b_=void 0,e.A_=void 0,e}return cv(n,t),n.prototype.k_=function(t){var n=this;this.b_=new j(function(t,i){n.A_=t,n.T_=i}),this.c_(new el(this.b_,t))},n.prototype.p_=function(){var t=this.h_.response;if(null==t){var n=this.o_;""===n||"text"===n?t=this.h_.responseText:"document"===n?t=this.h_.responseXML:"arraybuffer"===n?t=new ArrayBuffer(0):"blob"===n&&(t=lv([]))}this.A_(t)},n.prototype.__=function(n){t.prototype.__.call(this,n),this.T_&&this.T_(n)},n}(wl),gl=function(t){function n(n){var i=t.call(this,n,ll)||this;return i.S_=void 0,i.E_=void 0,i.I_=!1,i}return cv(n,t),n.prototype.k_=function(t){var n=this;this.S_=new dv({start:function(t){n.E_=t},cancel:function(){n.I_=!0,n.y_()}}),this.c_(new el(this.S_,t))},n.prototype.l_=function(n){this.I_||this.E_.enqueue(new w(this.h_.response)),t.prototype.l_.call(this,n)},n.prototype.p_=function(){this.E_.close()},n.prototype.__=function(n){t.prototype.__.call(this,n),this.E_&&!this.I_&&(this.I_=!0,this.E_.error(n))},n}(wl),ml=function(){var t=_v.firefox&&dl(ll);return ml=function(){return t},t},pl=function(){var t;return t=_v.arrayBuffer&&dl("arraybuffer")?"arraybuffer":_v.blob&&dl("blob")?"blob":"",pl=function(){return t},t};function yl(t){return(_v.stream&&ml()?new gl(t):new bl(t,pl())).send()}var _l=vv.fetch,Sl=vv.Request,Il=(vv.Response,vv.AbortController);var Tl=["http:","https:"];var El=function(){try{if(_v.streamRequest){var t=new Sl("about:blank",{body:"",method:"POST"}).body;if(t&&bv(t.constructor))return t.constructor}}catch(t){}}();function kl(t,n,i){var e;if(_v.stream){var r=void 0;if(_v.streamResponse){var o=t.body;r=o&&mv(dv,o)}else r=yv(dv,function(){return al(t.arrayBuffer(),n,!0)},function(){n.abort()});r&&i&&(r=function(t,n,i){var e=0;return function(t,n,i){return new t(new gv(n.getReader(),i),{highWaterMark:0})}(dv,t,function(t){var r=t.done,o=t.value;r?i=void 0===i?e:i:e+=o.byteLength,n(e,i)})}(r,i,Rl(t.headers))),e=r}else{var u=al(t.arrayBuffer(),n,!0);i&&(u=function(t,n,i){return j.resolve().then(function(){return n(0,i),t}).then(function(t){var e=t.byteLength;return n(e,i=void 0===i?e:i),t})}(u,i,Rl(t.headers))),e=u}return new el(e,t)}function Rl(t){return t.has("content-length")?Number(t.get("content-length")):void 0}function Nl(t){var n=new fl;return t.signal&&hl(n,t.signal),function(t,n){var i,e,r=t;if(i=r.$l===jv.t_?_v.streamRequest&&El?j.resolve(mv(El,r.n_)):al(t.arrayBuffer(),n,!1):al(j.resolve(t.i_),n,!1),_v.abort){var o=new Il;hl(o,n.signal),e=o.signal}return i.then(function(n){return new Sl(t.url,{body:n||void 0,credentials:t.credentials,headers:(i=t.headers,(i instanceof Ev?i:new Ev(i)).asList()),method:t.method,mode:t.mode,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:e});var i})}(t,n).then(function(i){return _l(i).then(function(i){return kl(i,n,t.onprogress)})})}var Ol=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];var Pl=function(t){function n(i,e){var r,o,u,s,f,a,c,v,l,d=this,w=(e=e||{}).body||null;if(i instanceof n){if(i.bodyUsed)throw new h("Already used");r=i.url,o=i.credentials,e.headers||(u=new Ev(i.headers)),s=i.method,f=i.mode,a=i.referrer,c=i.referrerPolicy,v=i.signal,l=i.onprogress,w||null==i.i_||(w=i.i_,i.bodyUsed=!0)}else r=String(i),o="same-origin",s="GET",f="cors",a="about:client",c="",v=null,l=null;if(!e.headers&&u||(u=new Ev(e.headers)),e&&(a="about:client",c=""),(d=t.call(this,w,u)||this).url=r,d.headers=u,d.credentials=e.credentials||o,d.method=function(t){var n=t.toUpperCase();return Ol.indexOf(n)>-1?n:t}(e.method||s),d.mode=e.mode||f,d.signal=e.signal||v||(new fl).signal,d.referrer=void 0!==e.referrer?e.referrer:a,d.referrerPolicy=void 0!==e.referrerPolicy?e.referrerPolicy:c,d.onprogress=e.onprogress||l,("GET"===d.method||"HEAD"===d.method)&&w)throw new h("Body not allowed for GET or HEAD requests");return d}return cv(n,t),n.prototype.clone=function(){return new n(this,{body:tl(this)})},n}(nl),Al="function"==typeof _l&&_v.stream&&_v.streamResponse&&_v.url;function Dl(t,n){return new j(function(i){var e=new Pl(t,n);i((Al&&function(t){try{return Tl.indexOf(new vv.URL(t,vv.location.href).protocol)>=0}catch(t){return!1}}(e.url)?Nl:yl)(e))})}Dl.polyfill=!0;var Cl=function(){function t(t){this.jl=void 0,this.Ql=void 0,this.Jv=new on,this.Yl=void 0,this.R_=!1,this.Ql=t,this.Jv.Vs(t.zs),this.jl=this.N_()}var n=t.prototype;return n.N_=function(){var t,n,i,e,o,u,s,f,h=this;return Z.async(function(a){for(;;)switch(a.prev=a.next){case 0:(t=this.Ql).Dl&&r(function(){h.R_=!0,h.Jv.Hs()},t.Dl),a.prev=2,n=Dl(t.hl,{method:t.Nl,headers:t.Zd.Qf(),body:t.Ud,credentials:t.Ol?"include":"same-origin",signal:Fl(this.Jv.zs),onprogress:t.Bl}),a.next=9;break;case 6:throw a.prev=6,a.t0=a.catch(2),new sv(t,a.t0);case 9:return a.prev=9,a.next=12,Z.awrap(n);case 12:i=a.sent,a.next=20;break;case 15:throw a.prev=15,a.t1=a.catch(9),sn(e=this.D_(a.t1))&&this.Jv.Hs(),e;case 20:if(o=i.url||t.hl,u=0===i.status&&"file:"===(c=o,J.Or(c).protocol)?200:i.status,s=new xl(this,i,this.Jv),f=new nv({Hi:s,ul:t,Jd:t.Jd,Zd:new Ns(i.headers.asList()),Kd:u,$d:i.statusText,ol:o}),this.Yl=f,!Qc(f)){a.next=29;break}return a.abrupt("return",f);case 29:throw new fv(f);case 30:case"end":return a.stop()}var c},null,this,[[2,6],[9,15]],j)},n.D_=function(t){return sn(t)?this.R_?new hv(this.Ql):new un(t.message,t):this.Yl?new fv(this.Yl,t):new sv(this.Ql,t)},t}(),xl=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).C_=void 0,r.P_=void 0,r.Jv=void 0,r.zd=new Oo,r.C_=n,r.P_=i,r.Jv=e,r.zd.Uu.catch(lt),r}Ut(n,t);var i=n.prototype;return i.qd=function(){return this.zd.Uu},i.Bd=function(t){return this.Gd(this.P_.text(),t)},i.Md=function(t){return this.Gd(this.P_.arrayBuffer(),t)},i.xd=function(){var t=this.P_.body;return t?this.Qd(t):xc(this.Md().then(Dc),this.Jv)},i.Yd=function(){var t=this.P_.clone(),i=this.Jv.Xs(),e=i[0],r=i[1];return this.Jv=e,new n(this.C_,t,r)},i.Gd=function(t,n){var i=this;n&&this.Jv.Vs(n);var e=j.resolve(t).catch(function(t){throw i.C_.D_(t)});return e=fn(e,this.Jv),this.zd.Xu(e.then(lt)),e},i.Qd=function(t){var n=this,i=new mc,e=j.resolve(t.pipeTo(i.writable,{preventAbort:!0})).catch(function(t){var e=n.C_.D_(t);throw i.writable.abort(e).catch(lt),e});return e=fn(e,this.Jv),this.zd.Xu(e.then(lt)),i.readable},mt(n,[{key:"jd",get:function(){return this.P_.bodyUsed}}]),n}(Uc),Bl="abort";function Fl(t){var n=new fl;if(t.Ns)n.abort();else if(!t.Ds){var i=function(){e(),n.abort()},e=function e(){n.signal.removeEventListener(Bl,i),t.Ms(i),t.Fs(e)};n.signal.addEventListener(Bl,i),t.Ls(i),t.xs(e)}return n.signal}var Ll=function(){function t(){}var n=t.prototype;return n.ul=function(t){return new Cl(t).jl},n.Ll=function(t){var n=t.Fd?{"Content-type":t.Fd}:void 0;this.ul(new iv({Nl:$c.POST,hl:t.hl,Ud:t.Ud,Zd:n})).then(lt,lt)},n.Ml=function(){},t}(),zl=function(n){function i(){for(var i,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(i=n.call.apply(n,[this].concat(r))||this).O_=void 0,i.B_=function(){if(hi.hn)return!1;try{return"body"in t.Response.prototype}catch(t){return!1}}(),i.L_=hi.xn,i.M_=void 0,i}return Ut(i,n),mt(i,[{key:"Er",get:function(){return this.O_||(this.O_=new Io(ys())),this.O_}},{key:"x_",get:function(){return this.B_}},{key:"F_",get:function(){return this.L_}},{key:"U_",get:function(){return!1}},{key:"H_",get:function(){return Ss.ef()}},{key:"V_",get:function(){return{X_:Es}}},{key:"z_",get:function(){return e.connection&&e.connection.effectiveType||"default"}},{key:"W_",get:function(){return e.connection&&e.connection.type||"unknown"}},{key:"q_",get:function(){return this.M_||(this.M_=new ov(new Ll)),this.M_}}]),i}(no);tt(new zl),tt(new zl);var Ul=t;Ul.addEventListener("install",function(t){t.waitUntil(Ul.skipWaiting())}),Ul.addEventListener("activate",function(t){t.waitUntil(Ul.clients.claim())}),Jn.mr.Wy(Ul)}()}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:this);