@theoplayer/extended 4.1.0 → 4.2.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.chromeless.js +3 -3
- package/THEOplayer.d.ts +54 -2
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/THEOplayer.transmux.wasm +0 -0
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.e.js +3 -3
- package/theoplayer.p.js +3 -3
- package/theoplayer.sw.js +3 -3
- package/ui.css +1 -1
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.
|
|
28
|
-
Created: 2022-
|
|
27
|
+
Version: 2022.4.0 (4.2.0)
|
|
28
|
+
Created: 2022-10-24T09:05:40.589Z
|
|
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;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}});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)}}var $={exports:{}};!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}}}($.exports);var J,Z=$.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&>(t.prototype,n),i&>(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.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.fl="#EXTINF",t.hbt="#EXT-X-MAP",t.xO="#EXTM3U",t.i="#EXT-X-VERSION",t.o="#EXT-X-TARGETDURATION",t.x5="#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.FO="#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.fl,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.xO}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.Jkt=void 0,this.Jkt=t}return t.prototype.dR=function(){return this.hs+":"+this.Jkt},t}(),Ot=function(){function t(t){this.hs=St.x5,this.gbt=void 0,this.gbt=t}return t.prototype.dR=function(){return this.hs+":TIME-OFFSET="+this.gbt},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.SN=1,this.k=void 0,this.k=t}return t.prototype.dR=function(){return this.hs+":BANDWIDTH="+this.SN+',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.ubt="VOD",t.vCt="EVENT"}(Tt||(Tt={}));var Bt=function(){function t(t){this.hs=St.FO,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=null;try{qt=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 jt(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function Vt(t){return!0===(t&&t.Yn)}function Ht(t){var n=c.clz32(t&-t);return t?31-n:n}jt.prototype.Yn,a.defineProperty(jt.prototype,"Yn",{value:!0}),jt.isLong=Vt;var Xt={},Gt={};function Yt(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=Gt[t])?e:(i=Qt(t,0,!0),r&&(Gt[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Xt[t])?e:(i=Qt(t,t<0?-1:0,!1),r&&(Xt[t]=i),i)}function Kt(t,n){if(d(t))return n?un:on;if(n){if(t<0)return un;if(t>=nn)return cn}else{if(t<=-en)return vn;if(t+1>=en)return an}return t<0?Kt(-t,n).neg():Qt(t%tn|0,t/tn|0,n)}function Qt(t,n,i){return new jt(t,n,i)}jt.fromInt=Yt,jt.fromNumber=Kt,jt.fromBits=Qt;var $t=c.pow;function Jt(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?un:on;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 Jt(t.substring(1),n,i).neg();for(var r=Kt($t(i,8)),o=on,u=0;u<t.length;u+=8){var s=c.min(8,t.length-u),h=v(t.substring(u,u+s),i);if(s<8){var a=Kt($t(i,s));o=o.mul(a).add(Kt(h))}else o=(o=o.mul(r)).add(Kt(h))}return o.unsigned=n,o}function Zt(t,n){return"number"==typeof t?Kt(t,n):"string"==typeof t?Jt(t,n):Qt(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}jt.fromString=Jt,jt.fromValue=Zt;var tn=4294967296,nn=tn*tn,en=nn/2,rn=Yt(1<<24),on=Yt(0);jt.ZERO=on;var un=Yt(0,!0);jt.UZERO=un;var sn=Yt(1);jt.ONE=sn;var fn=Yt(1,!0);jt.UONE=fn;var hn=Yt(-1);jt.NEG_ONE=hn;var an=Qt(-1,2147483647,!1);jt.MAX_VALUE=an;var cn=Qt(-1,-1,!0);jt.MAX_UNSIGNED_VALUE=cn;var vn=Qt(0,-2147483648,!1);jt.MIN_VALUE=vn;var ln=jt.prototype;ln.toInt=function(){return this.unsigned?this.low>>>0:this.low},ln.toNumber=function(){return this.unsigned?(this.high>>>0)*tn+(this.low>>>0):this.high*tn+(this.low>>>0)},ln.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(vn)){var n=Kt(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=Kt($t(t,6),this.unsigned),o=this,u="";;){var s=o.div(r),f=(o.sub(s.mul(r)).toInt()>>>0).toString(t);if((o=s).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},ln.getHighBits=function(){return this.high},ln.getHighBitsUnsigned=function(){return this.high>>>0},ln.getLowBits=function(){return this.low},ln.getLowBitsUnsigned=function(){return this.low>>>0},ln.getNumBitsAbs=function(){if(this.isNegative())return this.eq(vn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&0==(t&1<<n);n--);return 0!=this.high?n+33:n+1},ln.isZero=function(){return 0===this.high&&0===this.low},ln.eqz=ln.isZero,ln.isNegative=function(){return!this.unsigned&&this.high<0},ln.isPositive=function(){return this.unsigned||this.high>=0},ln.isOdd=function(){return 1==(1&this.low)},ln.isEven=function(){return 0==(1&this.low)},ln.equals=function(t){return Vt(t)||(t=Zt(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},ln.eq=ln.equals,ln.notEquals=function(t){return!this.eq(t)},ln.neq=ln.notEquals,ln.ne=ln.notEquals,ln.lessThan=function(t){return this.comp(t)<0},ln.lt=ln.lessThan,ln.lessThanOrEqual=function(t){return this.comp(t)<=0},ln.lte=ln.lessThanOrEqual,ln.le=ln.lessThanOrEqual,ln.greaterThan=function(t){return this.comp(t)>0},ln.gt=ln.greaterThan,ln.greaterThanOrEqual=function(t){return this.comp(t)>=0},ln.gte=ln.greaterThanOrEqual,ln.ge=ln.greaterThanOrEqual,ln.compare=function(t){if(Vt(t)||(t=Zt(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},ln.comp=ln.compare,ln.negate=function(){return!this.unsigned&&this.eq(vn)?vn:this.not().add(sn)},ln.neg=ln.negate,ln.add=function(t){Vt(t)||(t=Zt(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,h=0,a=0,c=0;return a+=(c+=r+(65535&t.low))>>>16,h+=(a+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,Qt((a&=65535)<<16|(c&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},ln.subtract=function(t){return Vt(t)||(t=Zt(t)),this.add(t.neg())},ln.sub=ln.subtract,ln.multiply=function(t){if(this.isZero())return this;if(Vt(t)||(t=Zt(t)),qt)return Qt(qt.mul(this.low,this.high,t.low,t.high),qt.get_high(),this.unsigned);if(t.isZero())return this.unsigned?un:on;if(this.eq(vn))return t.isOdd()?vn:on;if(t.eq(vn))return this.isOdd()?vn:on;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(rn)&&t.lt(rn))return Kt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,a=0,c=0,v=0;return c+=(v+=r*f)>>>16,a+=(c+=e*f)>>>16,c&=65535,a+=(c+=r*s)>>>16,h+=(a+=i*f)>>>16,a&=65535,h+=(a+=e*s)>>>16,a&=65535,h+=(a+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,Qt((c&=65535)<<16|(v&=65535),(h&=65535)<<16|(a&=65535),this.unsigned)},ln.mul=ln.multiply,ln.divide=function(t){if(Vt(t)||(t=Zt(t)),t.isZero())throw f("division by zero");var n,i,e;if(qt)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Qt((this.unsigned?qt.div_u:qt.div_s)(this.low,this.high,t.low,t.high),qt.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?un:on;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return un;if(t.gt(this.shru(1)))return fn;e=un}else{if(this.eq(vn))return t.eq(sn)||t.eq(hn)?vn:t.eq(vn)?sn:(n=this.shr(1).div(t).shl(1)).eq(on)?t.isNegative()?sn:hn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(vn))return this.unsigned?un:on;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=on}for(i=this;i.gte(t);){n=c.max(1,c.floor(i.toNumber()/t.toNumber()));for(var r=c.ceil(c.log(n)/c.LN2),o=r<=48?1:$t(2,r-48),u=Kt(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Kt(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=sn),e=e.add(u),i=i.sub(s)}return e},ln.div=ln.divide,ln.modulo=function(t){return Vt(t)||(t=Zt(t)),qt?Qt((this.unsigned?qt.rem_u:qt.rem_s)(this.low,this.high,t.low,t.high),qt.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},ln.mod=ln.modulo,ln.rem=ln.modulo,ln.not=function(){return Qt(~this.low,~this.high,this.unsigned)},ln.countLeadingZeros=function(){return this.high?c.clz32(this.high):c.clz32(this.low)+32},ln.clz=ln.countLeadingZeros,ln.countTrailingZeros=function(){return this.low?Ht(this.low):Ht(this.high)+32},ln.ctz=ln.countTrailingZeros,ln.and=function(t){return Vt(t)||(t=Zt(t)),Qt(this.low&t.low,this.high&t.high,this.unsigned)},ln.or=function(t){return Vt(t)||(t=Zt(t)),Qt(this.low|t.low,this.high|t.high,this.unsigned)},ln.xor=function(t){return Vt(t)||(t=Zt(t)),Qt(this.low^t.low,this.high^t.high,this.unsigned)},ln.shiftLeft=function(t){return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Qt(0,this.low<<t-32,this.unsigned)},ln.shl=ln.shiftLeft,ln.shiftRight=function(t){return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Qt(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},ln.shr=ln.shiftRight,ln.shiftRightUnsigned=function(t){return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Qt(32===t?this.high:this.high>>>t-32,0,this.unsigned)},ln.shru=ln.shiftRightUnsigned,ln.shr_u=ln.shiftRightUnsigned,ln.rotateLeft=function(t){var n;return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Qt(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},ln.rotl=ln.rotateLeft,ln.rotateRight=function(t){var n;return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Qt(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},ln.rotr=ln.rotateRight,ln.toSigned=function(){return this.unsigned?Qt(this.low,this.high,!1):this},ln.toUnsigned=function(){return this.unsigned?this:Qt(this.low,this.high,!0)},ln.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},ln.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},ln.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},jt.fromBytes=function(t,n,i){return i?jt.fromBytesLE(t,n):jt.fromBytesBE(t,n)},jt.fromBytesLE=function(t,n){return new jt(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},jt.fromBytesBE=function(t,n){return new jt(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var dn=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,jt.UZERO):new t(n,n.isNegative()?jt.NEG_ONE:jt.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(jt.fromNumber(n%0x10000000000000000),jt.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(jt.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()?jt.NEG_ONE:jt.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,jt.ZERO,this.Wp()):t.Mp(this.Lp.shru(i-64),jt.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=jt.fromBits(p<<16|y,g<<16|m,E),R=jt.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=jt.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=jt.UZERO,v=jt.UZERO,l=jt.UZERO,d=jt.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=jt.fromBits(c.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0),b=jt.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}();dn.Hp=dn.xp(jt.ZERO),dn.Up=dn.xp(jt.UZERO),dn.ob=dn.xp(jt.ONE),dn.fb=dn.xp(jt.UONE),dn.vb=dn.xp(jt.NEG_ONE),dn.zp=dn.Mp(jt.NEG_ONE,jt.MAX_VALUE,!1),dn.Vp=dn.Mp(jt.MAX_UNSIGNED_VALUE,jt.MAX_UNSIGNED_VALUE,!0),dn.Xp=dn.Mp(jt.ZERO,jt.MIN_VALUE,!1);var wn=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}();wn.Eb=new wn(1/6,1),wn.Hp=new wn(0),wn.Ib=new wn(1/0),wn.Rb=1e6;var bn=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(jt.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(jt.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 wn(0===this.mb?this.kp():this.wi.toNumber(),this.mb)},i.Ab=function(t,i){void 0===i&&(i=pn.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===pn.Fb)return o.Np()?r.Cp(dn.ob):r;if(i===pn.Ub)return o.Np()?r:r.Ek(dn.ob);var u=o.hb(dn.Fp(2));return u.Np()?u.Dp().Ip(n)?r:r.Cp(dn.ob):u.Ip(n)?r:r.Ek(dn.ob)}(dn.xp(this.wi).hb(dn.Fp(t/r)),dn.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,pn.Hb).wi,e=t.Ab(n,pn.Hb).wi;return i.compare(e)},i.Dp=function(){return 0===this.mb?gn(this):new n(this.wi.negate(),this.mb)},i.Ek=function(t){if(0===this.mb||0===t.mb)return mn(this,t);if(this.qp())return t;if(t.qp())return this;var i=c.max(this.mb,t.mb),e=this.Ab(i,pn.Hb),r=t.Ab(i,pn.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?jt.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(jt.ZERO,this.mb);if(this.qp())return 0===t?n.Db:new n(jt.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 gn(t){return t.Pp()?t:t.Np()?bn.Cb:bn.Pb}function mn(t,n){return t.Pp()||n.Pp()?bn.Db:t.Op()&&n.Op()?t.Np()===n.Np()?t:bn.Db:t.Op()?t:n}bn.Hp=new bn(jt.ZERO,1e6),bn.Db=new bn(jt.ZERO,0),bn.Cb=new bn(jt.ONE,0),bn.Pb=new bn(jt.NEG_ONE,0);var pn,yn=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 jt.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 wn(0===this.mb?this.kp():Number(this.wi),this.mb)},i.Ab=function(t,i){void 0===i&&(i=pn.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===pn.Fb)return r<BigInt(0)?e-BigInt(1):e;if(i===pn.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,pn.Hb).wi,e=t.Ab(n,pn.Hb).wi;return i>e?rt.Is:i<e?rt.Rs:rt.Es},i.Dp=function(){return 0===this.mb?_n(this):new n(-this.wi,this.mb)},i.Ek=function(t){if(0===this.mb||0===t.mb)return Sn(this,t);if(this.qp())return t;if(t.qp())return this;var i=c.max(this.mb,t.mb),e=this.Ab(i,pn.Hb),r=t.Ab(i,pn.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 _n(t){return t.Pp()?t:t.Np()?yn.Cb:yn.Pb}function Sn(t,n){return t.Pp()||n.Pp()?yn.Db:t.Op()&&n.Op()?t.Np()===n.Np()?t:yn.Db:t.Op()?t:n}yn.zb=void 0,yn.Wb=void 0,yn.qb=void 0,yn.Gb=void 0,function(t){t[t.Fb=0]="Fb",t[t.Ub=1]="Ub",t[t.Hb=2]="Hb"}(pn||(pn={}));var In=function(){try{return"function"==typeof BigInt&&"bigint"==typeof BigInt(0)}catch(t){return!1}}()?yn:bn;function Tn(t){return In.xp(jt.fromBits(t[0],t[1],!1),t[2])}function En(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var kn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];f.apply(this,n)};(kn.prototype=a.create(f.prototype)).constructor=kn;var Rn,Nn=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(En(e),e.constructor),e}return Ut(n,t),mt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(kn),On=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}(),Pn=function(){function t(){this.Us=new On}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}(),An=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}(Nn);function Dn(t){return t instanceof f&&"AbortError"===t.name}function Cn(t,n){return t.then(function(t){return n.Bs(),t},function(t){throw n.Bs(),t})}j.resolve(),function(t){t.NZ="HELLO",t.DZ="HI_THERE",t.CZ="INITIALIZE",t.PZ="APPEND_INIT",t.OZ="APPEND_DATA",t.BZ="ACK",t.LZ="REMOVE",t.MZ="DESTROY_SESSION"}(Rn||(Rn={}));var xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Bn=16383;function Fn(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],xn[e>>2]+xn[(3&e)<<4|r>>4]+xn[(15&r)<<2|o>>6]+xn[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 zn(t,n){return null!=t&&t.substr(0,n.length)===n}var Un=16384;function Mn(t){var n=t.length;if(n<=Un)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Un)i.push(String.fromCharCode.apply(String,t.slice(e,e+Un)));return i.join("")}function Wn(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 Mn(n)}(t)}function qn(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function jn(t,n){return t>>n&63|128}function Vn(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(qn(t),n.push(t>>12&15|224),n.push(jn(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(jn(t,12)),n.push(jn(t,6))),n.push(63&t|128)):n.push(t)}function Hn(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 Xn(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|Hn(t,n);if(r>=128)return r;throw new f("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|Hn(t,n)<<6|Hn(t,n);if(o>=2048)return qn(o),o;throw new f("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|Hn(t,n)<<12|Hn(t,n)<<6|Hn(t,n);if(u>=65536&&u<=1114111)return u}throw new f("Invalid UTF-8 detected")}var Gn=65279;function Yn(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Cu,i);return n.Pu(2),e}function Kn(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Cu,i,e),n.Pu(2)}function Qn(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Cu+2<=t.byteLength;){var o=Yn(t,n,i);if(e&&!o)break;r.push(o)}return Mn(r)}(ti(t),new ri,n,!1)}function $n(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)Kn(t,n,i.charCodeAt(o),e)}(ti(i),new ri,t,n),i}function Jn(t){return Wn(function(t,n){var i,e=[],r=new ri;if(!n){if(!1===(i=Xn(t,r)))return e;i===Gn||e.push(i)}for(;!1!==(i=Xn(t,r));)e.push(i);return e}(ni(t)))}function Zn(t){return new w(function(t){for(var n=[],i=0;i<t.length;i++)Vn(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 ti(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function ni(t){return new w(t.buffer,t.byteOffset,t.byteLength)}function ii(t){return t instanceof ArrayBuffer?new w(t):ni(t)}function ei(t){if(t.slice)return t.slice(0);var n=new w(t.byteLength);return n.set(t,0),n}var ri=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}(),oi=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],ui=ArrayBuffer.isView||function(t){return t&&ct(oi,nt.call(t))};function si(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 fi(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Bn)e.push(Fn(t,o,c.min(r,o+Bn)));if(1===i){var u=t[n-1];e.push(xn[u>>2]+xn[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(xn[s>>2]+xn[(3&s)<<4|f>>4]+xn[(15&f)<<2]+"=")}return e.join("")}(new w(t))}function hi(t){return t&&"function"!=typeof t?t.slice():t}function ai(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 ci=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=hi(this.Ws[t.type]),i=hi(this.qs);ai(this.Gs,t,n),ai(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 An);var o=function(t){s(),e(t)},u=function(){s(),r(new An)},s=function(){i.$s(t,o),n&&n.Ms(u)};i.js(t,o),n&&n.Ls(u)})},t}(),vi=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},li=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}(vi),di=function(t){function n(n){var i;return(i=t.call(this)||this).jw=void 0,i.Mft=0,i.Wi=new w(0),i.ao=!1,i.A=!1,i.D=void 0,i.jw=n,i}Ut(n,t);var i=n.prototype;return i.pz=function(t,n){this.C&&0===this.Wi.length&&(this.Wi=this.D.slice()),this.Mft+=n.kp(),this.Wi=si([this.Wi,t]),this.Ys(new li(t))},i.Wa=function(){this.Za||(this.Ys(new vi("close")),this.ao=!0)},mt(n,[{key:"Vm",get:function(){return this.Mft}},{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}(ci),wi=function(){function t(t){this.L=!1,this.W=void 0,this.H=void 0,this.DEFAULT_SEGMENT_DURATION_IN_SECONDS=1.1,this.Qg="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 di(this.it(e));else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");this.H=new di(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}(),bi=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}(vi),gi=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 wi(i.tt),i.ht.H&&(i.ht.H.C=!0),i.ht.W&&(i.ht.W.C=!0),i.pt.push(new wi(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.pz=function(t){this.an(t),this.ln(t),this.bn(t)},i.Tz=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=Tn(t.startPts),i=Tn(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 wi(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!==Rn.PZ&&i!==Rn.OZ||(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 Rn.PZ:this.ui(e),this.en=0,this.rn=0;break;case Rn.LZ:this.si(e);break;case Rn.OZ: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=Tn(t.totalDuration);if(n?this.ht.H.pz(t.segment,i):this.ht.W.pz(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 bi(Tn(t.endTime)))},i.ii=function(t){var n=this;if(t.kind===Rn.LZ)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===Rn.LZ});-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===Rn.OZ)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===Rn.PZ)return[];var s=this.nn.get(i);if(void 0===s)return[];if(t.kind===Rn.LZ){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=Tn(t.startPts),u=Tn(t.totalDuration),s=o.Ek(u),f=ht(r,function(t){return t.kind===Rn.LZ}),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!==Rn.OZ||n.li(v,s)||(a=c)}var l=-1;return-1!==ht(i,function(t){return t.kind===Rn.PZ})&&(l=ht(r,function(t){return t.kind===Rn.PZ})),l>a&&(a=l+1),a>0?(r[a-1].kind===Rn.PZ&&(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===Rn.LZ});if(i>=0)return n.splice(0,i+1)}return[]},n.li=function(t,n){var i=n,e=Tn(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}(ci);var mi=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.qk.Ap(In.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.prt=t,this.prt.js("remove",this.se)}var n=t.prototype;return n.xnt=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.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.prt.sn(),n=0;n<t.length;n++){var i=t[n];if(!this.te.has(i.Qg)){i.et=!0;var e=i.X;i.rt&&this.ki.push(new Ct),this.te.set(i.Qg,i),this.ki.push(new Et(e,i.Qg)),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.fl?(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}(),pi=function(){function t(t){this.d0t=void 0,this.tr=void 0,this.nr=void 0,this.tt=t,this.d0t=new Lt,this.tr=new gi(this.tt);for(var n=0,i=this.tt;n<i.length;n++){var e=i[n];if(this.nr=new mi(this.tr,new Dt(0),new xt(0)),e.match(/video/)){var r=new At("video/index.m3u8");this.d0t.P(r)}else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");var o=new Bt("audio/index.m3u8");this.d0t.P(o)}}}var n=t.prototype;return n.er=function(t){if("master.m3u8"===t){if(this.d0t)return this.d0t.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.xnt=function(n){var i=n.split("/")[1];return this.nr.xnt(i,t.ur(n))},n.Tz=function(t){this.tr.Tz(t)},n.pz=function(t){this.tr.pz(t)},n.Fet=function(t){this.tr.Qa(t)},n.Bs=function(){this.tr.Bs(),this.d0t.Bs(),this.nr&&this.nr.Bs()},t.ur=function(t){return t.match(/video/)?wt.El:wt.Sl},t}();var yi,_i=function(){function n(t,n){var i=this;this.fit=void 0,this.hDt=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===Rn.CZ?4:o.t0===Rn.PZ?7:o.t0===Rn.OZ?9:o.t0===Rn.LZ?11:13;break;case 4:return e=n.mediaBufferConfigs,i.fit=new pi(e),o.abrupt("break",13);case 7:return i.fit.Tz(n),o.abrupt("break",13);case 9:return i.fit.pz(n),o.abrupt("break",13);case 11:return i.fit.Fet(n),o.abrupt("break",13);case 13:r={kind:Rn.BZ},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.hDt}var i=n.prototype;return i.ar=function(t){return this.fit.er(t)},i.cr=function(n){if(this.fit){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.Bnt(n)),o=new t.ReadableStream(r);return new Response(o,{headers:e})}throw new f("Stream not active.")},i.Bnt=function(t){return this.fit.xnt(t)},i.close=function(){this.sr.close(),this.fit&&this.fit.Bs()},n}(),Si=function(){function t(){var t=this;this.jG=yt(),this.UNt=void 0,this.hDt=function(n){var i=n.data;switch(i.kind){case Rn.NZ:t.vr().catch(lt);var e=i.port,r=dt(),o=new _i(e,n.source.id);t.jG.set(r,o);e.addEventListener("message",function n(i){i.data.kind===Rn.MZ&&(t.lr(r),e.removeEventListener("message",n))});var u={kind:Rn.DZ,sessionId:r};e.postMessage(u)}},this.br=function(n){if(zn(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.jG.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.UNt=t,t.addEventListener("message",this.hDt),t.addEventListener("fetch",this.br)},n.lr=function(t){var n=this.jG.get(t);n&&n.close(),this.jG.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.UNt.clients.matchAll());case 2:t=e.sent,n=t.map(function(t){return t.id}),this.jG.forEach(function(t,e){ct(n,t.hr)||i.lr(e)});case 5:case"end":return e.stop()}},null,this,null,j)},t}();Si.mr=new Si,function(t){t.l="web",t.g="android",t.R="android-tv",t.N="ios",t.M="tvos",t.F="chromecast"}(yi||(yi={}));var Ii=e?e.userAgent:"",Ti=Ii.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ei=Ii.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),ki=Ii.match(/Android ([0-9\.]+)/i),Ri=Ii.match(/Windows NT ([0-9\.]+)/i),Ni=Ii.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Oi=Ii.match(/Firefox\/([0-9\.]+)/i),Pi=Ii.match(/OPR\/(\d+\.\d+)/i),Ai=Ii.match(/Tizen ([0-9\.]+)/i),Di=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(Ii)||/(macintosh|mac(?=_powerpc)\s)/i.test(Ii),this.q=/Windows NT/i.test(Ii),this.G=Ri?l(Ri[1]):0,this.Y=/Android/i.test(Ii),this.j=ki?l(ki[1]):0,this.K=/windows phone (8|8\.1)/i.test(Ii),this.Z=/iPhone/i.test(Ii),this.J=/iPad/i.test(Ii),this.nt=this.V&&this.U&&!this.J,this.ut=/iPod/i.test(Ii),this.ot=/Mobile Safari/i.test(Ii),this.ct=/EOSSTB/i.test(Ii),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(Ii),this._t=Boolean(t.chrome&&/google/i.test(e.vendor))||this.dt,this.wt=this._t&&/Edg\//i.test(e.userAgent),this.yt=Ei?v(Ei[1],10):0,this.kt=Boolean(t.chrome||/Chrome/i.test(Ii)||/CriOS/i.test(Ii)),this.bt=Ti?v(Ti[1],10):0,this.At=/SMART-TV.*Tizen/i.test(Ii),this.Tt=Ai?l(Ai[1]):0,this.St=/webos|web0s/i.test(Ii),this.Et=/Edge\/\d+/i.test(Ii),this.It=/Trident/i.test(Ii),this.Rt=this.It&&!t.ActiveXObject&&"ActiveXObject"in t,this.Nt=/Vivaldi/i.test(Ii),this.Dt=/Firefox/i.test(Ii)&&!/Seamonkey/i.test(Ii),this.Ct=Oi?l(Oi[1]):0,this.Pt=/Safari/i.test(Ii)&&!/Chrome/i.test(Ii)&&!this.K&&!this.At,this.Ot=Ni?l(Ni[2]):0,this.Bt=Boolean(Pi),this.Lt=Pi?l(Pi[1]):0,this.Mt=/CrKey/.test(Ii),this.xt=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(Ii),this.Ft="web"===yi.R,this.Ut="web"===yi.g,this.Ht=this.Ut||this.Ft,this.Vt="web"===yi.N,this.Xt="web"===yi.M,this.zt="web"===yi.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(){return!(!this.Tn&&!this.pn)&&this._n<=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}();Di.qn=new Di;var Ci=Di.qn,xi=!(Ci.En&&!Ci.In),Bi=t.console;function Fi(t){if(et(t))try{return JSON.stringify(t)}catch(t){}return t}function Li(t){return t.map(Fi).join(" ")}function zi(t){var n=Bi&&Bi[t];return n?n.bind&&xi?n.bind(Bi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Bi[t](Li(i))}:void 0}var Ui,Mi=zi("log")||lt,Wi=zi("warn")||Mi.bind(void 0,"WARNING:"),qi=zi("error")||Mi.bind(void 0,"ERROR:"),ji=(Ui=Bi&&Bi.assert)?Ui.bind&&xi?Ui.bind(Bi):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];Bi.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];qi.apply(void 0,["Assertion failed:"].concat(i))}};function Vi(){return Date.now()||(new Date).getTime()}var Hi;jt.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"}(Hi||(Hi={}));var Xi=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Ut(n,t),n}(Nn),Gi=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 Xi(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Xi;return new te(n)},t}(),Yi=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 Hi.Jn}},{key:"ci",get:function(){var t;return null!=(t=this.ri.localName)?t:ee(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}(),Ki=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 ne(n)&&n.Ii===t})},n.Ri=function(t,n){return this.Ei.filter(function(i){return ne(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=ie(t.item(i));e&&n.push(e)}return n}(this.Ai.childNodes)),this.Ti}},{key:"Ci",get:function(){return this.Ei.filter(ne)}},{key:"Di",get:function(){return this.Ai}}]),t}(),Qi=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 Hi.Kn}},{key:"ci",get:function(){var t;return null!=(t=this.Ai.localName)?t:ee(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 Yi(t.item(i)));return n}(this.Ai.attributes)}},{key:"Ui",get:function(){return this.Ai.textContent}}]),n}(Ki),$i=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}(),Ji=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 Hi.Zn}}]),n}($i),Zi=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 Hi.$n}}]),n}($i),te=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 Hi.ni}},{key:"Vi",get:function(){return new Qi(this.Ai.documentElement)}}]),n}(Ki);function ne(t){return function(t){return t.jn===Hi.Kn}(t)}function ie(t){switch(t.nodeType){case Hi.Kn:return new Qi(t);case Hi.Zn:return new Ji(t);case Hi.$n:return new Zi(t)}}function ee(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}function re(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 oe(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){ue(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&ue(i,null,t.length,t),t}function ue(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 se=/[a-zA-Z]/,fe=/[0-9]/,he=/[0-9a-fA-F]/,ae=/^0x/i,ce=/^[0-9]+$/,ve=/^[0-9a-fA-F]+$/,le=/^[0-7]+$/,de=a.prototype.toString,we=Array.isArray||function(t){return"[object Array]"===de.call(t)},be="undefined"!=typeof Symbol&&"symbol"==typeof Symbol.iterator;function ge(t){return we(t)?t:Array.from(t)}function me(t){return t>=65&&t<=90}function pe(t){return me(t)||function(t){return t>=97&&t<=122}(t)}function ye(t){return t>=48&&t<=57}function _e(t){return ye(t)||pe(t)}function Se(t){return ye(t)||t>=65&&t<=70||t>=97&&t<=102}function Ie(t){return me(t)?t+32:t}function Te(t){return ye(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ee(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var ke=c.min,Re=String.fromCharCode,Ne=16384;function Oe(t){for(var n=t.length,i=[],e=0;e<n;e+=Ne){var r=ke(e+Ne,n);i.push(Re.apply(null,t.slice(e,r)))}return i.join("")}var Pe=/[^\0-\x7E]/,Ae=/[\x2E\u3002\uFF0E\uFF61]/g,De={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ce=c.floor,xe=String.fromCharCode;function Be(t){throw new RangeError(De[t])}function Fe(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,ze,Ue,Me=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},We=function(t,n,i){var e=0;for(t=i?Ce(t/700):t>>1,t+=Ce(t/n);t>455;e+=36)t=Ce(t/35);return Ce(e+36*t/(t+38))},qe=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(Ae,".")).split("."),n).join(".");return e+r}(t,function(t){return Pe.test(t)?"xn--"+function(t){for(var n=[],i=(t=Fe(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(xe(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>Ce((2147483647-r)/w)&&Be("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&&Be("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(xe(Me(_+S%I,0))),p=Ce(S/I)}n.push(xe(Me(p,0))),o=We(r,w,a==h),r=0,++a}}++r,++e}return n.join("")}(t):t})};function je(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 Ve(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function He(t,n){return t>>n&63|128}function Xe(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Ve(t),n.push(t>>12&15|224),n.push(He(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(He(t,12)),n.push(He(t,6))),n.push(63&t|128)):n.push(t)}function Ge(t){for(var n=[],i=0;i<t.length;i++){Xe(t[i],n)}return n}function Ye(){if(Ue>=ze)throw new f("Invalid byte index");var t=255&Le[Ue];if(Ue++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function Ke(){var t,n;if(Ue>ze)throw new f("Invalid byte index");if(Ue===ze)return!1;if(t=255&Le[Ue],Ue++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ye())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ye()<<6|Ye())>=2048)return Ve(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ye()<<12|Ye()<<6|Ye())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}function Qe(t){return[37,Ee(t>>4),Ee(15&t)]}function $e(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Je(t){return $e(t)||32===t||34===t||60===t||62===t||96===t}function Ze(t){return Je(t)||35===t||63===t||123===t||125===t}function tr(t){return Ze(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function nr(t){return t<33||t>126||34===t||35===t||60===t||62===t}function ir(t){return nr(t)||39===t}function er(t,n){if(!n(t))return[t];for(var i=Ge([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,Qe(o))}return e}function rr(t,n){for(var i=[],e=0,r=Fe(t);e<r.length;e++){var o=r[e];i.push.apply(i,er(o,n))}return je(i)}function or(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&&Se(t[e+1])&&Se(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}(Ge(t))}function ur(t){return je(function(t){Le=t.slice(),ze=Le.length,Ue=0;for(var n,i=[];!1!==(n=Ke());)i.push(n);return i}(or(Fe(t))))}function sr(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&&he.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(!fe.test(t[a]))throw new h;for(;a<o&&fe.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 fr(t){var n=10,i=ce;return ae.test(t)?(t=t.slice(2),n=16,i=ve):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=le),""===t?0:i.test(t)?v(t,n):void 0}var hr={Xi:4},ar=/[\0\t\n\r #%/:?@\[\\\]]/,cr=/[\0\t\n\r #/:?@\[\\\]]/;function vr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new h("Invalid IPv6 address");return{Xi:2,zi:sr(t.slice(1,-1))}}if(!n)return function(t){if(cr.test(t))throw new h("Invalid code point in opaque host");var n=rr(t,$e);return""===n?hr:{Xi:3,Wi:n}}(t);var i=function(t){return function(t){return qe(t.toLowerCase())}(t)}(ur(t));if(ar.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=fr(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?hr:{Xi:0,qi:i}}function lr(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 dr=/\+/g;function wr(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(dr," "),s=s.replace(dr," ");var f=ur(u),h=ur(s);i.push([f,h])}}return i}function br(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=gr(Ge(Fe(e[0])))+"="+gr(Ge(Fe(e[1])))}return n}function gr(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||_e(n)?i.push(r):i.push.apply(i,Qe(r))}return Oe(i)}var mr=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function pr(t){var n=""+t,i=mr.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(_r(o))if(Sr(o)||r===i-1)e.push(yr);else{var u=t.charCodeAt(r+1);Sr(u)?(e.push(o,u),r++):e.push(yr)}else e.push(o)}return t.slice(0,n)+Oe(e)}(n,i.index):n}var yr=65533,_r=function(t){return 55296==(63488&t)},Sr=function(t){return 0!=(1024&t)};function Ir(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 Er(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Gi,wr(n))}function kr(t){if(t.Qi){var n=br(t.Gi);""===n&&(n=null),t.Qi.Qi.Yi=n}}var Rr=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 Rr&&we(o.Gi)&&(!be||o[Symbol.iterator]===Nr))this.Gi=t.Gi.slice();else if(function(t){return null!=t&&(!!we(t)||!!be&&"function"==typeof t[Symbol.iterator])}(t)){this.Gi=[];for(var n=0,i=ge(t);n<i.length;n++){var e=ge(i[n]);if(2!==e.length)throw new h("Invalid name-value pair");this.Gi.push([pr(e[0]),pr(e[1])])}}else for(var r in this.Gi=[],t)a.prototype.hasOwnProperty.call(t,r)&&this.Gi.push([pr(r),pr(t[r])]);else(t=pr(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Gi=wr(t);var o}var n=t.prototype;return n.append=function(t,n){t=pr(t),n=pr(n),this.Gi.push([t,n]),kr(this)},n.delete=function(t){t=pr(t);for(var n=this.Gi,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}kr(this)},n.get=function(t){t=pr(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=pr(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=pr(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=pr(t),n=pr(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]),kr(this)},n.sort=function(){oe(this.Gi,Ir),kr(this)},n.toString=function(){return br(this.Gi)},n.entries=function(){return new Dr(this.Gi,Or)},n.keys=function(){return new Dr(this.Gi,Pr)},n.values=function(){return new Dr(this.Gi,Ar)},n.forEach=function(t){var n=this;this.Gi.forEach(function(i){return t(i[1],i[0],n)})},t}(),Nr=Rr.prototype.entries;be&&(Rr.prototype[Symbol.iterator]=Nr);var Or=function(t){return[t[0],t[1]]},Pr=function(t){return t[0]},Ar=function(t){return t[1]},Dr=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}(),Cr="null";var xr=a.create(null);xr.ftp=21,xr.file=0,xr.gopher=70,xr.http=80,xr.https=443,xr.ws=80,xr.wss=443;var Br=/^(?:\.|%2e)$/i,Fr=/^(?:\.|%2e){2}$/i;function Lr(t){return Br.test(t)}function zr(t){return Fr.test(t)}function Ur(t){return void 0!==xr[t]}function Mr(t){return Ur(t.Zi)}function Wr(t){return""!==t.Ji||""!==t.$i}function qr(t){var n=t.length;if(!(n>=2))return!1;if(!Vr(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function jr(t){return 2===t.length&&se.test(t[0])&&(":"===t[1]||"|"===t[1])}function Vr(t){return 2===t.length&&jr(Oe(t))}function Hr(t){return jr(t)&&":"===t[1]}function Xr(t){var n=t.re;0!==n.length&&("file"===t.Zi&&1===n.length&&Hr(n[0])||n.pop())}function Gr(t){return null===t.ue||hr===t.ue||t.oe||"file"===t.Zi}var Yr=-1,Kr=/\t|\n|\r/g,Qr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function $r(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Zr,t=t.replace(Qr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,a=Fe(t=t.replace(Kr,"")),c=a.length,l=0;l<=c;){var d=l<c?a[l]:Yr;switch(r){case 0:if(!pe(d)){if(null===e){o.length=0,r=2;continue}throw new h("Invalid scheme")}o.push(Ie(d)),r=1;break;case 1:if(_e(d)||43===d||45===d||46===d)o.push(Ie(d));else{if(58!==d){if(null===e){o.length=0,r=2,l=0;continue}throw new h("Invalid scheme")}var w=je(o);if(null!==e){if(Ur(i.Zi)&&!Ur(w))return;if(!Ur(i.Zi)&&Ur(w))return;if((Wr(i)||null!==i.fe)&&"file"===w)return;if("file"===i.Zi&&(i.ue===hr||null===i.ue))return}if(i.Zi=w,null!==e)return void(Mr(i)&&i.fe===xr[i.Zi]&&(i.fe=null));o.length=0,"file"===i.Zi?r=13:Mr(i)&&n&&n.Zi===i.Zi?r=3:Mr(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,Yr===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&&Mr(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:!Mr(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=je(er(g,tr));f?i.$i+=m:i.Ji+=m}else f=!0}o.length=0}else if(Yr===d||47===d||63===d||35===d||Mr(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(Yr===d||47===d||63===d||35===d||Mr(i)&&92===d){if(l-=1,Mr(i)&&0===o.length)throw new h("Invalid host");if(null!==e&&0===o.length&&(Wr(i)||null!==i.fe))return;var p=vr(je(o),Mr(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=vr(je(o),Mr(i));if(i.ue=y,o.length=0,r=12,11===e)return}break;case 12:if(ye(d))o.push(d);else{if(!(Yr===d||47===d||63===d||35===d||Mr(i)&&92===d||null!==e))throw new h("Invalid port");if(0!==o.length){var _=v(je(o),10);if(_>65535)throw new h("Invalid port");i.fe=_===xr[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?Yr===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):(qr(a.slice(l))||(i.ue=n.ue,i.re=n.re.slice(),Xr(i)),r=17,l-=1):(r=17,l-=1);break;case 14:47===d||92===d?r=15:(n&&"file"===n.Zi&&!qr(a.slice(l))&&(Hr(n.re[0])?i.re.push(n.re[0]):i.ue=n.ue),r=17,l-=1);break;case 15:if(Yr===d||47===d||92===d||63===d||35===d)if(l-=1,null===e&&Vr(o))r=17;else if(0===o.length){if(i.ue=hr,null!==e)return;r=16}else{var S=vr(je(o),Mr(i));if(0===S.Xi&&"localhost"===S.qi&&(S=hr),i.ue=S,null!==e)return;o.length=0,r=16}else o.push(d);break;case 16:Mr(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):Yr!==d&&(r=17,47!==d&&(l-=1));break;case 17:if(Yr===d||47===d||Mr(i)&&92===d||null===e&&(63===d||35===d)){var I=je(o);if(zr(I)?(Xr(i),47===d||Mr(i)&&92===d||i.re.push("")):!Lr(I)||47===d||Mr(i)&&92===d?Lr(I)||("file"===i.Zi&&0===i.re.length&&Vr(o)&&(hr!==i.ue&&null!==i.ue&&(i.ue=hr),o[1]=58,I=je(o)),i.re.push(I)):i.re.push(""),o.length=0,"file"===i.Zi&&(Yr===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,er(d,Ze));break;case 18:63===d?(i.Yi="",r=19):35===d?(i._e="",r=20):Yr!==d&&(i.re[0]+=je(er(d,$e)));break;case 19:null===e&&35===d?(i._e="",r=20):Yr!==d&&(i.Yi+=je(er(d,Mr(i)?ir:nr)));break;case 20:Yr===d||0===d||(i._e+=je(er(d,Je)))}l++}return i}function Jr(t,n,i,e){try{$r(t,n,i,e)}catch(t){}}var Zr=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 to(t){switch(t.Zi){case"blob":var n;try{n=$r(t.re[0],null)}catch(t){return Cr}return to(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return i=t.Zi,e=t.ue,r=t.fe,i+"://"+lr(e)+(null===r?"":":"+r);case"file":default:return Cr}var i,e,r}var no,io,eo=function(){function t(t,n){var i,e,r=null;if(null!=n)if(null!=(i=n)&&i instanceof eo&&"object"==typeof i.Qi)r=n.Qi;else try{r=$r(String(n),null)}catch(t){throw new h("Invalid base URL: "+t.message)}try{e=$r(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 Rr;return null!==t&&Er(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+="//",Wr(t)&&(i+=t.Ji,""!==t.$i&&(i+=":"+t.$i),i+="@"),i+=lr(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=$r(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&&Er(this.Yi,i)}},{key:"origin",get:function(){return to(this.Qi)}},{key:"protocol",get:function(){return this.Qi.Zi+":"},set:function(t){Jr(t+":",null,this.Qi,0)}},{key:"username",get:function(){return this.Qi.Ji},set:function(t){Gr(this.Qi)||(this.Qi.Ji=rr(t,tr))}},{key:"password",get:function(){return this.Qi.$i},set:function(t){Gr(this.Qi)||(this.Qi.$i=rr(t,tr))}},{key:"host",get:function(){var t=this.Qi,n=t.ue;if(null===n)return"";var i=t.fe,e=lr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Qi.oe||Jr(t,null,this.Qi,10)}},{key:"hostname",get:function(){var t=this.Qi.ue;return null===t?"":lr(t)},set:function(t){this.Qi.oe||Jr(t,null,this.Qi,11)}},{key:"port",get:function(){var t=this.Qi.fe;return null===t?"":""+t},set:function(t){Gr(this.Qi)||(""===t?this.Qi.fe=null:Jr(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,Jr(t,null,this.Qi,16))}},{key:"search",get:function(){var t=this.Qi.Yi;return null===t||""===t?"":"?"+t},set:function(t){t=pr(t);var n=this.Qi;if(""===t)return n.Yi=null,void Tr(this.Yi);"?"===t[0]&&(t=t.slice(1)),n.Yi="",Jr(t,null,n,19),Er(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="",Jr(t,null,this.Qi,20)):this.Qi._e=null}}])&&re(n.prototype,i),e&&re(n,e),t}();function ro(t){return t.document&&t.document.baseURI||t.location.href||""}function oo(){return void 0!==i?i.createElement("video"):void 0}function uo(){return io||(io=oo()),io}var so=!!("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch)||!(!e||!e.msMaxTouchPoints),fo=uo(),ho=!(!fo||!fo.webkitShowPlaybackTargetPicker),ao=function(){function t(){this.Pe=void 0,this.Oe=!1,this.Wt=so,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 ho}},{key:"Xe",get:function(){return!1}},{key:"ze",get:function(){return!0}},{key:"We",get:function(){return Ci.Cn||Ci.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}(),co=function(){var t=oo();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ci.$t)return!1;var t=oo();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var vo=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=co&&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}(ao),lo=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 Ci.un}}]),n}(vo),wo=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.Me=function(){if(!no.MediaSource)return 1},mt(n,[{key:"Qe",get:function(){return!0}}]),n}(lo),bo=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 Ci.An<3}},{key:"ze",get:function(){return Ci.An>=3}},{key:"Ke",get:function(){return Ci.An<3}}]),n}(vo),go=function(t){function n(){return t.call(this)||this}return Ut(n,t),n}(ao),mo=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=po(t.Je,"mp4a.40.2")&&po(n.Je,"mp4a.40.5"),e=po(t.Je,"mp4a.40.5")&&po(n.Je,"mp4a.40.2"),r=po(t.Je,"mp4a.40.2")&&po(n.Je,"mp4a.40.34"),o=po(t.Je,"mp4a.40.34")&&po(n.Je,"mp4a.40.2"),u=po(t.Je,"mp4a.40.5")&&po(n.Je,"mp4a.40.34"),s=po(t.Je,"mp4a.40.34")&&po(n.Je,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},mt(n,[{key:"Ye",get:function(){if(Ci.qt)return 4096}}]),n}(go);function po(t,n){return t.indexOf(n)>-1}var yo,_o=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),n.prototype.Fe=function(t){return t>=2},n}(go),So=function(t){function n(){var n;return(n=t.call(this)||this).Oe=Ci.Pn>=11,n.Be=Ci.Cn&&!(Ci.un&&Ci.Pn<10),n}return Ut(n,t),n}(go),Io=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),mt(n,[{key:"qe",get:function(){return!1}}]),n}(vo),To=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),mt(n,[{key:"je",get:function(){return!Ci.Gt||(Ci.wn?92!==Ci.yn:Ci._n>=100)}}]),n}(go),Eo=function(t){function n(){return t.apply(this,arguments)||this}return Ut(n,t),mt(n,[{key:"Qe",get:function(){return!0}}]),n}(vo),ko=function(){function n(){var n;this.$e=void 0,this.ir=new Gi,this.rr=new Ro,this.dr=(n=function(){if(Ci.Nn)return new mo;if(Ci.Sn||Ci.En)return new _o;if(Ci.Cn)return new So;if(Ci.dn)return new To;return new go}(),Ci.un?new wo(n):Ci.fn?new lo(n):Ci.pn?new bo(n):Ci.Tn?new Io(n):Ci.qt?new Eo(n):new vo(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=Vi}var i=n.prototype;return i.gr=function(){Mi.apply(void 0,arguments)},i.wr=function(){Wi.apply(void 0,arguments)},i.yr=function(){qi.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];ji.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=ro(no)),i="object"!=typeof n||n instanceof eo?n:n.href,new eo(t,i)},i.Br=function(n,i){if(void 0===i&&(i=ro(no)),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}(),Ro=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 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)}!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"}(yo||(yo={}));var Oo,Po=yo.Jr,Ao="urn:uuid:"+Po,Do="com.microsoft.playready",Co=yo.$r,xo="urn:uuid:"+Co,Bo=yo.ns,Fo="urn:uuid:"+Bo,Lo=yo.rs,zo="urn:uuid:"+Lo,Uo="com.apple.fps.1_0";!function(t){t.Jr="playready",t.$r="widevine",t.rs="fairplay",t.ns="clearkey",t.us="aes128"}(Oo||(Oo={}));var Mo={hs:Oo.Jr,fs:Do,vs:"cenc",ds:Po,ls:Ao,_s:"PlayReady"},Wo={hs:Oo.$r,fs:"com.widevine.alpha",vs:"cenc",ds:Co,ls:xo,_s:"Widevine"},qo={hs:Oo.rs,fs:Uo,vs:"skd",ds:Lo,ls:zo,_s:"FairPlay"};Oo.rs;var jo={hs:Oo.ns,fs:"org.w3.clearkey",vs:"cenc",ds:Bo,ls:Fo,_s:"ClearKey"},Vo=Ci.dn&&Ci._n>=42||Ci.Nn&&Ci.Dn>=38||Ci.Sn||Ci.In||Ci.On&&Ci.Bn>=29;function Ho(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 Xo,Go=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(Wo)},n.Ir=function(){return this.Pr(jo)},n.Nr=function(){return this.Pr(Mo)},n.Rr=function(){return this.Pr(qo)},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,[Ho(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,[Ho(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(Vo){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}(),Yo=["cenc"],Ko=function(t){function n(n){var i;return(i=t.call(this,"fu")||this).au=n,i}return Ut(n,t),n}(vi),Qo=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}(vi);!function(t){t.mu="yu",t.pu="bu"}(Xo||(Xo={}));var $o=new w([0]).buffer,Jo=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}(),Zo=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 An)},n.Bs=function(){this.Hu=void 0,this.Vu=void 0},t}();function tu(t,n){return t===Do?function(t){if(t.byteLength<2*nu.length)return t;if(Qn(new DataView(t,0,2*nu.length),!0)===nu)return t;return n=t,$n('<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">'+fi(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 nu="<PlayReady";var iu=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}(Nn),eu=function(t,n){return(eu=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 ru(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}eu(t,n),t.prototype=null===n?a.create(n):(i.prototype=n.prototype,new i)}function ou(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}function uu(t,n,i){return c.min(c.max(t,n),i)}function su(t,n){return t>>8-n}function fu(t,n){return t&(1<<n)-1}!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(){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=fu(this.Ku.get(this.Zu),8-this.Ju),n=su(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 hu=function(t,n){return t===n?0:t<n?-1:t>n?1:d(t)?d(n)?0:1:-1},au=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?ou(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=ou(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,hu)},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=uu(n,0,this.length),r=uu(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}(),cu=function(){function t(n){this.oo=n||t.BUFFER_CHUNK_SIZE,this.ao=!1,this.do=new au,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|=su(t,n+1),this.closeByte(),this.mo=fu(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|=su(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=fu(t[i-1],8-n),r=su(t[i],n+1);this.mo=e<<n+1|r,this.closeByte()}this.mo=fu(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}(),vu=function(){function t(t){this.rb=new au,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 cu),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}(),lu=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 vu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=c.pow(2,32),t}();function du(t,n){return t instanceof jt?64===n:t<c.pow(2,n)}function wu(t,n){return c.round(t*c.pow(2,n))}function bu(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}var gu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!du(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return ru(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);!function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}ru(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(au.from(this.data))}}(lu);var mu=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 pu(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<=yu)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=yu)i.push(String.fromCharCode.apply(String,t.slice(e,e+yu)));return i.join("")}(n)}var yu=16384;function _u(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Su(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 Iu(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 Eu(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 jt.fromBits(u,o,!0)}function ku(t,n){var i=_u(t,n);if(i)return String.fromCharCode(i)}function Ru(t,n,i){for(var e="",r=0;r<i;r++)e+=ku(t,n);return e}function Nu(t,n){var i,e=_u(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&_u(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&_u(t,n))+(63&_u(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&_u(t,n))+64*(63&_u(t,n))+(63&_u(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=Nu(t,n);if(void 0===r)break;if(i&&0===r)break;e.push(r)}return pu(e)}(t,n,!0)}var Pu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new mu(this.offset<<3)},t}(),Au=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return _u(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 jt.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Eu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Su(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 Ru(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 Du(t,n){return t.type===n}var Cu=8;function xu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Iu(t,n,Cu)){var e=n.offset+Cu;return{complete:!1,neededOffset:e}}var r=Tu(t,n),o=Ru(t,n,4);if(1===r){if(!Iu(t,n,8)){var e=n.offset+8;return n.seek(i),{complete:!1,neededOffset:e}}r=Eu(t,n).toNumber()}if("uuid"===o){if(!Iu(t,n,16)){var e=n.offset+16;return n.seek(i),{complete:!1,neededOffset:e}}o=Ru(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 Au((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 Pu(r.headerSize))};return n.seek(u),{complete:!0,box:c}}!function(t){function n(){return t.call(this,"mdir")||this}ru(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 ru(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}(gu));var Bu=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(!du(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}();!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}ru(n,t),a.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.Eo},set:function(t){if(!du(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(!du(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(!du(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(!du(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(!du(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)}}}(Bu),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}ru(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(au.from(this.data))}}(Bu);var Fu=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return ru(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(Bu);!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 Fu(r.fixed28BitMode),o}ru(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(!du(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(!du(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&&!du(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&&!du(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)}}(Bu);var Lu=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return ru(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}(lu),zu=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ru(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(Lu),Uu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return ru(n,t),a.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.Lo},set:function(t){if(!du(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}(zu),Mu=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 ru(n,t),a.defineProperty(n.prototype,"channelCount",{get:function(){return this.Mo},set:function(t){if(!du(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(!du(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(!du(wu(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(wu(this.sampleRate,16),32),this.extra&&bu(n.writer,this.extra)},n}(Uu);!function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}ru(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!du(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!du(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)}}}(gu),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}ru(n,t),a.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Ho},set:function(t){if(!du(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(!du(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(!du(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(!du(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(!du(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(!du(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(!du(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(!du(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)}}(lu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}ru(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!du(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!du(t.sampleCount,32)||!du(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)}}}(gu),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}ru(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))}}(gu),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}ru(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))}}(gu),function(t){function n(){return t.call(this,"dinf")||this}ru(n,t)}(zu);var Wu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!du(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return ru(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);!function(t){function n(){return t.call(this,"dref",0,0)||this}ru(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)}}(Wu);var qu=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 ru(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(!du(e.segmentDuration,this.bitSize))throw new f("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!du(e.mediaTime,this.bitSize))throw new f("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!du(e.mediaRateInteger,16))throw new f("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!du(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}(gu);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ru(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)}}}(qu),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ru(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)}}}(qu),function(t){function n(){return t.call(this,"edts")||this}ru(n,t)}(zu);var ju=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 ru(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(!du(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}(lu);!function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}ru(n,t)}(ju),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}ru(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(au.from(this.data))}}(lu);var Vu,Hu=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 ru(n,t),a.defineProperty(n.prototype,"creationTime",{get:function(){return this.Jo},set:function(t){if(!du(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(!du(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(!du(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(!du(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}(gu);!function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}ru(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)}}(Hu),function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}ru(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)}}(Hu),function(t){function n(){return t.call(this,"mdia")||this}ru(n,t)}(zu),function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new au,n}ru(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(lu),function(t){function n(){return t.call(this,"minf")||this}ru(n,t)}(zu),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}ru(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())}}(Wu),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"}(Vu||(Vu={}));var Xu,Gu,Yu={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ku(t,n){n.writer.writeUInt(wu(t.a,16),32),n.writer.writeUInt(wu(t.b,16),32),n.writer.writeUInt(wu(0,30),32),n.writer.writeUInt(wu(t.c,16),32),n.writer.writeUInt(wu(t.d,16),32),n.writer.writeUInt(wu(0,30),32),n.writer.writeUInt(wu(t.x,16),32),n.writer.writeUInt(wu(t.y,16),32),n.writer.writeUInt(wu(1,30),32)}function Qu(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Xu.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Gu.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Gu.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Gu.UNKNOWN,2)}function $u(t,n){var i,e,r;n.writer.writeUInt(0,4),Qu(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"}(Xu||(Xu={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Gu||(Gu={}));var Ju=function(){return function(){}}(),Zu=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 ru(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(!du(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(au.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(au.from(this.data))},n}(gu),ts=function(t){function n(n,i){return t.call(this,0,n,i)||this}return ru(n,t),n}(Zu),ns=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return ru(n,t),a.defineProperty(n.prototype,"kIds",{get:function(){return this.sh},set:function(t){if(!du(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(au.from(e))}},n}(Zu);var is=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 ru(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(!du(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}(gu);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ru(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)}}(is),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ru(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)}}(is),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}ru(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.oh},set:function(t){if(!du(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(!du(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(!du(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(!du(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)&&!du(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!du(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),$u(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)}}(gu),function(t){function n(){return t.call(this,"mvex")||this}ru(n,t)}(zu);var es=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:Yu,a.dh=e,a}return ru(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(!du(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(!du(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(!du(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(!du(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(!du(wu(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(!du(wu(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(!du(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(wu(this.rate,16),32),n.writer.writeUInt(wu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ku(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}(gu);!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}ru(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)}}(es),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}ru(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)}}(es);var rs=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:Yu,c}return ru(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(!du(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(!du(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(!du(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(!du(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(!du(wu(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(!du(wu(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(!du(wu(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(!du(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(!du(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(wu(this.volume,8),16),n.writer.writeUInt(0,16),Ku(this.matrix,n),n.writer.writeUInt(wu(this.width,16),32),n.writer.writeUInt(wu(this.height,16),32)},n}(gu);!function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}ru(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)}}(rs),function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}ru(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)}}(rs),function(t){function n(){return t.call(this,"trak")||this}ru(n,t)}(zu),function(t){function n(){return t.call(this,"moov")||this}ru(n,t)}(zu);var os=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 ru(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(!du(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}(gu);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ru(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)}}(os),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ru(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)}}(os),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}ru(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.oh},set:function(t){if(!du(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&&!du(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&&!du(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&&!du(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&&!du(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)&&!du(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!du(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&&$u(this.defaultSampleFlags,n)}}(gu),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}ru(n,t),a.defineProperty(n.prototype,"dataOffset",{get:function(){return this.Eh},set:function(t){if(t&&!du(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)&&!du(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!du(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(!du(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&&!du(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&&!du(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)&&!du(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)&&!du(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&&!du(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&&$u(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&&$u(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}}}(gu),function(t){function n(){return t.call(this,"traf")||this}ru(n,t)}(zu),function(t){function n(){return t.call(this,"moof")||this}ru(n,t)}(zu),function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}ru(n,t),a.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.Nh},set:function(t){if(!du(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)}}(gu);var us=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return ru(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}(lu);!function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}ru(n,t),a.defineProperty(n.prototype,"hSpacing",{get:function(){return this.Ch},set:function(t){if(!du(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(!du(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)}}(lu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}ru(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())}}(zu),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new us(n),r}ru(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())}}(lu);var ss=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 ru(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(!du(t.length,32))throw new f("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!du(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(!du(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!du(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}(gu);!function(t){function n(){return null!==t&&t.apply(this,arguments)||this}ru(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)}}}(ss),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}ru(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)}}}(ss),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}ru(n,t),a.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.Bh},set:function(t){if(!du(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(!du(t.length,32))throw new f("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!du(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(!du(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!du(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)}}}(gu),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}ru(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++){Qu(e[i],n)}}}(gu),function(t){function n(n){return t.call(this,"stsd",n,0)||this}ru(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)}}(Wu);var fs=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 ru(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}(gu);!function(t){function n(n,i){return t.call(this,0,n,i)||this}ru(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(fs),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}ru(n,t),a.defineProperty(n.prototype,"defaultLength",{get:function(){return this.Fh},set:function(t){if(!du(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)}}(fs),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}ru(n,t),a.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.hh},set:function(t){if(!du(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)}}(fs),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}ru(n,t),a.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.Uh},set:function(t){if(!du(t.length,32))throw new f("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!du(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)}}}(gu),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}ru(n,t),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.fh},set:function(t){if(!du(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(!du(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)}}(gu),function(t){function n(){return t.call(this,"stbl")||this}ru(n,t)}(zu),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}ru(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!du(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!du(t.firstChunk,32)||!du(t.sampleDescriptionIndex,32)||!du(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)}}}(gu),function(t){function n(){return t.call(this,"schi")||this}ru(n,t)}(zu),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}ru(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(!du(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))}}(gu);var hs=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 ru(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(!du(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(!du(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(!du(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(!du(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(!du(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(!du(e.referencedSize,31))throw new f("Provided referenced size does not fit in 31 bits.");if(!du(e.subsegmentDuration,32))throw new f("Provided subsegment duration does not fit in 31 bits.");if(!du(e.sapType,3))throw new f("Provided SAP type does not fit in 3 bits.");if(!du(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}(gu);!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}ru(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)}}(hs),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}ru(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)}}(hs),function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}ru(n,t)}(ju),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}ru(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(!du(wu(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(wu(this.balance,8),16),n.writer.writeUInt(0,16)}}(gu),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}ru(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!du(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!du(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)}}}(gu),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}ru(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Uo},set:function(t){if(!du(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!du(t.sampleCount,32)||!du(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)}}}(gu),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}ru(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.oh},set:function(t){if(!du(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)}}(Wu),function(t){function n(){return t.call(this,"udta")||this}ru(n,t)}(zu);var as={red:0,green:0,blue:0};!function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=as);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}ru(n,t),a.defineProperty(n.prototype,"opColor",{get:function(){return this.jh},set:function(t){if(!du(t.red,16)||!du(t.green,16)||!du(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)}}(gu);var cs=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 ru(n,t),a.defineProperty(n.prototype,"width",{get:function(){return this.wh},set:function(t){if(!du(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(!du(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(!du(wu(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(!du(wu(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(!du(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(!du(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(wu(this.horizontalResolution,16),32),n.writer.writeUInt(wu(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&&bu(n.writer,this.extra)},n}(Uu);!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}ru(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(au.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(gu),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}ru(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())}}(Mu),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}ru(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)}}(cs),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}ru(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)}}(Uu),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}ru(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(lu),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(!du(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(!du(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(!du(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(!du(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(!du(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(!du(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(au.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(au.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}ru(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())}}(cs),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}ru(n,t),a.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ro},set:function(t){if(!du(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(!du(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(!du(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)}}(lu);var vs=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 ru(n,t),a.defineProperty(n.prototype,"isProtected",{get:function(){return this.Ta},set:function(t){if(!du(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),bu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),bu(t.writer,this.constantIv))},n}(gu);!function(t){function n(n){return t.call(this,0,n)||this}ru(n,t)}(vs);var ls=function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return ru(n,t),a.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.Ra},set:function(t){if(!du(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(!du(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}(vs);function ds(t){return void 0!==t.iv}function ws(t){return void 0!==t.subsamples}!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new ls(n),i}ru(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ju),function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}ru(n,t),a.defineProperty(n.prototype,"samples",{get:function(){return this.Rh},set:function(t){var n;if(!du(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(ds(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=ws(r)),!0===n&&!ws(r)||!1===n&&ws(r))throw new f("Mix of samples with and without subsamples detected.");if(ws(r)){if(!du(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(!du(s.clearData,16))throw new f("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!du(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];ds(r)&&(n+=r.iv.length),ws(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(ds(r)&&bu(n.writer,r.iv),ws(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)}}(gu),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}ru(n,t),a.defineProperty(n.prototype,"timescale",{get:function(){return this.nh},set:function(t){if(!du(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(!du(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(!du(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(!du(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(au.from(this.data))}}(gu);var bs,gs,ms=(bs="pssh",gs=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 ns(i,s,e):new ts(i,s)},function(t){var n,i=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=xu(i,e);if(!r.complete)return;if(Du(r.box,n))return r.box}}(new Au((n=t,new DataView(n.buffer,n.byteOffset,n.byteLength)),new Pu),bs);if(!i)throw new f("".concat(bs," box not found"));return gs(i)}),ps=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 Qo(En(e),t.messageType,tu(e.Ha,t.message)))},e.Va=function(){e.Ba=!0,e.Oa.Du>0&&(e.Oa.Nu(),e.Ys(new Ko(En(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 Jo;var r=[];return e.Xa.closed&&r.push(j.resolve(e.Xa.closed)),e.Ma=new Zo,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 An);else{var r=J.Qn(function(){void 0!==n&&n.Ms(o),i()},t),o=function(){J.Gn(r),e(new An)};void 0!==n&&n.Ls(o)}}))),this.Ma.Xu(j.race(i).catch(ys)),this.Ba=!0,this.La},i.qa=function(t,n,i){if(Ci.hn){var e=ms(ii(n));if(1===e.version)n=new ts(e.systemId,e.data).serialize().join()}return j.resolve(this.Xa.generateRequest(t,n)).catch(ys)},i.Ga=function(t){return j.resolve(this.Xa.load(t)).catch(ys)},i.Qa=function(){return j.resolve(this.Xa.remove()).catch(ys)},i.Ya=function(t){return j.resolve(this.Xa.update(t)).catch(ys)},i.Fa=function(){var t=this;this.Oa.Nu(),this.Xa.keyStatuses.forEach(function(n,i){t.Ka(i,n)}),this.Ys(new Ko(this))},i.Ka=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=ii(t);if(this.Ha===Do&&16===e.byteLength){var r=ti(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===Do&&"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}(ci);function ys(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 iu(t.message,void 0,n,t)}var _s=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 ps(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}(),Ss=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 _s(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 Is(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 Es(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 ks(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Rs))||!(!t.videoCapabilities||!t.videoCapabilities.some(Rs))}function Rs(t){return!t.robustness}function Ns(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 Os,Ps,As=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=Es(o.audioCapabilities)),o.videoCapabilities&&(o.videoCapabilities=Es(o.videoCapabilities));if("com.widevine.alpha"!==t||!n.some(ks)){c.next=14;break}return u=n.map(function(t){return i="SW_SECURE_CRYPTO",No({},n=t,{videoCapabilities:n.videoCapabilities?Ns(n.videoCapabilities,i):void 0,audioCapabilities:n.audioCapabilities?Ns(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 Ss(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 Ss(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}(),Ds=function(){function t(){}return t.prototype.Ts=function(t,n){try{return j.resolve(function(t,n){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!==no.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"}(Ps||(Ps={})),function(t){(Ps||(Ps={})).fromCode=function(t){var n=c.floor(t/1e3);if(n in Ps)return n;throw new h("Invalid error code: "+t)}}();var xs=function(){function t(){}return t.prototype.Ts=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(!Bs())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.wc=function(){return Bs()},t}();function Bs(){return void 0!==no.WebKitMediaKeys}var Fs,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}(),zs=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 Zo,i.Hc="",i.zc=new Zo,i.Vc=new Jo,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 iu("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 Qo(this,"license-request",tu(this.Ha,ei(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 Zo,this.Uc=ii(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 Zo,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,ii(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($o,t),this.Ys(new Ko(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}(ci),Us=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 zs(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}(),Ms=function(){function t(t,n){this.ic=t,this.$c=n}var n=t.prototype;return n.vc=function(){return j.resolve(new Us(this.ic,this.$c))},n.dc=function(){return this.$c},t}(),Ws=function(){function t(){}return t.prototype.Ts=function(t,n){try{return j.resolve(qs(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 qs(t,n){if(!Ws.wc())throw new h("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Is(js,Yo,t,e);if(r)return new Ms(t,r)}throw new h("Unsupported key system configuration for "+t)}function js(t,n){var i=uo();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function Vs(){return Fs||(Fs=function(){var t=[];xs.wc()&&t.push(new xs);As.wc()&&t.push(new As);Ds.wc()&&t.push(new Ds);Ws.wc()&&t.push(new Ws);return new Ls(t)}()),Fs}var Hs=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}(),Xs=function(){function t(){}return t.ef=function(){return t.qn||(t.qn=Gs.wc()?new Gs:new Hs),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}();Xs.qn=void 0;var Gs=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}(Xs);var Ys=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 Ks(t,n,e){var r=Ys([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 Qs,$s;!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"}(Qs||(Qs={})),function(t){t.Wf="arraybuffer",t.qf="json",t.Gf="stream",t.Zn="text"}($s||($s={}));var Js=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=Zs(i),e=tf(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=Zs(t).toLowerCase();delete this.Zr[n]},n.get=function(t){var n=Zs(t).toLowerCase();return this.Zr.hasOwnProperty(n)?this.Zr[n][1]:null},n.has=function(t){var n=Zs(t).toLowerCase();return this.Zr.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=Zs(i)).toLowerCase();this.Zr[e]=[i,tf(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 Zs(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 tf(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(t){return"Symbol("+t+")"};function ef(){}var rf=void 0!==t?t:void 0!==n?n:"undefined"!=typeof global?global:void 0;function of(t){return"object"==typeof t&&null!==t||"function"==typeof t}var uf=ef,sf=j,ff=j.prototype.then,hf=j.resolve.bind(sf),af=j.reject.bind(sf);function cf(t){return new sf(t)}function vf(t){return hf(t)}function lf(t){return af(t)}function df(t,n,i){return ff.call(t,n,i)}function wf(t,n,i){df(df(t,n,i),void 0,uf)}function bf(t,n){wf(t,n)}function gf(t,n){wf(t,void 0,n)}function mf(t,n,i){return df(t,n,i)}function pf(t){df(t,void 0,uf)}var yf=function(){var t=rf&&rf.queueMicrotask;if("function"==typeof t)return t;var n=vf(void 0);return function(t){return df(n,t)}}();function _f(t,n,i){if("function"!=typeof t)throw new h("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Sf(t,n,i){try{return vf(_f(t,n,i))}catch(t){return lf(t)}}var If=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 Tf(t,n){t.ev=n,n.rv=t,"readable"===n.we?Nf(t):"closed"===n.we?function(t){Nf(t),Af(t)}(t):Of(t,n.uv)}function Ef(t,n){return kc(t.ev,n)}function kf(t){"readable"===t.ev.we?Pf(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 Rf(t){return new h("Cannot "+t+" a stream using a released reader")}function Nf(t){t.La=cf(function(n,i){t.ov=n,t.hv=i})}function Of(t,n){Nf(t),Pf(t,n)}function Pf(t,n){void 0!==t.hv&&(pf(t.La),t.hv(n),t.ov=void 0,t.hv=void 0)}function Af(t){void 0!==t.ov&&(t.ov(void 0),t.ov=void 0,t.hv=void 0)}var Df=nf("[[AbortSteps]]"),Cf=nf("[[ErrorSteps]]"),xf=nf("[[CancelSteps]]"),Bf=nf("[[PullSteps]]"),Ff=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 zf(t,n){if(void 0!==t&&("object"!=typeof(i=t)&&"function"!=typeof i))throw new h(n+" is not an object.");var i}function Uf(t,n){if("function"!=typeof t)throw new h(n+" is not a function.")}function Mf(t,n){if(!function(t){return"object"==typeof t&&null!==t||"function"==typeof t}(t))throw new h(n+" is not an object.")}function Wf(t,n,i){if(void 0===t)throw new h("Parameter "+n+" is required in '"+i+"'.")}function qf(t,n,i){if(void 0===t)throw new h(n+" is required in '"+i+"'.")}function jf(t){return Number(t)}function Vf(t){return 0===t?0:t}function Hf(t,n){var i=Number.MAX_SAFE_INTEGER,e=Number(t);if(e=Vf(e),!Ff(e))throw new h(n+" is not a finite number");if((e=function(t){return Vf(Lf(t))}(e))<0||e>i)throw new h(n+" is outside the accepted range of 0 to "+i+", inclusive");return Ff(e)&&0!==e?e:0}function Xf(t,n){if(!Tc(t))throw new h(n+" is not a ReadableStream.")}function Gf(t){return new th(t)}function Yf(t,n){t.rv.fv.push(n)}function Kf(t,n,i){var e=t.rv.fv.shift();i?e.vv():e._v(n)}function Qf(t){return t.rv.fv.length}function $f(t){var n=t.rv;return void 0!==n&&!!nh(n)}var Jf,Zf,th=function(){function t(t){if(Wf(t,1,"ReadableStreamDefaultReader"),Xf(t,"First parameter"),Ec(t))throw new h("This stream has already been locked for exclusive reading by another reader");Tf(this,t),this.fv=new If}return a.defineProperty(t.prototype,"closed",{get:function(){return nh(this)?this.La:lf(eh("closed"))},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),nh(this)?void 0===this.ev?lf(Rf("cancel")):Ef(this,t):lf(eh("cancel"))},t.prototype.read=function(){if(!nh(this))return lf(eh("read"));if(void 0===this.ev)return lf(Rf("read from"));var t,n,i=cf(function(i,e){t=i,n=e});return ih(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(!nh(this))throw eh("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");kf(this)}},t}();function nh(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"fv")&&t instanceof th)}function ih(t,n){var i=t.ev;i.mv=!0,"closed"===i.we?n.vv():"errored"===i.we?n.wv(i.uv):i.yv[Bf](n)}function eh(t){return new h("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}a.defineProperties(th.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(th.prototype,nf.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof nf.asyncIterator&&((Jf={})[nf.asyncIterator]=function(){return this},Zf=Jf,a.defineProperty(Zf,nf.asyncIterator,{enumerable:!1}));var rh=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?mf(this.pv,n,n):n(),this.pv},t.prototype.return=function(t){var n=this,i=function(){return n.Sv(t)};return this.pv?mf(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 lf(Rf("iterate"));var r=cf(function(t,e){n=t,i=e});return ih(e,{_v:function(i){t.pv=void 0,yf(function(){return n({value:i,done:!1})})},vv:function(){t.pv=void 0,t.bv=!0,kf(e),n({value:void 0,done:!0})},wv:function(n){t.pv=void 0,t.bv=!0,kf(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 lf(Rf("finish iterating"));if(!this.Av){var i=Ef(n,t);return kf(n),mf(i,function(){return{value:t,done:!0}})}return kf(n),vf({value:t,done:!0})},t}(),oh={next:function(){return uh(this)?this.Ev.next():lf(sh("next"))},return:function(t){return uh(this)?this.Ev.return(t):lf(sh("return"))}};function uh(t){if(!of(t))return!1;if(!a.prototype.hasOwnProperty.call(t,"Ev"))return!1;try{return t.Ev instanceof rh}catch(t){return!1}}function sh(t){return new h("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}void 0!==Zf&&a.setPrototypeOf(oh,Zf);var fh=Number.isNaN||function(t){return t!=t};function hh(t){return t.slice()}function ah(t,n,i,e,r){new w(t).set(new w(i,e,r),n)}function ch(t){return t}function vh(t,n,i){if(t.slice)return t.slice(n,i);var e=i-n,r=new ArrayBuffer(e);return ah(r,0,t,n,e),r}function lh(t){var n=vh(t.buffer,t.byteOffset,t.byteOffset+t.byteLength);return new w(n)}function dh(t){var n=t.Iv.shift();return t.Rv-=n.size,t.Rv<0&&(t.Rv=0),n.value}function wh(t,n,i){if("number"!=typeof(e=i)||fh(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 bh(t){t.Iv=new If,t.Rv=0}var gh=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"view",{get:function(){if(!yh(this))throw qh("view");return this.Nv},enumerable:!1,configurable:!0}),t.prototype.respond=function(t){if(!yh(this))throw qh("respond");if(Wf(t,1,"respond"),t=Hf(t,"First parameter"),void 0===this.Dv)throw new h("This BYOB request has been invalidated");this.Nv.buffer,Uh(this.Dv,t)},t.prototype.respondWithNewView=function(t){if(!yh(this))throw qh("respondWithNewView");if(Wf(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,Mh(this.Dv,t)},t}();a.defineProperties(gh.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(gh.prototype,nf.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var mh=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"byobRequest",{get:function(){if(!ph(this))throw jh("byobRequest");return Lh(this)},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!ph(this))throw jh("desiredSize");return zh(this)},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(!ph(this))throw jh("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");xh(this)},t.prototype.enqueue=function(t){if(!ph(this))throw jh("enqueue");if(Wf(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");Bh(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!ph(this))throw jh("error");Fh(this,t)},t.prototype[xf]=function(t){Sh(this),bh(this);var n=this.Ov(t);return Ch(this),n},t.prototype[Bf]=function(t){var n=this.Pv;if(this.Rv>0){var i=this.Iv.shift();this.Rv-=i.byteLength,Nh(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)}Yf(n,t),_h(this)}},t}();function ph(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"Pv")&&t instanceof mh)}function yh(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"Dv")&&t instanceof gh)}function _h(t){(function(t){var n=t.Pv;if("readable"!==n.we)return!1;if(t.Cv)return!1;if(!t.Mv)return!1;if($f(n)&&Qf(n)>0)return!0;if(Gh(n)&&Xh(n)>0)return!0;if(zh(t)>0)return!0;return!1})(t)&&(t.xv?t.Fv=!0:(t.xv=!0,wf(t.Uv(),function(){t.xv=!1,t.Fv&&(t.Fv=!1,_h(t))},function(n){Fh(t,n)})))}function Sh(t){Oh(t),t.Lv=new If}function Ih(t,n){var i=!1;"closed"===t.we&&(i=!0);var e=Th(n);"default"===n.readerType?Kf(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 Eh(t,n,i,e){t.Iv.push({buffer:n,byteOffset:i,byteLength:e}),t.Rv+=e}function kh(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;ah(n.buffer,l,a.buffer,a.byteOffset,v),a.byteLength===v?h.shift():(a.byteOffset+=v,a.byteLength-=v),t.Rv-=v,Rh(t,v,n),s-=v}return f}function Rh(t,n,i){i.bytesFilled+=n}function Nh(t){0===t.Rv&&t.Cv?(Ch(t),Rc(t.Pv)):_h(t)}function Oh(t){null!==t.Vv&&(t.Vv.Dv=void 0,t.Vv.Nv=null,t.Vv=null)}function Ph(t){for(;t.Lv.length>0;){if(0===t.Rv)return;var n=t.Lv.peek();kh(t,n)&&(Dh(t),Ih(t.Pv,n))}}function Ah(t,n){var i=t.Lv.peek();Oh(t),"closed"===t.Pv.we?function(t,n){var i=t.Pv;if(Gh(i))for(;Xh(i)>0;)Ih(i,Dh(t))}(t):function(t,n,i){if(Rh(0,n,i),!(i.bytesFilled<i.elementSize)){Dh(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=vh(i.buffer,r-e,r);Eh(t,o,0,o.byteLength)}i.bytesFilled-=e,Ih(t.Pv,i),Ph(t)}}(t,n,i),_h(t)}function Dh(t){return t.Lv.shift()}function Ch(t){t.Uv=void 0,t.Ov=void 0}function xh(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 Fh(t,i),i}Ch(t),Rc(n)}}function Bh(t,n){var i=t.Pv;if(!t.Cv&&"readable"===i.we){var e=n.buffer,r=n.byteOffset,o=n.byteLength,u=ch(e);if(t.Lv.length>0){var s=t.Lv.peek();s.buffer,0,s.buffer=ch(s.buffer)}if(Oh(t),$f(i))if(0===Qf(i))Eh(t,u,r,o);else t.Lv.length>0&&Dh(t),Kf(i,new w(u,r,o),!1);else Gh(i)?(Eh(t,u,r,o),Ph(t)):Eh(t,u,r,o);_h(t)}}function Fh(t,n){var i=t.Pv;"readable"===i.we&&(Sh(t),bh(t),Ch(t),Nc(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(gh.prototype);!function(t,n,i){t.Dv=n,t.Nv=i}(e,t,i),t.Vv=e}return t.Vv}function zh(t){var n=t.Pv.we;return"errored"===n?null:"closed"===n?0:t.Xv-t.Rv}function Uh(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=ch(i.buffer),Ah(t,n)}function Mh(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=ch(n.buffer),Ah(t,e)}function Wh(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,bh(n),n.Cv=!1,n.Mv=!1,n.Xv=o,n.Uv=e,n.Ov=r,n.Bv=u,n.Lv=new If,t.yv=n,wf(vf(i()),function(){n.Mv=!0,_h(n)},function(t){Fh(n,t)})}function qh(t){return new h("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function jh(t){return new h("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Vh(t){return new Yh(t)}function Hh(t,n){t.rv.Hv.push(n)}function Xh(t){return t.rv.Hv.length}function Gh(t){var n=t.rv;return void 0!==n&&!!Kh(n)}a.defineProperties(mh.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(mh.prototype,nf.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var Yh=function(){function t(t){if(Wf(t,1,"ReadableStreamBYOBReader"),Xf(t,"First parameter"),Ec(t))throw new h("This stream has already been locked for exclusive reading by another reader");if(!ph(t.yv))throw new h("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Tf(this,t),this.Hv=new If}return a.defineProperty(t.prototype,"closed",{get:function(){return Kh(this)?this.La:lf($h("closed"))},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),Kh(this)?void 0===this.ev?lf(Rf("cancel")):Ef(this,t):lf($h("cancel"))},t.prototype.read=function(t){if(!Kh(this))return lf($h("read"));if(!ArrayBuffer.isView(t))return lf(new h("view must be an array buffer view"));if(0===t.byteLength)return lf(new h("view must have non-zero byteLength"));if(0===t.buffer.byteLength)return lf(new h("view's buffer must have non-zero byteLength"));if(t.buffer,void 0===this.ev)return lf(Rf("read from"));var n,i,e=cf(function(t,e){n=t,i=e});return Qh(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(!Kh(this))throw $h("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");kf(this)}},t}();function Kh(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"Hv")&&t instanceof Yh)}function Qh(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=ch(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 Hh(e,i);if("closed"!==e.we){if(t.Rv>0){if(kh(t,s)){var f=Th(s);return Nh(t),void i._v(f)}if(t.Cv){var a=new h("Insufficient bytes to fill elements in the given buffer");return Fh(t,a),void i.wv(a)}}t.Lv.push(s),Hh(e,i),_h(t)}else{var c=new o(s.buffer,s.byteOffset,0);i.vv(c)}}(e.yv,n,i)}function $h(t){return new h("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}function Jh(t,n){var i=t.highWaterMark;if(void 0===i)return n;if(fh(i)||i<0)throw new RangeError("Invalid highWaterMark");return i}function Zh(t){var n=t.size;return n||function(){return 1}}function ta(t,n){zf(t,n);var i=null==t?void 0:t.highWaterMark,e=null==t?void 0:t.size;return{highWaterMark:void 0===i?void 0:jf(i),size:void 0===e?void 0:na(e,n+" has member 'size' that")}}function na(t,n){return Uf(t,n),function(n){return jf(t(n))}}function ia(t,n,i){return Uf(t,i),function(i){return Sf(t,n,[i])}}function ea(t,n,i){return Uf(t,i),function(){return Sf(t,n,[])}}function ra(t,n,i){return Uf(t,i),function(i){return _f(t,n,[i])}}function oa(t,n,i){return Uf(t,i),function(i,e){return Sf(t,n,[i,e])}}function ua(t,n){if(!ca(t))throw new h(n+" is not a WritableStream.")}a.defineProperties(Yh.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(Yh.prototype,nf.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var sa="function"==typeof AbortController;var fa=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),void 0===t?t=null:Mf(t,"First parameter");var i=ta(n,"Second parameter"),e=function(t,n){zf(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:ia(i,t,n+" has member 'abort' that"),close:void 0===e?void 0:ea(e,t,n+" has member 'close' that"),start:void 0===r?void 0:ra(r,t,n+" has member 'start' that"),write:void 0===u?void 0:oa(u,t,n+" has member 'write' that"),type:o}}(t,"First parameter");if(aa(this),void 0!==e.type)throw new RangeError("Invalid type is specified");var r=Zh(i);!function(t,n,i,e){var r=a.create(Oa.prototype),o=function(){},u=function(){return vf(void 0)},s=function(){return vf(void 0)},f=function(){return vf(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)});Aa(t,r,o,u,s,f,i,e)}(this,e,Jh(i,1),r)}return a.defineProperty(t.prototype,"locked",{get:function(){if(!ca(this))throw za("locked");return va(this)},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){return void 0===t&&(t=void 0),ca(this)?va(this)?lf(new h("Cannot abort a stream that already has a writer")):la(this,t):lf(za("abort"))},t.prototype.close=function(){return ca(this)?va(this)?lf(new h("Cannot close a stream that already has a writer")):ma(this)?lf(new h("Cannot close an already-closing stream")):da(this):lf(za("close"))},t.prototype.getWriter=function(){if(!ca(this))throw za("getWriter");return ha(this)},t}();function ha(t){return new _a(t)}function aa(t){t.we="writable",t.uv=void 0,t.po=void 0,t.zv=void 0,t.Wv=new If,t.qv=void 0,t.Gv=void 0,t.Qv=void 0,t.Yv=void 0,t.Kv=!1}function ca(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"zv")&&t instanceof fa)}function va(t){return void 0!==t.po}function la(t,n){var i;if("closed"===t.we||"errored"===t.we)return vf(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 vf(void 0);if(void 0!==t.Yv)return t.Yv.$v;var r=!1;"erroring"===e&&(r=!0,n=void 0);var o=cf(function(i,e){t.Yv={$v:void 0,Hu:i,Vu:e,td:n,ed:r}});return t.Yv.$v=o,r||ba(t,n),o}function da(t){var n=t.we;if("closed"===n||"errored"===n)return lf(new h("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i,e=cf(function(n,i){var e={Hu:n,Vu:i};t.Gv=e}),r=t.po;return void 0!==r&&t.Kv&&"writable"===n&&Qa(r),wh(i=t.zv,Na,0),xa(i),e}function wa(t,n){"writable"!==t.we?ga(t):ba(t,n)}function ba(t,n){var i=t.zv;t.we="erroring",t.uv=n;var e=t.po;void 0!==e&&Ea(e,n),!function(t){if(void 0===t.qv&&void 0===t.Qv)return!1;return!0}(t)&&i.Mv&&ga(t)}function ga(t){t.we="errored",t.zv[Cf]();var n=t.uv;if(t.Wv.forEach(function(t){t.Vu(n)}),t.Wv=new If,void 0!==t.Yv){var i=t.Yv;if(t.Yv=void 0,i.ed)return i.Vu(n),void pa(t);wf(t.zv[Df](i.td),function(){i.Hu(),pa(t)},function(n){i.Vu(n),pa(t)})}else pa(t)}function ma(t){return void 0!==t.Gv||void 0!==t.Qv}function pa(t){void 0!==t.Gv&&(t.Gv.Vu(t.uv),t.Gv=void 0);var n=t.po;void 0!==n&&Va(n,t.uv)}function ya(t,n){var i=t.po;void 0!==i&&n!==t.Kv&&(n?function(t){Xa(t)}(i):Qa(i)),t.Kv=n}a.defineProperties(fa.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(fa.prototype,nf.toStringTag,{value:"WritableStream",configurable:!0});var _a=function(){function t(t){if(Wf(t,1,"WritableStreamDefaultWriter"),ua(t,"First parameter"),va(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)!ma(t)&&t.Kv?Xa(this):Ya(this),qa(this);else if("erroring"===i)Ga(this,t.uv),qa(this);else if("closed"===i)Ya(this),qa(n=this),Ha(n);else{var e=t.uv;Ga(this,e),ja(this,e)}}return a.defineProperty(t.prototype,"closed",{get:function(){return Sa(this)?this.La:lf(Ma("closed"))},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Sa(this))throw Ma("desiredSize");if(void 0===this.rd)throw Wa("desiredSize");return function(t){var n=t.rd,i=n.we;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Ca(n.zv)}(this)},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"ready",{get:function(){return Sa(this)?this.ud:lf(Ma("ready"))},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){return void 0===t&&(t=void 0),Sa(this)?void 0===this.rd?lf(Wa("abort")):function(t,n){return la(t.rd,n)}(this,t):lf(Ma("abort"))},t.prototype.close=function(){if(!Sa(this))return lf(Ma("close"));var t=this.rd;return void 0===t?lf(Wa("close")):ma(t)?lf(new h("Cannot close an already-closing stream")):Ia(this)},t.prototype.releaseLock=function(){if(!Sa(this))throw Ma("releaseLock");void 0!==this.rd&&ka(this)},t.prototype.write=function(t){return void 0===t&&(t=void 0),Sa(this)?void 0===this.rd?lf(Wa("write to")):Ra(this,t):lf(Ma("write"))},t}();function Sa(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"rd")&&t instanceof _a)}function Ia(t){return da(t.rd)}function Ta(t,n){"pending"===t.od?Va(t,n):function(t,n){ja(t,n)}(t,n)}function Ea(t,n){"pending"===t.hd?Ka(t,n):function(t,n){Ga(t,n)}(t,n)}function ka(t){var n=t.rd,i=new h("Writer was released and can no longer be used to monitor the stream's closedness");Ea(t,i),Ta(t,i),n.po=void 0,t.rd=void 0}function Ra(t,n){var i=t.rd,e=i.zv,r=function(t,n){try{return t.fd(n)}catch(n){return Ba(t,n),1}}(e,n);if(i!==t.rd)return lf(Wa("write to"));var o=i.we;if("errored"===o)return lf(i.uv);if(ma(i)||"closed"===o)return lf(new h("The stream is closing or closed and cannot be written to"));if("erroring"===o)return lf(i.uv);var u=function(t){return cf(function(n,i){var e={Hu:n,Vu:i};t.Wv.push(e)})}(i);return function(t,n,i){try{wh(t,n,i)}catch(n){return void Ba(t,n)}var e=t.vd;if(!ma(e)&&"writable"===e.we){var r=Fa(t);ya(e,r)}xa(t)}(e,n,r),u}a.defineProperties(_a.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(_a.prototype,nf.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var Na={},Oa=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"abortReason",{get:function(){if(!Pa(this))throw Ua("abortReason");return this.Zv},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"signal",{get:function(){if(!Pa(this))throw Ua("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),!Pa(this))throw Ua("error");"writable"===this.vd.we&&La(this,t)},t.prototype[Df]=function(t){var n=this.dd(t);return Da(this),n},t.prototype[Cf]=function(){bh(this)},t}();function Pa(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"vd")&&t instanceof Oa)}function Aa(t,n,i,e,r,o,u,s){n.vd=t,t.zv=n,n.Iv=void 0,n.Rv=void 0,bh(n),n.Zv=void 0,n.Jv=function(){if(sa)return new AbortController}(),n.Mv=!1,n.fd=s,n.Xv=u,n.ld=e,n._d=r,n.dd=o;var f=Fa(n);ya(t,f),wf(vf(i()),function(){n.Mv=!0,xa(n)},function(i){n.Mv=!0,wa(t,i)})}function Da(t){t.ld=void 0,t._d=void 0,t.dd=void 0,t.fd=void 0}function Ca(t){return t.Xv-t.Rv}function xa(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===Na?function(t){var n=t.vd;(function(t){t.Qv=t.Gv,t.Gv=void 0})(n),dh(t);var i=t._d();Da(t),wf(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&&Ha(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),wa(t,n)}(n,t)})}(t):function(t,n){var i=t.vd;(function(t){t.qv=t.Wv.shift()})(i),wf(t.ld(n),function(){!function(t){t.qv.Hu(void 0),t.qv=void 0}(i);var n=i.we;if(dh(t),!ma(i)&&"writable"===n){var e=Fa(t);ya(i,e)}xa(t)},function(n){"writable"===i.we&&Da(t),function(t,n){t.qv.Vu(n),t.qv=void 0,wa(t,n)}(i,n)})}(t,i)}}else ga(n)}function Ba(t,n){"writable"===t.vd.we&&La(t,n)}function Fa(t){return Ca(t)<=0}function La(t,n){var i=t.vd;Da(t),ba(i,n)}function za(t){return new h("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Ua(t){return new h("WritableStreamDefaultController.prototype."+t+" can only be used on a WritableStreamDefaultController")}function Ma(t){return new h("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Wa(t){return new h("Cannot "+t+" a stream using a released writer")}function qa(t){t.La=cf(function(n,i){t.ov=n,t.hv=i,t.od="pending"})}function ja(t,n){qa(t),Va(t,n)}function Va(t,n){void 0!==t.hv&&(pf(t.La),t.hv(n),t.ov=void 0,t.hv=void 0,t.od="rejected")}function Ha(t){void 0!==t.ov&&(t.ov(void 0),t.ov=void 0,t.hv=void 0,t.od="resolved")}function Xa(t){t.ud=cf(function(n,i){t.wd=n,t.md=i}),t.hd="pending"}function Ga(t,n){Xa(t),Ka(t,n)}function Ya(t){Xa(t),Qa(t)}function Ka(t,n){void 0!==t.md&&(pf(t.ud),t.md(n),t.wd=void 0,t.md=void 0,t.hd="rejected")}function Qa(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 nf.toStringTag&&a.defineProperty(Oa.prototype,nf.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var $a="undefined"!=typeof DOMException?DOMException:void 0;var Ja,Za=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}($a)?$a:((Ja=function(t,n){this.message=t||"",this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=a.create(f.prototype),a.defineProperty(Ja.prototype,"constructor",{value:Ja,writable:!0,configurable:!0}),Ja);function tc(t,n,i,e,r,o){var u=Gf(t),s=ha(n);t.mv=!0;var f=!1,a=vf(void 0);return cf(function(c,v){var l,d,w,b;if(void 0!==o){if(l=function(){var i=new Za("Aborted","AbortError"),o=[];e||o.push(function(){return"writable"===n.we?la(n,i):vf(void 0)}),r||o.push(function(){return"readable"===t.we?kc(t,i):vf(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 la(n,t)},!0,t)}),p(n,s.La,function(n){r?_(!0,n):y(function(){return kc(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 ma(n)||"closed"===i?vf(void 0):"errored"===i?lf(n.uv):Ia(t)}(s)})},"closed"===d.we?b():bf(w,b),ma(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 kc(t,g)},!0,g)}function m(){var t=a;return df(a,function(){return t!==a?m():void 0})}function p(t,n,i){"errored"===t.we?i(t.uv):gf(n,i)}function y(t,i,e){function r(){wf(t(),function(){return S(i,e)},function(t){return S(!0,t)})}f||(f=!0,"writable"!==n.we||ma(n)?r():bf(m(),r))}function _(t,i){f||(f=!0,"writable"!==n.we||ma(n)?S(t,i):bf(m(),function(){return S(t,i)}))}function S(t,n){ka(s),kf(u),void 0!==o&&o.removeEventListener("abort",l),t?v(n):c(void 0)}pf(cf(function(t,n){!function i(e){e?t():df(f?vf(!0):df(s.ud,function(){return cf(function(t,n){ih(u,{_v:function(n){a=df(Ra(s,n),void 0,ef),t(!1)},vv:function(){return t(!0)},wv:n})})}),i,n)}(!1)}))})}var nc=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!ic(this))throw vc("desiredSize");return hc(this)},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(!ic(this))throw vc("close");if(!ac(this))throw new h("The stream is not in a state that permits close");uc(this)},t.prototype.enqueue=function(t){if(void 0===t&&(t=void 0),!ic(this))throw vc("enqueue");if(!ac(this))throw new h("The stream is not in a state that permits enqueue");return sc(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!ic(this))throw vc("error");fc(this,t)},t.prototype[xf]=function(t){bh(this);var n=this.Ov(t);return oc(this),n},t.prototype[Bf]=function(t){var n=this.yd;if(this.Iv.length>0){var i=dh(this);this.Cv&&0===this.Iv.length?(oc(this),Rc(n)):ec(this),t._v(i)}else Yf(n,t),ec(this)},t}();function ic(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"yd")&&t instanceof nc)}function ec(t){rc(t)&&(t.xv?t.Fv=!0:(t.xv=!0,wf(t.Uv(),function(){t.xv=!1,t.Fv&&(t.Fv=!1,ec(t))},function(n){fc(t,n)})))}function rc(t){var n=t.yd;return!!ac(t)&&(!!t.Mv&&(!!(Ec(n)&&Qf(n)>0)||hc(t)>0))}function oc(t){t.Uv=void 0,t.Ov=void 0,t.fd=void 0}function uc(t){if(ac(t)){var n=t.yd;t.Cv=!0,0===t.Iv.length&&(oc(t),Rc(n))}}function sc(t,n){if(ac(t)){var i=t.yd;if(Ec(i)&&Qf(i)>0)Kf(i,n,!1);else{var e=void 0;try{e=t.fd(n)}catch(n){throw fc(t,n),n}try{wh(t,n,e)}catch(n){throw fc(t,n),n}}ec(t)}}function fc(t,n){var i=t.yd;"readable"===i.we&&(bh(t),oc(t),Nc(i,n))}function hc(t){var n=t.yd.we;return"errored"===n?null:"closed"===n?0:t.Xv-t.Rv}function ac(t){var n=t.yd.we;return!t.Cv&&"readable"===n}function cc(t,n,i,e,r,o,u){n.yd=t,n.Iv=void 0,n.Rv=void 0,bh(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,wf(vf(i()),function(){n.Mv=!0,ec(n)},function(t){fc(n,t)})}function vc(t){return new h("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}function lc(t,n){return ph(t.yv)?function(t){var n,i,e,r,o,u=Gf(t),s=!1,f=!1,h=!1,a=!1,c=!1,v=cf(function(t){o=t});function l(t){gf(t.La,function(n){t===u&&(Fh(e.yv,n),Fh(r.yv,n),a&&c||o(void 0))})}function d(){Kh(u)&&(kf(u),l(u=Gf(t)));var n={_v:function(n){yf(function(){f=!1,h=!1;var i=n,u=n;if(!a&&!c)try{u=lh(n)}catch(n){return Fh(e.yv,n),Fh(r.yv,n),void o(kc(t,n))}a||Bh(e.yv,i),c||Bh(r.yv,u),s=!1,f?b():h&&g()})},vv:function(){s=!1,a||xh(e.yv),c||xh(r.yv),e.yv.Lv.length>0&&Uh(e.yv,0),r.yv.Lv.length>0&&Uh(r.yv,0),a&&c||o(void 0)},wv:function(){s=!1}};ih(u,n)}function w(n,i){nh(u)&&(kf(u),l(u=Vh(t)));var v=i?r:e,d=i?e:r,w={_v:function(n){yf(function(){f=!1,h=!1;var e=i?c:a,r=i?a:c;if(r)e||Mh(v.yv,n);else{var u=void 0;try{u=lh(n)}catch(n){return Fh(v.yv,n),Fh(d.yv,n),void o(kc(t,n))}e||Mh(v.yv,n),Bh(d.yv,u)}s=!1,f?b():h&&g()})},vv:function(t){s=!1;var n=i?c:a,e=i?a:c;n||xh(v.yv),e||xh(d.yv),void 0!==t&&(n||Mh(v.yv,t),!e&&d.yv.Lv.length>0&&Uh(d.yv,0)),n&&e||o(void 0)},wv:function(){s=!1}};Qh(u,n,w)}function b(){if(s)return f=!0,vf(void 0);s=!0;var t=Lh(e.yv);return null===t?d():w(t.Nv,!1),vf(void 0)}function g(){if(s)return h=!0,vf(void 0);s=!0;var t=Lh(r.yv);return null===t?d():w(t.Nv,!0),vf(void 0)}function m(){}return e=Sc(m,b,function(e){if(a=!0,n=e,c){var r=hh([n,i]),u=kc(t,r);o(u)}return v}),r=Sc(m,g,function(e){if(c=!0,i=e,a){var r=hh([n,i]),u=kc(t,r);o(u)}return v}),l(u),[e,r]}(t):function(t,n){var i,e,r,o,u,s=Gf(t),f=!1,h=!1,a=!1,c=!1,v=cf(function(t){u=t});function l(){if(f)return h=!0,vf(void 0);f=!0;var t={_v:function(t){yf(function(){h=!1;var n=t,i=t;a||sc(r.yv,n),c||sc(o.yv,i),f=!1,h&&l()})},vv:function(){f=!1,a||uc(r.yv),c||uc(o.yv),a&&c||u(void 0)},wv:function(){f=!1}};return ih(s,t),vf(void 0)}function d(){}return r=_c(d,l,function(n){if(a=!0,i=n,c){var r=hh([i,e]),o=kc(t,r);u(o)}return v}),o=_c(d,l,function(n){if(c=!0,e=n,a){var r=hh([i,e]),o=kc(t,r);u(o)}return v}),gf(s.La,function(t){fc(r.yv,t),fc(o.yv,t),a&&c||u(void 0)}),[r,o]}(t)}function dc(t,n,i){return Uf(t,i),function(i){return Sf(t,n,[i])}}function wc(t,n,i){return Uf(t,i),function(i){return Sf(t,n,[i])}}function bc(t,n,i){return Uf(t,i),function(i){return _f(t,n,[i])}}function gc(t,n){if("bytes"!==(t=""+t))throw new h(n+" '"+t+"' is not a valid enumeration value for ReadableStreamType");return t}function mc(t,n){if("byob"!==(t=""+t))throw new h(n+" '"+t+"' is not a valid enumeration value for ReadableStreamReaderMode");return t}function pc(t,n){zf(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(nc.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(nc.prototype,nf.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var yc=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),void 0===t?t=null:Mf(t,"First parameter");var i=ta(n,"Second parameter"),e=function(t,n){zf(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:Hf(e,n+" has member 'autoAllocateChunkSize' that"),cancel:void 0===r?void 0:dc(r,i,n+" has member 'cancel' that"),pull:void 0===o?void 0:wc(o,i,n+" has member 'pull' that"),start:void 0===u?void 0:bc(u,i,n+" has member 'start' that"),type:void 0===s?void 0:gc(s,n+" has member 'type' that")}}(t,"First parameter");if(Ic(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(mh.prototype),r=function(){},o=function(){return vf(void 0)},u=function(){return vf(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");Wh(t,e,r,o,u,i,s)}(this,e,Jh(i,0))}else{var r=Zh(i);!function(t,n,i,e){var r=a.create(nc.prototype),o=function(){},u=function(){return vf(void 0)},s=function(){return vf(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)}),cc(t,r,o,u,s,i,e)}(this,e,Jh(i,1),r)}}return a.defineProperty(t.prototype,"locked",{get:function(){if(!Tc(this))throw Oc("locked");return Ec(this)},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),Tc(this)?Ec(this)?lf(new h("Cannot cancel a stream that already has a reader")):kc(this,t):lf(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){zf(t,n);var i=null==t?void 0:t.mode;return{mode:void 0===i?void 0:mc(i,n+" has member 'mode' that")}}(t,"First parameter").mode?Gf(this):Vh(this)},t.prototype.pipeThrough=function(t,n){if(void 0===n&&(n={}),!Tc(this))throw Oc("pipeThrough");Wf(t,1,"pipeThrough");var i=function(t,n){zf(t,n);var i=null==t?void 0:t.readable;qf(i,"readable","ReadableWritablePair"),Xf(i,n+" has member 'readable' that");var e=null==t?void 0:t.writable;return qf(e,"writable","ReadableWritablePair"),ua(e,n+" has member 'writable' that"),{readable:i,writable:e}}(t,"First parameter"),e=pc(n,"Second parameter");if(Ec(this))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(va(i.writable))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return pf(tc(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 lf(Oc("pipeTo"));if(void 0===t)return lf("Parameter 1 is required in 'pipeTo'.");if(!ca(t))return lf(new h("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var i;try{i=pc(n,"Second parameter")}catch(t){return lf(t)}return Ec(this)?lf(new h("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):va(t)?lf(new h("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):tc(this,t,i.preventClose,i.preventAbort,i.preventCancel,i.signal)},t.prototype.tee=function(){if(!Tc(this))throw Oc("tee");return hh(lc(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){zf(t,n);var i=null==t?void 0:t.preventCancel;return{preventCancel:Boolean(i)}}(t,"First parameter");return n=this,i=u.preventCancel,e=Gf(n),r=new rh(e,i),(o=a.create(oh)).Ev=r,o},t}();function _c(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=a.create(yc.prototype);return Ic(o),cc(o,a.create(nc.prototype),t,n,i,e,r),o}function Sc(t,n,i){var e=a.create(yc.prototype);return Ic(e),Wh(e,a.create(mh.prototype),t,n,i,0,void 0),e}function Ic(t){t.we="readable",t.rv=void 0,t.uv=void 0,t.mv=!1}function Tc(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"yv")&&t instanceof yc)}function Ec(t){return void 0!==t.rv}function kc(t,n){if(t.mv=!0,"closed"===t.we)return vf(void 0);if("errored"===t.we)return lf(t.uv);Rc(t);var i=t.rv;return void 0!==i&&Kh(i)&&(i.Hv.forEach(function(t){t.vv(void 0)}),i.Hv=new If),mf(t.yv[xf](n),ef)}function Rc(t){t.we="closed";var n=t.rv;void 0!==n&&(Af(n),nh(n)&&(n.fv.forEach(function(t){t.vv()}),n.fv=new If))}function Nc(t,n){t.we="errored",t.uv=n;var i=t.rv;void 0!==i&&(Pf(i,n),nh(i)?(i.fv.forEach(function(t){t.wv(n)}),i.fv=new If):(i.Hv.forEach(function(t){t.wv(n)}),i.Hv=new If))}function Oc(t){return new h("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}function Pc(t,n){zf(t,n);var i=null==t?void 0:t.highWaterMark;return qf(i,"highWaterMark","QueuingStrategyInit"),{highWaterMark:jf(i)}}a.defineProperties(yc.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(yc.prototype,nf.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof nf.asyncIterator&&a.defineProperty(yc.prototype,nf.asyncIterator,{value:yc.prototype.values,writable:!0,configurable:!0});var Ac=function(t){return t.byteLength};try{a.defineProperty(Ac,"name",{value:"size",configurable:!0})}catch(Jf){}var Dc=function(){function t(t){Wf(t,1,"ByteLengthQueuingStrategy"),t=Pc(t,"First parameter"),this.kd=t.highWaterMark}return a.defineProperty(t.prototype,"highWaterMark",{get:function(){if(!xc(this))throw Cc("highWaterMark");return this.kd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"size",{get:function(){if(!xc(this))throw Cc("size");return Ac},enumerable:!1,configurable:!0}),t}();function Cc(t){return new h("ByteLengthQueuingStrategy.prototype."+t+" can only be used on a ByteLengthQueuingStrategy")}function xc(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"kd")&&t instanceof Dc)}a.defineProperties(Dc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(Dc.prototype,nf.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var Bc=function(){return 1};try{a.defineProperty(Bc,"name",{value:"size",configurable:!0})}catch(Jf){}var Fc=function(){function t(t){Wf(t,1,"CountQueuingStrategy"),t=Pc(t,"First parameter"),this.pd=t.highWaterMark}return a.defineProperty(t.prototype,"highWaterMark",{get:function(){if(!zc(this))throw Lc("highWaterMark");return this.pd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"size",{get:function(){if(!zc(this))throw Lc("size");return Bc},enumerable:!1,configurable:!0}),t}();function Lc(t){return new h("CountQueuingStrategy.prototype."+t+" can only be used on a CountQueuingStrategy")}function zc(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"pd")&&t instanceof Fc)}function Uc(t,n,i){return Uf(t,i),function(i){return Sf(t,n,[i])}}function Mc(t,n,i){return Uf(t,i),function(i){return _f(t,n,[i])}}function Wc(t,n,i){return Uf(t,i),function(i,e){return Sf(t,n,[i,e])}}a.defineProperties(Fc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(Fc.prototype,nf.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var qc=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=ta(n,"Second parameter"),r=ta(i,"Third parameter"),o=function(t,n){zf(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:Uc(i,t,n+" has member 'flush' that"),readableType:e,start:void 0===r?void 0:Mc(r,t,n+" has member 'start' that"),transform:void 0===o?void 0:Wc(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=Jh(r,0),f=Zh(r),h=Jh(e,1),c=Zh(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(fa.prototype);return aa(u),Aa(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 mf(e,function(){var e=t.bd,r=e.we;if("erroring"===r)throw e.uv;return Jc(i,n)})}return Jc(i,n)}(t,n)},function(){return function(t){var n=t.Ed,i=t.Td,e=i.Id();return Qc(i),mf(e,function(){if("errored"===n.we)throw n.uv;uc(n.yv)},function(i){throw Vc(t,i),n.uv})}(t)},function(n){return function(t,n){return Vc(t,n),vf(void 0)}(t,n)},i,e),t.Ed=_c(u,function(){return function(t){return Xc(t,!1),t.Sd}(t)},function(n){return Hc(t,n),vf(void 0)},r,o),t.Kv=void 0,t.Sd=void 0,t.Rd=void 0,Xc(t,!0),t.Td=void 0}(this,cf(function(t){u=t}),h,c,s,f),function(t,n){var i=a.create(Yc.prototype),e=function(t){try{return $c(i,t),vf(void 0)}catch(t){return lf(t)}},r=function(){return vf(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(!jc(this))throw tv("readable");return this.Ed},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"writable",{get:function(){if(!jc(this))throw tv("writable");return this.bd},enumerable:!1,configurable:!0}),t}();function jc(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"Td")&&t instanceof qc)}function Vc(t,n){fc(t.Ed.yv,n),Hc(t,n)}function Hc(t,n){Qc(t.Td),Ba(t.bd.zv,n),t.Kv&&Xc(t,!1)}function Xc(t,n){void 0!==t.Sd&&t.Rd(),t.Sd=cf(function(n){t.Rd=n}),t.Kv=n}a.defineProperties(qc.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(qc.prototype,nf.toStringTag,{value:"TransformStream",configurable:!0});var Gc,Yc=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Kc(this))throw Zc("desiredSize");return hc(this.Nd.Ed.yv)},enumerable:!1,configurable:!0}),t.prototype.enqueue=function(t){if(void 0===t&&(t=void 0),!Kc(this))throw Zc("enqueue");$c(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Kc(this))throw Zc("error");var n;n=t,Vc(this.Nd,n)},t.prototype.terminate=function(){if(!Kc(this))throw Zc("terminate");!function(t){var n=t.Nd;uc(n.Ed.yv);var i=new h("TransformStream terminated");Hc(n,i)}(this)},t}();function Kc(t){return!!of(t)&&(!!a.prototype.hasOwnProperty.call(t,"Nd")&&t instanceof Yc)}function Qc(t){t.Dd=void 0,t.Id=void 0}function $c(t,n){var i=t.Nd,e=i.Ed.yv;if(!ac(e))throw new h("Readable side is not in a state that permits enqueue");try{sc(e,n)}catch(t){throw Hc(i,t),i.Ed.uv}(function(t){return!rc(t)})(e)!==i.Kv&&Xc(i,!0)}function Jc(t,n){return mf(t.Dd(n),void 0,function(n){throw Vc(t.Nd,n),n})}function Zc(t){return new h("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function tv(t){return new h("TransformStream.prototype."+t+" can only be used on a TransformStream")}function nv(t){return n=[t],new yc({start:function(t){for(var i=0;i<n.length;i++){var e=n[i];t.enqueue(e)}t.close()}});var n}function iv(t){return nv(new w(t))}function ev(t,n){return function(t,n){var i=n,e=t.getReader(),r=new Zo,o=function(){u();var t=new An;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 si(t).buffer})}function rv(t,n){var i=n,e=new qc,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 ov(t){return Jn(new w(t))}function uv(t){return Zn(t).buffer}a.defineProperties(Yc.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof nf.toStringTag&&a.defineProperty(Yc.prototype,nf.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),function(t){t[t.Gf=0]="Gf",t[t.Cd=1]="Cd"}(Gc||(Gc={}));var sv="content-type",fv="text/plain;charset=UTF-8",hv=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 $s.Wf:return this.Ld(n);case $s.qf:return this.Pd(n);case $s.Gf:return this.Md();case $s.Zn:return this.Od(n);default:throw new h}},t}();function av(t,n,i){if(t instanceof hv)return t;if(t instanceof yc)return function(t,n){return new vv({hs:Gc.Gf,Md:t,xd:cv(n)})}(t,i);var e=cv(i),r=j.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{hs:$s.Zn,Fd:t,xd:n||fv};if(t instanceof ArrayBuffer||ui(t))return{hs:$s.Wf,Fd:pv(t),xd:n};if(et(i=t)&&i.constructor&&i.constructor===a||it(t))return{hs:$s.qf,Fd:t,xd:n};throw new h("Unsupported BodyInit type")}return{hs:$s.Zn,Fd:null,xd:n};var i}(t,e)});return new vv({hs:Gc.Cd,Uu:r,Ud:n})}function cv(t){return(t.get(sv)||"").toLowerCase()}var vv=function(t){function n(n){var i;return(i=t.call(this)||this).Hd=!1,i.Vd=void 0,i.Xd=new Zo,i.Xd.Uu.catch(lt),i.zd(n),i}Ut(n,t);var i=n.prototype;return i.Wd=function(){return this.Xd.Uu},i.Od=function(t){return this.qd(lv,t)},i.Pd=function(t){return this.qd(wv,t)},i.Ld=function(t){return this.qd(gv,t)},i.Md=function(){return this.Gd((t=this.Vd).hs===Gc.Gf?t.Md:rv(t.Uu.then(mv).then(iv),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.Xu(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 qc,i=j.resolve(t.pipeTo(n.writable));return this.Xd.Xu(i),n.readable},i.zd=function(t){this.Vd=t,t.hs===Gc.Cd&&t.Uu.catch(lt)},i.Qd=function(){if(this.Hd)throw new h("Already used");var t=function(t){if(t.hs===Gc.Gf){var n=t.Md.tee(),i=n[0],e=n[1];return[{hs:t.hs,Md:i,xd:t.xd},{hs:t.hs,Md:e,xd:t.xd}]}var r=t.Ud.Xs(),o=r[0],u=r[1];return[{hs:t.hs,Uu:t.Uu,Ud:o},{hs:t.hs,Uu:t.Uu,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}(hv);function lv(t,n){return t.hs===Gc.Gf?ev(t.Md,n).then(ov):(n&&t.Ud.Vs(n),Cn(t.Uu.then(dv),t.Ud))}function dv(t){switch(t.hs){case $s.Zn:return j.resolve(t.Fd||"");case $s.Wf:return j.resolve(t.Fd).then(ov);case $s.qf:return j.resolve(t.Fd).then(JSON.stringify)}}function wv(t,n){return t.hs===Gc.Gf?lv(t,n).then(JSON.parse):(n&&t.Ud.Vs(n),Cn(t.Uu.then(bv),t.Ud))}function bv(t){return t.hs===$s.qf?j.resolve(t.Fd):dv(t).then(JSON.parse)}function gv(t,n){return t.hs===Gc.Gf?ev(t.Md,n):(n&&t.Ud.Vs(n),Cn(t.Uu.then(mv),t.Ud))}function mv(t){switch(t.hs){case $s.Wf:return j.resolve(t.Fd);case $s.Zn:case $s.qf:return dv(t).then(uv)}}function pv(t){return t instanceof ArrayBuffer?t:ei(ni(t)).buffer}function yv(t){return t.jd>=200&&t.jd<=299||304===t.jd}var _v,Sv,Iv,Tv,Ev=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=$s.Zn,u=200,s="OK",f=!1);var h=n.il,a=new Js(n.Kd||r),c=n.Zd||o,v=n.ul||(i&&i.il===h?i.ul:h.ol),l=i?i.hl:null,d=av(void 0!==n.Hi?n.Hi:l,n.Ud||new Pn,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.Lu=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}(hv));!function(t){t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT"}(_v||(_v={})),function(t){t.al="",t.cl="manifest",t.fl="segment",t.vl="content-protection"}(Sv||(Sv={})),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"}(Iv||(Iv={})),function(t){t.al="",t.Sl="audio",t.El="video",t.Zn="text",t.Il="image"}(Tv||(Tv={}));var kv=function(t,n){this.Fd=void 0,this.Kd=void 0,this.Rl=void 0,this.Zd=void 0,this.Nl=void 0,this.zs=void 0,this.hs=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.zs,f=n.hs,h=n.Dl,a=n.Cl,c=n.Pl,v=n.Ol):(i=null,e={},r=_v.GET,o=$s.Zn,u=0,f=Sv.al,h=Iv.al,a=Tv.al,c=!1),this.ol=l,this.Fd=t.Fd||i,this.Kd=new Js(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.zs=t.zs||s||(new Pn).zs,this.hs=t.hs||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},Rv=function(){function t(){}var n=t.prototype;return n.il=function(t){var n=function(t){return new Ev({Hi:null,Kd:{},il:t,ul:t.ol,Zd:t.Zd,jd:0,Jd:Qs.Af})}(new kv(t));return j.resolve(n)},n.Bl=function(t){},n.Ll=function(){},t}();var Nv,Ov=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 kv(n);if(!this.xl){var e=t.Hl(i.ol);i=new kv({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.Hr&&zn(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 Rv)),t.Xl}}]),t}();Ov.Xl=void 0,function(t){t.zl="HttpOpenError",t.Wl="HttpResponseError",t.ql="HttpTimeoutError"}(Nv||(Nv={}));var Pv=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}(Nn);var Av=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 Nv.zl}}]),n}(Pv);var Dv=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 Nv.Wl}},{key:"Yl",get:function(){return this.Ql}}]),n}(Pv);var Cv=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 Nv.ql}}]),n}(Pv),xv=function(t,n){return(xv=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 Bv(t,n){function i(){this.constructor=t}xv(t,n),t.prototype=null===n?a.create(n):(i.prototype=n.prototype,new i)}var Fv="object"==typeof n?n:"object"==typeof t?t:"object"==typeof global?global:null;var Lv=function(){var t=Fv.Blob;if(t)try{return new t,function(t,n){return new Fv.Blob(t,n)}}catch(t){}var n,i=Fv.BlobBuilder||Fv.WebKitBlobBuilder||Fv.MozBlobBuilder||Fv.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}(),zv="function"==typeof yc?yc:void 0;function Uv(t){return t&&"function"==typeof t.getReader}function Mv(t){if("function"!=typeof t)return!1;try{var n=!1,i=new t({start:function(){n=!0}});return!!n&&Uv(i)}catch(t){return!1}}var Wv=function(){function t(t,n){this.rv=t,this.jl=n}return t.prototype.pull=function(t){var n=this;return this.rv.read().then(function(i){n.jl&&n.jl(i),i.done?t.close():t.enqueue(i.value)})},t.prototype.cancel=function(t){return this.rv.cancel(t)},t}();function qv(t,n){return n.constructor===t?n:new t(new Wv(n.getReader()),{highWaterMark:0})}var jv=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 jv(n,i),{highWaterMark:0})}var Hv={searchParams:"URLSearchParams"in Fv,iterable:"Symbol"in Fv&&"iterator"in Symbol,blob:"FileReader"in Fv&&!!Lv,formData:"FormData"in Fv,arrayBuffer:"ArrayBuffer"in Fv,stream:Mv(zv),streamRequest:"Request"in Fv&&"body"in Fv.Request.prototype,streamResponse:"Response"in Fv&&"body"in Fv.Response.prototype,abort:"AbortController"in Fv&&"Request"in Fv&&"signal"in Fv.Request.prototype,encoding:"TextEncoder"in Fv&&"TextDecoder"in Fv,url:"URL"in Fv&&function(t){try{return new Fv.URL(t).toString()===t}catch(t){return!1}}("http://example.com/"),firefox:"navigator"in Fv&&/Firefox\//.test(Fv.navigator.userAgent)};function Xv(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 Gv(t){return"string"!=typeof t&&(t=String(t)),t}function Yv(t){var n={next:function(){var n=t.shift();return{done:void 0===n,value:n}}};return Hv.iterable&&(n[Symbol.iterator]=function(){return n}),n}var Kv=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 Hv.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=Xv(t),n=Gv(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=Xv(t).toLowerCase();delete this.Zr[n]},t.prototype.get=function(t){var n=Xv(t).toLowerCase();return this.Zr.hasOwnProperty(n)?this.Zr[n][1]:null},t.prototype.has=function(t){var n=Xv(t).toLowerCase();return this.Zr.hasOwnProperty(n)},t.prototype.set=function(t,n){var i=(t=Xv(t)).toLowerCase();this.Zr[i]=[t,Gv(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)}),Yv(t)},t.prototype.values=function(){var t=[];return this.forEach(function(n){t.push(n)}),Yv(t)},t.prototype.entries=function(){var t=[];return this.forEach(function(n,i){t.push([i,n])}),Yv(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 Qv(){}Hv.iterable&&(Kv.prototype[Symbol.iterator]=Kv.prototype.entries);var $v,Jv,Zv,tl=c.min,nl=String.fromCharCode,il=16384;function el(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+=il){var r=tl(e+il,n);i.push(nl.apply(null,t.slice(e,r)))}return i.join("")}(n)}function rl(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ol(t,n){return t>>n&63|128}function ul(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(rl(t),n.push(t>>12&15|224),n.push(ol(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ol(t,12)),n.push(ol(t,6))),n.push(63&t|128)):n.push(t)}function sl(){if(Zv>=Jv)throw new f("Invalid byte index");var t=255&$v[Zv];if(Zv++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function fl(){var t,n;if(Zv>Jv)throw new f("Invalid byte index");if(Zv===Jv)return!1;if(t=255&$v[Zv],Zv++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|sl())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|sl()<<6|sl())>=2048)return rl(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|sl()<<12|sl()<<6|sl())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}var hl=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"];function al(t){return t&&URLSearchParams.prototype.isPrototypeOf(t)}function cl(t){return t&&ArrayBuffer.prototype.isPrototypeOf(t)}function vl(t){return t&&DataView.prototype.isPrototypeOf(t)}var ll,dl=ArrayBuffer.isView||function(t){return t&&(hl.indexOf(a.prototype.toString.call(t))>-1||vl(t))};function wl(t){if(t.bodyUsed)return j.reject(new h("Already used"));t.bodyUsed=!0}function bl(t){return new j(function(n,i){t.onload=function(){n(t.result)},t.onerror=function(){i(t.error)}})}function gl(t){return Hv.encoding?new Fv.TextDecoder("utf-8").decode(new w(t)):el(function(t){Jv=($v=t).length,Zv=0;for(var n,i=[];!1!==(n=fl());)i.push(n);return i}(new w(t)))}function ml(t){return Hv.encoding?(new Fv.TextEncoder).encode(t).buffer:new w(function(t){for(var n=[],i=0,e=t;i<e.length;i++)ul(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 pl(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 yl(t){return pl(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 _l(t){return t.slice?t.slice(0):Sl(new w(t))}function Sl(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 Il(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.Jl===ll.$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===ll.Wf?_l(n.t_):n.Jl===ll.Cd?n.t_.then(Tl):n.n_}!function(t){t[t.Zn=0]="Zn",t[t.i_=1]="i_",t[t.e_=2]="e_",t[t.Wf=3]="Wf",t[t.$l=4]="$l",t[t.Cd=5]="Cd"}(ll||(ll={}));var El=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=ll.Zn,this.t_=n;else if((o=n)&&"function"==typeof o.then)this.Jl=ll.Cd,this.t_=j.resolve(n).then(function(n){return new t(n,i)}),this.t_.catch(Qv);else if(Hv.blob&&function(t){return t&&Blob.prototype.isPrototypeOf(t)}(n))this.Jl=ll.i_,this.t_=n;else if(Hv.formData&&function(t){return t&&FormData.prototype.isPrototypeOf(t)}(n))this.Jl=ll.e_,this.t_=n;else if(Hv.searchParams&&al(n))this.Jl=ll.Zn,this.t_=n.toString();else if(Hv.arrayBuffer&&(cl(n)||dl(n)))vl(n)&&(this.n_=new w((r=n).buffer,r.byteOffset,r.byteLength)),this.Jl=ll.Wf,this.t_=cl(e=n)?_l(e):Sl(e);else{if(!Hv.stream||!Uv(n))throw new f("unsupported BodyInit type");n=qv(zv,n),this.Jl=ll.$l,this.t_=n,this.n_=n}else this.Jl=ll.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===ll.i_&&u.t_.type?this.r_=u.t_.type:Hv.searchParams&&al(n)&&(this.r_="application/x-www-form-urlencoded;charset=UTF-8"),this.r_&&i.set("content-type",this.r_)),Hv.stream&&(null==n?this.body=null:u.Jl===ll.$l?this.body=u.t_:this.body=Vv(zv,function(){return u.arrayBuffer()},function(){u.bodyUsed=!0}))}return t.prototype.text=function(){var t,n,i,e=wl(this);return e||(this.Jl===ll.i_?(t=this.t_,n=new FileReader,i=bl(n),n.readAsText(t),i):this.Jl===ll.Wf?j.resolve(this.t_).then(gl):this.Jl===ll.$l?yl(this.t_).then(gl):this.Jl===ll.Cd?this.t_.then(function(t){return t.text()}):this.Jl===ll.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}();Hv.blob&&(El.prototype.blob=function(){var t,n,i=wl(this);return i||(this.Jl===ll.i_?j.resolve(this.t_):this.Jl===ll.Wf?j.resolve(Lv([this.t_],{type:this.r_})):this.Jl===ll.$l?(t=this.t_,n=this.r_,pl(t).then(function(t){return Lv(t,{type:n||""})})):this.Jl===ll.Cd?this.t_.then(function(t){return t.blob()}):this.Jl===ll.e_?j.reject(new f("could not read FormData body as Blob")):j.resolve(Lv([this.t_],{type:this.r_})))}),Hv.arrayBuffer&&(El.prototype.arrayBuffer=function(){var t,n,i;return this.Jl===ll.Wf?wl(this)||j.resolve(this.t_):this.Jl===ll.i_?wl(this)||(t=this.t_,n=new FileReader,i=bl(n),n.readAsArrayBuffer(t),i):this.Jl===ll.$l?yl(this.t_):this.Jl===ll.Cd?wl(this)||this.t_.then(function(t){return t.arrayBuffer()}):this.Jl===ll.e_?j.reject(new f("could not read FormData body as ArrayBuffer")):j.resolve(this.t_).then(ml)}),Hv.formData&&(El.prototype.formData=function(){return this.Jl===ll.e_?wl(this)||j.resolve(this.t_):this.text().then(Il)});var kl=[301,302,303,307,308],Rl=function(t){function n(n,i){var e=this,r=new Kv((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 Bv(n,t),n.prototype.clone=function(){return new n(Tl(this),{status:this.status,statusText:this.statusText,headers:new Kv(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===kl.indexOf(i))throw new RangeError("Invalid status code");return new n(null,{status:i,headers:{location:t}})},n}(El);var Nl,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});(Nl=Ol)&&Nl.__esModule&&a.prototype.hasOwnProperty.call(Nl,"default")&&Nl.default,Ol.AbortSignal;var Pl=Ol.AbortController,Al=Fv.DOMException;try{new Al}catch(t){(Al=function(t,n){f.call(this,t),this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=a.create(f.prototype),Al.prototype.constructor=Al}var Dl=Pl;function Cl(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 xl(t,n,i){return new j(function(e,r){if(n.signal.aborted)return t.catch(Qv),r(Bl());var o=function(){n.signal.removeEventListener("abort",o),r(Bl())};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 Bl(){return new Al("Aborted","AbortError")}var Fl,Ll="moz-chunked-arraybuffer";function zl(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"}(Fl||(Fl={}));var Ul=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===ll.$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.g_=function(){this.l_(new h("Network request failed"))},t.prototype.w_=function(){this.l_(Bl())},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.w_();r.onreadystatechange=function(){if(r.readyState>=Fl.HEADERS_RECEIVED&&!i.s_){var t=function(t){var n=new Kv;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.g_()},r.onabort=function(){return i.w_()},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.w_(),this.o_.abort()},t}(),Ml=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 Bv(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 Rl(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=Lv([]))}this.b_(t)},n.prototype.l_=function(n){t.prototype.l_.call(this,n),this.A_&&this.A_(n)},n}(Ul),Wl=function(t){function n(n){var i=t.call(this,n,Ll)||this;return i.T_=void 0,i.S_=void 0,i.E_=!1,i}return Bv(n,t),n.prototype.y_=function(t){var n=this;this.T_=new zv({start:function(t){n.S_=t},cancel:function(){n.E_=!0,n.m_()}}),this.a_(new Rl(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}(Ul),ql=function(){var t=Hv.firefox&&zl(Ll);return ql=function(){return t},t},jl=function(){var t;return t=Hv.arrayBuffer&&zl("arraybuffer")?"arraybuffer":Hv.blob&&zl("blob")?"blob":"",jl=function(){return t},t};function Vl(t){return(Hv.stream&&ql()?new Wl(t):new Ml(t,jl())).send()}var Hl=Fv.fetch,Xl=Fv.Request;Fv.Response;var Gl=Fv.AbortController;var Yl=["http:","https:"];var Kl=function(){try{if(Hv.streamRequest){var t=new Xl("about:blank",{body:"",method:"POST"}).body;if(t&&Mv(t.constructor))return t.constructor}}catch(t){}}();function Ql(t,n,i){var e;if(Hv.stream){var r=void 0;if(Hv.streamResponse){var o=t.body;r=o&&qv(zv,o)}else r=Vv(zv,function(){return xl(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 Wv(n.getReader(),i),{highWaterMark:0})}(zv,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,$l(t.headers))),e=r}else{var u=xl(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,$l(t.headers))),e=u}return new Rl(e,t)}function $l(t){return t.has("content-length")?Number(t.get("content-length")):void 0}function Jl(t){var n=new Dl;return t.signal&&Cl(n,t.signal),function(t,n){var i,e,r=t;if(i=r.Jl===ll.$l?Hv.streamRequest&&Kl?j.resolve(qv(Kl,r.t_)):xl(t.arrayBuffer(),n,!1):xl(j.resolve(t.n_),n,!1),Hv.abort){var o=new Gl;Cl(o,n.signal),e=o.signal}return i.then(function(n){return new Xl(t.url,{body:n||void 0,credentials:t.credentials,headers:(i=t.headers,(i instanceof Kv?i:new Kv(i)).asList()),method:t.method,mode:t.mode,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:e});var i})}(t,n).then(function(i){return Hl(i).then(function(i){return Ql(i,n,t.onprogress)})})}var Zl=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];var td=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 Kv(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 Kv(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 Zl.indexOf(n)>-1?n:t}(e.method||s),d.mode=e.mode||f,d.signal=e.signal||v||(new Dl).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 Bv(n,t),n.prototype.clone=function(){return new n(this,{body:Tl(this)})},n}(El),nd="function"==typeof Hl&&Hv.stream&&Hv.streamResponse&&Hv.url;function id(t,n){return new j(function(i){var e=new td(t,n);i((nd&&function(t){try{return Yl.indexOf(new Fv.URL(t,Fv.location.href).protocol)>=0}catch(t){return!1}}(e.url)?Jl:Vl)(e))})}id.polyfill=!0;var ed=function(){function t(t){this.Yl=void 0,this.Gl=void 0,this.Jv=new Pn,this.Ql=void 0,this.I_=!1,this.Gl=t,this.Jv.Vs(t.zs),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.Jv.Hs()},t.Nl),a.prev=2,n=id(t.ol,{method:t.Rl,headers:t.Kd.Qf(),body:t.Fd,credentials:t.Pl?"include":"same-origin",signal:ud(this.Jv.zs),onprogress:t.Ol}),a.next=9;break;case 6:throw a.prev=6,a.t0=a.catch(2),new Av(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),Dn(e=this.N_(a.t1))&&this.Jv.Hs(),e;case 20:if(o=i.url||t.ol,u=0===i.status&&"file:"===(c=o,J.Or(c).protocol)?200:i.status,s=new rd(this,i,this.Jv),f=new Ev({Hi:s,il:t,Zd:t.Zd,Kd:new Js(i.headers.asList()),jd:u,Jd:i.statusText,ul:o}),this.Ql=f,!yv(f)){a.next=29;break}return a.abrupt("return",f);case 29:throw new Dv(f);case 30:case"end":return a.stop()}var c},null,this,[[2,6],[9,15]],j)},n.N_=function(t){return Dn(t)?this.I_?new Cv(this.Gl):new An(t.message,t):this.Ql?new Dv(this.Ql,t):new Av(this.Gl,t)},t}(),rd=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).D_=void 0,r.C_=void 0,r.Jv=void 0,r.Xd=new Zo,r.D_=n,r.C_=i,r.Jv=e,r.Xd.Uu.catch(lt),r}Ut(n,t);var i=n.prototype;return i.Wd=function(){return this.Xd.Uu},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):rv(this.Ld().then(iv),this.Jv)},i.Qd=function(){var t=this.C_.clone(),i=this.Jv.Xs(),e=i[0],r=i[1];return this.Jv=e,new n(this.D_,t,r)},i.qd=function(t,n){var i=this;n&&this.Jv.Vs(n);var e=j.resolve(t).catch(function(t){throw i.D_.N_(t)});return e=Cn(e,this.Jv),this.Xd.Xu(e.then(lt)),e},i.Gd=function(t){var n=this,i=new qc,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=Cn(e,this.Jv),this.Xd.Xu(e.then(lt)),i.readable},mt(n,[{key:"Yd",get:function(){return this.C_.bodyUsed}}]),n}(hv),od="abort";function ud(t){var n=new Dl;if(t.Ns)n.abort();else if(!t.Ds){var i=function(){e(),n.abort()},e=function e(){n.signal.removeEventListener(od,i),t.Ms(i),t.Fs(e)};n.signal.addEventListener(od,i),t.Ls(i),t.xs(e)}return n.signal}var sd=function(){function t(){}var n=t.prototype;return n.il=function(t){return new ed(t).Yl},n.Bl=function(t){var n=t.xd?{"Content-type":t.xd}:void 0;this.il(new kv({Rl:_v.POST,ol:t.ol,Fd:t.Fd,Kd:n})).then(lt,lt)},n.Ll=function(){},t}(),fd=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(Ci.hn)return!1;try{return"body"in t.Response.prototype}catch(t){return!1}}(),i.B_=Ci.xn,i.L_=void 0,i}return Ut(i,n),mt(i,[{key:"Er",get:function(){return this.P_||(this.P_=new Go(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 Xs.ef()}},{key:"H_",get:function(){return{V_:Ks}}},{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 Ov(new sd)),this.L_}}]),i}(ko);tt(new fd),tt(new fd);var hd=t;hd.addEventListener("install",function(t){t.waitUntil(hd.skipWaiting())}),hd.addEventListener("activate",function(t){t.waitUntil(hd.clients.claim())}),Si.mr.Wy(hd)}()}("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.ye=0,this.ke=!1,this.pe=void 0,this.Ae=[],k(t,this)}function _(t,n){for(;3===t.ye;)t=t.pe;0!==t.ye?(t.ke=!0,y.Te(function(){var i=1===t.ye?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.pe)}catch(t){return void I(n.promise,t)}S(n.promise,e)}else(1===t.ye?S:I)(n.promise,t.pe)})):t.Ae.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.ye=3,t.pe=n,void T(t);if("function"==typeof i)return void k((e=i,r=n,function(){e.apply(r,arguments)}),t)}t.ye=1,t.pe=n,T(t)}catch(n){I(t,n)}var e,r}function I(t,n){t.ye=2,t.pe=n,T(t)}function T(t){2===t.ye&&0===t.Ae.length&&y.Te(function(){t.ke||y.Se(t.pe)});for(var n=0,i=t.Ae.length;n<i;n++)_(t,t.Ae[n]);t.Ae=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.Te="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){g(t,0)},y.Se=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.Ee=0,this.Ie=0,this.Gi=[],this.Re=t}return t.prototype.Ne=function(t){var n=this.length();this.De(n+1);var i=this.Ie+n&this.Re-1;this.Gi[i]=t,this.Ee=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.Re<n)this.Ne(t);else{var i=this.Ie+n-1,e=this.Re-1;this.Gi[i&e]=t,this.Ee=n}},t.prototype.shift=function(){var t=this.Ie,n=this.Gi[t];return this.Gi[t]=void 0,this.Ie=t+1&this.Re-1,this.Ee--,n},t.prototype.length=function(){return this.Ee},t.prototype.De=function(t){this.Re<t&&this.Ce(this.Re<<1)},t.prototype.Ce=function(t){var n=this.Re;this.Re=t;var i=this.Ie+this.Ee&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.Gi,0,n,i)},t}();var F="unhandledrejection",L=t.PromiseRejectionEvent,z=t.CustomEvent;function M(t){return new L(F,{reason:t,promise:R.reject(t).catch(function(){}),cancelable:!0})}function U(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}()?M:function(){try{var t=new z(F,{detail:{reason:"error"}});return F===t.type&&"error"===t.detail.reason}catch(t){}return!1}()?U:W)(t)};if(R&&!(P&&A<60||C&&x<15))j=R;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.Te,Q=(V=K,H=new B(16),X=!1,{Pe:function(t){H.push(t),X||(X=!0,V(G))},Oe:G=function(){for(;H.length()>0;)H.shift()();X=!1}});y.Te=Q.Pe,y.Se=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)}}var $={exports:{}};!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.Yr=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,"jr")?j.resolve(h.jr).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{jr: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.Yr=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}}}($.exports);var J,Z=$.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.Rs=0]="Rs",t[t.Ns=1]="Ns",t[t.Ds=-1]="Ds"}(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.Rs:function(t,n){return t===n?rt.Rs:t<n?rt.Ds:t>n?rt.Ns:d(t)?d(n)?rt.Rs:rt.Ns:rt.Ds}(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&>(t.prototype,n),i&>(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.Il="audio",t.Rl="video",t.GA="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.dl="#EXTINF",t.Jpt="#EXT-X-MAP",t.UO="#EXTM3U",t.i="#EXT-X-VERSION",t.o="#EXT-X-TARGETDURATION",t.q5="#EXT-X-START",t.s="#EXT-X-INDEPENDENT-SEGMENTS",t.Yf="#EXT-X-STREAM-INF",t.h="#EXT-X-MEDIA-SEQUENCE",t.m="#EXT-X-ENDLIST",t.HO="#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.vs=St.dl,this.T=void 0,this.k=void 0,this.T=t,this.k=n}return t.prototype._R=function(){return this.vs+":"+this.T+",\n"+this.k},t}(),kt=function(){function t(){this.vs=St.UO}return t.prototype._R=function(){return this.vs},t}(),Rt=function(){function t(t){this.vs=St.i,this.pT=void 0,this.pT=t}return t.prototype._R=function(){return this.vs+":"+this.pT},t}(),Nt=function(){function t(t){this.vs=St.o,this.opt=void 0,this.opt=t}return t.prototype._R=function(){return this.vs+":"+this.opt},t}(),Ot=function(){function t(t){this.vs=St.q5,this.ubt=void 0,this.ubt=t}return t.prototype._R=function(){return this.vs+":TIME-OFFSET="+this.ubt},t}(),Pt=function(){function t(){this.vs=St.s}return t.prototype._R=function(){return this.vs},t}(),At=function(){function t(t){this.vs=St.Yf,this.IN=1,this.k=void 0,this.k=t}return t.prototype._R=function(){return this.vs+":BANDWIDTH="+this.IN+',AUDIO="audio"\n'+this.k},t}(),Dt=function(){function t(t){this.vs=St.h,this.oE=void 0,this.oE=t}return t.prototype._R=function(){return this.vs+":"+this.oE},t}(),Ct=function(){function t(){this.vs=St.p}return t.prototype._R=function(){return this.vs},t}(),xt=function(){function t(t){this.vs=St.S,this.oE=void 0,this.oE=t}return t.prototype._R=function(){return this.vs+":"+this.oE},t}();!function(t){t.Kpt="VOD",t.XCt="EVENT"}(Tt||(Tt={}));var Bt=function(){function t(t){this.vs=St.HO,this.k=void 0,this.k=t}return t.prototype._R=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.vs+":"+n.join(",")},t}(),Ft=function(){function t(t){this.Vo=[],this.Vo=t}return t.prototype.O=function(){for(var t="",n=0,i=this.Vo;n<i.length;n++){t+=i[n]._R()+"\n"}return t},mt(t,[{key:"vS",get:function(){return this.Vo}}]),t}(),Lt=function(){function t(){this.Vo=[];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.Vo.push(t)},n.Ms=function(){this.Vo.length=0},mt(t,[{key:"vS",get:function(){return new Ft(this.Vo)}}]),t}();function zt(t,n){return(zt=a.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Mt(t,n){t.prototype=a.create(n.prototype),t.prototype.constructor=t,zt(t,n)}var Ut=function(){function t(){}var n=t.prototype;return n.pp=function(t){return this.bp()*t},n.Ap=function(t){return this.Tp(t)>0},n.Sp=function(t){return this.Tp(t)>=0},n.Ep=function(t,n){return this.Rp(t).Ip(n)},n.fp=function(t){return 0===this.Tp(t)},n.Np=function(t){return this.Tp(t)<0},n.Ip=function(t){return this.Tp(t)<=0},n.Dp=function(){return this.Cp()?this.Pp():this},n.Op=function(t){return this.Rk(t.Pp())},n.Rp=function(t){return this.Op(t).Dp()},t}();function Wt(t,n){return t.Bp()?n.Bp()?rt.Rs:rt.Ns:n.Bp()?rt.Ds:t.Lp()?n.Lp()&&t.Cp()===n.Cp()?rt.Rs:t.Cp()?rt.Ds:rt.Ns:n.Cp()?rt.Ns:rt.Ds}var qt=null;try{qt=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 jt(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function Vt(t){return!0===(t&&t.Kn)}function Ht(t){var n=c.clz32(t&-t);return t?31-n:n}jt.prototype.Kn,a.defineProperty(jt.prototype,"Kn",{value:!0}),jt.isLong=Vt;var Xt={},Gt={};function Yt(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=Gt[t])?e:(i=Qt(t,0,!0),r&&(Gt[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Xt[t])?e:(i=Qt(t,t<0?-1:0,!1),r&&(Xt[t]=i),i)}function Kt(t,n){if(d(t))return n?un:on;if(n){if(t<0)return un;if(t>=nn)return cn}else{if(t<=-en)return vn;if(t+1>=en)return an}return t<0?Kt(-t,n).neg():Qt(t%tn|0,t/tn|0,n)}function Qt(t,n,i){return new jt(t,n,i)}jt.fromInt=Yt,jt.fromNumber=Kt,jt.fromBits=Qt;var $t=c.pow;function Jt(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?un:on;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 Jt(t.substring(1),n,i).neg();for(var r=Kt($t(i,8)),o=on,u=0;u<t.length;u+=8){var s=c.min(8,t.length-u),h=v(t.substring(u,u+s),i);if(s<8){var a=Kt($t(i,s));o=o.mul(a).add(Kt(h))}else o=(o=o.mul(r)).add(Kt(h))}return o.unsigned=n,o}function Zt(t,n){return"number"==typeof t?Kt(t,n):"string"==typeof t?Jt(t,n):Qt(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}jt.fromString=Jt,jt.fromValue=Zt;var tn=4294967296,nn=tn*tn,en=nn/2,rn=Yt(1<<24),on=Yt(0);jt.ZERO=on;var un=Yt(0,!0);jt.UZERO=un;var sn=Yt(1);jt.ONE=sn;var fn=Yt(1,!0);jt.UONE=fn;var hn=Yt(-1);jt.NEG_ONE=hn;var an=Qt(-1,2147483647,!1);jt.MAX_VALUE=an;var cn=Qt(-1,-1,!0);jt.MAX_UNSIGNED_VALUE=cn;var vn=Qt(0,-2147483648,!1);jt.MIN_VALUE=vn;var ln=jt.prototype;ln.toInt=function(){return this.unsigned?this.low>>>0:this.low},ln.toNumber=function(){return this.unsigned?(this.high>>>0)*tn+(this.low>>>0):this.high*tn+(this.low>>>0)},ln.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(vn)){var n=Kt(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=Kt($t(t,6),this.unsigned),o=this,u="";;){var s=o.div(r),f=(o.sub(s.mul(r)).toInt()>>>0).toString(t);if((o=s).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},ln.getHighBits=function(){return this.high},ln.getHighBitsUnsigned=function(){return this.high>>>0},ln.getLowBits=function(){return this.low},ln.getLowBitsUnsigned=function(){return this.low>>>0},ln.getNumBitsAbs=function(){if(this.isNegative())return this.eq(vn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&0==(t&1<<n);n--);return 0!=this.high?n+33:n+1},ln.isZero=function(){return 0===this.high&&0===this.low},ln.eqz=ln.isZero,ln.isNegative=function(){return!this.unsigned&&this.high<0},ln.isPositive=function(){return this.unsigned||this.high>=0},ln.isOdd=function(){return 1==(1&this.low)},ln.isEven=function(){return 0==(1&this.low)},ln.equals=function(t){return Vt(t)||(t=Zt(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},ln.eq=ln.equals,ln.notEquals=function(t){return!this.eq(t)},ln.neq=ln.notEquals,ln.ne=ln.notEquals,ln.lessThan=function(t){return this.comp(t)<0},ln.lt=ln.lessThan,ln.lessThanOrEqual=function(t){return this.comp(t)<=0},ln.lte=ln.lessThanOrEqual,ln.le=ln.lessThanOrEqual,ln.greaterThan=function(t){return this.comp(t)>0},ln.gt=ln.greaterThan,ln.greaterThanOrEqual=function(t){return this.comp(t)>=0},ln.gte=ln.greaterThanOrEqual,ln.ge=ln.greaterThanOrEqual,ln.compare=function(t){if(Vt(t)||(t=Zt(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},ln.comp=ln.compare,ln.negate=function(){return!this.unsigned&&this.eq(vn)?vn:this.not().add(sn)},ln.neg=ln.negate,ln.add=function(t){Vt(t)||(t=Zt(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,h=0,a=0,c=0;return a+=(c+=r+(65535&t.low))>>>16,h+=(a+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,Qt((a&=65535)<<16|(c&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},ln.subtract=function(t){return Vt(t)||(t=Zt(t)),this.add(t.neg())},ln.sub=ln.subtract,ln.multiply=function(t){if(this.isZero())return this;if(Vt(t)||(t=Zt(t)),qt)return Qt(qt.mul(this.low,this.high,t.low,t.high),qt.get_high(),this.unsigned);if(t.isZero())return this.unsigned?un:on;if(this.eq(vn))return t.isOdd()?vn:on;if(t.eq(vn))return this.isOdd()?vn:on;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(rn)&&t.lt(rn))return Kt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,a=0,c=0,v=0;return c+=(v+=r*f)>>>16,a+=(c+=e*f)>>>16,c&=65535,a+=(c+=r*s)>>>16,h+=(a+=i*f)>>>16,a&=65535,h+=(a+=e*s)>>>16,a&=65535,h+=(a+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,Qt((c&=65535)<<16|(v&=65535),(h&=65535)<<16|(a&=65535),this.unsigned)},ln.mul=ln.multiply,ln.divide=function(t){if(Vt(t)||(t=Zt(t)),t.isZero())throw f("division by zero");var n,i,e;if(qt)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Qt((this.unsigned?qt.div_u:qt.div_s)(this.low,this.high,t.low,t.high),qt.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?un:on;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return un;if(t.gt(this.shru(1)))return fn;e=un}else{if(this.eq(vn))return t.eq(sn)||t.eq(hn)?vn:t.eq(vn)?sn:(n=this.shr(1).div(t).shl(1)).eq(on)?t.isNegative()?sn:hn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(vn))return this.unsigned?un:on;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=on}for(i=this;i.gte(t);){n=c.max(1,c.floor(i.toNumber()/t.toNumber()));for(var r=c.ceil(c.log(n)/c.LN2),o=r<=48?1:$t(2,r-48),u=Kt(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Kt(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=sn),e=e.add(u),i=i.sub(s)}return e},ln.div=ln.divide,ln.modulo=function(t){return Vt(t)||(t=Zt(t)),qt?Qt((this.unsigned?qt.rem_u:qt.rem_s)(this.low,this.high,t.low,t.high),qt.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},ln.mod=ln.modulo,ln.rem=ln.modulo,ln.not=function(){return Qt(~this.low,~this.high,this.unsigned)},ln.countLeadingZeros=function(){return this.high?c.clz32(this.high):c.clz32(this.low)+32},ln.clz=ln.countLeadingZeros,ln.countTrailingZeros=function(){return this.low?Ht(this.low):Ht(this.high)+32},ln.ctz=ln.countTrailingZeros,ln.and=function(t){return Vt(t)||(t=Zt(t)),Qt(this.low&t.low,this.high&t.high,this.unsigned)},ln.or=function(t){return Vt(t)||(t=Zt(t)),Qt(this.low|t.low,this.high|t.high,this.unsigned)},ln.xor=function(t){return Vt(t)||(t=Zt(t)),Qt(this.low^t.low,this.high^t.high,this.unsigned)},ln.shiftLeft=function(t){return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Qt(0,this.low<<t-32,this.unsigned)},ln.shl=ln.shiftLeft,ln.shiftRight=function(t){return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Qt(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},ln.shr=ln.shiftRight,ln.shiftRightUnsigned=function(t){return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Qt(32===t?this.high:this.high>>>t-32,0,this.unsigned)},ln.shru=ln.shiftRightUnsigned,ln.shr_u=ln.shiftRightUnsigned,ln.rotateLeft=function(t){var n;return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Qt(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},ln.rotl=ln.rotateLeft,ln.rotateRight=function(t){var n;return Vt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Qt(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},ln.rotr=ln.rotateRight,ln.toSigned=function(){return this.unsigned?Qt(this.low,this.high,!1):this},ln.toUnsigned=function(){return this.unsigned?this:Qt(this.low,this.high,!0)},ln.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},ln.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},ln.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},jt.fromBytes=function(t,n,i){return i?jt.fromBytesLE(t,n):jt.fromBytesBE(t,n)},jt.fromBytesLE=function(t,n){return new jt(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},jt.fromBytesBE=function(t,n){return new jt(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var dn=function(){function t(t,n){this.Mp=void 0,this.xp=void 0,this.Mp=t,this.xp=n}t.Fp=function(n,i,e){return e?new t(n.toUnsigned(),i.toUnsigned()):new t(n.toSigned(),i.toSigned())},t.Up=function(n){return n.unsigned?new t(n,jt.UZERO):new t(n,n.isNegative()?jt.NEG_ONE:jt.ZERO)},t.Hp=function(n,i){if(d(n))return i?t.Vp:t.Xp;if(i){if(n<0)return t.Vp;if(n>=3.402823669209385e38)return t.zp}else{if(n<=-1.7014118346046923e38)return t.Wp;if(n+1>=1.7014118346046923e38)return t.qp}return n<0?t.Hp(-n,i).Pp():t.Fp(jt.fromNumber(n%0x10000000000000000),jt.fromNumber(n/0x10000000000000000),i)};var n=t.prototype;return n.Gp=function(){return this.xp.unsigned},n.Qp=function(){return this.Mp.isZero()&&this.xp.isZero()},n.Cp=function(){return this.xp.isNegative()},n.Yp=function(){return this.Gp()?t.Fp(this.Mp,this.xp,!1):this},n.jp=function(){return this.Gp()?this:t.Fp(this.Mp,this.xp,!0)},n.Kp=function(){return this.Mp},n.bp=function(){return this.Cp()?-this.Pp().bp():0x10000000000000000*this.xp.toNumber()+this.Mp.toUnsigned().toNumber()},n.Zp=function(){return this.Mp.toInt()},n.fp=function(t){return(this.Gp()===t.Gp()||this.xp.getHighBits()>>>31!=1||t.xp.getHighBits()>>>31!=1)&&(this.xp.toUnsigned().eq(t.xp.toUnsigned())&&this.Mp.toUnsigned().eq(t.Mp.toUnsigned()))},n.Tp=function(t){if(this.fp(t))return rt.Rs;var n=this.Cp(),i=t.Cp();if(n&&!i)return rt.Ds;if(!n&&i)return rt.Ns;if(!this.Gp())return this.Op(t).Cp()?rt.Ds:rt.Ns;var e=this.jp(),r=t.jp(),o=r.xp.comp(e.xp);return o>0||0===o&&r.Mp.gt(e.Mp)?rt.Ds:rt.Ns},n.Np=function(t){return this.Tp(t)<0},n.Ip=function(t){return this.Tp(t)<=0},n.Jp=function(t){return this.Tp(t)>0},n.$p=function(t){return this.Tp(t)>=0},n.ib=function(){return new t(this.Mp.not(),this.xp.not())},n.eb=function(n){return new t(this.Mp.and(n.Mp),this.xp.and(n.xp))},n.sb=function(n){return new t(this.Mp.or(n.Mp),this.xp.or(n.xp))},n.ub=function(n){var i=127&n;return 0===i?this:i<64?t.Fp(this.Mp.shl(i),this.xp.shl(i).or(this.Mp.shru(64-i)),this.Gp()):t.Fp(jt.ZERO,this.Mp.shl(i-64),this.Gp())},n.ob=function(n){var i=127&n;return 0===i?this:i<64?t.Fp(this.Mp.shru(i).or(this.xp.shl(64-i)),this.xp.shr(i),this.Gp()):t.Fp(this.xp.shr(i-64),this.xp.isNegative()?jt.NEG_ONE:jt.ZERO,this.Gp())},n.hb=function(n){var i=127&n;return 0===i?this:i<64?t.Fp(this.Mp.shru(i).or(this.xp.shl(64-i)),this.xp.shru(i),this.Gp()):64===i?t.Fp(this.xp,jt.ZERO,this.Gp()):t.Fp(this.xp.shru(i-64),jt.ZERO,this.Gp())},n.Rk=function(n){var i=this.xp.high>>>16,e=65535&this.xp.high,r=this.xp.low>>>16,o=65535&this.xp.low,u=this.Mp.high>>>16,s=65535&this.Mp.high,f=this.Mp.low>>>16,h=65535&this.Mp.low,a=n.xp.high>>>16,c=65535&n.xp.high,v=n.xp.low>>>16,l=65535&n.xp.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.Gp(),k=jt.fromBits(p<<16|y,g<<16|m,E),R=jt.fromBits(I<<16|T,_<<16|S,E);return t.Fp(R,k,E)},n.Op=function(t){return this.Rk(t.Pp())},n.Pp=function(){return this.ib().Rk(t.cb)},n.fb=function(n){if(this.Qp()||n.Qp())return this.Gp()?t.Vp:t.Xp;if(this.Cp())return n.Cp()?this.Pp().fb(n.Pp()):this.Pp().fb(n).Pp();if(n.Cp())return this.fb(n.Pp()).Pp();if(this.xp.isZero()&&0===this.Mp.high&&n.xp.isZero()&&0===n.Mp.high)return t.Up(this.Mp.multiply(n.Mp));var i=jt.fromBits(4294967295,0,!0),e=this.Mp.and(i),r=this.Mp.shru(32),o=this.xp.and(i),u=this.xp.shru(32),s=n.Mp.and(i),f=n.Mp.shru(32),h=n.xp.and(i),a=n.xp.shru(32),c=jt.UZERO,v=jt.UZERO,l=jt.UZERO,d=jt.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=jt.fromBits(c.getLowBitsUnsigned(),v.getLowBitsUnsigned(),!0),b=jt.fromBits(l.getLowBitsUnsigned(),d.getLowBitsUnsigned(),!0);return t.Fp(w,b,this.Gp())},n.vb=function(n){var i,e,r=n;if(r.Qp())throw new RangeError("division by zero");if(this.Qp())return this.Gp()?[t.Vp,t.Vp]:[t.Xp,t.Xp];if(this.Gp()){if(r.Gp()||(r=r.jp()),r.Jp(this))return[t.Vp,this];if(r.Jp(this.hb(1)))return[e=t._b,i=this.Op(r)];e=t.Vp}else{if(this.fp(t.Wp)){if(r.fp(t.cb)||r.fp(t.gb))return[t.Wp,t.Xp];if(r.fp(t.Wp))return[t.cb,t.Xp];var o=this.ob(1).wb(r).ub(1);return o.fp(t.Xp)?e=r.Cp()?t.cb:t.gb:(i=this.Op(r.fb(o)),e=o.Rk(i.wb(r))),[e,i=this.Op(r.fb(e))]}if(r.fp(t.Wp))return this.Gp()?[t.Vp,this]:[t.Xp,this];if(this.Cp()){if(r.Cp())return this.Pp().vb(r.Pp());var u=this.Pp().vb(r);return e=u[0],i=u[1],[e.Pp(),i.Pp()]}if(r.Cp()){var s=this.vb(r.Pp());return e=s[0],i=s[1],[e.Pp(),i.Pp()]}e=t.Xp}for(i=this;i.$p(r);){for(var f=c.max(1,c.floor(i.bp()/r.bp())),h=c.ceil(c.log(f)/c.LN2),a=h<=48?1:c.pow(2,h-48),v=t.Hp(f),l=v.fb(r);l.Cp()||l.Jp(i);)f-=a,l=(v=t.Hp(f,this.Gp())).fb(r);v.Qp()&&(v=t.cb),e=e.Rk(v),i=i.Op(l)}return[e,i]},n.wb=function(t){return this.vb(t)[0]},n.mb=function(t){return this.vb(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.Cp()){if(this.fp(t.Wp)){var e=t.Hp(i),r=this.wb(e),o=r.fb(e).Op(this);return r.toString(i)+o.Zp().toString(i)}return"-"+this.Pp().toString(i)}for(var u=t.Hp(c.pow(i,6),this.Gp()),s=this,f="";;){var h=s.wb(u),a=(s.Op(h.fb(u)).Zp()>>>0).toString(i);if((s=h).Qp())return a+f;for(;a.length<6;)a="0"+a;f=String(a)+f}},t}();dn.Xp=dn.Up(jt.ZERO),dn.Vp=dn.Up(jt.UZERO),dn.cb=dn.Up(jt.ONE),dn._b=dn.Up(jt.UONE),dn.gb=dn.Up(jt.NEG_ONE),dn.qp=dn.Fp(jt.NEG_ONE,jt.MAX_VALUE,!1),dn.zp=dn.Fp(jt.MAX_UNSIGNED_VALUE,jt.MAX_UNSIGNED_VALUE,!0),dn.Wp=dn.Fp(jt.ZERO,jt.MIN_VALUE,!1);var wn=function(){function t(t,n){void 0===n&&(n=1),this.yb=void 0,this.kb=void 0,this.yb=t,this.kb=n}t.pb=function(n){return new t(c.ceil(n.yb),n.kb)},t.bb=function(n){return new t(c.floor(n.yb),n.kb)},t.Ab=function(t,n){return t.Sp(n)?t:n},t.Tb=function(t,n){return t.Ip(n)?t:n};var n=t.prototype;return n.Rk=function(n){return this.kb>=n.kb?new t(this.yb+n.Sb(this.kb).yb,this.kb):new t(this.Sb(n.kb).yb+n.yb,n.kb)},n.Ap=function(t){return t.Np(this)},n.Sp=function(t){return t.Ip(this)},n.Rp=function(n){return this.kb>=n.kb?new t(c.abs(this.yb-n.Sb(this.kb).yb),this.kb):n.Rp(this)},n.Ep=function(t,n){return this.Rp(t).Ip(n)},n.Tp=function(t){return i=t,(n=this).kb>=i.kb?ft(n.yb,i.Sb(n.kb).yb):ft(n.Sb(i.kb).yb,i.yb);var n,i},n.fp=function(t){return 0===this.Tp(t)},n.Np=function(t){return this.Tp(t)<0},n.Ip=function(t){return this.Tp(t)<=0},n.Sb=function(n){return new t(this.yb*(n/this.kb),n)},n.Op=function(n){return this.kb>=n.kb?new t(this.yb-n.Sb(this.kb).yb,this.kb):new t(this.Sb(n.kb).yb-n.yb,n.kb)},n.Eb=function(n){return new t(this.yb*n,this.kb)},mt(t,[{key:"Lp",get:function(){return!isFinite(this.yb)}},{key:"Ib",get:function(){return this.yb/this.kb}}]),t}();wn.Rb=new wn(1/6,1),wn.Xp=new wn(0),wn.Nb=new wn(1/0),wn.Db=1e6;var bn=function(t){function n(n,i){var e;return(e=t.call(this)||this).Ti=void 0,e.kb=void 0,e.Ti=n.toSigned(),e.kb=i>>>0,e}Mt(n,t),n.Cb=function(t,i){return void 0===i&&(i=1e6),n.Hp(t*i,i)},n.Hp=function(t,i){return d(t)?n.Pb:t===1/0?n.Ob:t===-1/0?n.Bb:new n(jt.fromNumber(t),i)},n.Up=function(t,i){return new n(t,i)},n.Lb=function(t){return n.Cb(t.Ib,1e6)},n.Mb=function(t){return new n(jt.fromNumber(t.getTime()),1e3)},n.Ab=function(t,n){return t.Sp(n)?t:n},n.Tb=function(t,n){return t.Ip(n)?t:n},n.xb=function(t,i,e){return n.Ab(i,n.Tb(e,t))};var i=n.prototype;return i.Cp=function(){return this.Ti.isNegative()},i.Qp=function(){return 0!==this.kb&&this.Ti.isZero()},i.Lp=function(){return 0===this.kb&&!this.Ti.isZero()},i.Bp=function(){return 0===this.kb&&this.Ti.isZero()},i.bp=function(){if(0===this.kb)return this.Ti.isZero()?NaN:this.Ti.isNegative()?-1/0:1/0;var t=this.Ti.divide(this.kb),n=this.Ti.subtract(t.multiply(this.kb));return t.toNumber()+n.toNumber()/this.kb},i.Kp=function(){if(0===this.kb)throw new f("Failed to convert timestamp");return this.Ti},i.Fb=function(){return new Date(0===this.kb?NaN:this.Sb(1e3).Ti.toNumber())},i.Ub=function(){return new wn(0===this.kb?this.bp():this.Ti.toNumber(),this.kb)},i.Sb=function(t,i){void 0===i&&(i=pn.Hb);var e=this.kb;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.vb(n),r=e[0],o=e[1];if(o.Qp())return r;if(i===pn.Hb)return o.Cp()?r.Op(dn.cb):r;if(i===pn.Vb)return o.Cp()?r:r.Rk(dn.cb);var u=o.fb(dn.Hp(2));return u.Cp()?u.Pp().Np(n)?r:r.Op(dn.cb):u.Np(n)?r:r.Rk(dn.cb)}(dn.Up(this.Ti).fb(dn.Hp(t/r)),dn.Hp(e/r),i).Kp(),t)},i.Tp=function(t){if(this===t)return rt.Rs;if(0===this.kb||0===t.kb)return Wt(this,t);if(this.Qp())return t.Qp()?rt.Rs:t.Cp()?rt.Ns:rt.Ds;if(t.Qp())return this.Cp()?rt.Ds:rt.Ns;var n=c.min(this.kb,t.kb),i=this.Sb(n,pn.Xb).Ti,e=t.Sb(n,pn.Xb).Ti;return i.compare(e)},i.Pp=function(){return 0===this.kb?gn(this):new n(this.Ti.negate(),this.kb)},i.Rk=function(t){if(0===this.kb||0===t.kb)return mn(this,t);if(this.Qp())return t;if(t.Qp())return this;var i=c.max(this.kb,t.kb),e=this.Sb(i,pn.Xb),r=t.Sb(i,pn.Xb);return new n(e.Ti.add(r.Ti),i)},i.fb=function(t){if(this.Bp()||d(t))return n.Pb;if(this.Lp()||!isFinite(t)){if(this.Qp()||0===t)return n.Pb;var i=this.Cp()?n.Bb:n.Ob;return t<0?i.Pp():i}return this.Qp()?this:new n(0===t?jt.ZERO:this.Ti.multiply(t),this.kb)},i.wb=function(t){if(this.Bp()||d(t))return n.Pb;if(this.Lp())return isFinite(t)?0===t?1/t<0?this.Pp():this:t<0?this.Pp():this:n.Pb;if(!isFinite(t))return new n(jt.ZERO,this.kb);if(this.Qp())return 0===t?n.Pb:new n(jt.ZERO,this.kb);if(0===t){var i=this.Cp()?n.Bb:n.Ob;return 1/t<0?i.Pp():i}return new n(this.Ti.divide(t),this.kb)},i.zb=function(){return[this.Ti.low,this.Ti.high,this.kb]},n}(Ut);function gn(t){return t.Bp()?t:t.Cp()?bn.Ob:bn.Bb}function mn(t,n){return t.Bp()||n.Bp()?bn.Pb:t.Lp()&&n.Lp()?t.Cp()===n.Cp()?t:bn.Pb:t.Lp()?t:n}bn.Xp=new bn(jt.ZERO,1e6),bn.Pb=new bn(jt.ZERO,0),bn.Ob=new bn(jt.ONE,0),bn.Bb=new bn(jt.NEG_ONE,0);var pn,yn=function(t){function n(n,i){var e;return(e=t.call(this)||this).Ti=void 0,e.kb=void 0,e.Ti=BigInt.asIntN(64,n),e.kb=i>>>0,e}Mt(n,t),n.Cb=function(t,i){return void 0===i&&(i=1e6),n.Hp(t*i,i)},n.Hp=function(t,i){return d(t)?n.Pb:t===1/0?n.Ob:t===-1/0?n.Bb:new n(BigInt(c.floor(t)),i)},n.Up=function(t,i){return new n(BigInt(t.high)<<BigInt(32)|BigInt(t.low>>>0),i)},n.Lb=function(t){return n.Cb(t.Ib,1e6)},n.Mb=function(t){return n.Hp(t.getTime(),1e3)},n.Ab=function(t,n){return t.Sp(n)?t:n},n.Tb=function(t,n){return t.Ip(n)?t:n},n.xb=function(t,i,e){return n.Ab(i,n.Tb(e,t))};var i=n.prototype;return i.Cp=function(){return this.Ti<BigInt(0)},i.Qp=function(){return 0!==this.kb&&this.Ti===BigInt(0)},i.Lp=function(){return 0===this.kb&&this.Ti!==BigInt(0)},i.Bp=function(){return 0===this.kb&&this.Ti===BigInt(0)},i.bp=function(){if(0===this.kb)return this.Ti===BigInt(0)?NaN:this.Ti<BigInt(0)?-1/0:1/0;var t=this.Ti/BigInt(this.kb),n=this.Ti-t*BigInt(this.kb);return Number(t)+Number(n)/this.kb},i.Kp=function(){if(0===this.kb)throw new f("Failed to convert timestamp");return this.Wb()},i.Wb=function(){var t=this.Ti&BigInt(4294967295),n=this.Ti>>BigInt(32)&BigInt(4294967295);return jt.fromBits(Number(t),Number(n))},i.Fb=function(){return new Date(0===this.kb?NaN:Number(this.Sb(1e3).Ti))},i.Ub=function(){return new wn(0===this.kb?this.bp():Number(this.Ti),this.kb)},i.Sb=function(t,i){void 0===i&&(i=pn.Hb);var e=this.kb;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===pn.Hb)return r<BigInt(0)?e-BigInt(1):e;if(i===pn.Vb)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.Ti*BigInt(t/r),BigInt(e/r),i),t)},i.Tp=function(t){if(this===t)return rt.Rs;if(0===this.kb||0===t.kb)return Wt(this,t);if(this.Qp())return t.Qp()?rt.Rs:t.Cp()?rt.Ns:rt.Ds;if(t.Qp())return this.Cp()?rt.Ds:rt.Ns;var n=c.min(this.kb,t.kb),i=this.Sb(n,pn.Xb).Ti,e=t.Sb(n,pn.Xb).Ti;return i>e?rt.Ns:i<e?rt.Ds:rt.Rs},i.Pp=function(){return 0===this.kb?_n(this):new n(-this.Ti,this.kb)},i.Rk=function(t){if(0===this.kb||0===t.kb)return Sn(this,t);if(this.Qp())return t;if(t.Qp())return this;var i=c.max(this.kb,t.kb),e=this.Sb(i,pn.Xb),r=t.Sb(i,pn.Xb);return new n(e.Ti+r.Ti,i)},i.fb=function(t){if(this.Bp()||d(t))return n.Pb;if(this.Lp()||!isFinite(t)){if(this.Qp()||0===t)return n.Pb;var i=this.Cp()?n.Bb:n.Ob;return t<0?i.Pp():i}return this.Qp()?this:new n(0===t?BigInt(0):this.Ti*BigInt(t),this.kb)},i.wb=function(t){if(this.Bp()||d(t))return n.Pb;if(this.Lp())return isFinite(t)?0===t?1/t<0?this.Pp():this:t<0?this.Pp():this:n.Pb;if(!isFinite(t))return new n(BigInt(0),this.kb);if(this.Qp())return 0===t?n.Pb:new n(BigInt(0),this.kb);if(0===t){var i=this.Cp()?n.Bb:n.Ob;return 1/t<0?i.Pp():i}return new n(this.Ti/BigInt(t),this.kb)},i.zb=function(){var t=this.Wb();return[t.low,t.high,this.kb]},mt(n,null,[{key:"Xp",get:function(){return n.qb||(n.qb=new n(BigInt(0),1e6)),n.qb}},{key:"Pb",get:function(){return n.Gb||(n.Gb=new n(BigInt(0),0)),n.Gb}},{key:"Ob",get:function(){return n.Qb||(n.Qb=new n(BigInt(1),0)),n.Qb}},{key:"Bb",get:function(){return n.Yb||(n.Yb=new n(BigInt(-1),0)),n.Yb}}]),n}(Ut);function _n(t){return t.Bp()?t:t.Cp()?yn.Ob:yn.Bb}function Sn(t,n){return t.Bp()||n.Bp()?yn.Pb:t.Lp()&&n.Lp()?t.Cp()===n.Cp()?t:yn.Pb:t.Lp()?t:n}yn.qb=void 0,yn.Gb=void 0,yn.Qb=void 0,yn.Yb=void 0,function(t){t[t.Hb=0]="Hb",t[t.Vb=1]="Vb",t[t.Xb=2]="Xb"}(pn||(pn={}));var In=function(){try{return"function"==typeof BigInt&&"bigint"==typeof BigInt(0)}catch(t){return!1}}()?yn:bn;function Tn(t){return In.Up(jt.fromBits(t[0],t[1],!1),t[2])}function En(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var kn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];f.apply(this,n)};(kn.prototype=a.create(f.prototype)).constructor=kn;var Rn,Nn=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(En(e),e.constructor),e}return Mt(n,t),mt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(kn),On=function(){function t(){this.Cs=!1,this.Ps=!1,this.Os=[],this.Bs=[]}var n=t.prototype;return n.Ls=function(){if(!this.Cs&&!this.Ps){this.Cs=!0;for(var t=0,n=this.Os.slice();t<n.length;t++){(0,n[t])()}this.Ms()}},n.Ms=function(){if(!this.Ps){this.Ps=!0;for(var t=0,n=this.Bs.slice();t<n.length;t++){(0,n[t])()}vt(this.Os),vt(this.Bs)}},n.xs=function(t){this.Ps||this.Os.push(t)},n.Fs=function(t){this.Ps||at(this.Os,t)},n.Us=function(t){this.Ps||this.Bs.push(t)},n.Hs=function(t){this.Ps||at(this.Bs,t)},t}(),Pn=function(){function t(){this.Vs=new On}var n=t.prototype;return n.Xs=function(){this.Vs.Ls()},n.Ms=function(){this.Vs.Ms()},n.zs=function(t){var n=this.Vs;if(!n.Cs)if(t.Cs)n.Ls();else if(!n.Ps&&!t.Ps){var i=function(){e(),n.Ls()},e=function e(){t.Fs(i),t.Hs(e),n.Fs(i),n.Hs(e)};t.xs(i),t.Us(e),n.xs(i),n.Us(e)}},n.Ws=function(){var n=new t,i=new t,e=n.qs,r=i.qs,o=this.Vs,u=function(){e.Cs&&r.Ps||r.Cs&&e.Ps?o.Ls():e.Ps&&r.Ps&&o.Ms()};e.xs(u),r.xs(u),e.Us(u),r.Us(u),n.zs(o),i.zs(o);return o.Us(function(){e.Fs(u),r.Fs(u),e.Hs(u),r.Hs(u)}),[n,i]},mt(t,[{key:"qs",get:function(){return this.Vs}}]),t}(),An=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Mt(n,t),mt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(Nn);function Dn(t){return t instanceof f&&"AbortError"===t.name}function Cn(t,n){return t.then(function(t){return n.Ms(),t},function(t){throw n.Ms(),t})}j.resolve(),function(t){t.MZ="HELLO",t.xZ="HI_THERE",t.FZ="INITIALIZE",t.UZ="APPEND_INIT",t.HZ="APPEND_DATA",t.VZ="ACK",t.XZ="REMOVE",t.zZ="DESTROY_SESSION"}(Rn||(Rn={}));var xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Bn=16383;function Fn(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],xn[e>>2]+xn[(3&e)<<4|r>>4]+xn[(15&r)<<2|o>>6]+xn[63&o]));return u.join("")}var Ln=function(){function t(t){void 0===t&&(t=0),this.Lu=t}var n=t.prototype;return n.Bu=function(t){this.Lu+=t},n.Mu=function(t){this.Lu=t},n.xu=function(){return new t(this.Ou)},mt(t,[{key:"Ou",get:function(){return this.Lu}}]),t}();function zn(t,n){return null!=t&&t.substr(0,n.length)===n}var Mn=16384;function Un(t){var n=t.length;if(n<=Mn)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Mn)i.push(String.fromCharCode.apply(String,t.slice(e,e+Mn)));return i.join("")}function Wn(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 Un(n)}(t)}function qn(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function jn(t,n){return t>>n&63|128}function Vn(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(qn(t),n.push(t>>12&15|224),n.push(jn(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(jn(t,12)),n.push(jn(t,6))),n.push(63&t|128)):n.push(t)}function Hn(t,n){if(n.Ou>=t.length)throw new f("Invalid byte index");var i=255&t[n.Ou];if(n.Bu(1),128==(192&i))return 63&i;throw new f("Invalid continuation byte")}function Xn(t,n){var i=n.Ou;if(i>t.length)throw new f("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Bu(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|Hn(t,n);if(r>=128)return r;throw new f("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|Hn(t,n)<<6|Hn(t,n);if(o>=2048)return qn(o),o;throw new f("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|Hn(t,n)<<12|Hn(t,n)<<6|Hn(t,n);if(u>=65536&&u<=1114111)return u}throw new f("Invalid UTF-8 detected")}var Gn=65279;function Yn(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Ou,i);return n.Bu(2),e}function Kn(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Ou,i,e),n.Bu(2)}function Qn(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Ou+2<=t.byteLength;){var o=Yn(t,n,i);if(e&&!o)break;r.push(o)}return Un(r)}(ti(t),new ri,n,!1)}function $n(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)Kn(t,n,i.charCodeAt(o),e)}(ti(i),new ri,t,n),i}function Jn(t){return Wn(function(t,n){var i,e=[],r=new ri;if(!n){if(!1===(i=Xn(t,r)))return e;i===Gn||e.push(i)}for(;!1!==(i=Xn(t,r));)e.push(i);return e}(ni(t)))}function Zn(t){return new w(function(t){for(var n=[],i=0;i<t.length;i++)Vn(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 ti(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function ni(t){return new w(t.buffer,t.byteOffset,t.byteLength)}function ii(t){return t instanceof ArrayBuffer?new w(t):ni(t)}function ei(t){if(t.slice)return t.slice(0);var n=new w(t.byteLength);return n.set(t,0),n}var ri=function(){function t(t){void 0===t&&(t=0),this.Lu=t}var n=t.prototype;return n.Bu=function(t){this.Lu+=t},n.Mu=function(t){this.Lu=t},n.xu=function(){return new t(this.Ou)},n.Hu=function(){return new Ln(this.Ou<<3)},mt(t,[{key:"Ou",get:function(){return this.Lu}}]),t}(),oi=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],ui=ArrayBuffer.isView||function(t){return t&&ct(oi,nt.call(t))};function si(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 fi(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Bn)e.push(Fn(t,o,c.min(r,o+Bn)));if(1===i){var u=t[n-1];e.push(xn[u>>2]+xn[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(xn[s>>2]+xn[(3&s)<<4|f>>4]+xn[(15&f)<<2]+"=")}return e.join("")}(new w(t))}function hi(t){return t&&"function"!=typeof t?t.slice():t}function ai(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 ci=function(){function t(t){var n=this;this.Gs=pt(),this.Qs=void 0,this.Ys=void 0,this.js=function(t){n.Ks(t)},this.Ys=t||this}var n=t.prototype;return n.Zs=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.Gs[t];i?"function"==typeof i?this.Gs[t]=[i,n]:i.push(n):this.Gs[t]=n},n.$s=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.tu=function(){this.Gs=pt(),this.Qs=void 0},n.Ks=function(t){var n=hi(this.Gs[t.type]),i=hi(this.Qs);ai(this.Ys,t,n),ai(this.Ys,t,i)},n.nu=function(t,n){if("function"==typeof n)if("string"==typeof t)this.uu(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.uu(e,n)}},n.uu=function(t,n){var i=this.Gs[t];i&&("function"==typeof i?i===n&&(this.Gs[t]=void 0):at(i,n))},n.ou=function(t){if("string"==typeof t)this.Gs[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.Gs[i]=void 0}},n.au=function(t){var n=this.Qs;n&&("function"==typeof n?n===t&&(this.Qs=void 0):at(n,t))},n.fu=function(t,n){var i=this;return new j(function(e,r){if(n&&n.Cs)return r(new An);var o=function(t){s(),e(t)},u=function(){s(),r(new An)},s=function(){i.nu(t,o),n&&n.Fs(u)};i.Zs(t,o),n&&n.xs(u)})},t}(),vi=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},li=function(t){function n(n){var i;return(i=t.call(this,"append")||this).Xi=void 0,i.Xi=n,i}return Mt(n,t),n}(vi),di=function(t){function n(n){var i;return(i=t.call(this)||this).Zw=void 0,i.qft=0,i.Gi=new w(0),i._o=!1,i.A=!1,i.D=void 0,i.Zw=n,i}Mt(n,t);var i=n.prototype;return i.Rz=function(t,n){this.C&&0===this.Gi.length&&(this.Gi=this.D.slice()),this.qft+=n.bp(),this.Gi=si([this.Gi,t]),this.Ks(new li(t))},i.Ga=function(){this.$a||(this.Ks(new vi("close")),this._o=!0)},mt(n,[{key:"zm",get:function(){return this.qft}},{key:"Xi",get:function(){return this.Gi}},{key:"$a",get:function(){return this._o}},{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}(ci),wi=function(){function t(t){this.L=!1,this.W=void 0,this.H=void 0,this.DEFAULT_SEGMENT_DURATION_IN_SECONDS=1.1,this.jg="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 di(this.it(e));else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");this.H=new di(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.Ga=function(){this.W&&this.W.Ga(),this.H&&this.H.Ga()},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}(),bi=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).Qk=void 0,i.Qk=n,i}return Mt(n,t),n}(vi),gi=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 wi(i.tt),i.ht.H&&(i.ht.H.C=!0),i.ht.W&&(i.ht.W.C=!0),i.pt.push(new wi(i.tt)),i}Mt(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.Rz=function(t){this.an(t),this.ln(t),this.bn(t)},i.Cz=function(t){this.an(t)},i.Ka=function(t){this.an(t),this.bn(t)},i.Ms=function(){this.ht.Ga(),this.pt.forEach(function(t){return t.Ga()}),this.st.length=0},i.ln=function(t){var n=Tn(t.startPts),i=Tn(t.totalDuration);this.nn.set(t.mimeType,n.Rk(i))},i.gn=function(){this.ht.Ga(),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 wi(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.zm,e=!this.ht.W||0===this.ht.W.zm,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!==Rn.UZ&&i!==Rn.HZ||(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 Rn.UZ:this.ui(e),this.en=0,this.rn=0;break;case Rn.XZ:this.si(e);break;case Rn.HZ: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=Tn(t.totalDuration);if(n?this.ht.H.Rz(t.segment,i):this.ht.W.Rz(t.segment,i),n||1===this.tt.length){this.en+=i.bp();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.Ks(new bi(Tn(t.endTime)))},i.ii=function(t){var n=this;if(t.kind===Rn.XZ)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===Rn.XZ});-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===Rn.HZ)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===Rn.UZ)return[];var s=this.nn.get(i);if(void 0===s)return[];if(t.kind===Rn.XZ){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=Tn(t.startPts),u=Tn(t.totalDuration),s=o.Rk(u),f=ht(r,function(t){return t.kind===Rn.XZ}),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!==Rn.HZ||n.li(v,s)||(a=c)}var l=-1;return-1!==ht(i,function(t){return t.kind===Rn.UZ})&&(l=ht(r,function(t){return t.kind===Rn.UZ})),l>a&&(a=l+1),a>0?(r[a-1].kind===Rn.UZ&&(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===Rn.XZ});if(i>=0)return n.splice(0,i+1)}return[]},n.li=function(t,n){var i=n,e=Tn(t.startPts);return i.Sp(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.bp())+" ")}),J.yr(t)},i.pi=function(){var t=this;J.yr("[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.yr(e)},n.ti=function(t){return t.match(/audio/)?"audio":"video"},n}(ci);var mi=function(){function t(t,n,i){var e=this;this.ki=[],this.te=yt(),this.ie=0,this.Drt=void 0,this.ee=void 0,this.se=function(t){if(t.Qk.Sp(In.Cb(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.Drt=t,this.Drt.Zs("remove",this.se)}var n=t.prototype;return n.Gnt=function(t,n){var i=this.te.get(t);if(i)if(n===wt.Rl){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.Ms=function(){this.ki.length=0,this.ae.oE=0,this.te.clear(),this.ie=0},n.vS=function(){return this.ve(),new Ft([].concat(this.ee,[this.ae,this.ce],this.ki))},n.ve=function(){for(var t=this.Drt.sn(),n=0;n<t.length;n++){var i=t[n];if(!this.te.has(i.jg)){i.et=!0;var e=i.X;i.rt&&this.ki.push(new Ct),this.te.set(i.jg,i),this.ki.push(new Et(e,i.jg)),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.vs===St.dl?(this.be(t),this.ie-=t.T,this.ae.oE++):function(t){return t.vs===St.p}(t)&&this.ce.oE++)},n.be=function(t){this.te.delete(t.k)},t}(),pi=function(){function t(t){this.X0t=void 0,this.tr=void 0,this.nr=void 0,this.tt=t,this.X0t=new Lt,this.tr=new gi(this.tt);for(var n=0,i=this.tt;n<i.length;n++){var e=i[n];if(this.nr=new mi(this.tr,new Dt(0),new xt(0)),e.match(/video/)){var r=new At("video/index.m3u8");this.X0t.P(r)}else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");var o=new Bt("audio/index.m3u8");this.X0t.P(o)}}}var n=t.prototype;return n.er=function(t){if("master.m3u8"===t){if(this.X0t)return this.X0t.vS;throw new f("Master playlist not ready yet")}if(this.nr)return this.nr.vS();throw new f("Media playlist not ready yet")},n.Gnt=function(n){var i=n.split("/")[1];return this.nr.Gnt(i,t.ur(n))},n.Cz=function(t){this.tr.Cz(t)},n.Rz=function(t){this.tr.Rz(t)},n.Qet=function(t){this.tr.Ka(t)},n.Ms=function(){this.tr.Ms(),this.X0t.Ms(),this.nr&&this.nr.Ms()},t.ur=function(t){return t.match(/video/)?wt.Rl:wt.Il},t}();var yi,_i=function(){function n(t,n){var i=this;this.pit=void 0,this.FDt=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===Rn.FZ?4:o.t0===Rn.UZ?7:o.t0===Rn.HZ?9:o.t0===Rn.XZ?11:13;break;case 4:return e=n.mediaBufferConfigs,i.pit=new pi(e),o.abrupt("break",13);case 7:return i.pit.Cz(n),o.abrupt("break",13);case 9:return i.pit.Rz(n),o.abrupt("break",13);case 11:return i.pit.Qet(n),o.abrupt("break",13);case 13:r={kind:Rn.VZ},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.FDt}var i=n.prototype;return i.ar=function(t){return this.pit.er(t)},i.cr=function(n){if(this.pit){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(n){var i,e=function(t){i.enqueue(t.Xi)},r=function t(){i.close(),n.nu("append",e),n.nu("close",t)};return new t.ReadableStream({start:function(t){(i=t).enqueue(n.Xi),n.$a?i.close():(n.Zs("append",e),n.Zs("close",r))},cancel:function(){n.nu("append",e),n.nu("close",r),n.Ga()}})}(this.znt(n));return new Response(r,{headers:e})}throw new f("Stream not active.")},i.znt=function(t){return this.pit.Gnt(t)},i.close=function(){this.sr.close(),this.pit&&this.pit.Ms()},n}(),Si=function(){function t(){var t=this;this.iQ=yt(),this._Dt=void 0,this.FDt=function(n){var i=n.data;switch(i.kind){case Rn.MZ:t.vr().catch(lt);var e=i.port,r=dt(),o=new _i(e,n.source.id);t.iQ.set(r,o);e.addEventListener("message",function n(i){i.data.kind===Rn.zZ&&(t.lr(r),e.removeEventListener("message",n))});var u={kind:Rn.xZ,sessionId:r};e.postMessage(u)}},this.br=function(n){if(zn(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.iQ.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.Gy=function(t){this._Dt=t,t.addEventListener("message",this.FDt),t.addEventListener("fetch",this.br)},n.lr=function(t){var n=this.iQ.get(t);n&&n.close(),this.iQ.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._Dt.clients.matchAll());case 2:t=e.sent,n=t.map(function(t){return t.id}),this.iQ.forEach(function(t,e){ct(n,t.hr)||i.lr(e)});case 5:case"end":return e.stop()}},null,this,null,j)},t}();Si.mr=new Si,function(t){t.l="web",t.g="android",t.R="android-tv",t.N="ios",t.M="tvos",t.F="chromecast"}(yi||(yi={}));var Ii=e?e.userAgent:"",Ti=Ii.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ei=Ii.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),ki=Ii.match(/Android ([0-9\.]+)/i),Ri=Ii.match(/Windows NT ([0-9\.]+)/i),Ni=Ii.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Oi=Ii.match(/Firefox\/([0-9\.]+)/i),Pi=Ii.match(/OPR\/(\d+\.\d+)/i),Ai=Ii.match(/Tizen ([0-9\.]+)/i),Di=Ii.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Ci=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(Ii)||/(macintosh|mac(?=_powerpc)\s)/i.test(Ii),this.q=/Windows NT/i.test(Ii),this.G=Ri?l(Ri[1]):0,this.Y=/Android/i.test(Ii),this.j=ki?l(ki[1]):0,this.K=/windows phone (8|8\.1)/i.test(Ii),this.Z=/iPhone/i.test(Ii),this.J=/iPad/i.test(Ii),this.nt=this.V&&this.U&&!this.J,this.ut=/iPod/i.test(Ii),this.ot=/Mobile Safari/i.test(Ii),this.ct=/EOSSTB/i.test(Ii),this.ft=(this.Z||this.J||this.nt||this.ut)&&!this.K,this.vt=Di?l(Di[2]):0,this.dt=this.K||this.ft||this.Y||this.ot,this._t=/CriOS/i.test(Ii),this.wt=Boolean(t.chrome&&/google/i.test(e.vendor))||this._t,this.yt=this.wt&&/Edg\//i.test(e.userAgent),this.kt=Ei?v(Ei[1],10):0,this.bt=Boolean(t.chrome||/Chrome/i.test(Ii)||/CriOS/i.test(Ii)),this.At=Ti?v(Ti[1],10):0,this.Tt=/SMART-TV.*Tizen/i.test(Ii),this.St=Ai?l(Ai[1]):0,this.Et=/webos|web0s/i.test(Ii),this.It=/Edge\/\d+/i.test(Ii),this.Rt=/Trident/i.test(Ii),this.Nt=this.Rt&&!t.ActiveXObject&&"ActiveXObject"in t,this.Dt=/Vivaldi/i.test(Ii),this.Ct=/Firefox/i.test(Ii)&&!/Seamonkey/i.test(Ii),this.Pt=Oi?l(Oi[1]):0,this.Ot=/Safari/i.test(Ii)&&!/Chrome/i.test(Ii)&&!this.K&&!this.Tt,this.Bt=Ni?l(Ni[2]):0,this.Lt=Boolean(Pi),this.Mt=Pi?l(Pi[1]):0,this.xt=/CrKey/.test(Ii),this.Ft=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(Ii),this.Ut="web"===yi.R,this.Ht="web"===yi.g,this.Vt=this.Ht||this.Ut,this.Xt="web"===yi.N,this.zt="web"===yi.M,this.Wt="web"===yi.F}return mt(n,[{key:"qt",get:function(){return this.U}},{key:"Gt",get:function(){return this.V}},{key:"Qt",get:function(){return this.q}},{key:"Yt",get:function(){return this.G}},{key:"jt",get:function(){return this.Y}},{key:"Kt",get:function(){return this.j}},{key:"Zt",get:function(){return this.K}},{key:"Jt",get:function(){return this.Z}},{key:"$t",get:function(){return this.J}},{key:"in",get:function(){return this.nt}},{key:"un",get:function(){return this.ut}},{key:"hn",get:function(){return this.ft}},{key:"cn",get:function(){return this.vt}},{key:"fn",get:function(){return this.ct}},{key:"vn",get:function(){return this.ot}},{key:"dn",get:function(){return this.dt}},{key:"_n",get:function(){return this._t}},{key:"wn",get:function(){return this.wt}},{key:"yn",get:function(){return this.At}},{key:"pn",get:function(){return this.yt}},{key:"An",get:function(){return this.kt}},{key:"Tn",get:function(){return this.Tt}},{key:"Sn",get:function(){return this.St}},{key:"En",get:function(){return this.Et}},{key:"In",get:function(){return this.It}},{key:"Rn",get:function(){return this.Rt}},{key:"Nn",get:function(){return this.Nt}},{key:"Dn",get:function(){return this.Dt}},{key:"Cn",get:function(){return this.Ct}},{key:"Pn",get:function(){return this.Pt}},{key:"On",get:function(){return this.Ot}},{key:"Bn",get:function(){return this.Bt}},{key:"Ln",get:function(){return this.Lt}},{key:"Mn",get:function(){return this.Mt}},{key:"xn",get:function(){return this.xt}},{key:"Fn",get:function(){return this.Ft}},{key:"Un",get:function(){return!(!this.En&&!this.Tn)&&this.yn<=56}},{key:"Hn",get:function(){return this.Ut}},{key:"Vn",get:function(){return this.Ht}},{key:"Xn",get:function(){return this.Vt}},{key:"zn",get:function(){return this.Xt}},{key:"Wn",get:function(){return this.zt}},{key:"qn",get:function(){return this.Wt}},{key:"Gn",get:function(){return this.bt}}]),n}();Ci.Qn=new Ci;var xi=Ci.Qn,Bi=!(xi.Rn&&!xi.Nn),Fi=t.console;function Li(t){if(et(t))try{return JSON.stringify(t)}catch(t){}return t}function zi(t){return t.map(Li).join(" ")}function Mi(t){var n=Fi&&Fi[t];return n?n.bind&&Bi?n.bind(Fi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Fi[t](zi(i))}:void 0}var Ui,Wi=Mi("log")||lt,qi=Mi("warn")||Wi.bind(void 0,"WARNING:"),ji=Mi("error")||Wi.bind(void 0,"ERROR:"),Vi=(Ui=Fi&&Fi.assert)?Ui.bind&&Bi?Ui.bind(Fi):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];Fi.assert(t,zi(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];ji.apply(void 0,["Assertion failed:"].concat(i))}};function Hi(){return Date.now()||(new Date).getTime()}var Xi;jt.fromNumber(ot),function(t){t[t.Jn=1]="Jn",t[t.ni=2]="ni",t[t.$n=3]="$n",t[t.ei=4]="ei",t[t.ri=9]="ri"}(Xi||(Xi={}));var Gi=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Mt(n,t),n}(Nn),Yi=function(){function t(){}return t.prototype.oi=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Gi(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Gi;return new ne(n)},t}(),Ki=function(){function t(t){this.ai=void 0,this.ai=t}var n=t.prototype;return n.ci=function(t){return this.ai.isEqualNode(t.ai)},n.di=function(n){return new t(this.ai.cloneNode(n))},mt(t,[{key:"Zn",get:function(){return Xi.ni}},{key:"_i",get:function(){var t;return null!=(t=this.ai.localName)?t:re(this.ai.nodeName)}},{key:"gi",get:function(){return this.ai.nodeName}},{key:"wi",get:function(){var t;return null!=(t=this.ai.namespaceURI)?t:void 0}},{key:"Ai",get:function(){var t;return null!=(t=this.ai.prefix)?t:void 0}},{key:"Ti",get:function(){return this.ai.nodeValue}}]),t}(),Qi=function(){function t(t){this.Si=void 0,this.Ei=void 0,this.Si=t}var n=t.prototype;return n.Ii=function(t){return this.Ri.filter(function(n){return ie(n)&&n.Ni===t})},n.Di=function(t,n){return this.Ri.filter(function(i){return ie(i)&&i._i===n&&i.wi===t})},n.Ci=function(t){this.Si.appendChild(t.Pi),this.Ei&&this.Ei.push(t)},n.ci=function(t){return this.Si.isEqualNode(t.Pi)},mt(t,[{key:"Ri",get:function(){return void 0===this.Ei&&(this.Ei=function(t){for(var n=[],i=0;i<t.length;i++){var e=ee(t.item(i));e&&n.push(e)}return n}(this.Si.childNodes)),this.Ei}},{key:"Oi",get:function(){return this.Ri.filter(ie)}},{key:"Pi",get:function(){return this.Si}}]),t}(),$i=function(t){function n(n){return t.call(this,n)||this}Mt(n,t);var i=n.prototype;return i.Bi=function(t){if(this.Si.hasAttribute(t))return this.Si.getAttribute(t)},i.Li=function(t,n){if(this.Si.hasAttributeNS(t,n))return this.Si.getAttributeNS(t,n)},i.Mi=function(t){this.Si.removeAttribute(t)},i.xi=function(t,n){this.Si.removeAttributeNS(t,n)},i.Fi=function(t,n){this.Si.setAttribute(t,n)},i.Ui=function(t,n,i){this.Si.setAttributeNS(t,n,i)},i.di=function(t){return new n(this.Si.cloneNode(t))},mt(n,[{key:"Zn",get:function(){return Xi.Jn}},{key:"_i",get:function(){var t;return null!=(t=this.Si.localName)?t:re(this.Si.nodeName)}},{key:"wi",get:function(){var t;return null!=(t=this.Si.namespaceURI)?t:void 0}},{key:"Ai",get:function(){var t;return null!=(t=this.Si.prefix)?t:void 0}},{key:"Ni",get:function(){return this.Si.nodeName}},{key:"Hi",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Ki(t.item(i)));return n}(this.Si.attributes)}},{key:"Vi",get:function(){return this.Si.textContent}}]),n}(Qi),Ji=function(){function t(t){this.Si=void 0,this.Si=t}return t.prototype.ci=function(t){return this.Xi===t.Xi},mt(t,[{key:"Xi",get:function(){return this.Si.nodeValue}},{key:"Pi",get:function(){return this.Si}}]),t}(),Zi=function(t){function n(n){return t.call(this,n)||this}return Mt(n,t),n.prototype.di=function(t){return new n(this.Si.cloneNode(t))},mt(n,[{key:"Zn",get:function(){return Xi.$n}}]),n}(Ji),te=function(t){function n(n){return t.call(this,n)||this}return Mt(n,t),n.prototype.di=function(t){return new n(this.Si.cloneNode(t))},mt(n,[{key:"Zn",get:function(){return Xi.ei}}]),n}(Ji),ne=function(t){function n(n){return t.call(this,n)||this}return Mt(n,t),n.prototype.di=function(t){return new n(this.Si.cloneNode(t))},mt(n,[{key:"Zn",get:function(){return Xi.ri}},{key:"zi",get:function(){return new $i(this.Si.documentElement)}}]),n}(Qi);function ie(t){return function(t){return t.Zn===Xi.Jn}(t)}function ee(t){switch(t.nodeType){case Xi.Jn:return new $i(t);case Xi.$n:return new Zi(t);case Xi.ei:return new te(t)}}function re(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}function oe(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 ue(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){se(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&se(i,null,t.length,t),t}function se(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 fe=/[a-zA-Z]/,he=/[0-9]/,ae=/[0-9a-fA-F]/,ce=/^0x/i,ve=/^[0-9]+$/,le=/^[0-9a-fA-F]+$/,de=/^[0-7]+$/,we=a.prototype.toString,be=Array.isArray||function(t){return"[object Array]"===we.call(t)},ge="undefined"!=typeof Symbol&&"symbol"==typeof Symbol.iterator;function me(t){return be(t)?t:Array.from(t)}function pe(t){return t>=65&&t<=90}function ye(t){return pe(t)||function(t){return t>=97&&t<=122}(t)}function _e(t){return t>=48&&t<=57}function Se(t){return _e(t)||ye(t)}function Ie(t){return _e(t)||t>=65&&t<=70||t>=97&&t<=102}function Te(t){return pe(t)?t+32:t}function Ee(t){return _e(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function ke(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Re=c.min,Ne=String.fromCharCode,Oe=16384;function Pe(t){for(var n=t.length,i=[],e=0;e<n;e+=Oe){var r=Re(e+Oe,n);i.push(Ne.apply(null,t.slice(e,r)))}return i.join("")}var Ae=/[^\0-\x7E]/,De=/[\x2E\u3002\uFF0E\uFF61]/g,Ce={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xe=c.floor,Be=String.fromCharCode;function Fe(t){throw new RangeError(Ce[t])}function Le(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 ze,Me,Ue,We=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},qe=function(t,n,i){var e=0;for(t=i?xe(t/700):t>>1,t+=xe(t/n);t>455;e+=36)t=xe(t/35);return xe(e+36*t/(t+38))},je=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(De,".")).split("."),n).join(".");return e+r}(t,function(t){return Ae.test(t)?"xn--"+function(t){for(var n=[],i=(t=Le(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(Be(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>xe((2147483647-r)/w)&&Fe("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&&Fe("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(Be(We(_+S%I,0))),p=xe(S/I)}n.push(Be(We(p,0))),o=qe(r,w,a==h),r=0,++a}}++r,++e}return n.join("")}(t):t})};function Ve(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 Pe(n)}function He(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Xe(t,n){return t>>n&63|128}function Ge(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(He(t),n.push(t>>12&15|224),n.push(Xe(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Xe(t,12)),n.push(Xe(t,6))),n.push(63&t|128)):n.push(t)}function Ye(t){for(var n=[],i=0;i<t.length;i++){Ge(t[i],n)}return n}function Ke(){if(Ue>=Me)throw new f("Invalid byte index");var t=255&ze[Ue];if(Ue++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function Qe(){var t,n;if(Ue>Me)throw new f("Invalid byte index");if(Ue===Me)return!1;if(t=255&ze[Ue],Ue++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ke())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ke()<<6|Ke())>=2048)return He(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ke()<<12|Ke()<<6|Ke())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}function $e(t){return[37,ke(t>>4),ke(15&t)]}function Je(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Ze(t){return Je(t)||32===t||34===t||60===t||62===t||96===t}function tr(t){return Ze(t)||35===t||63===t||123===t||125===t}function nr(t){return tr(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function ir(t){return t<33||t>126||34===t||35===t||60===t||62===t}function er(t){return ir(t)||39===t}function rr(t,n){if(!n(t))return[t];for(var i=Ye([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,$e(o))}return e}function or(t,n){for(var i=[],e=0,r=Le(t);e<r.length;e++){var o=r[e];i.push.apply(i,rr(o,n))}return Ve(i)}function ur(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&&Ie(t[e+1])&&Ie(t[e+2])){var o=Ee(t[e+1])<<4|Ee(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Ye(t))}function sr(t){return Ve(function(t){ze=t.slice(),Me=ze.length,Ue=0;for(var n,i=[];!1!==(n=Qe());)i.push(n);return i}(ur(Le(t))))}function fr(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&&ae.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(!he.test(t[a]))throw new h;for(;a<o&&he.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 hr(t){var n=10,i=ve;return ce.test(t)?(t=t.slice(2),n=16,i=le):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=de),""===t?0:i.test(t)?v(t,n):void 0}var ar={Wi:4},cr=/[\0\t\n\r #%/:?@\[\\\]]/,vr=/[\0\t\n\r #/:?@\[\\\]]/;function lr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new h("Invalid IPv6 address");return{Wi:2,qi:fr(t.slice(1,-1))}}if(!n)return function(t){if(vr.test(t))throw new h("Invalid code point in opaque host");var n=or(t,Je);return""===n?ar:{Wi:3,Gi:n}}(t);var i=function(t){return function(t){return je(t.toLowerCase())}(t)}(sr(t));if(cr.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=hr(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?{Wi:1,qi:e}:""===i?ar:{Wi:0,Qi:i}}function dr(t){switch(t.Wi){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.qi);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.qi)+"]";case 3:return t.Gi;case 4:return""}}var wr=/\+/g;function br(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(wr," "),s=s.replace(wr," ");var f=sr(u),h=sr(s);i.push([f,h])}}return i}function gr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=mr(Ye(Le(e[0])))+"="+mr(Ye(Le(e[1])))}return n}function mr(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||Se(n)?i.push(r):i.push.apply(i,$e(r))}return Pe(i)}var pr=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function yr(t){var n=""+t,i=pr.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Sr(o))if(Ir(o)||r===i-1)e.push(_r);else{var u=t.charCodeAt(r+1);Ir(u)?(e.push(o,u),r++):e.push(_r)}else e.push(o)}return t.slice(0,n)+Pe(e)}(n,i.index):n}var _r=65533,Sr=function(t){return 55296==(63488&t)},Ir=function(t){return 0!=(1024&t)};function Tr(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Er(t){t.Yi.length=0}function kr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Yi,br(n))}function Rr(t){if(t.ji){var n=gr(t.Yi);""===n&&(n=null),t.ji.ji.Ki=n}}var Nr=function(){function t(t){if(void 0===t&&(t=void 0),this.ji=null,null==t)this.Yi=[];else if("object"==typeof t||"function"==typeof t)if((o=t)instanceof Nr&&be(o.Yi)&&(!ge||o[Symbol.iterator]===Or))this.Yi=t.Yi.slice();else if(function(t){return null!=t&&(!!be(t)||!!ge&&"function"==typeof t[Symbol.iterator])}(t)){this.Yi=[];for(var n=0,i=me(t);n<i.length;n++){var e=me(i[n]);if(2!==e.length)throw new h("Invalid name-value pair");this.Yi.push([yr(e[0]),yr(e[1])])}}else for(var r in this.Yi=[],t)a.prototype.hasOwnProperty.call(t,r)&&this.Yi.push([yr(r),yr(t[r])]);else(t=yr(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Yi=br(t);var o}var n=t.prototype;return n.append=function(t,n){t=yr(t),n=yr(n),this.Yi.push([t,n]),Rr(this)},n.delete=function(t){t=yr(t);for(var n=this.Yi,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Rr(this)},n.get=function(t){t=yr(t);for(var n=this.Yi,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=yr(t);for(var n=this.Yi,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=yr(t);for(var n=this.Yi,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=yr(t),n=yr(n);for(var i=this.Yi,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]),Rr(this)},n.sort=function(){ue(this.Yi,Tr),Rr(this)},n.toString=function(){return gr(this.Yi)},n.entries=function(){return new Cr(this.Yi,Pr)},n.keys=function(){return new Cr(this.Yi,Ar)},n.values=function(){return new Cr(this.Yi,Dr)},n.forEach=function(t){var n=this;this.Yi.forEach(function(i){return t(i[1],i[0],n)})},t}(),Or=Nr.prototype.entries;ge&&(Nr.prototype[Symbol.iterator]=Or);var Pr=function(t){return[t[0],t[1]]},Ar=function(t){return t[0]},Dr=function(t){return t[1]},Cr=function(){function t(t,n){this.Zi=0,this.Yi=t,this.Ji=n}return t.prototype.next=function(){return this.Zi<this.Yi.length?{done:!1,value:this.Ji(this.Yi[this.Zi++])}:{done:!0,value:void 0}},t}(),xr="null";var Br=a.create(null);Br.ftp=21,Br.file=0,Br.gopher=70,Br.http=80,Br.https=443,Br.ws=80,Br.wss=443;var Fr=/^(?:\.|%2e)$/i,Lr=/^(?:\.|%2e){2}$/i;function zr(t){return Fr.test(t)}function Mr(t){return Lr.test(t)}function Ur(t){return void 0!==Br[t]}function Wr(t){return Ur(t.$i)}function qr(t){return""!==t.re||""!==t.ue}function jr(t){var n=t.length;if(!(n>=2))return!1;if(!Hr(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 Vr(t){return 2===t.length&&fe.test(t[0])&&(":"===t[1]||"|"===t[1])}function Hr(t){return 2===t.length&&Vr(Pe(t))}function Xr(t){return Vr(t)&&":"===t[1]}function Gr(t){var n=t.oe;0!==n.length&&("file"===t.$i&&1===n.length&&Xr(n[0])||n.pop())}function Yr(t){return null===t.fe||ar===t.fe||t._e||"file"===t.$i}var Kr=-1,Qr=/\t|\n|\r/g,$r=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Jr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new to,t=t.replace($r,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,a=Le(t=t.replace(Qr,"")),c=a.length,l=0;l<=c;){var d=l<c?a[l]:Kr;switch(r){case 0:if(!ye(d)){if(null===e){o.length=0,r=2;continue}throw new h("Invalid scheme")}o.push(Te(d)),r=1;break;case 1:if(Se(d)||43===d||45===d||46===d)o.push(Te(d));else{if(58!==d){if(null===e){o.length=0,r=2,l=0;continue}throw new h("Invalid scheme")}var w=Ve(o);if(null!==e){if(Ur(i.$i)&&!Ur(w))return;if(!Ur(i.$i)&&Ur(w))return;if((qr(i)||null!==i.we)&&"file"===w)return;if("file"===i.$i&&(i.fe===ar||null===i.fe))return}if(i.$i=w,null!==e)return void(Wr(i)&&i.we===Br[i.$i]&&(i.we=null));o.length=0,"file"===i.$i?r=13:Wr(i)&&n&&n.$i===i.$i?r=3:Wr(i)?r=7:47===a[l+1]?(r=4,l+=1):(i._e=!0,i.oe.push(""),r=18)}break;case 2:if(!n||n._e&&35!==d)throw new h("Invalid scheme");n._e&&35===d?(i.$i=n.$i,i.oe=n.oe.slice(),i.Ki=n.Ki,i.me="",i._e=!0,r=20):"file"!==n.$i?(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.$i=n.$i,Kr===d?(i.re=n.re,i.ue=n.ue,i.fe=n.fe,i.we=n.we,i.oe=n.oe.slice(),i.Ki=n.Ki):47===d?r=6:63===d?(i.re=n.re,i.ue=n.ue,i.fe=n.fe,i.we=n.we,i.oe=n.oe.slice(),i.Ki="",r=19):35===d?(i.re=n.re,i.ue=n.ue,i.fe=n.fe,i.we=n.we,i.oe=n.oe.slice(),i.Ki=n.Ki,i.me="",r=20):92===d&&Wr(i)?r=6:(i.re=n.re,i.ue=n.ue,i.fe=n.fe,i.we=n.we,i.oe=n.oe.slice(),i.oe.pop(),r=17,l-=1);break;case 6:!Wr(i)||47!==d&&92!==d?47===d?r=9:(i.re=n.re,i.ue=n.ue,i.fe=n.fe,i.we=n.we,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=Ve(rr(g,nr));f?i.ue+=m:i.re+=m}else f=!0}o.length=0}else if(Kr===d||47===d||63===d||35===d||Wr(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.$i)l-=1,r=15;else if(58!==d||s)if(Kr===d||47===d||63===d||35===d||Wr(i)&&92===d){if(l-=1,Wr(i)&&0===o.length)throw new h("Invalid host");if(null!==e&&0===o.length&&(qr(i)||null!==i.we))return;var p=lr(Ve(o),Wr(i));if(i.fe=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=lr(Ve(o),Wr(i));if(i.fe=y,o.length=0,r=12,11===e)return}break;case 12:if(_e(d))o.push(d);else{if(!(Kr===d||47===d||63===d||35===d||Wr(i)&&92===d||null!==e))throw new h("Invalid port");if(0!==o.length){var _=v(Ve(o),10);if(_>65535)throw new h("Invalid port");i.we=_===Br[i.$i]?null:_,o.length=0}if(null!==e)return;r=16,l-=1}break;case 13:i.$i="file",47===d||92===d?r=14:n&&"file"===n.$i?Kr===d?(i.fe=n.fe,i.oe=n.oe.slice(),i.Ki=n.Ki):63===d?(i.fe=n.fe,i.oe=n.oe.slice(),i.Ki="",r=19):35===d?(i.fe=n.fe,i.oe=n.oe.slice(),i.Ki=n.Ki,i.me="",r=20):(jr(a.slice(l))||(i.fe=n.fe,i.oe=n.oe.slice(),Gr(i)),r=17,l-=1):(r=17,l-=1);break;case 14:47===d||92===d?r=15:(n&&"file"===n.$i&&!jr(a.slice(l))&&(Xr(n.oe[0])?i.oe.push(n.oe[0]):i.fe=n.fe),r=17,l-=1);break;case 15:if(Kr===d||47===d||92===d||63===d||35===d)if(l-=1,null===e&&Hr(o))r=17;else if(0===o.length){if(i.fe=ar,null!==e)return;r=16}else{var S=lr(Ve(o),Wr(i));if(0===S.Wi&&"localhost"===S.Qi&&(S=ar),i.fe=S,null!==e)return;o.length=0,r=16}else o.push(d);break;case 16:Wr(i)?(r=17,47!==d&&92!==d&&(l-=1)):null===e&&63===d?(i.Ki="",r=19):null===e&&35===d?(i.me="",r=20):Kr!==d&&(r=17,47!==d&&(l-=1));break;case 17:if(Kr===d||47===d||Wr(i)&&92===d||null===e&&(63===d||35===d)){var I=Ve(o);if(Mr(I)?(Gr(i),47===d||Wr(i)&&92===d||i.oe.push("")):!zr(I)||47===d||Wr(i)&&92===d?zr(I)||("file"===i.$i&&0===i.oe.length&&Hr(o)&&(ar!==i.fe&&null!==i.fe&&(i.fe=ar),o[1]=58,I=Ve(o)),i.oe.push(I)):i.oe.push(""),o.length=0,"file"===i.$i&&(Kr===d||63===d||35===d))for(;i.oe.length>1&&""===i.oe[0];)i.oe.shift();63===d?(i.Ki="",r=19):35===d&&(i.me="",r=20)}else o.push.apply(o,rr(d,tr));break;case 18:63===d?(i.Ki="",r=19):35===d?(i.me="",r=20):Kr!==d&&(i.oe[0]+=Ve(rr(d,Je)));break;case 19:null===e&&35===d?(i.me="",r=20):Kr!==d&&(i.Ki+=Ve(rr(d,Wr(i)?er:ir)));break;case 20:Kr===d||0===d||(i.me+=Ve(rr(d,Ze)))}l++}return i}function Zr(t,n,i,e){try{Jr(t,n,i,e)}catch(t){}}var to=function(){this.$i="",this.re="",this.ue="",this.fe=null,this.we=null,this.oe=[],this.Ki=null,this.me=null,this._e=!1};function no(t){switch(t.$i){case"blob":var n;try{n=Jr(t.oe[0],null)}catch(t){return xr}return no(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return i=t.$i,e=t.fe,r=t.we,i+"://"+dr(e)+(null===r?"":":"+r);case"file":default:return xr}var i,e,r}var io,eo,ro=function(){function t(t,n){var i,e,r=null;if(null!=n)if(null!=(i=n)&&i instanceof ro&&"object"==typeof i.ji)r=n.ji;else try{r=Jr(String(n),null)}catch(t){throw new h("Invalid base URL: "+t.message)}try{e=Jr(String(t),r)}catch(t){throw new h("Invalid URL: "+t.message)}var o=e.Ki;this.ji=e,this.Ki=function(t){var n=new Nr;return null!==t&&kr(n,t),n}(o),this.Ki.ji=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.$i+":";if(null!==t.fe?(i+="//",qr(t)&&(i+=t.re,""!==t.ue&&(i+=":"+t.ue),i+="@"),i+=dr(t.fe),null!==t.we&&(i+=":"+t.we)):null===t.fe&&"file"===t.$i&&(i+="//"),t._e)i+=t.oe[0];else for(var e=0,r=t.oe;e<r.length;e++)i+="/"+r[e];return null!==t.Ki&&(i+="?"+t.Ki),n||null===t.me||(i+="#"+t.me),i}(this.ji)},set:function(t){var n;try{n=Jr(String(t),null)}catch(t){throw new h("Invalid URL: "+t.message)}this.ji=n,Er(this.Ki);var i=this.ji.Ki;null!==i&&kr(this.Ki,i)}},{key:"origin",get:function(){return no(this.ji)}},{key:"protocol",get:function(){return this.ji.$i+":"},set:function(t){Zr(t+":",null,this.ji,0)}},{key:"username",get:function(){return this.ji.re},set:function(t){Yr(this.ji)||(this.ji.re=or(t,nr))}},{key:"password",get:function(){return this.ji.ue},set:function(t){Yr(this.ji)||(this.ji.ue=or(t,nr))}},{key:"host",get:function(){var t=this.ji,n=t.fe;if(null===n)return"";var i=t.we,e=dr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.ji._e||Zr(t,null,this.ji,10)}},{key:"hostname",get:function(){var t=this.ji.fe;return null===t?"":dr(t)},set:function(t){this.ji._e||Zr(t,null,this.ji,11)}},{key:"port",get:function(){var t=this.ji.we;return null===t?"":""+t},set:function(t){Yr(this.ji)||(""===t?this.ji.we=null:Zr(t,null,this.ji,12))}},{key:"pathname",get:function(){var t=this.ji.oe;return this.ji._e?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.ji._e||(this.ji.oe.length=0,Zr(t,null,this.ji,16))}},{key:"search",get:function(){var t=this.ji.Ki;return null===t||""===t?"":"?"+t},set:function(t){t=yr(t);var n=this.ji;if(""===t)return n.Ki=null,void Er(this.Ki);"?"===t[0]&&(t=t.slice(1)),n.Ki="",Zr(t,null,n,19),kr(this.Ki,t)}},{key:"searchParams",get:function(){return this.Ki}},{key:"hash",get:function(){var t=this.ji.me;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.ji.me="",Zr(t,null,this.ji,20)):this.ji.me=null}}])&&oe(n.prototype,i),e&&oe(n,e),t}();function oo(t){return t.document&&t.document.baseURI||t.location.href||""}function uo(){return void 0!==i?i.createElement("video"):void 0}function so(){return eo||(eo=uo()),eo}var fo=!!("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch)||!(!e||!e.msMaxTouchPoints),ho=so(),ao=!(!ho||!ho.webkitShowPlaybackTargetPicker),co=function(){function t(){this.Be=void 0,this.Le=!1,this.qt=fo,this.dn=!1,this.Me=!0}var i=t.prototype;return i.xe=function(){return 0},i.Fe=function(t,n){return!0},i.Ue=function(t){return t>=1/6*2},mt(t,[{key:"He",get:function(){return void 0===this.Be&&(this.Be=this.xe()),this.Be}},{key:"Ve",get:function(){return!xi.Fn}},{key:"Xe",get:function(){return n.devicePixelRatio||1}},{key:"ze",get:function(){return ao}},{key:"We",get:function(){return!1}},{key:"qe",get:function(){return!0}},{key:"Ge",get:function(){return xi.On||xi.hn}},{key:"Qe",get:function(){return!0}},{key:"Ye",get:function(){return!0}},{key:"je",get:function(){return!1}},{key:"Ke",get:function(){}},{key:"Ze",get:function(){return!0}},{key:"Je",get:function(){return!1}}]),t}(),vo=function(){var t=uo();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(xi.in)return!1;var t=uo();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var lo=function(t){function n(n){var i;return(i=t.call(this)||this).$e=void 0,i.$e=n,i.$e&&(i.Le=i.$e.Le,i.qt=i.$e.qt,i.Me=vo&&i.$e.Me),i}Mt(n,t);var i=n.prototype;return i.xe=function(){return this.$e?this.$e.He:t.prototype.xe.call(this)},i.Fe=function(n,i){return this.$e?this.$e.Fe(n,i):t.prototype.Fe.call(this,n,i)},i.Ue=function(n){return this.$e?this.$e.Ue(n):t.prototype.Ue.call(this,n)},mt(n,[{key:"Ke",get:function(){var t;return null==(t=this.$e)?void 0:t.Ke}},{key:"Ze",get:function(){var t,n;return null==(t=null==(n=this.$e)?void 0:n.Ze)||t}}]),n}(co),wo=function(t){function n(n){var i;return(i=t.call(this,n)||this).Le=!0,i.dn=!0,i}return Mt(n,t),mt(n,[{key:"je",get:function(){return xi.hn}}]),n}(lo),bo=function(t){function n(){return t.apply(this,arguments)||this}return Mt(n,t),n.prototype.xe=function(){if(!io.MediaSource)return 1},mt(n,[{key:"je",get:function(){return!0}}]),n}(wo),go=function(t){function n(){return t.apply(this,arguments)||this}return Mt(n,t),n.prototype.Fe=function(n,i){return t.prototype.Fe.call(this,n,i)},mt(n,[{key:"We",get:function(){return xi.Sn<3}},{key:"qe",get:function(){return xi.Sn>=3}},{key:"Je",get:function(){return xi.Sn<3}}]),n}(lo),mo=function(t){function n(){return t.call(this)||this}return Mt(n,t),n}(co),po=function(t){function n(){return t.apply(this,arguments)||this}return Mt(n,t),n.prototype.Fe=function(t,n){if(t&&t.ir&&n&&n.ir){var i=yo(t.ir,"mp4a.40.2")&&yo(n.ir,"mp4a.40.5"),e=yo(t.ir,"mp4a.40.5")&&yo(n.ir,"mp4a.40.2"),r=yo(t.ir,"mp4a.40.2")&&yo(n.ir,"mp4a.40.34"),o=yo(t.ir,"mp4a.40.34")&&yo(n.ir,"mp4a.40.2"),u=yo(t.ir,"mp4a.40.5")&&yo(n.ir,"mp4a.40.34"),s=yo(t.ir,"mp4a.40.34")&&yo(n.ir,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},mt(n,[{key:"Ke",get:function(){if(xi.Gt)return 4096}}]),n}(mo);function yo(t,n){return t.indexOf(n)>-1}var _o,So=function(t){function n(){return t.apply(this,arguments)||this}return Mt(n,t),n.prototype.Ue=function(t){return t>=2},n}(mo),Io=function(t){function n(){var n;return(n=t.call(this)||this).Le=xi.Bn>=11,n.Me=xi.On&&!(xi.hn&&xi.Bn<10),n}return Mt(n,t),n}(mo),To=function(t){function n(){return t.apply(this,arguments)||this}return Mt(n,t),mt(n,[{key:"Qe",get:function(){return!1}}]),n}(lo),Eo=function(t){function n(){return t.apply(this,arguments)||this}return Mt(n,t),mt(n,[{key:"Ze",get:function(){return!xi.Qt||(xi.pn?92!==xi.An:xi.yn>=100)}}]),n}(mo),ko=function(t){function n(){return t.apply(this,arguments)||this}return Mt(n,t),mt(n,[{key:"je",get:function(){return!0}}]),n}(lo),Ro=function(){function n(){var n;this.rr=void 0,this.dr=new Yi,this._r=new No,this.gr=(n=function(){if(xi.Cn)return new po;if(xi.In||xi.Rn)return new So;if(xi.On)return new Io;if(xi.wn)return new Eo;return new mo}(),xi.hn?new bo(n):xi.dn?new wo(n):xi.Tn?new go(n):xi.En?new To(n):xi.Gt?new ko(n):new lo(n)),this.wr=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.rr=function(){return t.performance.now()}:this.rr=Hi}var i=n.prototype;return i.yr=function(){Wi.apply(void 0,arguments)},i.pr=function(){qi.apply(void 0,arguments)},i.Ar=function(){ji.apply(void 0,arguments)},i.Tr=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];Vi.apply(void 0,[t].concat(i))},i.jn=function(t,n){return r(t,n)},i.Sr=function(t,n){return u(t,n)},i.Yn=function(t){o(t)},i.Er=function(t){s(t)},i.oi=function(t){return this.dr.oi(t)},i.Ir=function(){return this.Rr.Ir()},i.Nr=function(){return this.Rr.Nr()},i.Dr=function(){return this.Rr.Dr()},i.Cr=function(){return this.Rr.Cr()},i.Pr=function(){return this.Rr.Pr()},i.Or=function(t,n){return this.Rr.Or(t,n)},i.Br=function(t){return this.Rr.Br(t)},i.Lr=function(t,n){var i;return void 0===n&&(n=oo(io)),i="object"!=typeof n||n instanceof ro?n:n.href,new ro(t,i)},i.Mr=function(n,i){if(void 0===i&&(i=oo(io)),this.wr){var e="string"==typeof i?i:i.toString();return new t.URL(n,e).href}return this.Lr(n,i).href},mt(n,[{key:"xr",get:function(){return this._r}},{key:"Fr",get:function(){return this.gr}},{key:"Ur",get:function(){return{Hr:e&&e.userAgent.match(/Android /i)?"Android":"other",Vr:Boolean(e&&e.userAgent.match(/Android 8.0.0/i))}}},{key:"Xr",get:function(){return t&&t.location&&"https:"===t.location.protocol}},{key:"zr",get:function(){return"languages"in e?e.languages.slice():[e.language]}}]),n}(),No=function(){function t(){}return mt(t,[{key:"Wr",get:function(){return e.oscpu}},{key:"Fr",get:function(){return e.platform}},{key:"qr",get:function(){return e.vendor}},{key:"Gr",get:function(){return e.vendorSub}}]),t}();function Oo(){return(Oo=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.ns="9a04f079-9840-4286-ab92-e65be0885f95",t.rs="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",t.us="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",t.hs="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"}(_o||(_o={}));var Po,Ao=_o.ns,Do="urn:uuid:"+Ao,Co="com.microsoft.playready",xo=_o.rs,Bo="urn:uuid:"+xo,Fo=_o.us,Lo="urn:uuid:"+Fo,zo=_o.hs,Mo="urn:uuid:"+zo,Uo="com.apple.fps.1_0";!function(t){t.ns="playready",t.rs="widevine",t.hs="fairplay",t.us="clearkey",t.fs="aes128"}(Po||(Po={}));var Wo={vs:Po.ns,ds:Co,ls:"cenc",_s:Ao,gs:Do,ys:"PlayReady"},qo={vs:Po.rs,ds:"com.widevine.alpha",ls:"cenc",_s:xo,gs:Bo,ys:"Widevine"},jo={vs:Po.hs,ds:Uo,ls:"skd",_s:zo,gs:Mo,ys:"FairPlay"};Po.hs;var Vo={vs:Po.us,ds:"org.w3.clearkey",ls:"cenc",_s:Fo,gs:Lo,ys:"ClearKey"},Ho=xi.wn&&xi.yn>=42||xi.Cn&&xi.Pn>=38||xi.In||xi.Nn||xi.Ln&&xi.Mn>=29;function Xo(t,n){return e="audio",null!=(i=t)&&-1!==i.indexOf(e)?{initDataTypes:["cenc"],audioCapabilities:[Oo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Oo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]};var i,e}var Go,Yo=function(){function t(t){this.As=void 0,this.Ts=yt(),this.Ss=void 0,this.As=t}var n=t.prototype;return n.Pr=function(){return this.Br(qo)},n.Nr=function(){return this.Br(Vo)},n.Cr=function(){return this.Br(Wo)},n.Dr=function(){return this.Br(jo)},n.Br=function(t){var n=t.gs,i=this.Ts.get(n);if(i)return i;var e=this.Or(t,'video/mp4; codecs="avc1.42000a"');return this.Ts.set(n,e),e},n.Or=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.As.Es(t.ds,[Xo(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.As.Es(t.ds,[Xo(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.Ir=function(){return this.Ss||(this.Ss=this.Is()),this.Ss},n.Is=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(Ho){t.next=4;break}return t.abrupt("return",!1);case 4:return t.next=6,Z.awrap(this.Nr());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}(),Ko=["cenc"],Qo=function(t){function n(n){var i;return(i=t.call(this,"du")||this).vu=n,i}return Mt(n,t),n}(vi),$o=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"_u")||this).vu=n,o.wu=i,o._u=e,o.mu=r,o}return Mt(n,t),n}(vi);!function(t){t.pu="bu",t.Au="Tu"}(Go||(Go={}));var Jo=new w([0]).buffer,Zo=function(){function t(){this.Eu=void 0,this.Eu=[]}var n=t.prototype;return n.Iu=function(t){for(var n=0,i=this.Eu;n<i.length;n++){if(i[n][0]===t)return!0}return!1},n.Ru=function(t){for(var n=0,i=this.Eu;n<i.length;n++){var e=i[n];if(e[0]===t)return e[1]}},n.Nu=function(t,n){this.Eu.forEach(function(n){return t(n[1],n[0])},n)},n.Du=function(t,n){this.Eu.push([t,n])},n.Cu=function(){vt(this.Eu)},mt(t,[{key:"Pu",get:function(){return this.Eu.length}}]),t}(),tu=function(){function t(){var t=this;this.Vu=void 0,this.Xu=void 0,this.Wu=void 0,this.Vu=new j(function(n,i){t.Xu=n,t.Wu=i})}var n=t.prototype;return n.Gu=function(t){this.Xu&&(this.Xu(t),this.Ms())},n.Qu=function(t){this.Wu&&(this.Wu(t),this.Ms())},n.Xs=function(){this.Vu.catch(lt),this.Qu(new An)},n.Ms=function(){this.Xu=void 0,this.Wu=void 0},t}();function nu(t,n){return t===Co?function(t){if(t.byteLength<2*iu.length)return t;if(Qn(new DataView(t,0,2*iu.length),!0)===iu)return t;return n=t,$n('<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">'+fi(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 iu="<PlayReady";var eu=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Yu=void 0,o.ju=void 0,o.Yu=i,o.ju=e,o}return Mt(n,t),n}(Nn),ru=function(t,n){return(ru=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 ou(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}ru(t,n),t.prototype=null===n?a.create(n):(i.prototype=n.prototype,new i)}function uu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}function su(t,n,i){return c.min(c.max(t,n),i)}function fu(t,n){return t>>8-n}function hu(t,n){return t&(1<<n)-1}!function(){function t(t,n){this.Ku=t,this.Zu=n}t.prototype.get=function(t){var n=this.Ku.get(t);if(0===this.Zu||void 0===n)return n;var i=this.Ku.get(t+1)||0,e=n&(1<<8-this.Zu)-1,r=i>>8-this.Zu;return(e<<this.Zu)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Ku.get(c.floor((t+this.Zu)/8));if(void 0!==n)return(n&1<<7-this.Zu-t%8)>0?1:0}},a.defineProperty(t.prototype,"bitLength",{get:function(){return this.Ku.bitLength-this.Zu},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"length",{get:function(){return this.Ku.length},enumerable:!1,configurable:!0})}(),function(){function t(t){this.Ju=t,this.$u=0,this.uo=0}a.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.$u+this.uo},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"done",{get:function(){return this.$u===this.Ju.length&&0===this.uo},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"location",{get:function(){return{byte:this.$u,bit:this.uo}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.Ju);return n.seek(this.$u,this.uo),n},t.prototype.canReadBits=function(t){return 8*this.$u+t+this.uo<=8*this.Ju.length},t.prototype.canReadBytes=function(t){return 0===this.uo?this.$u+t<=this.Ju.length:this.$u+t<this.Ju.length},t.prototype.incBit=function(){this.uo++,this.uo>7&&(this.$u++,this.uo=0)},t.prototype.seek=function(t,n){this.$u=t,this.uo=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new f("Cannot read past end of buffer.");return this.Ju.get(this.$u)>>7-this.uo&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.uo)return this.Ju.get(this.$u++);var t=hu(this.Ju.get(this.$u),8-this.uo),n=fu(this.Ju.get(this.$u+1),this.uo);return this.$u++,t<<this.uo|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.uo&&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.uo+t;this.$u+=n>>3,this.uo=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 au=function(t,n){return t===n?0:t<n?-1:t>n?1:d(t)?d(n)?0:1:-1},cu=function(){function t(){this.oo=[],this.ao=[],this.Ee=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.ao.length)this.ao.push(0);else{var e=this.ao[this.ao.length-1]+this.oo[this.oo.length-1].length;this.ao.push(e)}this.oo.push(t.subarray(n,n+i)),this.Ee+=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.oo;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.oo=[],this.ao=[],this.Ee=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.ao[n];return this.oo[n][i]}},a.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.oo.length<1)return-1;if(this.oo.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.oo[0];return"number"==typeof t?uu(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=uu(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.ao,t,au)},t.prototype.join=function(){if(1===this.oo.length)return this.oo[0];var t=new w(this.length);return this.copyInternal(t,0),t},a.defineProperty(t.prototype,"length",{get:function(){return this.Ee},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=su(n,0,this.length),r=su(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.oo[u],f=e,h=f-this.ao[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.ao[u],s=this.oo[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.oo.length-1,e=this.oo[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.oo[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),vu=function(){function t(n){this.do=n||t.BUFFER_CHUNK_SIZE,this._o=!1,this.mo=new cu,this.Ju=new w(this.do),this.po=0,this.Ao=0,this.uo=7}return t.prototype.closeByte=function(){this.Ju[this.po++]=this.Ao,this.po>=this.do&&this.closeBuffer(),this.Ao=0,this.uo=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.po&&(this.mo.pushRange(this.Ju,0,this.po),t&&(this.Ju=new w(this.do)),this.po=0)},a.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.uo},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this._o)throw new f("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this._o=!0,this.mo},t.prototype.writeBit=function(t){if(this._o)throw new f("Cannot write to a closed BitWriter.");this.Ao|=t<<this.uo,0===this.uo?this.closeByte():this.uo--},t.prototype.writeByte=function(t){if(this._o)throw new f("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.Ao=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.uo;this.Ao|=fu(t,n+1),this.closeByte(),this.Ao=hu(t,8-n)<<n+1,this.uo=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._o)throw new f("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.po+t.length<=this.do?(this.Ju.set(t,this.po),this.po+=t.length,this.po===this.do&&this.closeBuffer()):(this.closeBuffer(),this.mo.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.uo;this.Ao|=fu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=hu(t[i-1],8-n),r=fu(t[i],n+1);this.Ao=e<<n+1|r,this.closeByte()}this.Ao=hu(t[t.length-1],8-n)<<n+1,this.uo=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}(),lu=function(){function t(t){this.rb=new cu,this.To=t}return t.prototype.closeWriter=function(){void 0!==this.To&&(this.rb=this.rb.concat(this.To.close()),this.To=void 0)},a.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.To&&(this.To=new vu),this.To},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}(),du=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 lu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=c.pow(2,32),t}();function wu(t,n){return t instanceof jt?64===n:t<c.pow(2,n)}function bu(t,n){return c.round(t*c.pow(2,n))}function gu(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}var mu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!wu(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return ou(n,t),a.defineProperty(n.prototype,"flags",{get:function(){return this.So},set:function(t){this.So=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}(du);!function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}ou(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(cu.from(this.data))}}(du);var pu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();function yu(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<=_u)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=_u)i.push(String.fromCharCode.apply(String,t.slice(e,e+_u)));return i.join("")}(n)}var _u=16384;function Su(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Iu(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 Tu(t,n,i){return n.offset+i<=t.byteLength}function Eu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function ku(t,n,i){void 0===i&&(i=!1);var e=Eu(t,n,i),r=Eu(t,n,i),o=i?r:e,u=i?e:r;return jt.fromBits(u,o,!0)}function Ru(t,n){var i=Su(t,n);if(i)return String.fromCharCode(i)}function Nu(t,n,i){for(var e="",r=0;r<i;r++)e+=Ru(t,n);return e}function Ou(t,n){var i,e=Su(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&Su(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Su(t,n))+(63&Su(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Su(t,n))+64*(63&Su(t,n))+(63&Su(t,n))),i}function Pu(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=Ou(t,n);if(void 0===r)break;if(i&&0===r)break;e.push(r)}return yu(e)}(t,n,!0)}var Au=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new pu(this.offset<<3)},t}(),Du=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Su(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 Eu(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=Eu(t,n,i),r=Eu(t,n,i),o=i?r:e,u=i?e:r;return jt.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return ku(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Iu(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(Eu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Nu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Pu(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 Cu(t,n){return t.type===n}var xu=8;function Bu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Tu(t,n,xu)){var e=n.offset+xu;return{complete:!1,neededOffset:e}}var r=Eu(t,n),o=Nu(t,n,4);if(1===r){if(!Tu(t,n,8)){var e=n.offset+8;return n.seek(i),{complete:!1,neededOffset:e}}r=ku(t,n).toNumber()}if("uuid"===o){if(!Tu(t,n,16)){var e=n.offset+16;return n.seek(i),{complete:!1,neededOffset:e}}o=Nu(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 Du((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 Au(r.headerSize))};return n.seek(u),{complete:!0,box:c}}!function(t){function n(){return t.call(this,"mdir")||this}ou(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 ou(n,t),a.defineProperty(n.prototype,"handlerType",{get:function(){return this.Eo},set:function(t){this.Eo=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}(mu));var Fu=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.Io},set:function(t){if(!wu(t,8))throw new f("Provided tag does not fit in 8 bits.");this.Io=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}();!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}ou(n,t),a.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.Ro},set:function(t){if(!wu(t,8))throw new f("Provided objectTypeIndication does not fit in 8 bits.");this.Ro=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"streamType",{get:function(){return this.No},set:function(t){if(!wu(t,6))throw new f("Provided streamType does not fit in 6 bits.");this.No=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Do},set:function(t){if(!wu(t,24))throw new f("Provided bufferSizeDb does not fit in 24 bits.");this.Do=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.Co},set:function(t){if(!wu(t,32))throw new f("Provided maxBitrate does not fit in 32 bits.");this.Co=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.Po},set:function(t){if(!wu(t,32))throw new f("Provided avgBitrate does not fit in 32 bits.");this.Po=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)}}}(Fu),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}ou(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(cu.from(this.data))}}(Fu);var Lu=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return ou(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(Fu);!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 Lu(r.fixed28BitMode),o}ou(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.Oo},set:function(t){if(!wu(t,16))throw new f("Provided esId does not fit in 16 bits.");this.Oo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Bo},set:function(t){if(!wu(t,5))throw new f("Provided streamPriority does not fit in 5 bits.");this.Bo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.Lo},set:function(t){if(t&&!wu(t,16))throw new f("Provided dependsOnEsId does not fit in 16 bits.");this.Lo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.Mo},set:function(t){if(t&&!wu(t,16))throw new f("Provided ocrEsId does not fit in 16 bits.");this.Mo=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)}}(Fu);var zu=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return ou(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}(du),Mu=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ou(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(zu),Uu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return ou(n,t),a.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.xo},set:function(t){if(!wu(t,16))throw new f("Provided dataReferenceIndex does not fit in 16 bits.");this.xo=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}(Mu),Wu=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 ou(n,t),a.defineProperty(n.prototype,"channelCount",{get:function(){return this.Fo},set:function(t){if(!wu(t,16))throw new f("Provided channelCount does not fit in 16 bits.");this.Fo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleSize",{get:function(){return this.Uo},set:function(t){if(!wu(t,16))throw new f("Provided sampleSize does not fit in 16 bits.");this.Uo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Ho},set:function(t){if(!wu(bu(t,16),32))throw new f("Provided rate does not fit in 32 bits (fixed 16.16).");this.Ho=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(bu(this.sampleRate,16),32),this.extra&&gu(n.writer,this.extra)},n}(Uu);!function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}ou(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Vo},set:function(t){if(!wu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!wu(t,32)}))throw new f("Not all entries can be represented in 32 bits.");this.Vo=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)}}}(mu),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}ou(n,t),a.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Xo},set:function(t){if(!wu(t,32))throw new f("Provided cleanApertureWidthN does not fit in 32 bits.");this.Xo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.zo},set:function(t){if(!wu(t,32))throw new f("Provided cleanApertureWidthD does not fit in 32 bits.");this.zo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Wo},set:function(t){if(!wu(t,32))throw new f("Provided cleanApertureHeightN does not fit in 32 bits.");this.Wo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.qo},set:function(t){if(!wu(t,32))throw new f("Provided cleanApertureHeightD does not fit in 32 bits.");this.qo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Go},set:function(t){if(!wu(t,32))throw new f("Provided horizOffN does not fit in 32 bits.");this.Go=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizOffD",{get:function(){return this.Qo},set:function(t){if(!wu(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.Yo},set:function(t){if(!wu(t,32))throw new f("Provided vertOffN does not fit in 32 bits.");this.Yo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"vertOffD",{get:function(){return this.jo},set:function(t){if(!wu(t,32))throw new f("Provided vertOffD does not fit in 32 bits.");this.jo=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)}}(du),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}ou(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Vo},set:function(t){if(!wu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!wu(t.sampleCount,32)||!wu(t.sampleOffset,32)}))throw new f("Not all entries can be represented in 64 bits.");this.Vo=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)}}}(mu),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}ou(n,t),a.defineProperty(n.prototype,"location",{get:function(){return this.Ko},set:function(t){this.flags=void 0===t?1:0,this.Ko=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))}}(mu),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}ou(n,t),a.defineProperty(n.prototype,"location",{get:function(){return this.Ko},set:function(t){if(1&this.flags)throw new f("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.Ko=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))}}(mu),function(t){function n(){return t.call(this,"dinf")||this}ou(n,t)}(Mu);var qu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!wu(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return ou(n,t),a.defineProperty(n.prototype,"flags",{get:function(){return this.So},set:function(t){this.So=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}(zu);!function(t){function n(){return t.call(this,"dref",0,0)||this}ou(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)}}(qu);var ju=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 ou(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.Vo},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!wu(e.segmentDuration,this.bitSize))throw new f("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!wu(e.mediaTime,this.bitSize))throw new f("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!wu(e.mediaRateInteger,16))throw new f("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!wu(e.mediaRateFraction,16))throw new f("Provided mediaRateFraction does not fit in 16 bits.")}this.Vo=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}(mu);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ou(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)}}}(ju),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ou(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)}}}(ju),function(t){function n(){return t.call(this,"edts")||this}ou(n,t)}(Mu);var Vu=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 ou(n,t),a.defineProperty(n.prototype,"majorBrand",{get:function(){return this.Zo},set:function(t){if(4!==t.length)throw new f("the provided major brand does not conform to the 4 character requirement");this.Zo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"minorVersion",{get:function(){return this.Jo},set:function(t){if(!wu(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.$o},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.$o=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}(du);!function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}ou(n,t)}(Vu),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}ou(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(cu.from(this.data))}}(du);var Hu,Xu=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 ou(n,t),a.defineProperty(n.prototype,"creationTime",{get:function(){return this.nh},set:function(t){if(!wu(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,"modificationTime",{get:function(){return this.ih},set:function(t){if(!wu(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,"timescale",{get:function(){return this.eh},set:function(t){if(!wu(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.eh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.rh},set:function(t){if(!wu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.rh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"language",{get:function(){return this.sh},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.sh=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}(mu);!function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}ou(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)}}(Xu),function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}ou(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)}}(Xu),function(t){function n(){return t.call(this,"mdia")||this}ou(n,t)}(Mu),function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new cu,n}ou(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(du),function(t){function n(){return t.call(this,"minf")||this}ou(n,t)}(Mu),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}ou(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())}}(qu),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"}(Hu||(Hu={}));var Gu,Yu,Ku={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Qu(t,n){n.writer.writeUInt(bu(t.a,16),32),n.writer.writeUInt(bu(t.b,16),32),n.writer.writeUInt(bu(0,30),32),n.writer.writeUInt(bu(t.c,16),32),n.writer.writeUInt(bu(t.d,16),32),n.writer.writeUInt(bu(0,30),32),n.writer.writeUInt(bu(t.x,16),32),n.writer.writeUInt(bu(t.y,16),32),n.writer.writeUInt(bu(1,30),32)}function $u(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Gu.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Yu.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Yu.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Yu.UNKNOWN,2)}function Ju(t,n){var i,e,r;n.writer.writeUInt(0,4),$u(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"}(Gu||(Gu={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Yu||(Yu={}));var Zu=function(){return function(){}}(),ts=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 ou(n,t),a.defineProperty(n.prototype,"systemId",{get:function(){return this.uh},set:function(t){if(16!==t.length)throw new f("Provided systemId length is not 16.");this.uh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"data",{get:function(){return this.Gi},set:function(t){if(!wu(t.length,32))throw new f("Provided data length does not fit in 32 bits.");this.Gi=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(cu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(cu.from(this.data))},n}(mu),ns=function(t){function n(n,i){return t.call(this,0,n,i)||this}return ou(n,t),n}(ts),is=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return ou(n,t),a.defineProperty(n.prototype,"kIds",{get:function(){return this.oh},set:function(t){if(!wu(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.oh=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(cu.from(e))}},n}(ts);var es=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 ou(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.hh},set:function(t){if(!wu(t,this.bitSize))throw new f("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.hh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(mu);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ou(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)}}(es),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ou(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)}}(es),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}ou(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.ah},set:function(t){if(!wu(t,32))throw new f("Provided track id does not fit in 32 bits.");this.ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.fh},set:function(t){if(!wu(t,32))throw new f("Provided default sample description index does not fit in 32 bits.");this.fh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.vh},set:function(t){if(!wu(t,32))throw new f("Provided default sample duration does not fit in 32 bits.");this.vh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.dh},set:function(t){if(!wu(t,32))throw new f("Provided default sample size does not fit in 32 bits.");this.dh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.lh},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!wu(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!wu(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.lh=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),Ju(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)}}(mu),function(t){function n(){return t.call(this,"mvex")||this}ou(n,t)}(Mu);var rs=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:Ku,a._h=e,a}return ou(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.nh},set:function(t){if(!wu(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,"modificationTime",{get:function(){return this.ih},set:function(t){if(!wu(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,"timescale",{get:function(){return this.eh},set:function(t){if(!wu(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.eh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.rh},set:function(t){if(!wu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.rh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"rate",{get:function(){return this.gh},set:function(t){if(!wu(bu(t,16),32))throw new f("Provided rate does not fit in 32 bits (fixed 16.16).");this.gh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"volume",{get:function(){return this.wh},set:function(t){if(!wu(bu(t,8),16))throw new f("Provided volume does not fit in 16 bits (fixed 8.8).");this.wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"matrix",{get:function(){return this.yh},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.yh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"nextTrackId",{get:function(){return this._h},set:function(t){if(0===t)throw new f("NextTrackId cannot be 0.");if(!wu(t,32))throw new f("NextTrackId cannot exceed 32 bits.");this._h=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(bu(this.rate,16),32),n.writer.writeUInt(bu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Qu(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}(mu);!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}ou(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)}}(rs),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}ou(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)}}(rs);var os=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:Ku,c}return ou(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.nh},set:function(t){if(!wu(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,"modificationTime",{get:function(){return this.ih},set:function(t){if(!wu(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,"trackId",{get:function(){return this.ah},set:function(t){if(0===t)throw new f("trackId cannot be 0.");if(!wu(t,32))throw new f("trackId cannot exceed 32 bits.");this.ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"duration",{get:function(){return this.rh},set:function(t){if(!wu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.rh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"volume",{get:function(){return this.wh},set:function(t){if(!wu(bu(t,8),16))throw new f("Provided volume does not fit in 16 bits (fixed 8.8).");this.wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"width",{get:function(){return this.kh},set:function(t){if(!wu(bu(t,16),32))throw new f("Provided width does not fit in 32 bits (fixed 16.16).");this.kh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"height",{get:function(){return this.ph},set:function(t){if(!wu(bu(t,16),32))throw new f("Provided height does not fit in 32 bits (fixed 16.16).");this.ph=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"layer",{get:function(){return this.Ah},set:function(t){if(!wu(t,16))throw new f("Provided layer does not fit in 16 bits.");this.Ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.Th},set:function(t){if(!wu(t,16))throw new f("Provided alternateGroup does not fit in 16 bits.");this.Th=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"matrix",{get:function(){return this.yh},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.yh=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(bu(this.volume,8),16),n.writer.writeUInt(0,16),Qu(this.matrix,n),n.writer.writeUInt(bu(this.width,16),32),n.writer.writeUInt(bu(this.height,16),32)},n}(mu);!function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}ou(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)}}(os),function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}ou(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)}}(os),function(t){function n(){return t.call(this,"trak")||this}ou(n,t)}(Mu),function(t){function n(){return t.call(this,"moov")||this}ou(n,t)}(Mu);var us=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 ou(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.Sh},set:function(t){if(!wu(t,this.bitSize))throw new f("Provided baseMediaDecodeTime 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}(mu);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}ou(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)}}(us),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}ou(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)}}(us),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}ou(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.ah},set:function(t){if(!wu(t,32))throw new f("Provided track id does not fit in 32 bits.");this.ah=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.Eh},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&&!wu(t,64))throw new f("Provided baseDataOffset does not fit in 32 bits.");this.Eh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.Ih},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&&!wu(t,32))throw new f("Provided sampleDescriptionIndex does not fit in 32 bits.");this.Ih=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.vh},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&&!wu(t,32))throw new f("Provided defaultSampleDuration does not fit in 32 bits.");this.vh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.dh},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&&!wu(t,32))throw new f("Provided defaultSampleSize does not fit in 32 bits.");this.dh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.lh},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)&&!wu(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!wu(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.lh=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&&Ju(this.defaultSampleFlags,n)}}(mu),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}ou(n,t),a.defineProperty(n.prototype,"dataOffset",{get:function(){return this.Rh},set:function(t){if(t&&!wu(t,32))throw new f("Provided data offset does not fit in 32 bits.");this.Rh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.Nh},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!wu(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!wu(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.Nh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"samples",{get:function(){return this.Dh},set:function(t){var n,i;if(!wu(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&&!wu(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&&!wu(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)&&!wu(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)&&!wu(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&&!wu(o.compositionTimeOffset,32))throw new f("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.Dh=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&&Ju(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&&Ju(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}}}(mu),function(t){function n(){return t.call(this,"traf")||this}ou(n,t)}(Mu),function(t){function n(){return t.call(this,"moof")||this}ou(n,t)}(Mu),function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}ou(n,t),a.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.Ch},set:function(t){if(!wu(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.Ch=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)}}(mu);var ss=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return ou(n,t),a.defineProperty(n.prototype,"codingName",{get:function(){return this.Ph},set:function(t){if(4!==t.length)throw new f("Provided coding name was not 4 characters long.");this.Ph=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(du);!function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}ou(n,t),a.defineProperty(n.prototype,"hSpacing",{get:function(){return this.Oh},set:function(t){if(!wu(t,32))throw new f("Provided hSpacing does not fit in 32 bits.");this.Oh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"vSpacing",{get:function(){return this.Bh},set:function(t){if(!wu(t,32))throw new f("Provided vSpacing does not fit in 32 bits.");this.Bh=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)}}(du),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}ou(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())}}(Mu),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new ss(n),r}ou(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())}}(du);var fs=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 ou(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.Vo},set:function(t){var n=this;if(!wu(t.length,32))throw new f("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!wu(t,n.bitSize)}))throw new f("Not all provided entries fit in ".concat(this.bitSize," bits."));this.Vo=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.Lh},set:function(t){if(void 0===t)this.flags=0;else{if(!wu(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!wu(t.auxInfoTypeParameter,32))throw new f("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Lh=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}(mu);!function(t){function n(){return null!==t&&t.apply(this,arguments)||this}ou(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)}}}(fs),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}ou(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)}}}(fs),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}ou(n,t),a.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.Mh},set:function(t){if(!wu(t,8))throw new f("Provided defaultSampleInfoSize does not fit in a single byte.");this.Mh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.Fh},set:function(t){if(!wu(t.length,32))throw new f("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!wu(t,8)}))throw new f("Not all provided sampleInfoSizes fit in a byte.");this.Fh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.Lh},set:function(t){if(void 0===t)this.flags=0;else{if(!wu(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!wu(t.auxInfoTypeParameter,32))throw new f("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Lh=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)}}}(mu),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}ou(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++){$u(e[i],n)}}}(mu),function(t){function n(n){return t.call(this,"stsd",n,0)||this}ou(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)}}(qu);var hs=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 ou(n,t),a.defineProperty(n.prototype,"groupingType",{get:function(){return this.Uh},set:function(t){if(4!==t.length)throw new f("The provided groupingType does not equal 4 characters.");this.Uh=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}(mu);!function(t){function n(n,i){return t.call(this,0,n,i)||this}ou(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(hs),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}ou(n,t),a.defineProperty(n.prototype,"defaultLength",{get:function(){return this.Hh},set:function(t){if(!wu(t,32))throw new f("The provided defaultLength does not fit in 32 bits.");this.Hh=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)}}(hs),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}ou(n,t),a.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.fh},set:function(t){if(!wu(t,32))throw new f("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.fh=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)}}(hs),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}ou(n,t),a.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.Vh},set:function(t){if(!wu(t.length,32))throw new f("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!wu(t,32)}))throw new f("Not all sampleSizes can be represented in 32 bits.");this.Vh=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)}}}(mu),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}ou(n,t),a.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.dh},set:function(t){if(!wu(t,32))throw new f("Provided defaultSampleSize does not fit in 32 bits.");this.dh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"samples",{get:function(){return this.Dh},set:function(t){if(!wu(t,32))throw new f("Number of allowed samples cannot fit in 32 bits.");this.Dh=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)}}(mu),function(t){function n(){return t.call(this,"stbl")||this}ou(n,t)}(Mu),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}ou(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Vo},set:function(t){if(!wu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!wu(t.firstChunk,32)||!wu(t.sampleDescriptionIndex,32)||!wu(t.samplesPerChunk,32)}))throw new f("Not all entries can be represented in 96 bits.");this.Vo=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)}}}(mu),function(t){function n(){return t.call(this,"schi")||this}ou(n,t)}(Mu),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}ou(n,t),a.defineProperty(n.prototype,"schemeType",{get:function(){return this.Xh},set:function(t){if(4!==t.length)throw new f("The provided schemeType does not have a length of 4.");this.Xh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.Wh},set:function(t){if(!wu(t,32))throw new f("The provided schemeVersion does not fit in 23 bits.");this.Wh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"schemeUri",{get:function(){return this.qh},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.qh=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))}}(mu);var as=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 ou(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.Gh},set:function(t){if(!wu(t,32))throw new f("Provided referenceId does not fit in 32 bits.");this.Gh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"timescale",{get:function(){return this.eh},set:function(t){if(!wu(t,32))throw new f("Provided timescale does not fit in 32 bits.");this.eh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.Qh},set:function(t){if(!wu(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.Yh},set:function(t){if(!wu(t,this.bitSize))throw new f("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.Yh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"references",{get:function(){return this.jh},set:function(t){if(!wu(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(!wu(e.referencedSize,31))throw new f("Provided referenced size does not fit in 31 bits.");if(!wu(e.subsegmentDuration,32))throw new f("Provided subsegment duration does not fit in 31 bits.");if(!wu(e.sapType,3))throw new f("Provided SAP type does not fit in 3 bits.");if(!wu(e.sapDeltaTime,28))throw new f("Provided SAP delta time does not fit in 28 bits.")}this.jh=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}(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}ou(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)}}(as),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}ou(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)}}(as),function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}ou(n,t)}(Vu),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}ou(n,t),a.defineProperty(n.prototype,"balance",{get:function(){return this.Kh},set:function(t){if(t<-1||t>1)throw new f("Provided balance does not fit in the allowed range [-1, 1].");if(!wu(bu(t,8),16))throw new f("Provided balance does not fit in 16 bits (fixed 8.8).");this.Kh=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(bu(this.balance,8),16),n.writer.writeUInt(0,16)}}(mu),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}ou(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Vo},set:function(t){if(!wu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!wu(t,32)}))throw new f("Not all entries can be represented in 32 bits.");this.Vo=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)}}}(mu),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}ou(n,t),a.defineProperty(n.prototype,"entries",{get:function(){return this.Vo},set:function(t){if(!wu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!wu(t.sampleCount,32)||!wu(t.sampleDelta,32)}))throw new f("Not all entries can be represented in 64 bits.");this.Vo=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)}}}(mu),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}ou(n,t),a.defineProperty(n.prototype,"trackId",{get:function(){return this.ah},set:function(t){if(!wu(t,32))throw new f("The provided trackId does not fit in 32 bits.");this.ah=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)}}(qu),function(t){function n(){return t.call(this,"udta")||this}ou(n,t)}(Mu);var cs={red:0,green:0,blue:0};!function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=cs);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}ou(n,t),a.defineProperty(n.prototype,"opColor",{get:function(){return this.Zh},set:function(t){if(!wu(t.red,16)||!wu(t.green,16)||!wu(t.blue,16))throw new f("Not all colors could be represented in 16 bits.");this.Zh=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)}}(mu);var vs=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 ou(n,t),a.defineProperty(n.prototype,"width",{get:function(){return this.kh},set:function(t){if(!wu(t,16))throw new f("Provided width does not fit in 16 bits.");this.kh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"height",{get:function(){return this.ph},set:function(t){if(!wu(t,16))throw new f("Provided height does not fit in 16 bits.");this.ph=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.Jh},set:function(t){if(!wu(bu(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.$h},set:function(t){if(!wu(bu(t,16),32))throw new f("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.$h=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"compressorName",{get:function(){return this.ea},set:function(t){if(t.length>31)throw new f("The provided compressorName should at most be 31 characters long.");this.ea=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"frameCount",{get:function(){return this.ra},set:function(t){if(!wu(t,16))throw new f("Provided frameCount does not fit in 16 bits.");this.ra=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"depth",{get:function(){return this.ua},set:function(t){if(!wu(t,16))throw new f("Provided depth does not fit in 16 bits.");this.ua=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(bu(this.horizontalResolution,16),32),n.writer.writeUInt(bu(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&&gu(n.writer,this.extra)},n}(Uu);!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}ou(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(cu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(mu),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}ou(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())}}(Wu),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}ou(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)}}(vs),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}ou(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)}}(Uu),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}ou(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(du),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.oa},set:function(t){if(!wu(t,8))throw new f("Provided version does not fit in 8 bits.");this.oa=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"profileIndication",{get:function(){return this.va},set:function(t){if(!wu(t,8))throw new f("Provided profileIndication does not fit in 8 bits.");this.va=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this._a},set:function(t){if(!wu(t,8))throw new f("Provided profileCompatibility does not fit in 8 bits.");this._a=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"levelIndication",{get:function(){return this.ma},set:function(t){if(!wu(t,8))throw new f("Provided levelIndication does not fit in 8 bits.");this.ma=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"spsSets",{get:function(){return this.ya},set:function(t){if(!wu(t.length,5))throw new f("Provided number of spsSets exceeds the max (32)");this.ya=t},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Aa},set:function(t){if(!wu(t.length,8))throw new f("Provided number of ppsSets exceeds the max (256)");this.Aa=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(cu.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(cu.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}ou(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())}}(vs),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}ou(n,t),a.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Do},set:function(t){if(!wu(t,32))throw new f("Provided bufferSizeDb does not fit in 32 bits.");this.Do=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"max",{get:function(){return this.Ta},set:function(t){if(!wu(t,32))throw new f("Provided max does not fit in 32 bits.");this.Ta=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"avg",{get:function(){return this.Sa},set:function(t){if(!wu(t,32))throw new f("Provided avg does not fit in 32 bits.");this.Sa=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)}}(du);var ls=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 ou(n,t),a.defineProperty(n.prototype,"isProtected",{get:function(){return this.Ea},set:function(t){if(!wu(t,8))throw new f("Provided isProtected does not fit in 1 byte.");this.Ea=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.Ia},set:function(t){if(![8,16].includes(t))throw new f("Provided perSampleIvSize does not match any allowed value [8, 16].");this.Ia=t,this.Ra=new w(0)},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"kId",{get:function(){return this.Na},set:function(t){if(16!==t.length)throw new f("Provided kId length is not 16.");this.Na=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"constantIv",{get:function(){return this.Ra},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.Ra=t,this.Ia=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),gu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),gu(t.writer,this.constantIv))},n}(mu);!function(t){function n(n){return t.call(this,0,n)||this}ou(n,t)}(ls);var ds=function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return ou(n,t),a.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.Da},set:function(t){if(!wu(t,4))throw new f("Provided cryptByteBlocks does not fit in 4 bits.");this.Da=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.Ca},set:function(t){if(!wu(t,4))throw new f("Provided skipByteBlocks does not fit in 4 bits.");this.Ca=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(ls);function ws(t){return void 0!==t.iv}function bs(t){return void 0!==t.subsamples}!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new ds(n),i}ou(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Zu),function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}ou(n,t),a.defineProperty(n.prototype,"samples",{get:function(){return this.Dh},set:function(t){var n;if(!wu(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(ws(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=bs(r)),!0===n&&!bs(r)||!1===n&&bs(r))throw new f("Mix of samples with and without subsamples detected.");if(bs(r)){if(!wu(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(!wu(s.clearData,16))throw new f("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!wu(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.Dh=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];ws(r)&&(n+=r.iv.length),bs(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(ws(r)&&gu(n.writer,r.iv),bs(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)}}(mu),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}ou(n,t),a.defineProperty(n.prototype,"timescale",{get:function(){return this.eh},set:function(t){if(!wu(t,32))throw new f("The provided timescale does not fit in 32 bits.");this.eh=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Pa},set:function(t){if(!wu(t,32))throw new f("The provided presentationTimeDelta does not fit in 32 bits.");this.Pa=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"eventDuration",{get:function(){return this.Oa},set:function(t){if(!wu(t,32))throw new f("The provided eventDuration does not fit in 32 bits.");this.Oa=t},enumerable:!1,configurable:!0}),a.defineProperty(n.prototype,"id",{get:function(){return this.Ba},set:function(t){if(!wu(t,32))throw new f("The provided id does not fit in 32 bits.");this.Ba=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(cu.from(this.data))}}(mu);var gs,ms,ps=(gs="pssh",ms=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 is(i,s,e):new ns(i,s)},function(t){var n,i=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=Bu(i,e);if(!r.complete)return;if(Cu(r.box,n))return r.box}}(new Du((n=t,new DataView(n.buffer,n.byteOffset,n.byteLength)),new Au),gs);if(!i)throw new f("".concat(gs," box not found"));return ms(i)}),ys=function(t){function n(n,i){var e;(e=t.call(this)||this).La=void 0,e.Ma=!1,e.xa=void 0,e.Fa=void 0,e.Ua=function(){e.Ha()},e.Va=function(t){e.Ks(new $o(En(e),t.messageType,nu(e.Xa,t.message)))},e.Wa=function(){e.Ma=!0,e.La.Pu>0&&(e.La.Cu(),e.Ks(new Qo(En(e)))),e.qa.removeEventListener("keystatuseschange",e.Ua),e.qa.removeEventListener("message",e.Va)},e.qa=n,e.Xa=i,e.qa.addEventListener("keystatuseschange",e.Ua),e.qa.addEventListener("message",e.Va),e.La=new Zo;var r=[];return e.qa.closed&&r.push(j.resolve(e.qa.closed)),e.Fa=new tu,r.push(e.Fa.Vu),e.xa=j.race(r).then(e.Wa,e.Wa),e.Ha(),e}Mt(n,t);var i=n.prototype;return i.Ga=function(){if(this.Ma)return this.xa;var t,n,i=[];return i.push(j.resolve(this.qa.close())),i.push((t=1e3,new j(function(i,e){if(void 0!==n&&n.Cs)e(new An);else{var r=J.jn(function(){void 0!==n&&n.Fs(o),i()},t),o=function(){J.Yn(r),e(new An)};void 0!==n&&n.xs(o)}}))),this.Fa.Gu(j.race(i).catch(_s)),this.Ma=!0,this.xa},i.Qa=function(t,n,i){if(xi.fn){var e=ps(ii(n));if(1===e.version)n=new ns(e.systemId,e.data).serialize().join()}return j.resolve(this.qa.generateRequest(t,n)).catch(_s)},i.Ya=function(t){return j.resolve(this.qa.load(t)).catch(_s)},i.Ka=function(){return j.resolve(this.qa.remove()).catch(_s)},i.Za=function(t){return j.resolve(this.qa.update(t)).catch(_s)},i.Ha=function(){var t=this;this.La.Cu(),this.qa.keyStatuses.forEach(function(n,i){t.Ja(i,n)}),this.Ks(new Qo(this))},i.Ja=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=ii(t);if(this.Xa===Co&&16===e.byteLength){var r=ti(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.Xa===Co&&"status-pending"===n&&(n="usable"),this.La.Du(e,n)},mt(n,[{key:"$a",get:function(){return this.xa}},{key:"tc",get:function(){return this.qa.expiration}},{key:"nc",get:function(){return this.La}},{key:"ic",get:function(){return this.qa.sessionId}}]),n}(ci);function _s(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 eu(t.message,void 0,n,t)}var Ss=function(){function t(t,n,i){this.ec=t,this.rc=n,this.uc=i}var n=t.prototype;return n.hc=function(t){return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new ys(this.ec.createSession(t),this.rc));case 1:case"end":return n.stop()}},null,this,null,j)},n.ac=function(t){return j.resolve(this.ec.setServerCertificate(t))},n.cc=function(t){return j.resolve(t.setMediaKeys(this.ec))},n.fc=function(t){return j.resolve(t.setMediaKeys(null))},t}(),Is=function(){function t(t,n,i){this.vc=t,this.Xa=n,this.dc=i}var n=t.prototype;return n.lc=function(){var t;return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Z.awrap(this.vc.createMediaKeys());case 2:return t=n.sent,n.abrupt("return",new Ss(t,this.Xa,this.dc));case 4:case"end":return n.stop()}},null,this,null,j)},n._c=function(){return this.dc},mt(t,[{key:"rc",get:function(){return this.vc.keySystem}}]),t}();function Ts(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,mc:e.mc},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 Es(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 Es(t,n,i,e)}),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Es(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 ks(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 Rs(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Ns))||!(!t.videoCapabilities||!t.videoCapabilities.some(Ns))}function Ns(t){return!t.robustness}function Os(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(Oo({},r,{robustness:n}))}return i}var Ps,As,Ds=function(){function t(){}return t.prototype.Es=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.mc}),i=0,r=n;i<r.length;i++)(o=r[i]).audioCapabilities&&(o.audioCapabilities=ks(o.audioCapabilities)),o.videoCapabilities&&(o.videoCapabilities=ks(o.videoCapabilities));if("com.widevine.alpha"!==t||!n.some(Rs)){c.next=14;break}return u=n.map(function(t){return i="SW_SECURE_CRYPTO",Oo({},n=t,{videoCapabilities:n.videoCapabilities?Os(n.videoCapabilities,i):void 0,audioCapabilities:n.audioCapabilities?Os(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 Is(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 Is(h,t,a));case 19:case"end":return c.stop()}},null,null,[[4,12]],j)},t.yc=function(){return void 0!==e&&"function"==typeof e.requestMediaKeySystemAccess},t}(),Cs=function(){function t(){}return t.prototype.Es=function(t,n){try{return j.resolve(function(t,n){if(!xs())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.yc=function(){return xs()},t}();function xs(){return void 0!==io.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"}(Ps||(Ps={})),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"}(As||(As={})),function(t){(As||(As={})).fromCode=function(t){var n=c.floor(t/1e3);if(n in As)return n;throw new h("Invalid error code: "+t)}}();var Bs=function(){function t(){}return t.prototype.Es=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(!Fs())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.yc=function(){return Fs()},t}();function Fs(){return void 0!==io.WebKitMediaKeys}var Ls,zs=function(){function t(t){this.Hc=t}return t.prototype.Es=function(t,n){var i,e,r;return Z.async(function(o){for(;;)switch(o.prev=o.next){case 0:i=0,e=this.Hc;case 1:if(!(i<e.length)){o.next=14;break}return r=e[i],o.prev=3,o.next=6,Z.awrap(r.Es(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}(),Ms=function(t){function n(n){var i;return(i=t.call(this)||this).bc=void 0,i.Bc=void 0,i.kc=void 0,i._o=!1,i.Vc=void 0,i.Xc=void 0,i.zc=void 0,i.Wc=void 0,i.qc=void 0,i.Xa=n,i.kc=new tu,i.Xc="",i.qc=new tu,i.zc=new Zo,i}Mt(n,t);var i=n.prototype;return i.Gc=function(){this.Bc&&(this.Rc("usable"),this.Bc.Gu(void 0),this.Bc=void 0)},i.Qc=function(t){var n=new eu("Unknown CDM error",t.errorCode,t.systemCode);this.Bc?(this.Bc.Qu(n),this.Bc=void 0):this.bc?(this.bc.Qu(n),this.bc=void 0):n.Yu===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.Rc("output-restricted"):1===n.ju?this.Rc("expired"):this.Rc("internal-error")},i.Yc=function(t){0!==t.message.byteLength&&(this.bc&&(this.bc.Gu(void 0),this.bc=void 0),this.Ks(new $o(this,"license-request",nu(this.Xa,ei(t.message).buffer),t.defaultURL||void 0)))},i.jc=function(t){this.Wc||(this.Wc=t,this.qc.Gu(t))},i.Ga=function(){return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:this.throwIfClosed(),this._o=!0,this.kc.Gu(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.bc=new tu,this.Vc=ii(n),t.t0=this.Wc,t.t0){t.next=8;break}return t.next=7,Z.awrap(this.qc.Vu);case 7:t.t0=t.sent;case 8:return t.t0.webkitGenerateKeyRequest(this.Xa,this.Vc),t.next=12,Z.awrap(this.bc.Vu);case 12:case"end":return t.stop()}},null,this,null,j)},i.Ya=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.Ka=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.Za=function(t){return Z.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(this.throwIfClosed(),this.Bc=new tu,n.t0=this.Wc,n.t0){n.next=7;break}return n.next=6,Z.awrap(this.qc.Vu);case 6:n.t0=n.sent;case 7:return n.t0.webkitAddKey(this.Xa,ii(t),this.Vc,this.ic),n.next=11,Z.awrap(this.Bc.Vu);case 11:case"end":return n.stop()}},null,this,null,j)},i.throwIfClosed=function(){if(this._o)throw new h("Already closing or closed.")},i.Rc=function(t){this.zc.Cu(),this.zc.Du(Jo,t),this.Ks(new Qo(this))},mt(n,[{key:"nc",get:function(){return this.zc}},{key:"ic",get:function(){return this.Xc},set:function(t){this.Xc=t}},{key:"$a",get:function(){return this.kc.Vu}},{key:"tc",get:function(){return NaN}}]),n}(ci),Us=function(){function t(t,n){var i=this;this.Wc=void 0,this.Kc=yt(),this.Zc=[],this.Ic=function(t){var n=i.Jc(t.sessionId);n&&n.Gc()},this.$c=function(t){var n=i.Jc(t.sessionId);n&&n.Qc(t)},this.tf=function(t){var n=i.Jc(t.sessionId);n&&n.Yc(t)},this.rc=t,this.uc=n}var n=t.prototype;return n.cc=function(t){return this.Wc=t,this.Wc.addEventListener("webkitkeyadded",this.Ic),this.Wc.addEventListener("webkitkeyerror",this.$c),this.Wc.addEventListener("webkitkeymessage",this.tf),this.Kc.forEach(function(n,i){return n.jc(t)}),this.Zc.forEach(function(n){return n.jc(t)}),j.resolve()},n.fc=function(t){return t.removeEventListener("webkitkeyadded",this.Ic),t.removeEventListener("webkitkeyerror",this.$c),t.removeEventListener("webkitkeymessage",this.tf),this.Wc=void 0,j.resolve()},n.hc=function(t,n,i){var e;return Z.async(function(t){for(;;)switch(t.prev=t.next){case 0:return e=new Ms(this.rc),this.Wc&&e.jc(this.Wc),this.Zc.push(e),t.abrupt("return",e);case 4:case"end":return t.stop()}},null,this,null,j)},n.ac=function(t){return j.resolve(!1)},n.Jc=function(t){if(t){var n=this.Kc.get(t);return n||((n=this.Zc.shift())?(n.ic=t,this.Kc.set(t,n),n):void 0)}},t}(),Ws=function(){function t(t,n){this.rc=t,this.nf=n}var n=t.prototype;return n.lc=function(){return j.resolve(new Us(this.rc,this.nf))},n._c=function(){return this.nf},t}(),qs=function(){function t(){}return t.prototype.Es=function(t,n){try{return j.resolve(js(t,n))}catch(t){return j.reject(t)}},t.yc=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function js(t,n){if(!qs.yc())throw new h("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Ts(Vs,Ko,t,e);if(r)return new Ws(t,r)}throw new h("Unsupported key system configuration for "+t)}function Vs(t,n){var i=so();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function Hs(){return Ls||(Ls=function(){var t=[];Bs.yc()&&t.push(new Bs);Ds.yc()&&t.push(new Ds);Cs.yc()&&t.push(new Cs);qs.yc()&&t.push(new qs);return new zs(t)}()),Ls}var Xs=function(){function t(){this.if=yt()}var n=t.prototype;return n.Cu=function(t){this.if.delete(t)},n.ef=function(){this.if.clear()},n.Ru=function(t){return this.if.get(t)},n.rf=function(t,n){this.if.set(t,n)},t}(),Gs=function(){function t(){}return t.sf=function(){return t.Qn||(t.Qn=Ys.yc()?new Ys:new Xs),t.Qn},t.Cu=function(n){t.sf().Cu(n)},t.ef=function(){t.sf().ef()},t.Ru=function(n){return t.sf().Ru(n)},t.rf=function(n,i){t.sf().rf(n,i)},t}();Gs.Qn=void 0;var Ys=function(n){function i(){return n.apply(this,arguments)||this}Mt(i,n),i.yc=function(){try{return t.sessionStorage.setItem("foobar","foobar"),t.sessionStorage.removeItem("foobar"),!0}catch(t){return!1}};var e=i.prototype;return e.Cu=function(n){t.sessionStorage.removeItem(n)},e.ef=function(){t.sessionStorage.clear()},e.Ru=function(n){return t.sessionStorage[n]},e.rf=function(n,i){t.sessionStorage[n]=i},i}(Gs);var Ks=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 Qs(t,n,e){var r=Ks([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 $s,Js;!function(t){t.uf="hf",t.cf="vf",t.df="contentprotectionerror",t.lf="contentprotectionsuccess",t._f="currentsourcechange",t.gf="destroy",t.wf="durationchange",t.mf="emptied",t.pu="encrypted",t.yf="ended",t.kf="pf",t.bf="loadstart",t.Af="manifestupdate",t.Tf="nosupportedrepresentationfound",t.Sf="offline",t.Ef="online",t.If="pause",t.Rf="play",t.Nf="progress",t.Df="ratechange",t.Cf="representationchange",t.Pf="resize",t.Of="seeked",t.Bf="seeking",t.Lf="segmentnotfound",t.Mf="xf",t.Ff="Uf",t.Hf="sourcechange",t.Vf="timeupdate",t.Xf="volumechange",t.zf="Wf",t.qf="metricschange"}($s||($s={})),function(t){t.Gf="arraybuffer",t.Qf="json",t.Yf="stream",t.$n="text"}(Js||(Js={}));var Zs=function(){function t(n){var i=this;this.$r=void 0,this.$r={},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=tf(i),e=nf(e);var r=i.toLowerCase();if(this.$r.hasOwnProperty(r)){var o=this.$r[r],u=o[1];o[1]=u?u+", "+e:e}else this.$r[r]=[i,e]},n.delete=function(t){var n=tf(t).toLowerCase();delete this.$r[n]},n.get=function(t){var n=tf(t).toLowerCase();return this.$r.hasOwnProperty(n)?this.$r[n][1]:null},n.has=function(t){var n=tf(t).toLowerCase();return this.$r.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=tf(i)).toLowerCase();this.$r[e]=[i,nf(n)]},n.forEach=function(t,n){for(var i in this.$r)this.$r.hasOwnProperty(i)&&t.call(n,this.$r[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.$r)if(this.$r.hasOwnProperty(n)){var i=this.$r[n],e=i[0],r=i[1];t.push([e,r])}return t},n.jf=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.Kf=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.Zf=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function tf(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 nf(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(t){return"Symbol("+t+")"};function rf(){}var of=void 0!==t?t:void 0!==n?n:"undefined"!=typeof global?global:void 0;function uf(t){return"object"==typeof t&&null!==t||"function"==typeof t}var sf=rf,ff=j,hf=j.prototype.then,af=j.resolve.bind(ff),cf=j.reject.bind(ff);function vf(t){return new ff(t)}function lf(t){return af(t)}function df(t){return cf(t)}function wf(t,n,i){return hf.call(t,n,i)}function bf(t,n,i){wf(wf(t,n,i),void 0,sf)}function gf(t,n){bf(t,n)}function mf(t,n){bf(t,void 0,n)}function pf(t,n,i){return wf(t,n,i)}function yf(t){wf(t,void 0,sf)}var _f=function(){var t=of&&of.queueMicrotask;if("function"==typeof t)return t;var n=lf(void 0);return function(t){return wf(n,t)}}();function Sf(t,n,i){if("function"!=typeof t)throw new h("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function If(t,n,i){try{return lf(Sf(t,n,i))}catch(t){return df(t)}}var Tf=function(){function t(){this.Jf=0,this.$f=0,this.Ie={tv:[],ev:void 0},this.rv=this.Ie,this.Jf=0,this.$f=0}return a.defineProperty(t.prototype,"length",{get:function(){return this.$f},enumerable:!1,configurable:!0}),t.prototype.push=function(t){var n=this.rv,i=n;16383===n.tv.length&&(i={tv:[],ev:void 0}),n.tv.push(t),i!==n&&(this.rv=i,n.ev=i),++this.$f},t.prototype.shift=function(){var t=this.Ie,n=t,i=this.Jf,e=i+1,r=t.tv,o=r[i];return 16384===e&&(n=t.ev,e=0),--this.$f,this.Jf=e,t!==n&&(this.Ie=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.Jf,i=this.Ie,e=i.tv;!(n===e.length&&void 0===i.ev||n===e.length&&(n=0,0===(e=(i=i.ev).tv).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Ie,n=this.Jf;return t.tv[n]},t}();function Ef(t,n){t.uv=n,n.ov=t,"readable"===n.ye?Of(t):"closed"===n.ye?function(t){Of(t),Df(t)}(t):Pf(t,n.hv)}function kf(t,n){return Rc(t.uv,n)}function Rf(t){"readable"===t.uv.ye?Af(t,new h("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){Pf(t,n)}(t,new h("Reader was released and can no longer be used to monitor the stream's closedness")),t.uv.ov=void 0,t.uv=void 0}function Nf(t){return new h("Cannot "+t+" a stream using a released reader")}function Of(t){t.xa=vf(function(n,i){t.fv=n,t.vv=i})}function Pf(t,n){Of(t),Af(t,n)}function Af(t,n){void 0!==t.vv&&(yf(t.xa),t.vv(n),t.fv=void 0,t.vv=void 0)}function Df(t){void 0!==t.fv&&(t.fv(void 0),t.fv=void 0,t.vv=void 0)}var Cf=ef("[[AbortSteps]]"),xf=ef("[[ErrorSteps]]"),Bf=ef("[[CancelSteps]]"),Ff=ef("[[PullSteps]]"),Lf=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},zf=c.trunc||function(t){return t<0?c.ceil(t):c.floor(t)};function Mf(t,n){if(void 0!==t&&("object"!=typeof(i=t)&&"function"!=typeof i))throw new h(n+" is not an object.");var i}function Uf(t,n){if("function"!=typeof t)throw new h(n+" is not a function.")}function Wf(t,n){if(!function(t){return"object"==typeof t&&null!==t||"function"==typeof t}(t))throw new h(n+" is not an object.")}function qf(t,n,i){if(void 0===t)throw new h("Parameter "+n+" is required in '"+i+"'.")}function jf(t,n,i){if(void 0===t)throw new h(n+" is required in '"+i+"'.")}function Vf(t){return Number(t)}function Hf(t){return 0===t?0:t}function Xf(t,n){var i=Number.MAX_SAFE_INTEGER,e=Number(t);if(e=Hf(e),!Lf(e))throw new h(n+" is not a finite number");if((e=function(t){return Hf(zf(t))}(e))<0||e>i)throw new h(n+" is outside the accepted range of 0 to "+i+", inclusive");return Lf(e)&&0!==e?e:0}function Gf(t,n){if(!Ec(t))throw new h(n+" is not a ReadableStream.")}function Yf(t){return new nh(t)}function Kf(t,n){t.ov._v.push(n)}function Qf(t,n,i){var e=t.ov._v.shift();i?e.wv():e.mv(n)}function $f(t){return t.ov._v.length}function Jf(t){var n=t.ov;return void 0!==n&&!!ih(n)}var Zf,th,nh=function(){function t(t){if(qf(t,1,"ReadableStreamDefaultReader"),Gf(t,"First parameter"),kc(t))throw new h("This stream has already been locked for exclusive reading by another reader");Ef(this,t),this._v=new Tf}return a.defineProperty(t.prototype,"closed",{get:function(){return ih(this)?this.xa:df(rh("closed"))},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),ih(this)?void 0===this.uv?df(Nf("cancel")):kf(this,t):df(rh("cancel"))},t.prototype.read=function(){if(!ih(this))return df(rh("read"));if(void 0===this.uv)return df(Nf("read from"));var t,n,i=vf(function(i,e){t=i,n=e});return eh(this,{mv:function(n){return t({value:n,done:!1})},wv:function(){return t({value:void 0,done:!0})},yv:function(t){return n(t)}}),i},t.prototype.releaseLock=function(){if(!ih(this))throw rh("releaseLock");if(void 0!==this.uv){if(this._v.length>0)throw new h("Tried to release a reader lock when that reader has pending read() calls un-settled");Rf(this)}},t}();function ih(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"_v")&&t instanceof nh)}function eh(t,n){var i=t.uv;i.pv=!0,"closed"===i.ye?n.wv():"errored"===i.ye?n.yv(i.hv):i.bv[Ff](n)}function rh(t){return new h("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}a.defineProperties(nh.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(nh.prototype,ef.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof ef.asyncIterator&&((Zf={})[ef.asyncIterator]=function(){return this},th=Zf,a.defineProperty(th,ef.asyncIterator,{enumerable:!1}));var oh=function(){function t(t,n){this.Av=void 0,this.Tv=!1,this.ov=t,this.Sv=n}return t.prototype.next=function(){var t=this,n=function(){return t.Ev()};return this.Av=this.Av?pf(this.Av,n,n):n(),this.Av},t.prototype.return=function(t){var n=this,i=function(){return n.Iv(t)};return this.Av?pf(this.Av,i,i):i()},t.prototype.Ev=function(){var t=this;if(this.Tv)return j.resolve({value:void 0,done:!0});var n,i,e=this.ov;if(void 0===e.uv)return df(Nf("iterate"));var r=vf(function(t,e){n=t,i=e});return eh(e,{mv:function(i){t.Av=void 0,_f(function(){return n({value:i,done:!1})})},wv:function(){t.Av=void 0,t.Tv=!0,Rf(e),n({value:void 0,done:!0})},yv:function(n){t.Av=void 0,t.Tv=!0,Rf(e),i(n)}}),r},t.prototype.Iv=function(t){if(this.Tv)return j.resolve({value:t,done:!0});this.Tv=!0;var n=this.ov;if(void 0===n.uv)return df(Nf("finish iterating"));if(!this.Sv){var i=kf(n,t);return Rf(n),pf(i,function(){return{value:t,done:!0}})}return Rf(n),lf({value:t,done:!0})},t}(),uh={next:function(){return sh(this)?this.Rv.next():df(fh("next"))},return:function(t){return sh(this)?this.Rv.return(t):df(fh("return"))}};function sh(t){if(!uf(t))return!1;if(!a.prototype.hasOwnProperty.call(t,"Rv"))return!1;try{return t.Rv instanceof oh}catch(t){return!1}}function fh(t){return new h("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}void 0!==th&&a.setPrototypeOf(uh,th);var hh=Number.isNaN||function(t){return t!=t};function ah(t){return t.slice()}function ch(t,n,i,e,r){new w(t).set(new w(i,e,r),n)}function vh(t){return t}function lh(t,n,i){if(t.slice)return t.slice(n,i);var e=i-n,r=new ArrayBuffer(e);return ch(r,0,t,n,e),r}function dh(t){var n=lh(t.buffer,t.byteOffset,t.byteOffset+t.byteLength);return new w(n)}function wh(t){var n=t.Nv.shift();return t.Dv-=n.size,t.Dv<0&&(t.Dv=0),n.value}function bh(t,n,i){if("number"!=typeof(e=i)||hh(e)||e<0||i===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var e;t.Nv.push({value:n,size:i}),t.Dv+=i}function gh(t){t.Nv=new Tf,t.Dv=0}var mh=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"view",{get:function(){if(!_h(this))throw jh("view");return this.Cv},enumerable:!1,configurable:!0}),t.prototype.respond=function(t){if(!_h(this))throw jh("respond");if(qf(t,1,"respond"),t=Xf(t,"First parameter"),void 0===this.Pv)throw new h("This BYOB request has been invalidated");this.Cv.buffer,Uh(this.Pv,t)},t.prototype.respondWithNewView=function(t){if(!_h(this))throw jh("respondWithNewView");if(qf(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new h("You can only respond with array buffer views");if(void 0===this.Pv)throw new h("This BYOB request has been invalidated");t.buffer,Wh(this.Pv,t)},t}();a.defineProperties(mh.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(mh.prototype,ef.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var ph=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"byobRequest",{get:function(){if(!yh(this))throw Vh("byobRequest");return zh(this)},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!yh(this))throw Vh("desiredSize");return Mh(this)},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(!yh(this))throw Vh("close");if(this.Ov)throw new h("The stream has already been closed; do not close it again!");var t=this.Bv.ye;if("readable"!==t)throw new h("The stream (in "+t+" state) is not in the readable state and cannot be closed");Bh(this)},t.prototype.enqueue=function(t){if(!yh(this))throw Vh("enqueue");if(qf(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.Ov)throw new h("stream is closed or draining");var n=this.Bv.ye;if("readable"!==n)throw new h("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");Fh(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!yh(this))throw Vh("error");Lh(this,t)},t.prototype[Bf]=function(t){Ih(this),gh(this);var n=this.Lv(t);return xh(this),n},t.prototype[Ff]=function(t){var n=this.Bv;if(this.Dv>0){var i=this.Nv.shift();this.Dv-=i.byteLength,Oh(this);var e=new w(i.buffer,i.byteOffset,i.byteLength);t.mv(e)}else{var r=this.Mv;if(void 0!==r){var o=void 0;try{o=new ArrayBuffer(r)}catch(n){return void t.yv(n)}var u={buffer:o,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:w,readerType:"default"};this.xv.push(u)}Kf(n,t),Sh(this)}},t}();function yh(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"Bv")&&t instanceof ph)}function _h(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"Pv")&&t instanceof mh)}function Sh(t){(function(t){var n=t.Bv;if("readable"!==n.ye)return!1;if(t.Ov)return!1;if(!t.Fv)return!1;if(Jf(n)&&$f(n)>0)return!0;if(Yh(n)&&Gh(n)>0)return!0;if(Mh(t)>0)return!0;return!1})(t)&&(t.Uv?t.Hv=!0:(t.Uv=!0,bf(t.Vv(),function(){t.Uv=!1,t.Hv&&(t.Hv=!1,Sh(t))},function(n){Lh(t,n)})))}function Ih(t){Ph(t),t.xv=new Tf}function Th(t,n){var i=!1;"closed"===t.ye&&(i=!0);var e=Eh(n);"default"===n.readerType?Qf(t,e,i):function(t,n,i){var e=t.ov.Xv.shift();i?e.wv(n):e.mv(n)}(t,e,i)}function Eh(t){var n=t.bytesFilled,i=t.elementSize;return new t.viewConstructor(t.buffer,t.byteOffset,n/i)}function kh(t,n,i,e){t.Nv.push({buffer:n,byteOffset:i,byteLength:e}),t.Dv+=e}function Rh(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=c.min(t.Dv,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.Nv;s>0;){var a=h.peek(),v=c.min(s,a.byteLength),l=n.byteOffset+n.bytesFilled;ch(n.buffer,l,a.buffer,a.byteOffset,v),a.byteLength===v?h.shift():(a.byteOffset+=v,a.byteLength-=v),t.Dv-=v,Nh(t,v,n),s-=v}return f}function Nh(t,n,i){i.bytesFilled+=n}function Oh(t){0===t.Dv&&t.Ov?(xh(t),Nc(t.Bv)):Sh(t)}function Ph(t){null!==t.zv&&(t.zv.Pv=void 0,t.zv.Cv=null,t.zv=null)}function Ah(t){for(;t.xv.length>0;){if(0===t.Dv)return;var n=t.xv.peek();Rh(t,n)&&(Ch(t),Th(t.Bv,n))}}function Dh(t,n){var i=t.xv.peek();Ph(t),"closed"===t.Bv.ye?function(t,n){var i=t.Bv;if(Yh(i))for(;Gh(i)>0;)Th(i,Ch(t))}(t):function(t,n,i){if(Nh(0,n,i),!(i.bytesFilled<i.elementSize)){Ch(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=lh(i.buffer,r-e,r);kh(t,o,0,o.byteLength)}i.bytesFilled-=e,Th(t.Bv,i),Ah(t)}}(t,n,i),Sh(t)}function Ch(t){return t.xv.shift()}function xh(t){t.Vv=void 0,t.Lv=void 0}function Bh(t){var n=t.Bv;if(!t.Ov&&"readable"===n.ye)if(t.Dv>0)t.Ov=!0;else{if(t.xv.length>0)if(t.xv.peek().bytesFilled>0){var i=new h("Insufficient bytes to fill elements in the given buffer");throw Lh(t,i),i}xh(t),Nc(n)}}function Fh(t,n){var i=t.Bv;if(!t.Ov&&"readable"===i.ye){var e=n.buffer,r=n.byteOffset,o=n.byteLength,u=vh(e);if(t.xv.length>0){var s=t.xv.peek();s.buffer,0,s.buffer=vh(s.buffer)}if(Ph(t),Jf(i))if(0===$f(i))kh(t,u,r,o);else t.xv.length>0&&Ch(t),Qf(i,new w(u,r,o),!1);else Yh(i)?(kh(t,u,r,o),Ah(t)):kh(t,u,r,o);Sh(t)}}function Lh(t,n){var i=t.Bv;"readable"===i.ye&&(Ih(t),gh(t),xh(t),Oc(i,n))}function zh(t){if(null===t.zv&&t.xv.length>0){var n=t.xv.peek(),i=new w(n.buffer,n.byteOffset+n.bytesFilled,n.byteLength-n.bytesFilled),e=a.create(mh.prototype);!function(t,n,i){t.Pv=n,t.Cv=i}(e,t,i),t.zv=e}return t.zv}function Mh(t){var n=t.Bv.ye;return"errored"===n?null:"closed"===n?0:t.Wv-t.Dv}function Uh(t,n){var i=t.xv.peek();if("closed"===t.Bv.ye){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=vh(i.buffer),Dh(t,n)}function Wh(t,n){var i=t.xv.peek();if("closed"===t.Bv.ye){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=vh(n.buffer),Dh(t,e)}function qh(t,n,i,e,r,o,u){n.Bv=t,n.Hv=!1,n.Uv=!1,n.zv=null,n.Nv=n.Dv=void 0,gh(n),n.Ov=!1,n.Fv=!1,n.Wv=o,n.Vv=e,n.Lv=r,n.Mv=u,n.xv=new Tf,t.bv=n,bf(lf(i()),function(){n.Fv=!0,Sh(n)},function(t){Lh(n,t)})}function jh(t){return new h("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Vh(t){return new h("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Hh(t){return new Kh(t)}function Xh(t,n){t.ov.Xv.push(n)}function Gh(t){return t.ov.Xv.length}function Yh(t){var n=t.ov;return void 0!==n&&!!Qh(n)}a.defineProperties(ph.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(ph.prototype,ef.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var Kh=function(){function t(t){if(qf(t,1,"ReadableStreamBYOBReader"),Gf(t,"First parameter"),kc(t))throw new h("This stream has already been locked for exclusive reading by another reader");if(!yh(t.bv))throw new h("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Ef(this,t),this.Xv=new Tf}return a.defineProperty(t.prototype,"closed",{get:function(){return Qh(this)?this.xa:df(Jh("closed"))},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),Qh(this)?void 0===this.uv?df(Nf("cancel")):kf(this,t):df(Jh("cancel"))},t.prototype.read=function(t){if(!Qh(this))return df(Jh("read"));if(!ArrayBuffer.isView(t))return df(new h("view must be an array buffer view"));if(0===t.byteLength)return df(new h("view must have non-zero byteLength"));if(0===t.buffer.byteLength)return df(new h("view's buffer must have non-zero byteLength"));if(t.buffer,void 0===this.uv)return df(Nf("read from"));var n,i,e=vf(function(t,e){n=t,i=e});return $h(this,t,{mv:function(t){return n({value:t,done:!1})},wv:function(t){return n({value:t,done:!0})},yv:function(t){return i(t)}}),e},t.prototype.releaseLock=function(){if(!Qh(this))throw Jh("releaseLock");if(void 0!==this.uv){if(this.Xv.length>0)throw new h("Tried to release a reader lock when that reader has pending read() calls un-settled");Rf(this)}},t}();function Qh(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"Xv")&&t instanceof Kh)}function $h(t,n,i){var e=t.uv;e.pv=!0,"errored"===e.ye?i.yv(e.hv):function(t,n,i){var e=t.Bv,r=1;n.constructor!==DataView&&(r=n.constructor.BYTES_PER_ELEMENT);var o=n.constructor,u=vh(n.buffer),s={buffer:u,bufferByteLength:u.byteLength,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:r,viewConstructor:o,readerType:"byob"};if(t.xv.length>0)return t.xv.push(s),void Xh(e,i);if("closed"!==e.ye){if(t.Dv>0){if(Rh(t,s)){var f=Eh(s);return Oh(t),void i.mv(f)}if(t.Ov){var a=new h("Insufficient bytes to fill elements in the given buffer");return Lh(t,a),void i.yv(a)}}t.xv.push(s),Xh(e,i),Sh(t)}else{var c=new o(s.buffer,s.byteOffset,0);i.wv(c)}}(e.bv,n,i)}function Jh(t){return new h("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}function Zh(t,n){var i=t.highWaterMark;if(void 0===i)return n;if(hh(i)||i<0)throw new RangeError("Invalid highWaterMark");return i}function ta(t){var n=t.size;return n||function(){return 1}}function na(t,n){Mf(t,n);var i=null==t?void 0:t.highWaterMark,e=null==t?void 0:t.size;return{highWaterMark:void 0===i?void 0:Vf(i),size:void 0===e?void 0:ia(e,n+" has member 'size' that")}}function ia(t,n){return Uf(t,n),function(n){return Vf(t(n))}}function ea(t,n,i){return Uf(t,i),function(i){return If(t,n,[i])}}function ra(t,n,i){return Uf(t,i),function(){return If(t,n,[])}}function oa(t,n,i){return Uf(t,i),function(i){return Sf(t,n,[i])}}function ua(t,n,i){return Uf(t,i),function(i,e){return If(t,n,[i,e])}}function sa(t,n){if(!va(t))throw new h(n+" is not a WritableStream.")}a.defineProperties(Kh.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(Kh.prototype,ef.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var fa="function"==typeof AbortController;var ha=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),void 0===t?t=null:Wf(t,"First parameter");var i=na(n,"Second parameter"),e=function(t,n){Mf(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:ea(i,t,n+" has member 'abort' that"),close:void 0===e?void 0:ra(e,t,n+" has member 'close' that"),start:void 0===r?void 0:oa(r,t,n+" has member 'start' that"),write:void 0===u?void 0:ua(u,t,n+" has member 'write' that"),type:o}}(t,"First parameter");if(ca(this),void 0!==e.type)throw new RangeError("Invalid type is specified");var r=ta(i);!function(t,n,i,e){var r=a.create(Pa.prototype),o=function(){},u=function(){return lf(void 0)},s=function(){return lf(void 0)},f=function(){return lf(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)});Da(t,r,o,u,s,f,i,e)}(this,e,Zh(i,1),r)}return a.defineProperty(t.prototype,"locked",{get:function(){if(!va(this))throw Ma("locked");return la(this)},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){return void 0===t&&(t=void 0),va(this)?la(this)?df(new h("Cannot abort a stream that already has a writer")):da(this,t):df(Ma("abort"))},t.prototype.close=function(){return va(this)?la(this)?df(new h("Cannot close a stream that already has a writer")):pa(this)?df(new h("Cannot close an already-closing stream")):wa(this):df(Ma("close"))},t.prototype.getWriter=function(){if(!va(this))throw Ma("getWriter");return aa(this)},t}();function aa(t){return new Sa(t)}function ca(t){t.ye="writable",t.hv=void 0,t.To=void 0,t.qv=void 0,t.Gv=new Tf,t.Qv=void 0,t.Yv=void 0,t.Kv=void 0,t.Zv=void 0,t.Jv=!1}function va(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"qv")&&t instanceof ha)}function la(t){return void 0!==t.To}function da(t,n){var i;if("closed"===t.ye||"errored"===t.ye)return lf(void 0);t.qv.$v=n,null===(i=t.qv.td)||void 0===i||i.abort();var e=t.ye;if("closed"===e||"errored"===e)return lf(void 0);if(void 0!==t.Zv)return t.Zv.ed;var r=!1;"erroring"===e&&(r=!0,n=void 0);var o=vf(function(i,e){t.Zv={ed:void 0,Xu:i,Wu:e,rd:n,ud:r}});return t.Zv.ed=o,r||ga(t,n),o}function wa(t){var n=t.ye;if("closed"===n||"errored"===n)return df(new h("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i,e=vf(function(n,i){var e={Xu:n,Wu:i};t.Yv=e}),r=t.To;return void 0!==r&&t.Jv&&"writable"===n&&$a(r),bh(i=t.qv,Oa,0),Ba(i),e}function ba(t,n){"writable"!==t.ye?ma(t):ga(t,n)}function ga(t,n){var i=t.qv;t.ye="erroring",t.hv=n;var e=t.To;void 0!==e&&ka(e,n),!function(t){if(void 0===t.Qv&&void 0===t.Kv)return!1;return!0}(t)&&i.Fv&&ma(t)}function ma(t){t.ye="errored",t.qv[xf]();var n=t.hv;if(t.Gv.forEach(function(t){t.Wu(n)}),t.Gv=new Tf,void 0!==t.Zv){var i=t.Zv;if(t.Zv=void 0,i.ud)return i.Wu(n),void ya(t);bf(t.qv[Cf](i.rd),function(){i.Xu(),ya(t)},function(n){i.Wu(n),ya(t)})}else ya(t)}function pa(t){return void 0!==t.Yv||void 0!==t.Kv}function ya(t){void 0!==t.Yv&&(t.Yv.Wu(t.hv),t.Yv=void 0);var n=t.To;void 0!==n&&Ha(n,t.hv)}function _a(t,n){var i=t.To;void 0!==i&&n!==t.Jv&&(n?function(t){Ga(t)}(i):$a(i)),t.Jv=n}a.defineProperties(ha.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(ha.prototype,ef.toStringTag,{value:"WritableStream",configurable:!0});var Sa=function(){function t(t){if(qf(t,1,"WritableStreamDefaultWriter"),sa(t,"First parameter"),la(t))throw new h("This stream has already been locked for exclusive writing by another writer");this.od=t,t.To=this;var n,i=t.ye;if("writable"===i)!pa(t)&&t.Jv?Ga(this):Ka(this),ja(this);else if("erroring"===i)Ya(this,t.hv),ja(this);else if("closed"===i)Ka(this),ja(n=this),Xa(n);else{var e=t.hv;Ya(this,e),Va(this,e)}}return a.defineProperty(t.prototype,"closed",{get:function(){return Ia(this)?this.xa:df(Wa("closed"))},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Ia(this))throw Wa("desiredSize");if(void 0===this.od)throw qa("desiredSize");return function(t){var n=t.od,i=n.ye;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return xa(n.qv)}(this)},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"ready",{get:function(){return Ia(this)?this.hd:df(Wa("ready"))},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){return void 0===t&&(t=void 0),Ia(this)?void 0===this.od?df(qa("abort")):function(t,n){return da(t.od,n)}(this,t):df(Wa("abort"))},t.prototype.close=function(){if(!Ia(this))return df(Wa("close"));var t=this.od;return void 0===t?df(qa("close")):pa(t)?df(new h("Cannot close an already-closing stream")):Ta(this)},t.prototype.releaseLock=function(){if(!Ia(this))throw Wa("releaseLock");void 0!==this.od&&Ra(this)},t.prototype.write=function(t){return void 0===t&&(t=void 0),Ia(this)?void 0===this.od?df(qa("write to")):Na(this,t):df(Wa("write"))},t}();function Ia(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"od")&&t instanceof Sa)}function Ta(t){return wa(t.od)}function Ea(t,n){"pending"===t.fd?Ha(t,n):function(t,n){Va(t,n)}(t,n)}function ka(t,n){"pending"===t.vd?Qa(t,n):function(t,n){Ya(t,n)}(t,n)}function Ra(t){var n=t.od,i=new h("Writer was released and can no longer be used to monitor the stream's closedness");ka(t,i),Ea(t,i),n.To=void 0,t.od=void 0}function Na(t,n){var i=t.od,e=i.qv,r=function(t,n){try{return t.dd(n)}catch(n){return Fa(t,n),1}}(e,n);if(i!==t.od)return df(qa("write to"));var o=i.ye;if("errored"===o)return df(i.hv);if(pa(i)||"closed"===o)return df(new h("The stream is closing or closed and cannot be written to"));if("erroring"===o)return df(i.hv);var u=function(t){return vf(function(n,i){var e={Xu:n,Wu:i};t.Gv.push(e)})}(i);return function(t,n,i){try{bh(t,n,i)}catch(n){return void Fa(t,n)}var e=t.ld;if(!pa(e)&&"writable"===e.ye){var r=La(t);_a(e,r)}Ba(t)}(e,n,r),u}a.defineProperties(Sa.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(Sa.prototype,ef.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var Oa={},Pa=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"abortReason",{get:function(){if(!Aa(this))throw Ua("abortReason");return this.$v},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"signal",{get:function(){if(!Aa(this))throw Ua("signal");if(void 0===this.td)throw new h("WritableStreamDefaultController.prototype.signal is not supported");return this.td.signal},enumerable:!1,configurable:!0}),t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Aa(this))throw Ua("error");"writable"===this.ld.ye&&za(this,t)},t.prototype[Cf]=function(t){var n=this._d(t);return Ca(this),n},t.prototype[xf]=function(){gh(this)},t}();function Aa(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"ld")&&t instanceof Pa)}function Da(t,n,i,e,r,o,u,s){n.ld=t,t.qv=n,n.Nv=void 0,n.Dv=void 0,gh(n),n.$v=void 0,n.td=function(){if(fa)return new AbortController}(),n.Fv=!1,n.dd=s,n.Wv=u,n.wd=e,n.md=r,n._d=o;var f=La(n);_a(t,f),bf(lf(i()),function(){n.Fv=!0,Ba(n)},function(i){n.Fv=!0,ba(t,i)})}function Ca(t){t.wd=void 0,t.md=void 0,t._d=void 0,t.dd=void 0}function xa(t){return t.Wv-t.Dv}function Ba(t){var n=t.ld;if(t.Fv&&void 0===n.Qv)if("erroring"!==n.ye){if(0!==t.Nv.length){var i=t.Nv.peek().value;i===Oa?function(t){var n=t.ld;(function(t){t.Kv=t.Yv,t.Yv=void 0})(n),wh(t);var i=t.md();Ca(t),bf(i,function(){!function(t){t.Kv.Xu(void 0),t.Kv=void 0,"erroring"===t.ye&&(t.hv=void 0,void 0!==t.Zv&&(t.Zv.Xu(),t.Zv=void 0)),t.ye="closed";var n=t.To;void 0!==n&&Xa(n)}(n)},function(t){!function(t,n){t.Kv.Wu(n),t.Kv=void 0,void 0!==t.Zv&&(t.Zv.Wu(n),t.Zv=void 0),ba(t,n)}(n,t)})}(t):function(t,n){var i=t.ld;(function(t){t.Qv=t.Gv.shift()})(i),bf(t.wd(n),function(){!function(t){t.Qv.Xu(void 0),t.Qv=void 0}(i);var n=i.ye;if(wh(t),!pa(i)&&"writable"===n){var e=La(t);_a(i,e)}Ba(t)},function(n){"writable"===i.ye&&Ca(t),function(t,n){t.Qv.Wu(n),t.Qv=void 0,ba(t,n)}(i,n)})}(t,i)}}else ma(n)}function Fa(t,n){"writable"===t.ld.ye&&za(t,n)}function La(t){return xa(t)<=0}function za(t,n){var i=t.ld;Ca(t),ga(i,n)}function Ma(t){return new h("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Ua(t){return new h("WritableStreamDefaultController.prototype."+t+" can only be used on a WritableStreamDefaultController")}function Wa(t){return new h("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function qa(t){return new h("Cannot "+t+" a stream using a released writer")}function ja(t){t.xa=vf(function(n,i){t.fv=n,t.vv=i,t.fd="pending"})}function Va(t,n){ja(t),Ha(t,n)}function Ha(t,n){void 0!==t.vv&&(yf(t.xa),t.vv(n),t.fv=void 0,t.vv=void 0,t.fd="rejected")}function Xa(t){void 0!==t.fv&&(t.fv(void 0),t.fv=void 0,t.vv=void 0,t.fd="resolved")}function Ga(t){t.hd=vf(function(n,i){t.yd=n,t.kd=i}),t.vd="pending"}function Ya(t,n){Ga(t),Qa(t,n)}function Ka(t){Ga(t),$a(t)}function Qa(t,n){void 0!==t.kd&&(yf(t.hd),t.kd(n),t.yd=void 0,t.kd=void 0,t.vd="rejected")}function $a(t){void 0!==t.yd&&(t.yd(void 0),t.yd=void 0,t.kd=void 0,t.vd="fulfilled")}a.defineProperties(Pa.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(Pa.prototype,ef.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var Ja="undefined"!=typeof DOMException?DOMException:void 0;var Za,tc=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(Ja)?Ja:((Za=function(t,n){this.message=t||"",this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=a.create(f.prototype),a.defineProperty(Za.prototype,"constructor",{value:Za,writable:!0,configurable:!0}),Za);function nc(t,n,i,e,r,o){var u=Yf(t),s=aa(n);t.pv=!0;var f=!1,a=lf(void 0);return vf(function(c,v){var l,d,w,b;if(void 0!==o){if(l=function(){var i=new tc("Aborted","AbortError"),o=[];e||o.push(function(){return"writable"===n.ye?da(n,i):lf(void 0)}),r||o.push(function(){return"readable"===t.ye?Rc(t,i):lf(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.xa,function(t){e?_(!0,t):y(function(){return da(n,t)},!0,t)}),p(n,s.xa,function(n){r?_(!0,n):y(function(){return Rc(t,n)},!0,n)}),d=t,w=u.xa,b=function(){i?_():y(function(){return function(t){var n=t.od,i=n.ye;return pa(n)||"closed"===i?lf(void 0):"errored"===i?df(n.hv):Ta(t)}(s)})},"closed"===d.ye?b():gf(w,b),pa(n)||"closed"===n.ye){var g=new h("the destination writable stream closed before all data could be piped to it");r?_(!0,g):y(function(){return Rc(t,g)},!0,g)}function m(){var t=a;return wf(a,function(){return t!==a?m():void 0})}function p(t,n,i){"errored"===t.ye?i(t.hv):mf(n,i)}function y(t,i,e){function r(){bf(t(),function(){return S(i,e)},function(t){return S(!0,t)})}f||(f=!0,"writable"!==n.ye||pa(n)?r():gf(m(),r))}function _(t,i){f||(f=!0,"writable"!==n.ye||pa(n)?S(t,i):gf(m(),function(){return S(t,i)}))}function S(t,n){Ra(s),Rf(u),void 0!==o&&o.removeEventListener("abort",l),t?v(n):c(void 0)}yf(vf(function(t,n){!function i(e){e?t():wf(f?lf(!0):wf(s.hd,function(){return vf(function(t,n){eh(u,{mv:function(n){a=wf(Na(s,n),void 0,rf),t(!1)},wv:function(){return t(!0)},yv:n})})}),i,n)}(!1)}))})}var ic=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!ec(this))throw lc("desiredSize");return ac(this)},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(!ec(this))throw lc("close");if(!cc(this))throw new h("The stream is not in a state that permits close");sc(this)},t.prototype.enqueue=function(t){if(void 0===t&&(t=void 0),!ec(this))throw lc("enqueue");if(!cc(this))throw new h("The stream is not in a state that permits enqueue");return fc(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!ec(this))throw lc("error");hc(this,t)},t.prototype[Bf]=function(t){gh(this);var n=this.Lv(t);return uc(this),n},t.prototype[Ff]=function(t){var n=this.pd;if(this.Nv.length>0){var i=wh(this);this.Ov&&0===this.Nv.length?(uc(this),Nc(n)):rc(this),t.mv(i)}else Kf(n,t),rc(this)},t}();function ec(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"pd")&&t instanceof ic)}function rc(t){oc(t)&&(t.Uv?t.Hv=!0:(t.Uv=!0,bf(t.Vv(),function(){t.Uv=!1,t.Hv&&(t.Hv=!1,rc(t))},function(n){hc(t,n)})))}function oc(t){var n=t.pd;return!!cc(t)&&(!!t.Fv&&(!!(kc(n)&&$f(n)>0)||ac(t)>0))}function uc(t){t.Vv=void 0,t.Lv=void 0,t.dd=void 0}function sc(t){if(cc(t)){var n=t.pd;t.Ov=!0,0===t.Nv.length&&(uc(t),Nc(n))}}function fc(t,n){if(cc(t)){var i=t.pd;if(kc(i)&&$f(i)>0)Qf(i,n,!1);else{var e=void 0;try{e=t.dd(n)}catch(n){throw hc(t,n),n}try{bh(t,n,e)}catch(n){throw hc(t,n),n}}rc(t)}}function hc(t,n){var i=t.pd;"readable"===i.ye&&(gh(t),uc(t),Oc(i,n))}function ac(t){var n=t.pd.ye;return"errored"===n?null:"closed"===n?0:t.Wv-t.Dv}function cc(t){var n=t.pd.ye;return!t.Ov&&"readable"===n}function vc(t,n,i,e,r,o,u){n.pd=t,n.Nv=void 0,n.Dv=void 0,gh(n),n.Fv=!1,n.Ov=!1,n.Hv=!1,n.Uv=!1,n.dd=u,n.Wv=o,n.Vv=e,n.Lv=r,t.bv=n,bf(lf(i()),function(){n.Fv=!0,rc(n)},function(t){hc(n,t)})}function lc(t){return new h("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}function dc(t,n){return yh(t.bv)?function(t){var n,i,e,r,o,u=Yf(t),s=!1,f=!1,h=!1,a=!1,c=!1,v=vf(function(t){o=t});function l(t){mf(t.xa,function(n){t===u&&(Lh(e.bv,n),Lh(r.bv,n),a&&c||o(void 0))})}function d(){Qh(u)&&(Rf(u),l(u=Yf(t)));var n={mv:function(n){_f(function(){f=!1,h=!1;var i=n,u=n;if(!a&&!c)try{u=dh(n)}catch(n){return Lh(e.bv,n),Lh(r.bv,n),void o(Rc(t,n))}a||Fh(e.bv,i),c||Fh(r.bv,u),s=!1,f?b():h&&g()})},wv:function(){s=!1,a||Bh(e.bv),c||Bh(r.bv),e.bv.xv.length>0&&Uh(e.bv,0),r.bv.xv.length>0&&Uh(r.bv,0),a&&c||o(void 0)},yv:function(){s=!1}};eh(u,n)}function w(n,i){ih(u)&&(Rf(u),l(u=Hh(t)));var v=i?r:e,d=i?e:r,w={mv:function(n){_f(function(){f=!1,h=!1;var e=i?c:a,r=i?a:c;if(r)e||Wh(v.bv,n);else{var u=void 0;try{u=dh(n)}catch(n){return Lh(v.bv,n),Lh(d.bv,n),void o(Rc(t,n))}e||Wh(v.bv,n),Fh(d.bv,u)}s=!1,f?b():h&&g()})},wv:function(t){s=!1;var n=i?c:a,e=i?a:c;n||Bh(v.bv),e||Bh(d.bv),void 0!==t&&(n||Wh(v.bv,t),!e&&d.bv.xv.length>0&&Uh(d.bv,0)),n&&e||o(void 0)},yv:function(){s=!1}};$h(u,n,w)}function b(){if(s)return f=!0,lf(void 0);s=!0;var t=zh(e.bv);return null===t?d():w(t.Cv,!1),lf(void 0)}function g(){if(s)return h=!0,lf(void 0);s=!0;var t=zh(r.bv);return null===t?d():w(t.Cv,!0),lf(void 0)}function m(){}return e=Ic(m,b,function(e){if(a=!0,n=e,c){var r=ah([n,i]),u=Rc(t,r);o(u)}return v}),r=Ic(m,g,function(e){if(c=!0,i=e,a){var r=ah([n,i]),u=Rc(t,r);o(u)}return v}),l(u),[e,r]}(t):function(t,n){var i,e,r,o,u,s=Yf(t),f=!1,h=!1,a=!1,c=!1,v=vf(function(t){u=t});function l(){if(f)return h=!0,lf(void 0);f=!0;var t={mv:function(t){_f(function(){h=!1;var n=t,i=t;a||fc(r.bv,n),c||fc(o.bv,i),f=!1,h&&l()})},wv:function(){f=!1,a||sc(r.bv),c||sc(o.bv),a&&c||u(void 0)},yv:function(){f=!1}};return eh(s,t),lf(void 0)}function d(){}return r=Sc(d,l,function(n){if(a=!0,i=n,c){var r=ah([i,e]),o=Rc(t,r);u(o)}return v}),o=Sc(d,l,function(n){if(c=!0,e=n,a){var r=ah([i,e]),o=Rc(t,r);u(o)}return v}),mf(s.xa,function(t){hc(r.bv,t),hc(o.bv,t),a&&c||u(void 0)}),[r,o]}(t)}function wc(t,n,i){return Uf(t,i),function(i){return If(t,n,[i])}}function bc(t,n,i){return Uf(t,i),function(i){return If(t,n,[i])}}function gc(t,n,i){return Uf(t,i),function(i){return Sf(t,n,[i])}}function mc(t,n){if("bytes"!==(t=""+t))throw new h(n+" '"+t+"' is not a valid enumeration value for ReadableStreamType");return t}function pc(t,n){if("byob"!==(t=""+t))throw new h(n+" '"+t+"' is not a valid enumeration value for ReadableStreamReaderMode");return t}function yc(t,n){Mf(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(ic.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(ic.prototype,ef.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var _c=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),void 0===t?t=null:Wf(t,"First parameter");var i=na(n,"Second parameter"),e=function(t,n){Mf(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:Xf(e,n+" has member 'autoAllocateChunkSize' that"),cancel:void 0===r?void 0:wc(r,i,n+" has member 'cancel' that"),pull:void 0===o?void 0:bc(o,i,n+" has member 'pull' that"),start:void 0===u?void 0:gc(u,i,n+" has member 'start' that"),type:void 0===s?void 0:mc(s,n+" has member 'type' that")}}(t,"First parameter");if(Tc(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(ph.prototype),r=function(){},o=function(){return lf(void 0)},u=function(){return lf(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");qh(t,e,r,o,u,i,s)}(this,e,Zh(i,0))}else{var r=ta(i);!function(t,n,i,e){var r=a.create(ic.prototype),o=function(){},u=function(){return lf(void 0)},s=function(){return lf(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)}),vc(t,r,o,u,s,i,e)}(this,e,Zh(i,1),r)}}return a.defineProperty(t.prototype,"locked",{get:function(){if(!Ec(this))throw Pc("locked");return kc(this)},enumerable:!1,configurable:!0}),t.prototype.cancel=function(t){return void 0===t&&(t=void 0),Ec(this)?kc(this)?df(new h("Cannot cancel a stream that already has a reader")):Rc(this,t):df(Pc("cancel"))},t.prototype.getReader=function(t){if(void 0===t&&(t=void 0),!Ec(this))throw Pc("getReader");return void 0===function(t,n){Mf(t,n);var i=null==t?void 0:t.mode;return{mode:void 0===i?void 0:pc(i,n+" has member 'mode' that")}}(t,"First parameter").mode?Yf(this):Hh(this)},t.prototype.pipeThrough=function(t,n){if(void 0===n&&(n={}),!Ec(this))throw Pc("pipeThrough");qf(t,1,"pipeThrough");var i=function(t,n){Mf(t,n);var i=null==t?void 0:t.readable;jf(i,"readable","ReadableWritablePair"),Gf(i,n+" has member 'readable' that");var e=null==t?void 0:t.writable;return jf(e,"writable","ReadableWritablePair"),sa(e,n+" has member 'writable' that"),{readable:i,writable:e}}(t,"First parameter"),e=yc(n,"Second parameter");if(kc(this))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(la(i.writable))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return yf(nc(this,i.writable,e.preventClose,e.preventAbort,e.preventCancel,e.signal)),i.readable},t.prototype.pipeTo=function(t,n){if(void 0===n&&(n={}),!Ec(this))return df(Pc("pipeTo"));if(void 0===t)return df("Parameter 1 is required in 'pipeTo'.");if(!va(t))return df(new h("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var i;try{i=yc(n,"Second parameter")}catch(t){return df(t)}return kc(this)?df(new h("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):la(t)?df(new h("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):nc(this,t,i.preventClose,i.preventAbort,i.preventCancel,i.signal)},t.prototype.tee=function(){if(!Ec(this))throw Pc("tee");return ah(dc(this))},t.prototype.values=function(t){if(void 0===t&&(t=void 0),!Ec(this))throw Pc("values");var n,i,e,r,o,u=function(t,n){Mf(t,n);var i=null==t?void 0:t.preventCancel;return{preventCancel:Boolean(i)}}(t,"First parameter");return n=this,i=u.preventCancel,e=Yf(n),r=new oh(e,i),(o=a.create(uh)).Rv=r,o},t}();function Sc(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=a.create(_c.prototype);return Tc(o),vc(o,a.create(ic.prototype),t,n,i,e,r),o}function Ic(t,n,i){var e=a.create(_c.prototype);return Tc(e),qh(e,a.create(ph.prototype),t,n,i,0,void 0),e}function Tc(t){t.ye="readable",t.ov=void 0,t.hv=void 0,t.pv=!1}function Ec(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"bv")&&t instanceof _c)}function kc(t){return void 0!==t.ov}function Rc(t,n){if(t.pv=!0,"closed"===t.ye)return lf(void 0);if("errored"===t.ye)return df(t.hv);Nc(t);var i=t.ov;return void 0!==i&&Qh(i)&&(i.Xv.forEach(function(t){t.wv(void 0)}),i.Xv=new Tf),pf(t.bv[Bf](n),rf)}function Nc(t){t.ye="closed";var n=t.ov;void 0!==n&&(Df(n),ih(n)&&(n._v.forEach(function(t){t.wv()}),n._v=new Tf))}function Oc(t,n){t.ye="errored",t.hv=n;var i=t.ov;void 0!==i&&(Af(i,n),ih(i)?(i._v.forEach(function(t){t.yv(n)}),i._v=new Tf):(i.Xv.forEach(function(t){t.yv(n)}),i.Xv=new Tf))}function Pc(t){return new h("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}function Ac(t,n){Mf(t,n);var i=null==t?void 0:t.highWaterMark;return jf(i,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Vf(i)}}a.defineProperties(_c.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(_c.prototype,ef.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof ef.asyncIterator&&a.defineProperty(_c.prototype,ef.asyncIterator,{value:_c.prototype.values,writable:!0,configurable:!0});var Dc=function(t){return t.byteLength};try{a.defineProperty(Dc,"name",{value:"size",configurable:!0})}catch(Zf){}var Cc=function(){function t(t){qf(t,1,"ByteLengthQueuingStrategy"),t=Ac(t,"First parameter"),this.bd=t.highWaterMark}return a.defineProperty(t.prototype,"highWaterMark",{get:function(){if(!Bc(this))throw xc("highWaterMark");return this.bd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"size",{get:function(){if(!Bc(this))throw xc("size");return Dc},enumerable:!1,configurable:!0}),t}();function xc(t){return new h("ByteLengthQueuingStrategy.prototype."+t+" can only be used on a ByteLengthQueuingStrategy")}function Bc(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"bd")&&t instanceof Cc)}a.defineProperties(Cc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(Cc.prototype,ef.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var Fc=function(){return 1};try{a.defineProperty(Fc,"name",{value:"size",configurable:!0})}catch(Zf){}var Lc=function(){function t(t){qf(t,1,"CountQueuingStrategy"),t=Ac(t,"First parameter"),this.Td=t.highWaterMark}return a.defineProperty(t.prototype,"highWaterMark",{get:function(){if(!Mc(this))throw zc("highWaterMark");return this.Td},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"size",{get:function(){if(!Mc(this))throw zc("size");return Fc},enumerable:!1,configurable:!0}),t}();function zc(t){return new h("CountQueuingStrategy.prototype."+t+" can only be used on a CountQueuingStrategy")}function Mc(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"Td")&&t instanceof Lc)}function Uc(t,n,i){return Uf(t,i),function(i){return If(t,n,[i])}}function Wc(t,n,i){return Uf(t,i),function(i){return Sf(t,n,[i])}}function qc(t,n,i){return Uf(t,i),function(i,e){return If(t,n,[i,e])}}a.defineProperties(Lc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(Lc.prototype,ef.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var jc=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=na(n,"Second parameter"),r=na(i,"Third parameter"),o=function(t,n){Mf(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:Uc(i,t,n+" has member 'flush' that"),readableType:e,start:void 0===r?void 0:Wc(r,t,n+" has member 'start' that"),transform:void 0===o?void 0:qc(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=Zh(r,0),f=ta(r),h=Zh(e,1),c=ta(e);!function(t,n,i,e,r,o){function u(){return n}t.Sd=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=a.create(ha.prototype);return ca(u),Da(u,a.create(Pa.prototype),t,n,i,e,r,o),u}(u,function(n){return function(t,n){var i=t.Ed;if(t.Jv){var e=t.Id;return pf(e,function(){var e=t.Sd,r=e.ye;if("erroring"===r)throw e.hv;return Zc(i,n)})}return Zc(i,n)}(t,n)},function(){return function(t){var n=t.Rd,i=t.Ed,e=i.Nd();return $c(i),pf(e,function(){if("errored"===n.ye)throw n.hv;sc(n.bv)},function(i){throw Hc(t,i),n.hv})}(t)},function(n){return function(t,n){return Hc(t,n),lf(void 0)}(t,n)},i,e),t.Rd=Sc(u,function(){return function(t){return Gc(t,!1),t.Id}(t)},function(n){return Xc(t,n),lf(void 0)},r,o),t.Jv=void 0,t.Id=void 0,t.Dd=void 0,Gc(t,!0),t.Ed=void 0}(this,vf(function(t){u=t}),h,c,s,f),function(t,n){var i=a.create(Kc.prototype),e=function(t){try{return Jc(i,t),lf(void 0)}catch(t){return df(t)}},r=function(){return lf(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.Cd=t,t.Ed=n,n.Pd=i,n.Nd=e}(t,i,e,r)}(this,o),void 0!==o.start?u(o.start(this.Ed)):u(void 0)}return a.defineProperty(t.prototype,"readable",{get:function(){if(!Vc(this))throw nv("readable");return this.Rd},enumerable:!1,configurable:!0}),a.defineProperty(t.prototype,"writable",{get:function(){if(!Vc(this))throw nv("writable");return this.Sd},enumerable:!1,configurable:!0}),t}();function Vc(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"Ed")&&t instanceof jc)}function Hc(t,n){hc(t.Rd.bv,n),Xc(t,n)}function Xc(t,n){$c(t.Ed),Fa(t.Sd.qv,n),t.Jv&&Gc(t,!1)}function Gc(t,n){void 0!==t.Id&&t.Dd(),t.Id=vf(function(n){t.Dd=n}),t.Jv=n}a.defineProperties(jc.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(jc.prototype,ef.toStringTag,{value:"TransformStream",configurable:!0});var Yc,Kc=function(){function t(){throw new h("Illegal constructor")}return a.defineProperty(t.prototype,"desiredSize",{get:function(){if(!Qc(this))throw tv("desiredSize");return ac(this.Cd.Rd.bv)},enumerable:!1,configurable:!0}),t.prototype.enqueue=function(t){if(void 0===t&&(t=void 0),!Qc(this))throw tv("enqueue");Jc(this,t)},t.prototype.error=function(t){if(void 0===t&&(t=void 0),!Qc(this))throw tv("error");var n;n=t,Hc(this.Cd,n)},t.prototype.terminate=function(){if(!Qc(this))throw tv("terminate");!function(t){var n=t.Cd;sc(n.Rd.bv);var i=new h("TransformStream terminated");Xc(n,i)}(this)},t}();function Qc(t){return!!uf(t)&&(!!a.prototype.hasOwnProperty.call(t,"Cd")&&t instanceof Kc)}function $c(t){t.Pd=void 0,t.Nd=void 0}function Jc(t,n){var i=t.Cd,e=i.Rd.bv;if(!cc(e))throw new h("Readable side is not in a state that permits enqueue");try{fc(e,n)}catch(t){throw Xc(i,t),i.Rd.hv}(function(t){return!oc(t)})(e)!==i.Jv&&Gc(i,!0)}function Zc(t,n){return pf(t.Pd(n),void 0,function(n){throw Hc(t.Cd,n),n})}function tv(t){return new h("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function nv(t){return new h("TransformStream.prototype."+t+" can only be used on a TransformStream")}function iv(t){return n=[t],new _c({start:function(t){for(var i=0;i<n.length;i++){var e=n[i];t.enqueue(e)}t.close()}});var n}function ev(t){return iv(new w(t))}function rv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new tu,o=function(){u();var t=new An;e.cancel(t).catch(lt),r.Qu(t)},u=function(){i&&(i.Fs(o),i=void 0)};i&&(i.Cs?o():i.xs(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.Gu(t)},function(t){u(),r.Qu(t)}),r.Vu}(t,n).then(function(t){return si(t).buffer})}function ov(t,n){var i=n,e=new jc,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.Xs()};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 uv(t){return Jn(new w(t))}function sv(t){return Zn(t).buffer}a.defineProperties(Kc.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof ef.toStringTag&&a.defineProperty(Kc.prototype,ef.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),function(t){t[t.Yf=0]="Yf",t[t.Od=1]="Od"}(Yc||(Yc={}));var fv="content-type",hv="text/plain;charset=UTF-8",av=function(){function t(){}var n=t.prototype;return n.Bd=function(t){return this.Ld(t).then(JSON.parse)},n.Md=function(t,n){switch(t){case Js.Gf:return this.xd(n);case Js.Qf:return this.Bd(n);case Js.Yf:return this.Fd();case Js.$n:return this.Ld(n);default:throw new h}},t}();function cv(t,n,i){if(t instanceof av)return t;if(t instanceof _c)return function(t,n){return new lv({vs:Yc.Yf,Fd:t,Ud:vv(n)})}(t,i);var e=vv(i),r=j.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{vs:Js.$n,Hd:t,Ud:n||hv};if(t instanceof ArrayBuffer||ui(t))return{vs:Js.Gf,Hd:yv(t),Ud:n};if(et(i=t)&&i.constructor&&i.constructor===a||it(t))return{vs:Js.Qf,Hd:t,Ud:n};throw new h("Unsupported BodyInit type")}return{vs:Js.$n,Hd:null,Ud:n};var i}(t,e)});return new lv({vs:Yc.Od,Vu:r,Vd:n})}function vv(t){return(t.get(fv)||"").toLowerCase()}var lv=function(t){function n(n){var i;return(i=t.call(this)||this).Xd=!1,i.zd=void 0,i.Wd=new tu,i.Wd.Vu.catch(lt),i.qd(n),i}Mt(n,t);var i=n.prototype;return i.Gd=function(){return this.Wd.Vu},i.Ld=function(t){return this.Qd(dv,t)},i.Bd=function(t){return this.Qd(bv,t)},i.xd=function(t){return this.Qd(mv,t)},i.Fd=function(){return this.Yd((t=this.zd).vs===Yc.Yf?t.Fd:ov(t.Vu.then(pv).then(ev),t.Vd));var t},i.Qd=function(t,n){if(this.Xd)return j.reject(new h("Already used"));this.Xd=!0;var i=t(this.zd,n);return this.Wd.Gu(i.then(lt)),i},i.Yd=function(t){if(this.Xd)throw new h("Already used");if(t.locked)throw new h("Body stream is locked");this.Xd=!0;var n=new jc,i=j.resolve(t.pipeTo(n.writable));return this.Wd.Gu(i),n.readable},i.qd=function(t){this.zd=t,t.vs===Yc.Od&&t.Vu.catch(lt)},i.jd=function(){if(this.Xd)throw new h("Already used");var t=function(t){if(t.vs===Yc.Yf){var n=t.Fd.tee(),i=n[0],e=n[1];return[{vs:t.vs,Fd:i,Ud:t.Ud},{vs:t.vs,Fd:e,Ud:t.Ud}]}var r=t.Vd.Ws(),o=r[0],u=r[1];return[{vs:t.vs,Vu:t.Vu,Vd:o},{vs:t.vs,Vu:t.Vu,Vd:u}]}(this.zd),i=t[0],e=t[1];return this.qd(i),new n(e)},mt(n,[{key:"Kd",get:function(){return this.Xd}}]),n}(av);function dv(t,n){return t.vs===Yc.Yf?rv(t.Fd,n).then(uv):(n&&t.Vd.zs(n),Cn(t.Vu.then(wv),t.Vd))}function wv(t){switch(t.vs){case Js.$n:return j.resolve(t.Hd||"");case Js.Gf:return j.resolve(t.Hd).then(uv);case Js.Qf:return j.resolve(t.Hd).then(JSON.stringify)}}function bv(t,n){return t.vs===Yc.Yf?dv(t,n).then(JSON.parse):(n&&t.Vd.zs(n),Cn(t.Vu.then(gv),t.Vd))}function gv(t){return t.vs===Js.Qf?j.resolve(t.Hd):wv(t).then(JSON.parse)}function mv(t,n){return t.vs===Yc.Yf?rv(t.Fd,n):(n&&t.Vd.zs(n),Cn(t.Vu.then(pv),t.Vd))}function pv(t){switch(t.vs){case Js.Gf:return j.resolve(t.Hd);case Js.$n:case Js.Qf:return wv(t).then(sv)}}function yv(t){return t instanceof ArrayBuffer?t:ei(ni(t)).buffer}function _v(t){return t.Zd>=200&&t.Zd<=299||304===t.Zd}var Sv,Iv,Tv,Ev,kv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.Jd,o=i.$d,u=i.Zd,s=i.il,f=i.ul):(r=[],o=Js.$n,u=200,s="OK",f=!1);var h=n.ol,a=new Zs(n.Jd||r),c=n.$d||o,v=n.hl||(i&&i.ol===h?i.hl:h.al),l=i?i.cl:null,d=cv(void 0!==n.Xi?n.Xi:l,n.Vd||new Pn,a);return(e=t.call(this,d)||this).Jd=void 0,e.ol=void 0,e.hl=void 0,e.$d=void 0,e.Zd=void 0,e.il=void 0,e.ul=void 0,e.Jd=a,e.ol=h,e.hl=v,e.$d=c,e.Zd=void 0!==n.Zd?n.Zd:u,e.il=void 0!==n.il?String(n.il):s,e.ul=n.ul||f,e}Mt(n,t);var i=n.prototype;return i.Xi=function(t){return this.Md(this.$d,t)},i.xu=function(){return new n({Xi:this.jd(),ol:this.ol},this)},n}(function(t){function n(n){var i;return(i=t.call(this)||this).cl=void 0,i.cl=n,i}Mt(n,t);var i=n.prototype;return i.Gd=function(){return this.cl.Gd()},i.Ld=function(t){return this.cl.Ld(t)},i.Bd=function(t){return this.cl.Bd(t)},i.xd=function(t){return this.cl.xd(t)},i.Fd=function(){return this.cl.Fd()},i.jd=function(){return this.cl.jd()},mt(n,[{key:"Kd",get:function(){return this.cl.Kd}}]),n}(av));!function(t){t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT"}(Sv||(Sv={})),function(t){t.fl="",t.vl="manifest",t.dl="segment",t.ll="content-protection"}(Iv||(Iv={})),function(t){t.fl="",t._l="initialization-segment",t.wl="fairplay-license",t.yl="fairplay-certificate",t.bl="widevine-license",t.Al="widevine-certificate",t.Tl="playready-license",t.Sl="clearkey-license",t.El="aes128-key"}(Tv||(Tv={})),function(t){t.fl="",t.Il="audio",t.Rl="video",t.$n="text",t.Nl="image"}(Ev||(Ev={}));var Rv=function(t,n){this.Hd=void 0,this.Jd=void 0,this.Dl=void 0,this.$d=void 0,this.Cl=void 0,this.qs=void 0,this.vs=void 0,this.Pl=void 0,this.Ol=void 0,this.al=void 0,this.Bl=void 0,this.Ll=void 0;var i,e,r,o,u,s,f,h,a,c,v,l=t.al;n?(i=n.Hd,e=n.Jd,r=n.Dl,o=n.$d,u=n.Cl,s=n.qs,f=n.vs,h=n.Pl,a=n.Ol,c=n.Bl,v=n.Ll):(i=null,e={},r=Sv.GET,o=Js.$n,u=0,f=Iv.fl,h=Tv.fl,a=Ev.fl,c=!1),this.al=l,this.Hd=t.Hd||i,this.Jd=new Zs(t.Jd||e),this.Dl=t.Dl||r,this.$d=t.$d||o,this.Cl=void 0!==t.Cl?Number(t.Cl)||0:u,this.qs=t.qs||s||(new Pn).qs,this.vs=t.vs||f,this.Pl=t.Pl||h,this.Ol=t.Ol||a,this.Bl=void 0!==t.Bl?Boolean(t.Bl):c,this.Ll=t.Ll||v},Nv=function(){function t(){}var n=t.prototype;return n.ol=function(t){var n=function(t){return new kv({Xi:null,Jd:{},ol:t,hl:t.al,$d:t.$d,Zd:0,il:$s.Sf})}(new Rv(t));return j.resolve(n)},n.Ml=function(t){},n.xl=function(){},t}();var Ov,Pv=function(){function t(t,n){void 0===n&&(n=!0),this.Fl=void 0,this.Ul=void 0,this.Fl=t,this.Ul=n}var n=t.prototype;return n.ol=function(t){var n=this.Hl(t);return this.Fl.ol(n)},n.Ml=function(t){return this.Fl.Ml(this.Vl(t))},n.Hl=function(n){var i=new Rv(n);if(!this.Ul){var e=t.Xl(i.al);i=new Rv({al:e},i)}return i},n.Vl=function(n){var i=n.al;return this.Ul||(i=t.Xl(i)),{al:i,Hd:n.Hd}},t.Xl=function(t){return J.Xr&&zn(t,"http://")?t.replace(":","s:"):t},n.xl=function(){this.Fl.xl()},mt(t,null,[{key:"zl",get:function(){return t.Wl||(t.Wl=new t(new Nv)),t.Wl}}]),t}();Pv.Wl=void 0,function(t){t.ql="HttpOpenError",t.Gl="HttpResponseError",t.Ql="HttpTimeoutError"}(Ov||(Ov={}));var Av=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).Yl=void 0,r.Yl=n,r}return Mt(n,t),mt(n,[{key:"ol",get:function(){return this.Yl}}]),n}(Nn);var Dv=function(t){function n(n,i){return t.call(this,n,"Error while opening "+n.al+". Invalid URL.",i)||this}return Mt(n,t),mt(n,[{key:"name",get:function(){return Ov.ql}}]),n}(Av);var Cv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.ol,null!=e?e:function(t){return"Error while loading "+t.ol.al+", status code "+t.Zd}(n),i)||this).jl=void 0,r.jl=n,r}return Mt(n,t),mt(n,[{key:"name",get:function(){return Ov.Gl}},{key:"Kl",get:function(){return this.jl}}]),n}(Av);var xv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.al+" timed out after "+t.Cl+" seconds."}(n),i)||this}return Mt(n,t),mt(n,[{key:"name",get:function(){return Ov.Ql}}]),n}(Av),Bv=function(t,n){return(Bv=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 Fv(t,n){function i(){this.constructor=t}Bv(t,n),t.prototype=null===n?a.create(n):(i.prototype=n.prototype,new i)}var Lv="object"==typeof n?n:"object"==typeof t?t:"object"==typeof global?global:null;var zv=function(){var t=Lv.Blob;if(t)try{return new t,function(t,n){return new Lv.Blob(t,n)}}catch(t){}var n,i=Lv.BlobBuilder||Lv.WebKitBlobBuilder||Lv.MozBlobBuilder||Lv.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}(),Mv="function"==typeof _c?_c:void 0;function Uv(t){return t&&"function"==typeof t.getReader}function Wv(t){if("function"!=typeof t)return!1;try{var n=!1,i=new t({start:function(){n=!0}});return!!n&&Uv(i)}catch(t){return!1}}var qv=function(){function t(t,n){this.ov=t,this.Zl=n}return t.prototype.pull=function(t){var n=this;return this.ov.read().then(function(i){n.Zl&&n.Zl(i),i.done?t.close():t.enqueue(i.value)})},t.prototype.cancel=function(t){return this.ov.cancel(t)},t}();function jv(t,n){return n.constructor===t?n:new t(new qv(n.getReader()),{highWaterMark:0})}var Vv=function(){function t(t,n){this.Jl=t,this.$l=n}return t.prototype.pull=function(t){return this.Jl().then(function(n){t.enqueue(new w(n)),t.close()})},t.prototype.cancel=function(t){this.$l&&this.$l(t)},t}();function Hv(t,n,i){return new t(new Vv(n,i),{highWaterMark:0})}var Xv={searchParams:"URLSearchParams"in Lv,iterable:"Symbol"in Lv&&"iterator"in Symbol,blob:"FileReader"in Lv&&!!zv,formData:"FormData"in Lv,arrayBuffer:"ArrayBuffer"in Lv,stream:Wv(Mv),streamRequest:"Request"in Lv&&"body"in Lv.Request.prototype,streamResponse:"Response"in Lv&&"body"in Lv.Response.prototype,abort:"AbortController"in Lv&&"Request"in Lv&&"signal"in Lv.Request.prototype,encoding:"TextEncoder"in Lv&&"TextDecoder"in Lv,url:"URL"in Lv&&function(t){try{return new Lv.URL(t).toString()===t}catch(t){return!1}}("http://example.com/"),firefox:"navigator"in Lv&&/Firefox\//.test(Lv.navigator.userAgent)};function Gv(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 Yv(t){return"string"!=typeof t&&(t=String(t)),t}function Kv(t){var n={next:function(){var n=t.shift();return{done:void 0===n,value:n}}};return Xv.iterable&&(n[Symbol.iterator]=function(){return n}),n}var Qv=function(){function t(t){var n=this;this.$r={};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 Xv.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=Gv(t),n=Yv(n);var i=t.toLowerCase();if(this.$r.hasOwnProperty(i)){var e=this.$r[i],r=e[1];e[1]=r?r+", "+n:n}else this.$r[i]=[t,n]},t.prototype.delete=function(t){var n=Gv(t).toLowerCase();delete this.$r[n]},t.prototype.get=function(t){var n=Gv(t).toLowerCase();return this.$r.hasOwnProperty(n)?this.$r[n][1]:null},t.prototype.has=function(t){var n=Gv(t).toLowerCase();return this.$r.hasOwnProperty(n)},t.prototype.set=function(t,n){var i=(t=Gv(t)).toLowerCase();this.$r[i]=[t,Yv(n)]},t.prototype.forEach=function(t,n){for(var i in this.$r)this.$r.hasOwnProperty(i)&&t.call(n,this.$r[i][1],i,this)},t.prototype.keys=function(){var t=[];return this.forEach(function(n,i){t.push(i)}),Kv(t)},t.prototype.values=function(){var t=[];return this.forEach(function(n){t.push(n)}),Kv(t)},t.prototype.entries=function(){var t=[];return this.forEach(function(n,i){t.push([i,n])}),Kv(t)},t.prototype.asList=function(){var t=[];for(var n in this.$r)if(this.$r.hasOwnProperty(n)){var i=this.$r[n],e=i[0],r=i[1];t.push([e,r])}return t},t}();function $v(){}Xv.iterable&&(Qv.prototype[Symbol.iterator]=Qv.prototype.entries);var Jv,Zv,tl,nl=c.min,il=String.fromCharCode,el=16384;function rl(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+=el){var r=nl(e+el,n);i.push(il.apply(null,t.slice(e,r)))}return i.join("")}(n)}function ol(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ul(t,n){return t>>n&63|128}function sl(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(ol(t),n.push(t>>12&15|224),n.push(ul(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ul(t,12)),n.push(ul(t,6))),n.push(63&t|128)):n.push(t)}function fl(){if(tl>=Zv)throw new f("Invalid byte index");var t=255&Jv[tl];if(tl++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function hl(){var t,n;if(tl>Zv)throw new f("Invalid byte index");if(tl===Zv)return!1;if(t=255&Jv[tl],tl++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|fl())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|fl()<<6|fl())>=2048)return ol(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|fl()<<12|fl()<<6|fl())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}var al=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"];function cl(t){return t&&URLSearchParams.prototype.isPrototypeOf(t)}function vl(t){return t&&ArrayBuffer.prototype.isPrototypeOf(t)}function ll(t){return t&&DataView.prototype.isPrototypeOf(t)}var dl,wl=ArrayBuffer.isView||function(t){return t&&(al.indexOf(a.prototype.toString.call(t))>-1||ll(t))};function bl(t){if(t.bodyUsed)return j.reject(new h("Already used"));t.bodyUsed=!0}function gl(t){return new j(function(n,i){t.onload=function(){n(t.result)},t.onerror=function(){i(t.error)}})}function ml(t){return Xv.encoding?new Lv.TextDecoder("utf-8").decode(new w(t)):rl(function(t){Zv=(Jv=t).length,tl=0;for(var n,i=[];!1!==(n=hl());)i.push(n);return i}(new w(t)))}function pl(t){return Xv.encoding?(new Lv.TextEncoder).encode(t).buffer:new w(function(t){for(var n=[],i=0,e=t;i<e.length;i++)sl(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 yl(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 _l(t){return yl(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 Sl(t){return t.slice?t.slice(0):Il(new w(t))}function Il(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 Tl(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 El(t){var n=t;if(n.bodyUsed)throw new h("Already used");if(n.t_===dl.n_){if(!n.i_.tee)throw new f("could not clone ReadableStream body");var i=n.i_.tee(),e=i[0],r=i[1];return n.body=e,n.i_=e,n.e_=e,r}return n.t_===dl.Gf?Sl(n.i_):n.t_===dl.Od?n.i_.then(El):n.e_}!function(t){t[t.$n=0]="$n",t[t.r_=1]="r_",t[t.s_=2]="s_",t[t.Gf=3]="Gf",t[t.n_=4]="n_",t[t.Od=5]="Od"}(dl||(dl={}));var kl=function(){function t(n,i){this.bodyUsed=!1;var e,r,o,u=this;if(this.e_=n||null,n)if("string"==typeof n)this.t_=dl.$n,this.i_=n;else if((o=n)&&"function"==typeof o.then)this.t_=dl.Od,this.i_=j.resolve(n).then(function(n){return new t(n,i)}),this.i_.catch($v);else if(Xv.blob&&function(t){return t&&Blob.prototype.isPrototypeOf(t)}(n))this.t_=dl.r_,this.i_=n;else if(Xv.formData&&function(t){return t&&FormData.prototype.isPrototypeOf(t)}(n))this.t_=dl.s_,this.i_=n;else if(Xv.searchParams&&cl(n))this.t_=dl.$n,this.i_=n.toString();else if(Xv.arrayBuffer&&(vl(n)||wl(n)))ll(n)&&(this.e_=new w((r=n).buffer,r.byteOffset,r.byteLength)),this.t_=dl.Gf,this.i_=vl(e=n)?Sl(e):Il(e);else{if(!Xv.stream||!Uv(n))throw new f("unsupported BodyInit type");n=jv(Mv,n),this.t_=dl.n_,this.i_=n,this.e_=n}else this.t_=dl.$n,this.i_="";this.u_="",i.has("content-type")?this.u_=(i.get("content-type")||"").toLowerCase():("string"==typeof n?this.u_="text/plain;charset=UTF-8":u.t_===dl.r_&&u.i_.type?this.u_=u.i_.type:Xv.searchParams&&cl(n)&&(this.u_="application/x-www-form-urlencoded;charset=UTF-8"),this.u_&&i.set("content-type",this.u_)),Xv.stream&&(null==n?this.body=null:u.t_===dl.n_?this.body=u.i_:this.body=Hv(Mv,function(){return u.arrayBuffer()},function(){u.bodyUsed=!0}))}return t.prototype.text=function(){var t,n,i,e=bl(this);return e||(this.t_===dl.r_?(t=this.i_,n=new FileReader,i=gl(n),n.readAsText(t),i):this.t_===dl.Gf?j.resolve(this.i_).then(ml):this.t_===dl.n_?_l(this.i_).then(ml):this.t_===dl.Od?this.i_.then(function(t){return t.text()}):this.t_===dl.s_?j.reject(new f("could not read FormData body as text")):j.resolve(this.i_))},t.prototype.json=function(){return this.text().then(JSON.parse)},t}();Xv.blob&&(kl.prototype.blob=function(){var t,n,i=bl(this);return i||(this.t_===dl.r_?j.resolve(this.i_):this.t_===dl.Gf?j.resolve(zv([this.i_],{type:this.u_})):this.t_===dl.n_?(t=this.i_,n=this.u_,yl(t).then(function(t){return zv(t,{type:n||""})})):this.t_===dl.Od?this.i_.then(function(t){return t.blob()}):this.t_===dl.s_?j.reject(new f("could not read FormData body as Blob")):j.resolve(zv([this.i_],{type:this.u_})))}),Xv.arrayBuffer&&(kl.prototype.arrayBuffer=function(){var t,n,i;return this.t_===dl.Gf?bl(this)||j.resolve(this.i_):this.t_===dl.r_?bl(this)||(t=this.i_,n=new FileReader,i=gl(n),n.readAsArrayBuffer(t),i):this.t_===dl.n_?_l(this.i_):this.t_===dl.Od?bl(this)||this.i_.then(function(t){return t.arrayBuffer()}):this.t_===dl.s_?j.reject(new f("could not read FormData body as ArrayBuffer")):j.resolve(this.i_).then(pl)}),Xv.formData&&(kl.prototype.formData=function(){return this.t_===dl.s_?bl(this)||j.resolve(this.i_):this.text().then(Tl)});var Rl=[301,302,303,307,308],Nl=function(t){function n(n,i){var e=this,r=new Qv((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 Fv(n,t),n.prototype.clone=function(){return new n(El(this),{status:this.status,statusText:this.statusText,headers:new Qv(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===Rl.indexOf(i))throw new RangeError("Invalid status code");return new n(null,{status:i,headers:{location:t}})},n}(kl);var Ol,Pl=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});(Ol=Pl)&&Ol.__esModule&&a.prototype.hasOwnProperty.call(Ol,"default")&&Ol.default,Pl.AbortSignal;var Al=Pl.AbortController,Dl=Lv.DOMException;try{new Dl}catch(t){(Dl=function(t,n){f.call(this,t),this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=a.create(f.prototype),Dl.prototype.constructor=Dl}var Cl=Al;function xl(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 Bl(t,n,i){return new j(function(e,r){if(n.signal.aborted)return t.catch($v),r(Fl());var o=function(){n.signal.removeEventListener("abort",o),r(Fl())};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 Fl(){return new Dl("Aborted","AbortError")}var Ll,zl="moz-chunked-arraybuffer";function Ml(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"}(Ll||(Ll={}));var Ul=function(){function t(t,n){var i=this;this.o_=!1,this.Yl=t,this.h_=n,this.a_=new b,this.c_=new j(function(t,n){i.f_=t,i.v_=n})}return t.prototype.send=function(){var t=this;return this.d_().then(function(n){return t.l_(n,t.h_),t.c_})},t.prototype.d_=function(){var t=this.Yl;return t.t_===dl.n_?t.arrayBuffer():j.resolve(t.e_)},t.prototype.__=function(t){this.Yl.onprogress&&this.Yl.onprogress(t.loaded,t.lengthComputable?t.total:void 0)},t.prototype.g_=function(t){this.v_(t)},t.prototype.w_=function(){this.g_(new h("Network request failed"))},t.prototype.m_=function(){this.g_(new h("Network request failed"))},t.prototype.y_=function(){this.g_(Fl())},t.prototype.l_=function(t,n){var i=this,e=this.Yl,r=this.a_,o=function(){return i.k_()};if(e.signal.aborted)return this.y_();r.onreadystatechange=function(){if(r.readyState>=Ll.HEADERS_RECEIVED&&!i.o_){var t=function(t){var n=new Qv;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.o_=!0,i.p_(n)}},r.onprogress=function(t){return i.__(t)},r.onload=function(){return i.b_()},r.onerror=function(){return i.w_()},r.ontimeout=function(){return i.m_()},r.onabort=function(){return i.y_()},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.k_=function(){this.y_(),this.a_.abort()},t}(),Wl=function(t){function n(n,i){var e=t.call(this,n,i)||this;return e.A_=void 0,e.T_=void 0,e}return Fv(n,t),n.prototype.p_=function(t){var n=this;this.A_=new j(function(t,i){n.T_=t,n.S_=i}),this.f_(new Nl(this.A_,t))},n.prototype.b_=function(){var t=this.a_.response;if(null==t){var n=this.h_;""===n||"text"===n?t=this.a_.responseText:"document"===n?t=this.a_.responseXML:"arraybuffer"===n?t=new ArrayBuffer(0):"blob"===n&&(t=zv([]))}this.T_(t)},n.prototype.g_=function(n){t.prototype.g_.call(this,n),this.S_&&this.S_(n)},n}(Ul),ql=function(t){function n(n){var i=t.call(this,n,zl)||this;return i.E_=void 0,i.I_=void 0,i.R_=!1,i}return Fv(n,t),n.prototype.p_=function(t){var n=this;this.E_=new Mv({start:function(t){n.I_=t},cancel:function(){n.R_=!0,n.k_()}}),this.f_(new Nl(this.E_,t))},n.prototype.__=function(n){this.R_||this.I_.enqueue(new w(this.a_.response)),t.prototype.__.call(this,n)},n.prototype.b_=function(){this.I_.close()},n.prototype.g_=function(n){t.prototype.g_.call(this,n),this.I_&&!this.R_&&(this.R_=!0,this.I_.error(n))},n}(Ul),jl=function(){var t=Xv.firefox&&Ml(zl);return jl=function(){return t},t},Vl=function(){var t;return t=Xv.arrayBuffer&&Ml("arraybuffer")?"arraybuffer":Xv.blob&&Ml("blob")?"blob":"",Vl=function(){return t},t};function Hl(t){return(Xv.stream&&jl()?new ql(t):new Wl(t,Vl())).send()}var Xl=Lv.fetch,Gl=Lv.Request;Lv.Response;var Yl=Lv.AbortController;var Kl=["http:","https:"];var Ql=function(){try{if(Xv.streamRequest){var t=new Gl("about:blank",{body:"",method:"POST"}).body;if(t&&Wv(t.constructor))return t.constructor}}catch(t){}}();function $l(t,n,i){var e;if(Xv.stream){var r=void 0;if(Xv.streamResponse){var o=t.body;r=o&&jv(Mv,o)}else r=Hv(Mv,function(){return Bl(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 qv(n.getReader(),i),{highWaterMark:0})}(Mv,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,Jl(t.headers))),e=r}else{var u=Bl(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,Jl(t.headers))),e=u}return new Nl(e,t)}function Jl(t){return t.has("content-length")?Number(t.get("content-length")):void 0}function Zl(t){var n=new Cl;return t.signal&&xl(n,t.signal),function(t,n){var i,e,r=t;if(i=r.t_===dl.n_?Xv.streamRequest&&Ql?j.resolve(jv(Ql,r.i_)):Bl(t.arrayBuffer(),n,!1):Bl(j.resolve(t.e_),n,!1),Xv.abort){var o=new Yl;xl(o,n.signal),e=o.signal}return i.then(function(n){return new Gl(t.url,{body:n||void 0,credentials:t.credentials,headers:(i=t.headers,(i instanceof Qv?i:new Qv(i)).asList()),method:t.method,mode:t.mode,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:e});var i})}(t,n).then(function(i){return Xl(i).then(function(i){return $l(i,n,t.onprogress)})})}var td=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];var nd=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 Qv(i.headers)),s=i.method,f=i.mode,a=i.referrer,c=i.referrerPolicy,v=i.signal,l=i.onprogress,w||null==i.e_||(w=i.e_,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 Qv(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 td.indexOf(n)>-1?n:t}(e.method||s),d.mode=e.mode||f,d.signal=e.signal||v||(new Cl).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 Fv(n,t),n.prototype.clone=function(){return new n(this,{body:El(this)})},n}(kl),id="function"==typeof Xl&&Xv.stream&&Xv.streamResponse&&Xv.url;function ed(t,n){return new j(function(i){var e=new nd(t,n);i((id&&function(t){try{return Kl.indexOf(new Lv.URL(t,Lv.location.href).protocol)>=0}catch(t){return!1}}(e.url)?Zl:Hl)(e))})}ed.polyfill=!0;var rd=function(){function t(t){this.Kl=void 0,this.Yl=void 0,this.td=new Pn,this.jl=void 0,this.N_=!1,this.Yl=t,this.td.zs(t.qs),this.Kl=this.D_()}var n=t.prototype;return n.D_=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.Yl).Cl&&r(function(){h.N_=!0,h.td.Xs()},t.Cl),a.prev=2,n=ed(t.al,{method:t.Dl,headers:t.Jd.jf(),body:t.Hd,credentials:t.Bl?"include":"same-origin",signal:sd(this.td.qs),onprogress:t.Ll}),a.next=9;break;case 6:throw a.prev=6,a.t0=a.catch(2),new Dv(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),Dn(e=this.C_(a.t1))&&this.td.Xs(),e;case 20:if(o=i.url||t.al,u=0===i.status&&"file:"===(c=o,J.Lr(c).protocol)?200:i.status,s=new od(this,i,this.td),f=new kv({Xi:s,ol:t,$d:t.$d,Jd:new Zs(i.headers.asList()),Zd:u,il:i.statusText,hl:o}),this.jl=f,!_v(f)){a.next=29;break}return a.abrupt("return",f);case 29:throw new Cv(f);case 30:case"end":return a.stop()}var c},null,this,[[2,6],[9,15]],j)},n.C_=function(t){return Dn(t)?this.N_?new xv(this.Yl):new An(t.message,t):this.jl?new Cv(this.jl,t):new Dv(this.Yl,t)},t}(),od=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).P_=void 0,r.O_=void 0,r.td=void 0,r.Wd=new tu,r.P_=n,r.O_=i,r.td=e,r.Wd.Vu.catch(lt),r}Mt(n,t);var i=n.prototype;return i.Gd=function(){return this.Wd.Vu},i.Ld=function(t){return this.Qd(this.O_.text(),t)},i.xd=function(t){return this.Qd(this.O_.arrayBuffer(),t)},i.Fd=function(){var t=this.O_.body;return t?this.Yd(t):ov(this.xd().then(ev),this.td)},i.jd=function(){var t=this.O_.clone(),i=this.td.Ws(),e=i[0],r=i[1];return this.td=e,new n(this.P_,t,r)},i.Qd=function(t,n){var i=this;n&&this.td.zs(n);var e=j.resolve(t).catch(function(t){throw i.P_.C_(t)});return e=Cn(e,this.td),this.Wd.Gu(e.then(lt)),e},i.Yd=function(t){var n=this,i=new jc,e=j.resolve(t.pipeTo(i.writable,{preventAbort:!0})).catch(function(t){var e=n.P_.C_(t);throw i.writable.abort(e).catch(lt),e});return e=Cn(e,this.td),this.Wd.Gu(e.then(lt)),i.readable},mt(n,[{key:"Kd",get:function(){return this.O_.bodyUsed}}]),n}(av),ud="abort";function sd(t){var n=new Cl;if(t.Cs)n.abort();else if(!t.Ps){var i=function(){e(),n.abort()},e=function e(){n.signal.removeEventListener(ud,i),t.Fs(i),t.Hs(e)};n.signal.addEventListener(ud,i),t.xs(i),t.Us(e)}return n.signal}var fd=function(){function t(){}var n=t.prototype;return n.ol=function(t){return new rd(t).Kl},n.Ml=function(t){var n=t.Ud?{"Content-type":t.Ud}:void 0;this.ol(new Rv({Dl:Sv.POST,al:t.al,Hd:t.Hd,Jd:n})).then(lt,lt)},n.xl=function(){},t}(),hd=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).B_=void 0,i.L_=function(){if(xi.fn)return!1;try{return"body"in t.Response.prototype}catch(t){return!1}}(),i.M_=xi.Un||xi.fn,i.x_=void 0,i}return Mt(i,n),mt(i,[{key:"Rr",get:function(){return this.B_||(this.B_=new Yo(Hs())),this.B_}},{key:"F_",get:function(){return this.L_}},{key:"U_",get:function(){return this.M_}},{key:"H_",get:function(){return!1}},{key:"V_",get:function(){return Gs.sf()}},{key:"X_",get:function(){return{z_:Qs}}},{key:"W_",get:function(){return e.connection&&e.connection.effectiveType||"default"}},{key:"q_",get:function(){return e.connection&&e.connection.type||"unknown"}},{key:"G_",get:function(){return this.x_||(this.x_=new Pv(new fd)),this.x_}}]),i}(Ro);tt(new hd),tt(new hd);var ad=t;ad.addEventListener("install",function(t){t.waitUntil(ad.skipWaiting())}),ad.addEventListener("activate",function(t){t.waitUntil(ad.clients.claim())}),Si.mr.Gy(ad)}()}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:this);
|