@theoplayer/theoads 8.6.2 → 8.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/theoplayer.sw.js CHANGED
@@ -24,7 +24,7 @@
24
24
  THEOplayer is based on patented technology developed by
25
25
  THEO Technologies (https://www.theoplayer.com).
26
26
 
27
- Version: 8.6.2
28
- Created: 2024-12-10T16:10:01.093Z
27
+ Version: 8.6.3
28
+ Created: 2024-12-12T16:56:33.413Z
29
29
  */
30
- !function(t){"use strict";var n,i,e,r,o,u,s,f=t.window,h=t.document,c=(t.location,t.navigator),a=t.setTimeout,v=t.clearTimeout,d=t.setInterval,l=t.clearInterval,w=t.Error,b=t.TypeError,g=(t.SyntaxError,t.Object),m=t.Math,p=t.parseInt,y=t.parseFloat,_=t.isNaN,S=t.Uint8Array,T=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function E(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=Symbol.iterator,e=null!=(o=Symbol.dispose)?o:n("Symbol.dispose"),r=null!=(u=Symbol.asyncDispose)?u:n("Symbol.asyncDispose")):(s=0,i=(n=function(t){return"ul"+t+"_"+ ++s})("Symbol.iterator"),e=n("Symbol.dispose"),r=n("Symbol.asyncDispose"),n.iterator=i,n.dispose=e,n.asyncDispose=r);var I=a;function k(t){return Boolean(t&&void 0!==t.length)}function R(){}function O(t){if(!(this instanceof O))throw new b("Promises must be constructed via new");if("function"!=typeof t)throw new b("not a function");this.wa=0,this.ttn=!1,this.jbt=void 0,this.ntn=[],x(t,this)}function N(t,n){for(;3===t.wa;)t=t.jbt;0!==t.wa?(t.ttn=!0,O.itn((function(){var i=1===t.wa?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.jbt)}catch(t){return void A(n.promise,t)}P(n.promise,e)}else(1===t.wa?P:A)(n.promise,t.jbt)}))):t.ntn.push(n)}function P(t,n){try{if(n===t)throw new b("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":E(n))||"function"==typeof n)){var i=n.then;if(n instanceof O)return t.wa=3,t.jbt=n,void D(t);if("function"==typeof i)return void x(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.wa=1,t.jbt=n,D(t)}catch(n){A(t,n)}}function A(t,n){t.wa=2,t.jbt=n,D(t)}function D(t){2===t.wa&&0===t.ntn.length&&O.itn((function(){t.ttn||O.rtn(t.jbt)}));for(var n=0,i=t.ntn.length;n<i;n++)N(t,t.ntn[n]);t.ntn=null}function C(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function x(t,n){var i=!1;try{t((function(t){i||(i=!0,P(n,t))}),(function(t){i||(i=!0,A(n,t))}))}catch(t){if(i)return;i=!0,A(n,t)}}O.prototype.catch=function(t){return this.then(null,t)},O.prototype.then=function(t,n){var i=new this.constructor(R);return N(this,new C(t,n,i)),i},O.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)}))}))},O.all=function(t){return new O((function(n,i){if(!k(t))return i(new b("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":E(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])}))},O.allSettled=function(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new b((void 0===t?"undefined":E(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":E(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])}))},O.resolve=function(t){return t&&"object"===(void 0===t?"undefined":E(t))&&t.constructor===O?t:new O((function(n){n(t)}))},O.reject=function(t){return new O((function(n,i){i(t)}))},O.race=function(t){return new O((function(n,i){if(!k(t))return i(new b("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)O.resolve(t[e]).then(n,i)}))},O.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){I(t,0)},O.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var B=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),M=c?c.userAgent:"",U=M.match(/Firefox\/([0-9]+)/i),L=null!=U,F=U?Number(U[1]):0,z=M.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),W=null!=z,q=z?Number(z[3]):0,H=function(){function t(t){this.wx=0,this.yV=0,this.rC=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.yV+n&this.etn-1;this.rC[i]=t,this.wx=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.yV+n-1,e=this.etn-1;this.rC[i&e]=t,this.wx=n}},t.prototype.shift=function(){var t=this.yV,n=this.rC[t];return this.rC[t]=void 0,this.yV=t+1&this.etn-1,this.wx--,n},t.prototype.length=function(){return this.wx},t.prototype.stn=function(t){this.etn<t&&this.otn(this.etn<<1)},t.prototype.otn=function(t){var n=this.etn;this.etn=t;var i=this.yV+this.wx&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.rC,0,n,i)},t}();var V="unhandledrejection",X=self.PromiseRejectionEvent,j=self.CustomEvent;function Y(t){return new X(V,{reason:t,promise:B.reject(t).catch((function(){})),cancelable:!0})}function K(t){var n=new j(V,{detail:{reason:t},cancelable:!0});return g.defineProperty(n,"reason",{value:t}),n}function G(t){var n=h.createEvent("CustomEvent");return n.initCustomEvent(V,!1,!0,{reason:t}),n}var $,Z,J,Q,tt,nt,it,et,rt=function(t){return rt=function(){try{var t=B.resolve(),n="error",i=new X(V,{reason:n,promise:t});return V===i.type&&n===i.reason}catch(t){}return!1}()?Y:function(){try{var t="error",n=new j(V,{detail:{reason:t}});return V===n.type&&t===n.detail.reason}catch(t){}return!1}()?K:G,rt(t)};function ot(t,n,i,e,r,o,u){try{var s=t[o](u),f=s.value}catch(t){return void i(t)}s.done?n(f):Z.resolve(f).then(e,r)}function ut(t){return function(){var n=this,i=arguments;return new Z((function(e,r){var o=t.apply(n,i);function u(t){ot(o,e,r,u,s,"next",t)}function s(t){ot(o,e,r,u,s,"throw",t)}u(void 0)}))}}function st(t,e){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=g.create(("function"==typeof Iterator?Iterator:g).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[i]=function(){return this}),f;function h(n){return function(i){return function(n){if(r)throw new b("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,i])}}}function ft(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}function ht(t,n){if(t){if("string"==typeof t)return ft(t,n);var i=g.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ft(t,n):void 0}}function ct(t){return function(t){if(Array.isArray(t))return ft(t)}(t)||function(t){if(void 0!==n&&null!=t[i]||null!=t["@@iterator"])return Array.from(t)}(t)||ht(t)||function(){throw new b("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}B&&!(L&&F<60||W&&q<15)?Z=B:(Z=O,it=null!==($=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=B;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==$?$:O.itn,J=it,Q=new H(16),tt=!1,(et={y4:function(t){Q.push(t),tt||(tt=!0,J(nt))},aG:nt=function(){for(;Q.length()>0;)Q.shift()();tt=!1}}).aG,O.itn=et.y4,O.rtn=function(t){try{var n=rt(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}a((function(){throw new w("Unhandled promise rejection: ".concat(t))}),0)});var at={}.toString;function vt(t){return null!=t}var dt=Array.isArray||function(t){return"[object Array]"===at.call(t)};function lt(t){return"object"===(void 0===t?"undefined":E(t))&&null!==t}function wt(t){return"function"==typeof t}function bt(t){return wt(t)||lt(t)}var gt=9007199254740991,mt=(m.pow(2,-52),Array.prototype.find,Array.prototype.findLast,"function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1}),pt="function"==typeof Array.prototype.findLastIndex?function(t,n){return t.findLastIndex(n)}:function(t,n){for(var i=t.length-1;i>=0;i-=1){if(n(t[i],i,t))return i}return-1};function yt(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,i),!0)}function _t(t,n){for(var i=new Array(t.length),e=0,r=0;r<t.length;){if(t[r]===n){r++,i.length-=1;break}i[e++]=t[r++]}for(;r<t.length;)i[e++]=t[r++];return i}function St(t,n){return-1!==t.indexOf(n)}function Tt(t){t.length=0}var Et;Array.prototype.flat,Array.prototype.flatMap;function It(t){Et=t}var kt=function(){};function Rt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Ot(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),g.defineProperty(t,e.key,e)}}function Nt(t,n,i){return n&&Ot(t.prototype,n),i&&Ot(t,i),t}var Pt=function(t){return t.jM="audio",t.OM="video",t.kD="metadata",t}({});function At(t,n){return At=g.setPrototypeOf||function(t,n){return t.__proto__=n,t},At(t,n)}function Dt(t,n){if("function"!=typeof n&&null!==n)throw new b("Super expression must either be null or a function");t.prototype=g.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&At(t,n)}function Ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:void 0!==n&&t[i]||t["@@iterator"];if(null!=r){var o,u,s=[],f=!0,h=!1;try{for(r=r.call(t);!(f=(o=r.next()).done)&&(s.push(o.value),!e||s.length!==e);f=!0);}catch(t){h=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(h)throw u}}return s}}(t,e)||ht(t,e)||function(){throw new b("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xt(){var t=g.create(null);return t.Uf=void 0,delete t.Uf,t}function Bt(){return new Ut}var Mt="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Ut=Mt||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=g.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=xt(),this.size=0}var i=n.prototype;return i.get=function(t){return this.data[t]},i.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},i.has=function(t){return t in this.data},i.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},i.clear=function(){this.data=xt(),this.size=0},i.keys=function(){return new t(this.data,(function(t,n){return n}))},i.values=function(){return new t(this.data,(function(t,n){return t[n]}))},i.entries=function(){return new t(this.data,(function(t,n){return[n,t[n]]}))},i.forEach=function(t){for(var n in this.data)t(this.data[n],n)},n}()}();Mt||function(){var t=function(){function t(t,n){this.Qf=t,this.Ff=n}return t.prototype.next=function(){var t=this.Qf.next();return t.done?t:{value:this.Ff(t.value),done:!1}},t}();(function(){function n(){this.$d=Bt()}var i=n.prototype;i.get=function(t){return this.$d.get(""+t)},i.set=function(t,n){return this.$d.set(""+t,n),this},i.has=function(t){return this.$d.has(""+t)},i.delete=function(t){return this.$d.delete(""+t)},i.clear=function(){this.$d.clear()},i.keys=function(){return new t(this.$d.keys(),(function(t){return Number(t)}))},i.values=function(){return this.$d.values()},i.entries=function(){return new t(this.$d.entries(),(function(t){var n=Ct(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.$d.forEach((function(n,i){t(n,Number(i))}))},Nt(n,[{key:"size",get:function(){return this.$d.size}}])})()}();var Lt=function(t){return t.iE="#EXTINF",t.YOt="#EXT-X-MAP",t.i="#EXTM3U",t.p="#EXT-X-VERSION",t.en="#EXT-X-TARGETDURATION",t.obt="#EXT-X-START",t.ui="#EXT-X-INDEPENDENT-SEGMENTS",t.qD="#EXT-X-STREAM-INF",t.li="#EXT-X-MEDIA-SEQUENCE",t.vr="#EXT-X-ENDLIST",t.if="#EXT-X-MEDIA",t.sf="#EXT-X-DISCONTINUITY",t.ff="#EXT-X-DISCONTINUITY-SEQUENCE",t.af="#EXT-X-PLAYLIST-TYPE",t.tv="#EXT-X-KEY",t}({}),Ft=function(){function t(t,n){this.ow="#EXTINF",this.nv=t,this.ev=n}return t.prototype.Yw=function(){return this.ow+":"+this.nv+",\n"+this.ev},t}(),zt=function(){function t(t){this.ow="#EXT-X-MAP",this.ev=t}return t.prototype.Yw=function(){return this.ow+':URI="'+this.ev+'"'},t}(),Wt=function(){function t(){this.ow="#EXTM3U"}return t.prototype.Yw=function(){return this.ow},t}(),qt=function(){function t(t){this.ow="#EXT-X-VERSION",this.Bp=t}return t.prototype.Yw=function(){return this.ow+":"+this.Bp},t}(),Ht=function(){function t(t){this.ow="#EXT-X-TARGETDURATION",this.jOt=t}return t.prototype.Yw=function(){return this.ow+":"+this.jOt},t}(),Vt=function(){function t(t){this.ow="#EXT-X-START",this.ORt=t}return t.prototype.Yw=function(){return this.ow+":TIME-OFFSET="+this.ORt},t}(),Xt=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.ow="#EXT-X-KEY"}return t.prototype.Yw=function(){return this.ow+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),jt=function(){function t(t){this.ow="#EXT-X-STREAM-INF",this.rz=1,this.ev=t}return t.prototype.Yw=function(){return this.ow+":BANDWIDTH="+this.rz+',AUDIO="audio"\n'+this.ev},t}(),Yt=function(){function t(t){this.ow="#EXT-X-MEDIA-SEQUENCE",this.qy=t}return t.prototype.Yw=function(){return this.ow+":"+this.qy},t}(),Kt=function(){function t(t){this.ow="#EXT-X-MEDIA",this.ev=t}return t.prototype.Yw=function(){var t=Bt();t.set("TYPE","AUDIO"),t.set("GROUP-ID",'"audio"'),t.set("NAME",'"audio"'),t.set("AUTOSELECT","YES"),t.set("DEFAULT","YES"),t.set("CHANNELS",'"2"'),t.set("URI",'"'+this.ev+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.ow+":"+n.join(",")},t}(),Gt=function(){function t(t){this.Ux=[],this.Ux=t}var n=t.prototype;return n.EA=function(){return this.Ux},n.sv=function(t){this.Ux.push(t)},n.aBt=function(){for(var t="",n=0,i=this.EA();n<i.length;n++){t+=i[n].Yw()+"\n"}return t},n.Hf=function(){this.Ux.length=0},t}(),$t=function(t){function n(n,i){var e;return e=t.call(this,[new Wt,new qt(8)])||this,i&&e.sv(new jt("video/index.m3u8")),n&&e.sv(new Kt("audio/index.m3u8")),e}return Dt(n,t),n}(Gt),Zt=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];w.apply(this,n)};(Zt.prototype=g.create(w.prototype)).constructor=Zt;var Jt=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,w.captureStackTrace&&w.captureStackTrace(e,e.constructor),e}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(Zt),Qt=function(){function t(){this.Gf=!1,this.Vf=!1,this.Wf=[],this.Xf=[]}var n=t.prototype;return n.Yf=function(){if(!this.Gf&&!this.Vf){this.Gf=!0;for(var t=0,n=this.Wf.slice();t<n.length;t++){(0,n[t])()}this.Hf()}},n.Hf=function(){if(!this.Vf){this.Vf=!0;for(var t=0,n=this.Xf.slice();t<n.length;t++){(0,n[t])()}Tt(this.Wf),Tt(this.Xf)}},n.Zf=function(t){this.Vf||this.Wf.push(t)},n.qf=function(t){this.Vf||yt(this.Wf,t)},n.Kf=function(t){this.Vf||this.Xf.push(t)},n.Jf=function(t){this.Vf||yt(this.Xf,t)},t}(),tn=function(){function t(){this.t_=new Qt}var n=t.prototype;return n.i_=function(){this.t_.Yf()},n.Hf=function(){this.t_.Hf()},n.e_=function(t){var n=this.t_;if(!n.Gf)if(t.Gf)n.Yf();else if(!n.Vf&&!t.Vf){var i=function(){e(),n.Yf()},e=function(){t.qf(i),t.Jf(e),n.qf(i),n.Jf(e)};t.Zf(i),t.Kf(e),n.Zf(i),n.Kf(e)}},n.s_=function(){var n=new t,i=new t,e=n.$f,r=i.$f,o=this.t_,u=function(){e.Gf&&r.Vf||r.Gf&&e.Vf?o.Yf():e.Vf&&r.Vf&&o.Hf()};e.Zf(u),r.Zf(u),e.Kf(u),r.Kf(u),n.e_(o),i.e_(o);return o.Kf((function(){e.qf(u),r.qf(u),e.Jf(u),r.Jf(u)})),[n,i]},Nt(t,[{key:"$f",get:function(){return this.t_}}]),t}(),nn=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(Jt);function en(t){return t instanceof w&&"AbortError"===t.name}function rn(t,n){return n?new Z((function(i,e){if(n.Gf)return t.catch(kt),e(new nn);var r=function(){n.qf(r),e(new nn)};n.Zf(r),t.then((function(t){n.qf(r),i(t)}),(function(t){n.qf(r),e(t)}))})):t}function on(t,n){return t.then((function(t){return n.i_(),t}),(function(t){throw n.i_(),t}))}Z.resolve();function un(t,n){return new Z((function(i,e){if(void 0!==n&&n.Gf)e(new nn);else{var r=Et.o_((function(){void 0!==n&&n.qf(o),i()}),t),o=function(){Et.r_(r),e(new nn)};void 0!==n&&n.Zf(o)}}))}var sn=function(){function t(t){var n=this;this.mO=[],this.pO=void 0,this.wO=new tn,this.AO=function(){return 0===n.mO.length?n.MO?fn(n.MO,n.wO.$f).then(n.bO,n.bO):n.bO():n.mO.shift()().then(n.AO)},this.bO=function(){if(0!==n.mO.length)return n.AO();n.pO=void 0},this.MO=t}var n=t.prototype;return n.vO=function(t,n){var i=this;return new Z((function(e){var r=new tn;r.e_(i.wO.$f),n&&r.e_(n);var o=function(){r.Hf()};i.mO.push((function(){var n=fn(t,r.$f);return e(n),n.then(o,o)})),i.pO||(i.pO=i.AO())}))},n.i_=function(){return this.yO(!0)},n.gn=function(){return this.MO=void 0,this.yO(!1)},n.yO=function(t){var n=this.pO;return this.wO.i_(),t&&(this.wO=new tn),Z.resolve(n)},t}();function fn(t,n){return new Z((function(i){return i(t(n))}))}var hn=function(t){return t.s7="HELLO",t.n7="HI_THERE",t.r7="INITIALIZE",t.o7="APPEND_INIT",t.h7="APPEND_DATA",t.a7="ACK",t.u7="REMOVE",t.l7="DESTROY_SESSION",t}({}),cn=null;try{cn=new WebAssembly.Instance(new WebAssembly.Module(new S([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(J){}function an(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function vn(t){return!0===(t&&t.rp)}function dn(t){var n=m.clz32(t&-t);return t?31-n:n}an.prototype.rp,g.defineProperty(an.prototype,"rp",{value:!0}),an.isLong=vn;var ln={},wn={};function bn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=wn[t])?e:(i=mn(t,0,!0),r&&(wn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=ln[t])?e:(i=mn(t,t<0?-1:0,!1),r&&(ln[t]=i),i)}function gn(t,n){if(_(t))return n?Rn:kn;if(n){if(t<0)return Rn;if(t>=Tn)return Dn}else{if(t<=-En)return Cn;if(t+1>=En)return An}return t<0?gn(-t,n).neg():mn(t%Sn|0,t/Sn|0,n)}function mn(t,n,i){return new an(t,n,i)}an.fromInt=bn,an.fromNumber=gn,an.fromBits=mn;var pn=m.pow;function yn(t,n,i){if(0===t.length)throw w("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?Rn:kn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw w("interior hyphen");if(0===e)return yn(t.substring(1),n,i).neg();for(var r=gn(pn(i,8)),o=kn,u=0;u<t.length;u+=8){var s=m.min(8,t.length-u),f=p(t.substring(u,u+s),i);if(s<8){var h=gn(pn(i,s));o=o.mul(h).add(gn(f))}else o=(o=o.mul(r)).add(gn(f))}return o.unsigned=n,o}function _n(t,n){return"number"==typeof t?gn(t,n):"string"==typeof t?yn(t,n):mn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}an.fromString=yn,an.fromValue=_n;var Sn=4294967296,Tn=Sn*Sn,En=Tn/2,In=bn(1<<24),kn=bn(0);an.ZERO=kn;var Rn=bn(0,!0);an.UZERO=Rn;var On=bn(1);an.ONE=On;var Nn=bn(1,!0);an.UONE=Nn;var Pn=bn(-1);an.NEG_ONE=Pn;var An=mn(-1,2147483647,!1);an.MAX_VALUE=An;var Dn=mn(-1,-1,!0);an.MAX_UNSIGNED_VALUE=Dn;var Cn=mn(0,-2147483648,!1);an.MIN_VALUE=Cn;var xn=an.prototype;xn.toInt=function(){return this.unsigned?this.low>>>0:this.low},xn.toNumber=function(){return this.unsigned?(this.high>>>0)*Sn+(this.low>>>0):this.high*Sn+(this.low>>>0)},xn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Cn)){var n=gn(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=gn(pn(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}},xn.getHighBits=function(){return this.high},xn.getHighBitsUnsigned=function(){return this.high>>>0},xn.getLowBits=function(){return this.low},xn.getLowBitsUnsigned=function(){return this.low>>>0},xn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Cn)?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},xn.isZero=function(){return 0===this.high&&0===this.low},xn.eqz=xn.isZero,xn.isNegative=function(){return!this.unsigned&&this.high<0},xn.isPositive=function(){return this.unsigned||this.high>=0},xn.isOdd=function(){return 1==(1&this.low)},xn.isEven=function(){return 0==(1&this.low)},xn.equals=function(t){return vn(t)||(t=_n(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},xn.eq=xn.equals,xn.notEquals=function(t){return!this.eq(t)},xn.neq=xn.notEquals,xn.ne=xn.notEquals,xn.lessThan=function(t){return this.comp(t)<0},xn.lt=xn.lessThan,xn.lessThanOrEqual=function(t){return this.comp(t)<=0},xn.lte=xn.lessThanOrEqual,xn.le=xn.lessThanOrEqual,xn.greaterThan=function(t){return this.comp(t)>0},xn.gt=xn.greaterThan,xn.greaterThanOrEqual=function(t){return this.comp(t)>=0},xn.gte=xn.greaterThanOrEqual,xn.ge=xn.greaterThanOrEqual,xn.compare=function(t){if(vn(t)||(t=_n(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},xn.comp=xn.compare,xn.negate=function(){return!this.unsigned&&this.eq(Cn)?Cn:this.not().add(On)},xn.neg=xn.negate,xn.add=function(t){vn(t)||(t=_n(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,h=0,c=0,a=0;return c+=(a+=r+(65535&t.low))>>>16,h+=(c+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,mn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},xn.subtract=function(t){return vn(t)||(t=_n(t)),this.add(t.neg())},xn.sub=xn.subtract,xn.multiply=function(t){if(this.isZero())return this;if(vn(t)||(t=_n(t)),cn)return mn(cn.mul(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Rn:kn;if(this.eq(Cn))return t.isOdd()?Cn:kn;if(t.eq(Cn))return this.isOdd()?Cn:kn;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(In)&&t.lt(In))return gn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,c=0,a=0,v=0;return a+=(v+=r*f)>>>16,c+=(a+=e*f)>>>16,a&=65535,c+=(a+=r*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=e*s)>>>16,c&=65535,h+=(c+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,mn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},xn.mul=xn.multiply,xn.divide=function(t){if(vn(t)||(t=_n(t)),t.isZero())throw w("division by zero");var n,i,e;if(cn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?mn((this.unsigned?cn.div_u:cn.div_s)(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Rn:kn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Rn;if(t.gt(this.shru(1)))return Nn;e=Rn}else{if(this.eq(Cn))return t.eq(On)||t.eq(Pn)?Cn:t.eq(Cn)?On:(n=this.shr(1).div(t).shl(1)).eq(kn)?t.isNegative()?On:Pn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Cn))return this.unsigned?Rn:kn;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=kn}for(i=this;i.gte(t);){n=m.max(1,m.floor(i.toNumber()/t.toNumber()));for(var r=m.ceil(m.log(n)/m.LN2),o=r<=48?1:pn(2,r-48),u=gn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=gn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=On),e=e.add(u),i=i.sub(s)}return e},xn.div=xn.divide,xn.modulo=function(t){return vn(t)||(t=_n(t)),cn?mn((this.unsigned?cn.rem_u:cn.rem_s)(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},xn.mod=xn.modulo,xn.rem=xn.modulo,xn.not=function(){return mn(~this.low,~this.high,this.unsigned)},xn.countLeadingZeros=function(){return this.high?m.clz32(this.high):m.clz32(this.low)+32},xn.clz=xn.countLeadingZeros,xn.countTrailingZeros=function(){return this.low?dn(this.low):dn(this.high)+32},xn.ctz=xn.countTrailingZeros,xn.and=function(t){return vn(t)||(t=_n(t)),mn(this.low&t.low,this.high&t.high,this.unsigned)},xn.or=function(t){return vn(t)||(t=_n(t)),mn(this.low|t.low,this.high|t.high,this.unsigned)},xn.xor=function(t){return vn(t)||(t=_n(t)),mn(this.low^t.low,this.high^t.high,this.unsigned)},xn.shiftLeft=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):mn(0,this.low<<t-32,this.unsigned)},xn.shl=xn.shiftLeft,xn.shiftRight=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):mn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},xn.shr=xn.shiftRight,xn.shiftRightUnsigned=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):mn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},xn.shru=xn.shiftRightUnsigned,xn.shr_u=xn.shiftRightUnsigned,xn.rotateLeft=function(t){var n;return vn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?mn(this.high,this.low,this.unsigned):t<32?(n=32-t,mn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),mn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},xn.rotl=xn.rotateLeft,xn.rotateRight=function(t){var n;return vn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?mn(this.high,this.low,this.unsigned):t<32?(n=32-t,mn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),mn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},xn.rotr=xn.rotateRight,xn.toSigned=function(){return this.unsigned?mn(this.low,this.high,!1):this},xn.toUnsigned=function(){return this.unsigned?this:mn(this.low,this.high,!0)},xn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},xn.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]},xn.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]},an.fromBytes=function(t,n,i){return i?an.fromBytesLE(t,n):an.fromBytesBE(t,n)},an.fromBytesLE=function(t,n){return new an(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},an.fromBytesBE=function(t,n){return new an(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Bn=an;function Mn(){return Date.now()||(new Date).getTime()}Bn.fromNumber(gt);var Un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Ln=16383;function Fn(t,n,i){return Un[t>>2]+Un[(3&t)<<4|n>>4]+Un[(15&n)<<2|i>>6]+Un[63&i]}function zn(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Fn(t[r],t[r+1],t[r+2]));return e.join("")}var Wn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],qn=ArrayBuffer.isView||function(t){return t&&St(Wn,at.call(t))};function Hn(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(li(t),li(n))}function Vn(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new S(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 Xn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Ln)e.push(zn(t,o,m.min(r,o+Ln)));if(1===i){var u=t[n-1];e.push(Un[u>>2]+Un[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Un[s>>2]+Un[(3&s)<<4|f>>4]+Un[(15&f)<<2]+"=")}return e.join("")}(new S(t))}var jn=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.ep=function(t){this.Hu+=t},n.sp=function(t){this.Hu=t},n.np=function(){return new t(this.Lu)},Nt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}();String.prototype.replaceAll;var Yn="function"==typeof String.prototype.startsWith?function(t,n){return vt(t)&&t.startsWith(n)}:function(t,n){return vt(t)&&t.substr(0,n.length)===n},Kn=(String.prototype.endsWith,"function"==typeof String.prototype.repeat?function(t,n){return t.repeat(n)}:function(t,n){var i=0|n;if(0===t.length||0===i)return"";for(var e=t,r="";1==(1&i)&&(r+=e),0!=(i>>>=1);)e+=e;return r}),Gn=(String.prototype.padStart,String.prototype.padEnd,16384),$n="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Gn?(n=String).fromCodePoint.apply(n,ct(t)):Jn(t,String.fromCodePoint)}:function(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return Zn(n)};function Zn(t){var n;return t.length<=Gn?(n=String).fromCharCode.apply(n,ct(t)):Jn(t,String.fromCharCode)}function Jn(t,n){for(var i=[],e=0;e<t.length;e+=Gn)i.push(n.apply(void 0,ct(t.slice(e,e+Gn))));return i.join("")}function Qn(t){if(t>=55296&&t<=57343)throw new w("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ti(t,n){return t>>n&63|128}function ni(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(ti(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ti(t,12)),n.push(ti(t,6))),n.push(63&t|128)):n.push(t)}function ii(t,n){if(n.Lu>=t.length)throw new w("Invalid byte index");var i=255&t[n.Lu];if(n.ep(1),128==(192&i))return 63&i;throw new w("Invalid continuation byte")}function ei(t,n){var i=n.Lu;if(i>t.length)throw new w("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.ep(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|ii(t,n);if(r>=128)return r;throw new w("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|ii(t,n)<<6|ii(t,n);if(o>=2048)return Qn(o),o;throw new w("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|ii(t,n)<<12|ii(t,n)<<6|ii(t,n);if(u>=65536&&u<=1114111)return u}throw new w("Invalid UTF-8 detected")}var ri=65279;function oi(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Lu,i);return n.ep(2),e}function ui(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Lu,i,e),n.ep(2)}function si(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Lu,i,e),n.ep(4)}function fi(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){ui(t,n,i.charCodeAt(o),e)}}function hi(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Lu+2<=t.byteLength;){var o=oi(t,n,i);if(e&&!o)break;r.push(o)}return Zn(r)}(vi(t),new gi,n,!1)}function ci(t){return function(t){return $n(t)}(function(t,n){var i,e=[],r=new gi;if(!n){if(!1===(i=ei(t,r)))return e;i===ri||e.push(i)}for(;!1!==(i=ei(t,r));)e.push(i);return e}(di(t)))}function ai(t){return new S(function(t){for(var n=[],i=0;i<t.length;i++)ni(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 vi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function di(t){return new S(t.buffer,t.byteOffset,t.byteLength)}function li(t){return t instanceof ArrayBuffer?new S(t):di(t)}function wi(t){if(t.slice)return t.slice(0);var n=new S(t.byteLength);return n.set(t,0),n}var bi,gi=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.ep=function(t){this.Hu+=t},n.sp=function(t){this.Hu=t},n.np=function(){return new t(this.Lu)},n.ap=function(){return new jn(this.Lu<<3)},Nt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}(),mi=new Array(256);for(bi=0;bi<256;bi+=1)mi[bi]=(bi<16?"0":"")+bi.toString(16);function pi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*m.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function yi(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var _i=function(){function t(t){var n=this;this.a_=xt(),this.l_=void 0,this.u_=0,this.Ds=function(t){n.yo(t)},this.d_=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.h_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.h_(e,n)}},n.h_=function(t,n){var i=this.a_[t];void 0===i?this.a_[t]=n:"function"==typeof i?this.a_[t]=[i,n]:0===this.u_?i.push(n):this.a_[t]=i.concat(n)},n.c_=function(t){if("function"==typeof t){var n=this.l_;void 0===n?this.l_=t:"function"==typeof n?this.l_=[n,t]:0===this.u_?n.push(t):this.l_=n.concat(t)}},n.Bo=function(){this.a_=xt(),this.l_=void 0},n.yo=function(t){this.u_++;var n=this.a_[t.type],i=this.l_;void 0!==n&&yi(this.d_,t,n),void 0!==i&&yi(this.d_,t,i),this.u_--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.f_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.f_(e,n)}},n.f_=function(t,n){var i=this.a_[t];void 0!==i&&("function"==typeof i?i===n&&(this.a_[t]=void 0):0===this.u_?yt(i,n):this.a_[t]=_t(i,n))},n.__=function(t){if("string"==typeof t)this.a_[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.a_[i]=void 0}},n.g_=function(t){var n=this.l_;void 0!==n&&("function"==typeof n?n===t&&(this.l_=void 0):0===this.u_?yt(n,t):this.l_=_t(n,t))},n.v_=function(t,n){var i=this;return new Z((function(e,r){if(n&&n.Gf)return r(new nn);var o=function(t){s(),e(t)},u=function(){s(),r(new nn)},s=function(){i.fn(t,o),n&&n.qf(u)};i.yn(t,o),n&&n.Zf(u)}))},t}(),Si=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},Ti=function(t){function n(n){var i;return(i=t.call(this,"append")||this).lp=n,i}return Dt(n,t),n}(Si),Ei=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).bNt=0,n.rC=new S(0),n.Ax=!1,n.cv=!1,n}Dt(n,t);var i=n.prototype;return i.M$=function(t,n){this.bNt+=n,this.rC=Vn([this.rC,t]),this.yo(new Ti(t))},i.Ws=function(){this.wj||(this.yo(new Si("close")),this.Ax=!0)},Nt(n,[{key:"A_",get:function(){return this.bNt}},{key:"lp",get:function(){return this.rC}},{key:"wj",get:function(){return this.Ax}},{key:"av",get:function(){return this.cv},set:function(t){this.cv=t}}]),n}(_i),Ii="sync-seg-",ki=function(){function t(t,n){this.dv=!1,this.lv=!1,this.o=Ii+pi(),this.wv=n?new Ei:void 0,this.gv=t?new Ei:void 0}return t.prototype.Ws=function(){this.wv&&this.wv.Ws(),this.gv&&this.gv.Ws()},Nt(t,[{key:"kv",get:function(){return this.dv},set:function(t){this.dv=t}},{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}}]),t}(),Ri=1.1,Oi=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Wt,new qt(8),new Ht(1),new Vt(0)])||this).gd=[],r.zAt=Bt(),r.Ad=0,r.tw=function(t){if(t.HS>=gt)for(;r.gd.length>0;)r.rw()},e&&r.sv(new Xt(e,"com.apple.streamingkeydelivery","1")),r.gat=n,r.wrt=i,r.wrt.yn("remove",r.tw),r.sw=new Yt(0),r.sv(r.sw),r}Dt(n,t);var i=n.prototype;return i._Et=function(){return this.gat===Pt.OM?this.wrt.bw:this.gat===Pt.jM?this.wrt.kw:void 0},i.uat=function(t){return this.zAt.get(t)},i.Hf=function(){this.gd.length=0,this.sw.qy=0,this.zAt.clear(),this.Ad=0},i.EA=function(){return this.tb(),ct(t.prototype.EA.call(this)).concat(ct(this.gd))},i.tb=function(){for(var t=this.wrt.nb(),n=0;n<t.length;n++){var i=t[n];if(!this.zAt.has(i.o)){var e=void 0;if(this.gat===Pt.OM?(e=i.wv,i.jv=!0):(e=i.gv,i.kv=!0),!e)return;this.zAt.set(i.o,e),e.av&&this.gd.push(new zt(i.o+"-init")),this.gd.push(new Ft(Ri,i.o)),this.Ad+=Ri}}this.cb()},i.cb=function(){for(;this.Ad>60;)this.rw()},i.rw=function(){var t=this.gd.shift();void 0!==t&&function(t){return t.ow===Lt.iE}(t)&&(this.zAt.delete(t.ev),this.Ad-=t.nv,this.sw.qy++)},n}(Gt);var Ni=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).HS=n,i}return Dt(n,t),n}(Si),Pi=function(t){function n(n,i){var e;return(e=t.call(this)||this).ab=n,e.lb=i,e.tg=[],e.ng=[],e.ig=Bt(),e.ug=Bt(),e.sg=Bt(),e.lg=0,e}Dt(n,t);var i=n.prototype;return i.nb=function(){return this.bg?(this.tg=this.tg.filter((function(t){return!(t.jv&&t.kv)})),ct(this.tg).concat([this.bg],ct(this.ng))):[]},i.S$=function(t){this.mg(t)},i.M$=function(t){this.mg(t),this.kg(t),this.tm(t)},i.IS=function(t){this.mg(t),this.tm(t)},i.Hf=function(){var t;null==(t=this.bg)||t.Ws(),this.bg=void 0,this.ng.forEach((function(t){return t.Ws()})),this.ng.length=0,this.tg.length=0,this.sg=Bt(),this.lg=0},i.kg=function(t){var n=t.startPts,i=t.totalDuration;this.ug.set(t.mediaType,n+i)},i.rm=function(){if(this.bg){this.bg.Ws(),this.tg.push(this.bg);var t=this.ng.shift(),n=new ki(this.ab,this.lb);t?(this.bg=t,this.ng.push(n)):this.bg=n}},i.om=function(t){if(this.bg){var n=!this.bg.gv||0===this.bg.gv.A_,i=!this.bg.wv||0===this.bg.wv.A_,e=this.bg.gv&&this.bg.gv.av,r=this.bg.wv&&this.bg.wv.av,o=i&&(n&&!(this.bg.kv||this.bg.jv)||e),u=n&&(i&&!(this.bg.kv||this.bg.jv)||r);(t===Pt.jM&&!u||t===Pt.OM&&!o)&&(this.rm(),this.rm())}},i.mg=function(t){var n=t.mediaType,i=t.kind,e=this.ig.get(n);if(void 0===e){if(i===hn.o7||i===hn.h7){var r=[t];this.ig.set(n,r)}}else e.push(t)},i.tm=function(t){var n=this.sm(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case hn.o7:this.am(e),this.sg=Bt(),this.lg=0;break;case hn.u7:this.bm(e);break;case hn.h7:this.km(e)}}},i.am=function(t){var n=t.mediaType;void 0===this.bg?(this.bg=new ki(this.ab,this.lb),this.ng.push(new ki(this.ab,this.lb))):this.om(n),n===Pt.OM?(this.ip=t.segment,this.bg.wv.av=!0):n===Pt.jM&&(this.up=t.segment,this.bg.gv.av=!0)},i.km=function(t){var n,i,e=t.mediaType===Pt.jM,r=t.totalDuration,o=null!=(n=this.sg.get(t.mediaType))?n:0;e?(this.bg.gv.M$(t.segment,r),i=o+this.bg.gv.A_):(this.bg.wv.M$(t.segment,r),i=o+this.bg.wv.A_),i>=this.lg+Ri&&(this.sg.set(t.mediaType,i),this.lg+=Ri,this.rm())},i.bm=function(t){this.ug.set(t.mediaType,void 0),this.om(t.mediaType),this.tg.length=0,this.yo(new Ni(t.endTime))},i.sm=function(t){var n=this;if(t.kind===hn.u7)return this.ty(t);var i=[];return this.ig.forEach((function(t){if(t&&t.length>0){var e=mt(t,(function(t){return t.kind===hn.u7}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!St(i,u)){var s,f=n.ty(u);if(f.length>0)(s=i).push.apply(s,ct(f));else if(u.kind===hn.h7)break}}}})),i},i.ty=function(t){var n=this.ig.get(t.mediaType),i=function(t){return t===Pt.OM?Pt.jM:Pt.OM}(t.mediaType);if(!(i===Pt.OM?this.lb:this.ab))return n.splice(0,n.indexOf(t)+1);if(t.kind===hn.o7)return[];var e=this.ug.get(i);if(void 0===e)return[];if(t.kind===hn.u7){var r=this.ny(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),ct(o).concat(ct(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.hy(t,u,i);return ct(u).concat(ct(s),[t])}return[]},i.hy=function(t,n,i){var e=this.ig.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=mt(e,(function(t){return t.kind===hn.u7})),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var h=e[f];h.kind===hn.h7&&h.startPts>r&&(s=f)}var c=-1;return-1!==mt(n,(function(t){return t.kind===hn.o7}))&&(c=mt(e,(function(t){return t.kind===hn.o7}))),c>s&&(s=c+1),s>0?(e[s-1].kind===hn.o7&&(s-=1),e.splice(0,s)):[]},i.ny=function(t){var n=this.ig.get(t);if(n){var i=mt(n,(function(t){return t.kind===hn.u7}));if(i>=0)return n.splice(0,i+1)}return[]},i.by=function(){var t="[MEDIABUFFER] endPTS: ";this.ug.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),Et.xet(t)},i.my=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),Et.xet(i)},Nt(n,[{key:"kw",get:function(){var t;return null==(t=this.up)?void 0:t.slice()}},{key:"bw",get:function(){var t;return null==(t=this.ip)?void 0:t.slice()}}]),n}(_i);var Ai=function(){function t(t,n){var i=t.some((function(t){return t.match("audio")})),e=t.some((function(t){return t.match("video")}));this.ky=new Pi(i,e),this.OS=new $t(i,e),i&&(this.AS=new Oi(Pt.jM,this.ky,n)),e&&(this.BS=new Oi(Pt.OM,this.ky,n))}var n=t.prototype;return n.RT=function(t){var n,i,e=Di(t);return e===Pt.OM?null==(n=this.BS)?void 0:n._Et():e===Pt.jM?null==(i=this.AS)?void 0:i._Et():void 0},n.uat=function(t){var n,i,e=t.split("/")[1],r=Di(t);return r===Pt.OM?null==(n=this.BS)?void 0:n.uat(e):r===Pt.jM?null==(i=this.AS)?void 0:i.uat(e):void 0},n.S$=function(t){this.ky.S$(t)},n.M$=function(t){this.ky.M$(t)},n.Fct=function(t){this.ky.IS(t)},n.Hf=function(){var t,n;this.ky.Hf(),this.OS.Hf(),null==(t=this.AS)||t.Hf(),null==(n=this.BS)||n.Hf()},Nt(t,[{key:"IE",get:function(){return this.OS}},{key:"ME",get:function(){return this.AS}},{key:"tk",get:function(){return this.BS}}]),t}();function Di(t){return t.match(/video/)?Pt.OM:Pt.jM}var Ci=function(){function t(t,n){var i=this;this.ik=t,this.uk=n,this.Qat=void 0,this.pWt=ut((function(t){var n,e;return st(this,(function(r){switch((n=t.data).kind){case hn.r7:i.Qat=new Ai(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case hn.o7:i.Qat.S$(n);break;case hn.h7:i.Qat.M$(n);break;case hn.u7:i.Qat.Fct(n)}return e={kind:hn.a7},i.ik.postMessage(e),[2]}))})),this.ik.onmessage=this.pWt}var n=t.prototype;return n.aBt=function(t){return"master.m3u8"===t?this.Qat.IE:"video/index.m3u8"===t?this.Qat.tk:"audio/index.m3u8"===t?this.Qat.ME:void 0},n.sk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.aBt(t))?void 0:n.aBt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Ii)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Qat)?void 0:r.RT(t);return new Response(o,{headers:e})}var u=this.oat(t);if(!u)return new Response(void 0,{status:404,statusText:"Not Found"});var s=function(t){var n,i=function(t){n.enqueue(t.lp)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.lp),t.wj?n.close():(t.yn("append",i),t.yn("close",e))},cancel:function(){t.fn("append",i),t.fn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.oat=function(t){return this.Qat.uat(t)},n.close=function(){var t;this.ik.close(),null==(t=this.Qat)||t.Hf()},t}(),xi=function(){function t(){var t=this;this.i3=Bt(),this.pWt=function(n){var i=n.data;if(i.kind===hn.s7){t.ak().catch(kt);var e=i.port,r=pi(),o=new Ci(e,n.source.id);t.i3.set(r,o);var u=function(n){n.data.kind===hn.l7&&(t.mk(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:hn.n7,sessionId:r};e.postMessage(s)}},this.kk=function(n){if(Yn(n.request.url,"https://theo.proxy")){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/"),o=t.i3.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.sk(r);n.respondWith(f)}}}var n=t.prototype;return n.ur=function(t){this.qVt=t,t.addEventListener("message",this.pWt),t.addEventListener("fetch",this.kk)},n.mk=function(t){var n=this.i3.get(t);n&&n.close(),this.i3.delete(t)},n.ak=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:return[4,t.qVt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.i3.forEach((function(n,e){St(i,n.uk)||t.mk(e)})),[2]}}))}))()},t}();xi.TR=new xi;var Bi=function(t){return t.zE="web",t.BE="android",t.UE="android-tv",t.QE="ios",t.FE="tvos",t.YE="chromecast",t.GE="theoliveweb",t}({});var Mi=c?c.userAgent:"",Ui=Mi.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Li=Mi.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Fi=Mi.match(/Android ([0-9\.]+)/i),zi=Mi.match(/Windows NT ([0-9\.]+)/i),Wi=Mi.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),qi=Mi.match(/Firefox\/([0-9\.]+)/i),Hi=Mi.match(/OPR\/(\d+\.\d+)/i),Vi=Mi.match(/Tizen ([0-9\.]+)/i),Xi=Mi.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),ji=function(){function t(){this.VE=Boolean("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch||c&&c.msMaxTouchPoints),this.HE=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Mi)||/(macintosh|mac(?=_powerpc)\s)/i.test(Mi),this.ZE=/Windows NT/i.test(Mi),this.KE=zi?y(zi[1]):0,this.$E=/Android/i.test(Mi),this.nk=Fi?y(Fi[1]):0,this.hk=/windows phone (8|8\.1)/i.test(Mi),this.lk=/iPhone/i.test(Mi),this.fk=/iPad/i.test(Mi),this.gk=this.HE&&this.VE&&!this.fk,this.wk=/iPod/i.test(Mi),this.Sk=/Mobile Safari/i.test(Mi),this.bk=/EOS\d*STB/i.test(Mi),this.Tk=/APP\d*STB/i.test(Mi),this.pk=(this.lk||this.fk||this.gk||this.wk)&&!this.hk,this.yk=Xi?y(Xi[2]):0,this.Nk=this.hk||this.pk||this.$E||this.Sk,this.Dk=/CriOS/i.test(Mi),this.Lk=Boolean(self.chrome&&/google/i.test(c.vendor))||this.Dk,this.Rk=this.Lk&&/Edg\//i.test(c.userAgent),this.zk=Li?p(Li[1],10):0,this.LL=Boolean(self.chrome||/Chrome/i.test(Mi)||/CriOS/i.test(Mi)),this.jk=Ui?p(Ui[1],10):0,this.Uk=/SMART-TV.*Tizen/i.test(Mi),this.Fk=Vi?y(Vi[1]):0,this.Ck=this.Fk>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.Fk):void 0,this.Gk=/webos|web0s/i.test(Mi),this.Wk=/VIZIO/i.test(Mi),this.Xk=/Edge\/\d+/i.test(Mi),this.qk=/Trident/i.test(Mi),this.Jk=this.qk&&!self.ActiveXObject&&"ActiveXObject"in self,this.tL=/Vivaldi/i.test(Mi),this.eL=/Firefox/i.test(Mi)&&!/Seamonkey/i.test(Mi),this.nL=qi?y(qi[1]):0,this.oL=/Safari/i.test(Mi)&&!/Chrome/i.test(Mi)&&!this.hk&&!this.Uk,this.aL=Wi?y(Wi[2]):0,this.cL=Boolean(Hi),this.dL=Hi?y(Hi[1]):0,this._L=/CrKey/.test(Mi),this.vL=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Mi),this.pL="web"===Bi.UE,this.yL="web"===Bi.BE,this.bL=this.yL||this.pL,this.SL="web"===Bi.QE,this.IL="web"===Bi.FE,this.EL="web"===Bi.YE}return Nt(t,[{key:"Je",get:function(){return this.VE}},{key:"WE",get:function(){return this.HE}},{key:"XE",get:function(){return this.ZE}},{key:"qE",get:function(){return this.KE}},{key:"JE",get:function(){return this.$E}},{key:"ek",get:function(){return this.nk}},{key:"rk",get:function(){return this.hk}},{key:"ck",get:function(){return this.lk}},{key:"dk",get:function(){return this.fk}},{key:"_k",get:function(){return this.gk}},{key:"vk",get:function(){return this.wk}},{key:"Ua",get:function(){return this.pk}},{key:"Ak",get:function(){return this.yk}},{key:"Mk",get:function(){return this.bk||this.Tk}},{key:"ql",get:function(){return this.Sk}},{key:"Qs",get:function(){return this.Nk}},{key:"Ik",get:function(){return this.Dk}},{key:"Ek",get:function(){return this.Lk}},{key:"xk",get:function(){var t;return null!=(t=this.Ck)?t:this.jk}},{key:"Ok",get:function(){return this.Rk}},{key:"Pk",get:function(){return this.zk}},{key:"Bk",get:function(){return this.Uk}},{key:"Qk",get:function(){return this.Fk}},{key:"Yk",get:function(){return this.Gk}},{key:"Vk",get:function(){return this.Wk}},{key:"Hk",get:function(){return this.Xk}},{key:"Zk",get:function(){return this.qk}},{key:"Kk",get:function(){return this.Jk}},{key:"$k",get:function(){return this.tL}},{key:"iL",get:function(){return this.eL}},{key:"sL",get:function(){return this.nL}},{key:"rL",get:function(){return this.oL}},{key:"hL",get:function(){return this.aL}},{key:"uL",get:function(){return this.cL}},{key:"lL",get:function(){return this.dL}},{key:"fL",get:function(){return this._L}},{key:"gL",get:function(){return this.vL}},{key:"wL",get:function(){return!(!this.Yk&&!this.Bk)&&this.xk<=56}},{key:"mL",get:function(){return this.pL}},{key:"AL",get:function(){return this.yL}},{key:"ML",get:function(){return this.bL}},{key:"TL",get:function(){return this.SL}},{key:"NL",get:function(){return this.IL}},{key:"DL",get:function(){return this.EL}},{key:"kL",get:function(){return this.LL}}]),t}();ji.xL=new ji;var Yi=ji.xL,Ki=!(Yi.Zk&&!Yi.Kk),Gi=self.console;function $i(t){if(lt(t))try{return JSON.stringify(t)}catch(t){}return t}function Zi(t){return t.map($i).join(" ")}function Ji(t){var n=Gi&&Gi[t];return n?n.bind&&Ki?n.bind(Gi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Gi[t](Zi(i))}:void 0}var Qi=Ji("log")||kt,te=Ji("warn")||Qi.bind(void 0,"WARNING:"),ne=Ji("error")||Qi.bind(void 0,"ERROR:"),ie=function(){var t=Gi&&Gi.assert;return t?t.bind&&Ki?t.bind(Gi):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];Gi.assert(t,Zi(i))}:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];t||ne.apply(void 0,["Assertion failed:"].concat(ct(i)))}}();function ee(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),g.defineProperty(t,e.key,e)}}function re(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){oe(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&oe(i,null,t.length,t),t}function oe(t,n,i,e){var r,o,u,s,f,h=t.length,c=0,a=2*i;for(r=0;r<h;r+=a)for(u=(o=r+i)+i,o>h&&(o=h),u>h&&(u=h),s=r,f=o;;)if(s<o&&f<u)n(t[s],t[f])<=0?e[c++]=t[s++]:e[c++]=t[f++];else if(s<o)e[c++]=t[s++];else{if(!(f<u))break;e[c++]=t[f++]}}var ue=/[a-zA-Z]/,se=/[0-9]/,fe=/[0-9a-fA-F]/,he=/^0x/i,ce=/^[0-9]+$/,ae=/^[0-9a-fA-F]+$/,ve=/^[0-7]+$/,de=g.prototype.toString,le=Array.isArray||function(t){return"[object Array]"===de.call(t)},we=void 0!==n&&"symbol"==typeof i;function be(t){return le(t)?t:Array.from(t)}function ge(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}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 Te(t){return me(t)?t+32:t}function Ee(t){return ye(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ie(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=m.min,Re=String.fromCharCode,Oe=16384;function Ne(t){for(var n=t.length,i=[],e=0;e<n;e+=Oe){var r=ke(e+Oe,n);i.push(Re.apply(null,t.slice(e,r)))}return i.join("")}var Pe=2147483647,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=m.floor,Be=String.fromCharCode;function Me(t){throw new RangeError(Ce[t])}function Ue(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,Fe,ze,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))},He=function(t){return function(t,n){var i=t.split("@"),e="";i.length>1&&(e=i[0]+"@",t=i[1]);var r=function(t,n){for(var i=[],e=t.length;e--;)i[e]=n(t[e]);return i}((t=t.replace(De,".")).split("."),n).join(".");return e+r}(t,(function(t){return Ae.test(t)?"xn--"+function(t){for(var n=[],i=(t=Ue(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,c=h;for(h&&n.push("-");c<i;){for(var a=Pe,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>xe((Pe-r)/w)&&Me("overflow"),r+=(a-e)*w,e=a;for(var b=0,g=t;b<g.length;b++){var m=g[b];if(m<e&&++r>Pe&&Me("overflow"),m==e){for(var p=r,y=36;;y+=36){var _=y<=o?1:y>=o+26?26:y-o;if(p<_)break;var S=p-_,T=36-_;n.push(Be(We(_+S%T,0))),p=xe(S/T)}n.push(Be(We(p,0))),o=qe(r,w,c==h),r=0,++c}}++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 Ne(n)}function Xe(t){if(t>=55296&&t<=57343)throw new w("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function je(t,n){return t>>n&63|128}function Ye(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Xe(t),n.push(t>>12&15|224),n.push(je(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(je(t,12)),n.push(je(t,6))),n.push(63&t|128)):n.push(t)}function Ke(t){for(var n=[],i=0;i<t.length;i++){Ye(t[i],n)}return n}function Ge(){if(ze>=Fe)throw new w("Invalid byte index");var t=255&Le[ze];if(ze++,128==(192&t))return 63&t;throw new w("Invalid continuation byte")}function $e(){var t,n;if(ze>Fe)throw new w("Invalid byte index");if(ze===Fe)return!1;if(t=255&Le[ze],ze++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ge())>=128)return n;throw new w("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ge()<<6|Ge())>=2048)return Xe(n),n;throw new w("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ge()<<12|Ge()<<6|Ge())>=65536&&n<=1114111)return n;throw new w("Invalid UTF-8 detected")}function Ze(t){return[37,Ie(t>>4),Ie(15&t)]}function Je(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Qe(t){return Je(t)||32===t||34===t||60===t||62===t||96===t}function tr(t){return Qe(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=Ke([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,Ze(o))}return e}function or(t,n){for(var i=[],e=0,r=Ue(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&&Se(t[e+1])&&Se(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}(Ke(t))}function sr(t){return Ve(function(t){Le=t.slice(),Fe=Le.length,ze=0;for(var n,i=[];!1!==(n=$e());)i.push(n);return i}(ur(Ue(t))))}function fr(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new b;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new b("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&fe.test(t[o]);)u=u<<4|p(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new b;if(o-=s,e>6)throw new b;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new b;o+=1}if(!se.test(t[o]))throw new b;for(;o<n&&se.test(t[o]);){var c=p(t[o],10);if(null===h)h=c;else{if(0===h)throw new b;if((h=10*h+c)>255)throw new b}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new b;break}if(":"===t[o]){if((o+=1)===n)throw new b}else if(o<n)throw new b;i[e]=u,e+=1}else{if(null!==r)throw new b("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)ge(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new b;return i}function hr(t){var n=10,i=ce;return he.test(t)?(t=t.slice(2),n=16,i=ae):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ve),""===t?0:i.test(t)?p(t,n):void 0}var cr={a2:4},ar=/[\0\t\n\r #%/:?@\[\\\]]/,vr=/[\0\t\n\r #/:?@\[\\\]]/;function dr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new b("Invalid IPv6 address");return{a2:2,tet:fr(t.slice(1,-1))}}if(!n)return function(t){if(vr.test(t))throw new b("Invalid code point in opaque host");var n=or(t,Je);return""===n?cr:{a2:3,rC:n}}(t);var i=function(t){var n=function(t){return He(t.toLowerCase())}(t);return n}(sr(t));if(ar.test(i))throw new b("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 b;if(i[i.length-1]>=m.pow(256,5-i.length))throw new b;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*m.pow(256,3-f);return s}}(i);return void 0!==e?{a2:1,tet:e}:""===i?cr:{a2:0,iet:i}}function lr(t){switch(t.a2){case 0:return t.iet;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.tet);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.tet)+"]";case 3:return t.rC;case 4:return""}}var wr=/\+/g;function br(t){return 42===t||45===t||46===t||95===t||_e(t)}function gr(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 mr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=pr(Ke(Ue(e[0])))+"="+pr(Ke(Ue(e[1])))}return n}function pr(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):br(e)?n.push(e):n.push.apply(n,Ze(e))}return Ne(n)}var yr=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function _r(t){var n=""+t,i=yr.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Tr(o))if(Er(o)||r===i-1)e.push(Sr);else{var u=t.charCodeAt(r+1);Er(u)?(e.push(o,u),r++):e.push(Sr)}else e.push(o)}return t.slice(0,n)+Ne(e)}(n,i.index):n}var Sr=65533,Tr=function(t){return 55296==(63488&t)},Er=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 kr(t){t.tf.length=0}function Rr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.tf,gr(n))}function Or(t){if(t.Vu){var n=mr(t.tf);""===n&&(n=null),t.Vu.Vu.eet=n}}var Nr=function(){function t(t){if(void 0===t&&(t=void 0),this.Vu=null,null==t)this.tf=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Nr&&!!le(t.tf)&&(!we||t[i]===Pr)}(t))this.tf=t.tf.slice();else if(function(t){return null!=t&&(!!le(t)||!!we&&"function"==typeof t[i])}(t)){this.tf=[];for(var n=0,e=be(t);n<e.length;n++){var r=be(e[n]);if(2!==r.length)throw new b("Invalid name-value pair");this.tf.push([_r(r[0]),_r(r[1])])}}else for(var o in this.tf=[],t)g.prototype.hasOwnProperty.call(t,o)&&this.tf.push([_r(o),_r(t[o])]);else(t=_r(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.tf=gr(t)}var n=t.prototype;return n.append=function(t,n){t=_r(t),n=_r(n),this.tf.push([t,n]),Or(this)},n.delete=function(t){t=_r(t);for(var n=this.tf,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Or(this)},n.get=function(t){t=_r(t);for(var n=this.tf,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=_r(t);for(var n=this.tf,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=_r(t);for(var n=this.tf,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=_r(t),n=_r(n);for(var i=this.tf,e=!1,r=0;r<i.length;){var o=i[r];o[0]===t?e?i.splice(r,1):(o[1]=n,e=!0,r++):r++}e||i.push([t,n]),Or(this)},n.sort=function(){re(this.tf,Ir),Or(this)},n.toString=function(){return mr(this.tf)},n.entries=function(){return new xr(this.tf,Ar)},n.keys=function(){return new xr(this.tf,Dr)},n.values=function(){return new xr(this.tf,Cr)},n.forEach=function(t){var n=this;this.tf.forEach((function(i){return t(i[1],i[0],n)}))},t}(),Pr=Nr.prototype.entries;we&&(Nr.prototype[i]=Pr);var Ar=function(t){return[t[0],t[1]]},Dr=function(t){return t[0]},Cr=function(t){return t[1]},xr=function(){function t(t,n){this.net=0,this.tf=t,this.ret=n}return t.prototype.next=function(){return this.net<this.tf.length?{done:!1,value:this.ret(this.tf[this.net++])}:{done:!0,value:void 0}},t}(),Br="null";var Mr=g.create(null);Mr.ftp=21,Mr.file=0,Mr.gopher=70,Mr.http=80,Mr.https=443,Mr.ws=80,Mr.wss=443;var Ur=/^(?:\.|%2e)$/i,Lr=/^(?:\.|%2e){2}$/i;function Fr(t){return Ur.test(t)}function zr(t){return Lr.test(t)}function Wr(t){return void 0!==Mr[t]}function qr(t){return Wr(t.DP)}function Hr(t){return""!==t.oet||""!==t.het}function Vr(t){var n=t.length;if(!(n>=2))return!1;if(!jr(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 Xr(t){return 2===t.length&&ue.test(t[0])&&(":"===t[1]||"|"===t[1])}function jr(t){return 2===t.length&&Xr(Ne(t))}function Yr(t){return Xr(t)&&":"===t[1]}function Kr(t){var n=t.aet;0!==n.length&&("file"===t.DP&&1===n.length&&Yr(n[0])||n.pop())}function Gr(t){return null===t.uet||cr===t.uet||t.cet||"file"===t.DP}var $r=-1,Zr=/\t|\n|\r/g,Jr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Qr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new no,t=t.replace(Jr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=Ue(t=t.replace(Zr,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:$r;switch(r){case 0:if(!pe(v)){if(null===e){o.length=0,r=2;continue}throw new b("Invalid scheme")}o.push(Te(v)),r=1;break;case 1:if(_e(v)||43===v||45===v||46===v)o.push(Te(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new b("Invalid scheme")}var d=Ve(o);if(null!==e){if(Wr(i.DP)&&!Wr(d))return;if(!Wr(i.DP)&&Wr(d))return;if((Hr(i)||null!==i.f7)&&"file"===d)return;if("file"===i.DP&&(i.uet===cr||null===i.uet))return}if(i.DP=d,null!==e)return void(qr(i)&&i.f7===Mr[i.DP]&&(i.f7=null));o.length=0,"file"===i.DP?r=13:qr(i)&&n&&n.DP===i.DP?r=3:qr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.cet=!0,i.aet.push(""),r=18)}break;case 2:if(!n||n.cet&&35!==v)throw new b("Invalid scheme");n.cet&&35===v?(i.DP=n.DP,i.aet=n.aet.slice(),i.eet=n.eet,i.let="",i.cet=!0,r=20):"file"!==n.DP?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===h[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.DP=n.DP,$r===v?(i.oet=n.oet,i.het=n.het,i.uet=n.uet,i.f7=n.f7,i.aet=n.aet.slice(),i.eet=n.eet):47===v?r=6:63===v?(i.oet=n.oet,i.het=n.het,i.uet=n.uet,i.f7=n.f7,i.aet=n.aet.slice(),i.eet="",r=19):35===v?(i.oet=n.oet,i.het=n.het,i.uet=n.uet,i.f7=n.f7,i.aet=n.aet.slice(),i.eet=n.eet,i.let="",r=20):92===v&&qr(i)?r=6:(i.oet=n.oet,i.het=n.het,i.uet=n.uet,i.f7=n.f7,i.aet=n.aet.slice(),i.aet.pop(),r=17,a-=1);break;case 6:!qr(i)||47!==v&&92!==v?47===v?r=9:(i.oet=n.oet,i.het=n.het,i.uet=n.uet,i.f7=n.f7,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var g=Ve(rr(w,nr));f?i.het+=g:i.oet+=g}else f=!0}o.length=0}else if($r===v||47===v||63===v||35===v||qr(i)&&92===v){if(u&&0===o.length)throw new b("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.DP)a-=1,r=15;else if(58!==v||s)if($r===v||47===v||63===v||35===v||qr(i)&&92===v){if(a-=1,qr(i)&&0===o.length)throw new b("Invalid host");if(null!==e&&0===o.length&&(Hr(i)||null!==i.f7))return;var m=dr(Ve(o),qr(i));if(i.uet=m,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new b("Invalid host");var y=dr(Ve(o),qr(i));if(i.uet=y,o.length=0,r=12,11===e)return}break;case 12:if(ye(v))o.push(v);else{if(!($r===v||47===v||63===v||35===v||qr(i)&&92===v||null!==e))throw new b("Invalid port");if(0!==o.length){var _=p(Ve(o),10);if(_>65535)throw new b("Invalid port");i.f7=_===Mr[i.DP]?null:_,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.DP="file",47===v||92===v?r=14:n&&"file"===n.DP?$r===v?(i.uet=n.uet,i.aet=n.aet.slice(),i.eet=n.eet):63===v?(i.uet=n.uet,i.aet=n.aet.slice(),i.eet="",r=19):35===v?(i.uet=n.uet,i.aet=n.aet.slice(),i.eet=n.eet,i.let="",r=20):(Vr(h.slice(a))||(i.uet=n.uet,i.aet=n.aet.slice(),Kr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.DP&&!Vr(h.slice(a))&&(Yr(n.aet[0])?i.aet.push(n.aet[0]):i.uet=n.uet),r=17,a-=1);break;case 15:if($r===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&jr(o))r=17;else if(0===o.length){if(i.uet=cr,null!==e)return;r=16}else{var S=dr(Ve(o),qr(i));if(0===S.a2&&"localhost"===S.iet&&(S=cr),i.uet=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:qr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.eet="",r=19):null===e&&35===v?(i.let="",r=20):$r!==v&&(r=17,47!==v&&(a-=1));break;case 17:if($r===v||47===v||qr(i)&&92===v||null===e&&(63===v||35===v)){var T=Ve(o);if(zr(T)?(Kr(i),47===v||qr(i)&&92===v||i.aet.push("")):!Fr(T)||47===v||qr(i)&&92===v?Fr(T)||("file"===i.DP&&0===i.aet.length&&jr(o)&&(cr!==i.uet&&null!==i.uet&&(i.uet=cr),o[1]=58,T=Ve(o)),i.aet.push(T)):i.aet.push(""),o.length=0,"file"===i.DP&&($r===v||63===v||35===v))for(;i.aet.length>1&&""===i.aet[0];)i.aet.shift();63===v?(i.eet="",r=19):35===v&&(i.let="",r=20)}else o.push.apply(o,rr(v,tr));break;case 18:63===v?(i.eet="",r=19):35===v?(i.let="",r=20):$r!==v&&(i.aet[0]+=Ve(rr(v,Je)));break;case 19:null===e&&35===v?(i.let="",r=20):$r!==v&&(i.eet+=Ve(rr(v,qr(i)?er:ir)));break;case 20:$r===v||0===v||(i.let+=Ve(rr(v,Qe)))}a++}return i}function to(t,n,i,e){try{Qr(t,n,i,e)}catch(t){}}var no=function(){this.DP="",this.oet="",this.het="",this.uet=null,this.f7=null,this.aet=[],this.eet=null,this.let=null,this.cet=!1};function io(t){switch(t.DP){case"blob":var n;try{n=Qr(t.aet[0],null)}catch(t){return Br}return io(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+lr(n)+(null===i?"":":"+i)}(t.DP,t.uet,t.f7);default:return Br}}var eo,ro,oo=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof oo&&"object"==typeof t.Vu}(n))e=n.Vu;else try{e=Qr(String(n),null)}catch(t){throw new b("Invalid base URL: "+t.message)}try{i=Qr(String(t),e)}catch(t){throw new b("Invalid URL: "+t.message)}var r=i.eet;this.Vu=i,this.eet=function(t){var n=new Nr;return null!==t&&Rr(n,t),n}(r),this.eet.Vu=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&ee(t.prototype,n),i&&ee(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.DP+":";if(null!==t.uet?(i+="//",Hr(t)&&(i+=t.oet,""!==t.het&&(i+=":"+t.het),i+="@"),i+=lr(t.uet),null!==t.f7&&(i+=":"+t.f7)):null===t.uet&&"file"===t.DP&&(i+="//"),t.cet)i+=t.aet[0];else for(var e=0,r=t.aet;e<r.length;e++)i+="/"+r[e];return null!==t.eet&&(i+="?"+t.eet),n||null===t.let||(i+="#"+t.let),i}(this.Vu)},set:function(t){var n;try{n=Qr(String(t),null)}catch(t){throw new b("Invalid URL: "+t.message)}this.Vu=n,kr(this.eet);var i=this.Vu.eet;null!==i&&Rr(this.eet,i)}},{key:"origin",get:function(){return io(this.Vu)}},{key:"protocol",get:function(){return this.Vu.DP+":"},set:function(t){to(t+":",null,this.Vu,0)}},{key:"username",get:function(){return this.Vu.oet},set:function(t){Gr(this.Vu)||(this.Vu.oet=or(t,nr))}},{key:"password",get:function(){return this.Vu.het},set:function(t){Gr(this.Vu)||(this.Vu.het=or(t,nr))}},{key:"host",get:function(){var t=this.Vu,n=t.uet;if(null===n)return"";var i=t.f7,e=lr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Vu.cet||to(t,null,this.Vu,10)}},{key:"hostname",get:function(){var t=this.Vu.uet;return null===t?"":lr(t)},set:function(t){this.Vu.cet||to(t,null,this.Vu,11)}},{key:"port",get:function(){var t=this.Vu.f7;return null===t?"":""+t},set:function(t){Gr(this.Vu)||(""===t?this.Vu.f7=null:to(t,null,this.Vu,12))}},{key:"pathname",get:function(){var t=this.Vu.aet;return this.Vu.cet?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Vu.cet||(this.Vu.aet.length=0,to(t,null,this.Vu,16))}},{key:"search",get:function(){var t=this.Vu.eet;return null===t||""===t?"":"?"+t},set:function(t){t=_r(t);var n=this.Vu;if(""===t)return n.eet=null,void kr(this.eet);"?"===t[0]&&(t=t.slice(1)),n.eet="",to(t,null,n,19),Rr(this.eet,t)}},{key:"searchParams",get:function(){return this.eet}},{key:"hash",get:function(){var t=this.Vu.let;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Vu.let="",to(t,null,this.Vu,20)):this.Vu.let=null}}]),t}();function uo(t){return t.document&&t.document.baseURI||t.location.href||""}function so(){return void 0!==h?h.createElement("video"):void 0}function fo(){return ro||(ro=so()),ro}var ho=!!("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch)||!(!c||!c.msMaxTouchPoints),co=fo(),ao=!(!co||!co.webkitShowPlaybackTargetPicker),vo=function(){function t(){this.fet=void 0,this.Det=!1,this.Je=ho,this.Qs=!1,this.ntt=!0}var n=t.prototype;return n._et=function(){return 0},n.Net=function(t,n){return!0},n.Iet=function(t){return t>=.3333333333333333},Nt(t,[{key:"det",get:function(){return void 0===this.fet&&(this.fet=this._et()),this.fet}},{key:"vet",get:function(){return!Yi.gL}},{key:"wet",get:function(){if(f.screen)return{width:f.screen.width,height:f.screen.height}}},{key:"X3",get:function(){return f.devicePixelRatio||1}},{key:"met",get:function(){return ao}},{key:"I3",get:function(){return!1}},{key:"y3",get:function(){return!0}},{key:"eS",get:function(){return Yi.rL||Yi.Ua}},{key:"pet",get:function(){return!Yi.Ua}},{key:"HR",get:function(){return!0}},{key:"Aet",get:function(){return!0}},{key:"yet",get:function(){return!1}},{key:"Met",get:function(){}},{key:"bet",get:function(){return!0}},{key:"r0",get:function(){return!1}},{key:"Tet",get:function(){return Yi.Vk}}]),t}(),lo=function(){var t=so();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Yi._k)return!1;var t=so();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var wo=function(t){function n(n){var i;return(i=t.call(this)||this).Eet=n,i.Eet&&(i.Det=i.Eet.Det,i.Je=i.Eet.Je,i.ntt=lo&&i.Eet.ntt),i}Dt(n,t);var i=n.prototype;return i._et=function(){return this.Eet?this.Eet.det:t.prototype._et.call(this)},i.Net=function(n,i){return this.Eet?this.Eet.Net(n,i):t.prototype.Net.call(this,n,i)},i.Iet=function(n){return this.Eet?this.Eet.Iet(n):t.prototype.Iet.call(this,n)},Nt(n,[{key:"Met",get:function(){var t;return null==(t=this.Eet)?void 0:t.Met}},{key:"bet",get:function(){var t,n;return null==(n=null==(t=this.Eet)?void 0:t.bet)||n}}]),n}(vo),bo=function(t){function n(n){var i;return(i=t.call(this,n)||this).Det=!0,i.Qs=!0,i}return Dt(n,t),Nt(n,[{key:"yet",get:function(){return Yi.Ua}}]),n}(wo);var go=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype._et=function(){return function(t){return t&&bt(eo.ManagedMediaSource)?eo.ManagedMediaSource:bt(eo.MediaSource)?eo.MediaSource:void 0}(!0)?t.prototype._et.call(this):1},Nt(n,[{key:"yet",get:function(){return!0}}]),n}(bo),mo=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.Net=function(n,i){return t.prototype.Net.call(this,n,i)},Nt(n,[{key:"I3",get:function(){return Yi.Qk<3}},{key:"y3",get:function(){return Yi.Qk>=3}},{key:"wet",get:function(){var t=this;return f.tizen&&!this.ket&&f.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.ket={width:i,height:e})})),this.ket}},{key:"r0",get:function(){return Yi.Qk<3}}]),n}(wo),po=function(t){function n(){return t.call(this)||this}return Dt(n,t),n}(vo),yo=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.Net=function(t,n){if(t&&t.Let&&n&&n.Let){var i=_o(t.Let,"mp4a.40.2")&&_o(n.Let,"mp4a.40.5"),e=_o(t.Let,"mp4a.40.5")&&_o(n.Let,"mp4a.40.2"),r=_o(t.Let,"mp4a.40.2")&&_o(n.Let,"mp4a.40.34"),o=_o(t.Let,"mp4a.40.34")&&_o(n.Let,"mp4a.40.2"),u=_o(t.Let,"mp4a.40.5")&&_o(n.Let,"mp4a.40.34"),s=_o(t.Let,"mp4a.40.34")&&_o(n.Let,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Nt(n,[{key:"Met",get:function(){if(Yi.WE)return 4096}}]),n}(po);function _o(t,n){return t.indexOf(n)>-1}var So=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.Iet=function(t){return t>=2},n}(po),To=function(t){function n(){var n;return(n=t.call(this)||this).Det=Yi.hL>=11,n.ntt=Yi.rL&&!(Yi.Ua&&Yi.hL<10),n}return Dt(n,t),n}(po),Eo=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"wet",get:function(){var t=this;return f.webOS&&!this.ket&&f.webOS.deviceInfo((function(n){t.ket={width:n.screenWidth,height:n.screenHeight}})),this.ket}},{key:"HR",get:function(){return!1}}]),n}(wo),Io=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"bet",get:function(){return!Yi.XE||(Yi.Ok?92!==Yi.Pk:Yi.xk>=100)}}]),n}(po),ko=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"yet",get:function(){return!0}}]),n}(wo),Ro=function(){function t(){this.Ret=new Oo,this.zet=function(){var t=function(){if(Yi.iL)return new yo;if(Yi.Hk||Yi.Zk)return new So;if(Yi.rL)return new To;if(Yi.Ek)return new Io;return new po}();return Yi.Ua?new go(t):Yi.Qs?new bo(t):Yi.Bk?new mo(t):Yi.Yk?new Eo(t):Yi.WE?new ko(t):new wo(t)}(),this.Pet=No(),self.performance&&self.performance.now?this.n_=function(){return self.performance.now()}:this.n_=Mn}var n=t.prototype;return n.xet=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Qi.apply(void 0,ct(n))},n.Nw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];te.apply(void 0,ct(n))},n.Cet=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];ne.apply(void 0,ct(n))},n.jet=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];ie.apply(void 0,[t].concat(ct(i)))},n.o_=function(t,n){return a(t,n)},n.GT=function(t,n){return d(t,n)},n.r_=function(t){v(t)},n.WT=function(t){l(t)},n.Vj=function(){return this.Oet.Vj()},n.xM=function(){return this.Oet.xM()},n.CM=function(){return this.Oet.CM()},n.LM=function(){return this.Oet.LM()},n.kM=function(){return this.Oet.kM()},n.Fj=function(t,n){return this.Oet.Fj(t,n)},n.Uj=function(t){return this.Oet.Uj(t)},n.Ah=function(t,n){var i;return void 0===n&&(n=uo(eo)),i="object"!==(void 0===n?"undefined":E(n))||n instanceof oo?n:n.href,new oo(t,i)},n.dw=function(t,n){if(void 0===n&&(n=uo(eo)),this.Pet){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Ah(t,n).href},Nt(t,[{key:"zR",get:function(){return this.Ret}},{key:"Ys",get:function(){return this.zet}},{key:"Bet",get:function(){return{Uet:c&&c.userAgent.match(/Android /i)?"Android":"other",Qet:Boolean(c&&c.userAgent.match(/Android 8.0.0/i))}}},{key:"KW",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Fet",get:function(){return"languages"in c?c.languages.slice():[c.language]}}]),t}(),Oo=function(){function t(){}return Nt(t,[{key:"UR",get:function(){return c.oscpu}},{key:"Ys",get:function(){return c.platform}},{key:"QR",get:function(){return c.vendor}},{key:"FR",get:function(){return c.vendorSub}}]),t}();function No(){if(self.URL)try{var t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}function Po(){return Po=g.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)g.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},Po.apply(this,arguments)}var Ao="9a04f079-9840-4286-ab92-e65be0885f95",Do="urn:uuid:"+Ao,Co="com.microsoft.playready",xo="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Bo="urn:uuid:"+xo,Mo="com.widevine.alpha",Uo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Lo="urn:uuid:"+Uo,Fo="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",zo="urn:uuid:"+Fo,Wo="com.apple.fps.1_0",qo=function(t){return t.Iw="playready",t.Dw="widevine",t.Ew="fairplay",t.Lw="clearkey",t.xw="aes128",t}({}),Ho={ow:qo.Iw,CL:Co,jL:"cenc",OL:Ao,RL:Do,PL:"PlayReady"},Vo={ow:qo.Dw,CL:Mo,jL:"cenc",OL:xo,RL:Bo,PL:"Widevine"},Xo={ow:qo.Ew,CL:Wo,jL:"skd",OL:Fo,RL:zo,PL:"FairPlay"},jo=(qo.Ew,{ow:qo.Lw,CL:"org.w3.clearkey",jL:"cenc",OL:Uo,RL:Lo,PL:"ClearKey"}),Yo=Yi.Ek&&Yi.xk>=42||Yi.iL&&Yi.sL>=38||Yi.Hk||Yi.Kk||Yi.uL&&Yi.lL>=29;function Ko(t,n){return function(t,n){return vt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Po({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Po({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var Go=function(){function t(t){this.Qj=Bt(),this.Wj=void 0,this.Gj=t}var n=t.prototype;return n.kM=function(){return this.Uj(Vo)},n.xM=function(){return this.Uj(jo)},n.LM=function(){return this.Uj(Ho)},n.CM=function(){return this.Uj(Xo)},n.Uj=function(t){var n=t.RL,i=this.Qj.get(n);if(i)return i;var e=this.Fj(t,'video/mp4; codecs="avc1.42000a"');return this.Qj.set(n,e),e},n.Fj=function(t,n){var i=this;return ut((function(){return st(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.Gj.Yj(t.CL,[Ko(n,!0)])];case 1:return e.sent(),[2,!0];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,i.Gj.Yj(t.CL,[Ko(n,!1)])];case 4:return e.sent(),[2,!0];case 5:return e.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}}))}))()},n.Vj=function(){return this.Wj||(this.Wj=this.Hj()),this.Wj},n.Hj=function(){var t=this;return ut((function(){return st(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:Yo?[4,t.xM()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),$o=function(t){return t.BM="UM",t.QM="FM",t.YM="contentprotectionerror",t.GM="contentprotectionsuccess",t.VM="currentsourcechange",t.WM="destroy",t.HM="durationchange",t.XM="emptied",t.ZM="encrypted",t.qM="ended",t.KM="JM",t.$M="ib",t.eb="sb",t.ob="hb",t.ub="loadstart",t.fb="manifestupdate",t._b="nosupportedrepresentationfound",t.gb="offline",t.vb="online",t.wb="pause",t.so="play",t.mb="progress",t.pb="ratechange",t.Ab="representationchange",t.yb="resize",t.Mb="seeked",t.bb="seeking",t.Tb="segmentnotfound",t.Sb="Nb",t.Ib="Db",t.ro="sourcechange",t.Eb="timeupdate",t.kb="volumechange",t.Lb="xb",t.Cb="jb",t.Ob="metricschange",t}({}),Zo=["cenc"],Jo=["cbcs","cbcs-1-9"],Qo=function(t){function n(n){var i;return(i=t.call(this,$o.Cb)||this).zL=n,i}return Dt(n,t),n}(Si),tu=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"BL")||this).UL=n,o.QL=i,o.BL=e,o.FL=r,o}return Dt(n,t),n}(Si),nu=function(t){function n(){return t.call(this,"lt")||this}return Dt(n,t),n}(Si),iu=new S([0]).buffer,eu=function(){function t(){this.Ou=[]}var n=t.prototype;return n.HL=function(t){for(var n=0,i=this.Ou;n<i.length;n++){if(Hn(i[n][0],t))return!0}return!1},n.XL=function(t){for(var n=0,i=this.Ou;n<i.length;n++){var e=i[n];if(Hn(e[0],t))return e[1]}},n.ZL=function(t,n){for(var i=0,e=this.Ou;i<e.length;i++){var r=e[i];if(Hn(r[0],t))return void(r[1]=n)}this.Ou.push([t,n])},n.qL=function(t,n){this.Ou.forEach((function(n){return t(n[1],n[0])}),n)},n.KL=function(){Tt(this.Ou)},Nt(t,[{key:"jp",get:function(){return this.Ou.length}}]),t}(),ru=function(){function t(){var t=this;this.ix=new Z((function(n,i){t.Hd=n,t.tx=i}))}var n=t.prototype;return n.JL=function(t){this.Hd&&(this.Hd(t),this.Hf())},n.$L=function(t){this.tx&&(this.tx(t),this.Hf())},n.i_=function(){this.ix.catch(kt),this.$L(new nn)},n.e_=function(t){var n=this;t.then((function(t){return n.JL(t)}),(function(t){return n.$L(t)}))},n.Hf=function(){this.Hd=void 0,this.tx=void 0},t}();function ou(t,n){return t===Co?function(t){if(t.byteLength<2*uu.length)return t;var n=new DataView(t,0,2*uu.length),i=hi(n,!0);if(i===uu)return t;return function(t){var n='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',i='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',e=""+n+Xn(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new S(2*t.length);return fi(vi(i),new gi,t,n),i}(e,!0).buffer}(t)}(n):n}var uu="<PlayReady";var su=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).sx=i,o.nx=e,o}return Dt(n,t),n}(Jt),fu=function(t,n){return fu=g.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)g.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},fu(t,n)};function hu(t,n){if("function"!=typeof n&&null!==n)throw new b("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}fu(t,n),t.prototype=null===n?g.create(n):(i.prototype=n.prototype,new i)}function cu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.ox=t,this.hx=n}t.prototype.get=function(t){var n=this.ox.get(t);if(0===this.hx||void 0===n)return n;var i=this.ox.get(t+1)||0,e=n&(1<<8-this.hx)-1,r=i>>8-this.hx;return(e<<this.hx)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.ox.get(m.floor((t+this.hx)/8));if(void 0!==n)return(n&1<<7-this.hx-t%8)>0?1:0}},g.defineProperty(t.prototype,"bitLength",{get:function(){return this.ox.bitLength-this.hx},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"length",{get:function(){return this.ox.length},enumerable:!1,configurable:!0})})(),m.pow(2,-52);function au(t,n,i){return m.min(m.max(t,n),i)}function vu(t,n){return t>>8-n}function du(t,n){return t&(1<<n)-1}var lu=function(){function t(t){this.ux=t,this.lx=0,this._x=0}return g.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.lx+this._x},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"done",{get:function(){return this.lx===this.ux.length&&0===this._x},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"location",{get:function(){return{byte:this.lx,bit:this._x}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.ux);return n.seek(this.lx,this._x),n},t.prototype.canReadBits=function(t){return 8*this.lx+t+this._x<=8*this.ux.length},t.prototype.canReadBytes=function(t){return 0===this._x?this.lx+t<=this.ux.length:this.lx+t<this.ux.length},t.prototype.incBit=function(){this._x++,this._x>7&&(this.lx++,this._x=0)},t.prototype.seek=function(t,n){this.lx=t,this._x=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new w("Cannot read past end of buffer.");return this.ux.get(this.lx)>>7-this._x&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new w("Cannot read past end of buffer.");if(0===this._x)return this.ux.get(this.lx++);var t=du(this.ux.get(this.lx),8-this._x),n=vu(this.ux.get(this.lx+1),this._x);return this.lx++,t<<this._x|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new w("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 w("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new w("Cannot read past end of buffer.");var n=0;if(0===this._x&&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 w("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new w("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-m.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 w("Skipping over the buffer edge is not allowed.");var n=this._x+t;this.lx+=n>>3,this._x=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new w("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}(),wu=function(t,n){return t===n?0:t<n?-1:t>n?1:_(t)?_(n)?0:1:-1},bu=function(){function t(){this.gx=[],this.vx=[],this.wx=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 w("The buffer length must be positive.");if(0!==i){if(0===this.vx.length)this.vx.push(0);else{var e=this.vx[this.vx.length-1]+this.gx[this.gx.length-1].length;this.vx.push(e)}this.gx.push(t.subarray(n,n+i)),this.wx+=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.gx;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.gx=[],this.vx=[],this.wx=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.vx[n];return this.gx[n][i]}},g.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.gx.length<1)return-1;if(this.gx.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.gx[0];return"number"==typeof t?cu(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=cu(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=m.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.vx,t,wu)},t.prototype.join=function(){if(1===this.gx.length)return this.gx[0];var t=new S(this.length);return this.copyInternal(t,0),t},g.defineProperty(t.prototype,"length",{get:function(){return this.wx},enumerable:!1,configurable:!0}),g.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 w("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new w("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)*m.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=au(n,0,this.length),r=au(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.gx[u],f=e,h=f-this.vx[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.vx[u],s=this.gx[u];var c=r-f;return o.pushRange(s,h,c),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.gx.length-1,e=this.gx[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.gx[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),gu=function(){function t(n){this.mx=n||t.BUFFER_CHUNK_SIZE,this.Ax=!1,this.yx=new bu,this.ux=new S(this.mx),this.Mx=0,this.bx=0,this._x=7}return t.prototype.closeByte=function(){this.ux[this.Mx++]=this.bx,this.Mx>=this.mx&&this.closeBuffer(),this.bx=0,this._x=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.Mx&&(this.yx.pushRange(this.ux,0,this.Mx),t&&(this.ux=new S(this.mx)),this.Mx=0)},g.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this._x},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.Ax)throw new w("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.Ax=!0,this.yx},t.prototype.writeBit=function(t){if(this.Ax)throw new w("Cannot write to a closed BitWriter.");this.bx|=t<<this._x,0===this._x?this.closeByte():this._x--},t.prototype.writeByte=function(t){if(this.Ax)throw new w("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.bx=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this._x;this.bx|=vu(t,n+1),this.closeByte(),this.bx=du(t,8-n)<<n+1,this._x=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.Ax)throw new w("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.Mx+t.length<=this.mx?(this.ux.set(t,this.Mx),this.Mx+=t.length,this.Mx===this.mx&&this.closeBuffer()):(this.closeBuffer(),this.yx.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this._x;this.bx|=vu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=du(t[i-1],8-n),r=vu(t[i],n+1);this.bx=e<<n+1|r,this.closeByte()}this.bx=du(t[t.length-1],8-n)<<n+1,this._x=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new w("Received a negative number.");if(n>32)throw new w("The max bitlength that can be provided is 32.");if(t>=m.pow(2,n))throw new w("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 w("The max bitlength that can be provided is 32.");if(m.abs(t)>=m.pow(2,n-1))throw new w("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+m.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new w("Received a negative number.");for(var n=m.floor(m.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 S(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}(),mu=function(){function t(t){this.rb=new bu,this.Tx=t}return t.prototype.closeWriter=function(){void 0!==this.Tx&&(this.rb=this.rb.concat(this.Tx.close()),this.Tx=void 0)},g.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Tx&&(this.Tx=new gu),this.Tx},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}(),pu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new w("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(m.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 mu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=m.pow(2,32),t}();function yu(t,n){return t instanceof Bn?64===n:t<m.pow(2,n)}function _u(t,n){return m.round(t*m.pow(2,n))}function Su(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Tu(t,n){return t/m.pow(2,n)}var Eu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!yu(i,8))throw new w("the provided version cannot fit in 8 bits.");return r.flags=e,r}return hu(n,t),g.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new w("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(pu),Iu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return hu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(bu.from(this.data))},n}(pu),ku=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();var Ru=16384;function Ou(t){var n=t.length;if(n<=Ru)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Ru)i.push(String.fromCharCode.apply(String,t.slice(e,e+Ru)));return i.join("")}var Nu=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function Pu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Au(t,n,i){var e=Lu(zu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Du(t,n,i){return n.offset+i<=t.byteLength}function Cu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function xu(t,n,i){void 0===i&&(i=!1);var e=Cu(t,n,i),r=Cu(t,n,i),o=i?r:e,u=i?e:r;return Bn.fromBits(u,o,!0)}function Bu(t,n,i){return Ou(function(t){return[].slice.call(t)}(Au(t,n,i)))}function Mu(t,n){var i,e=Pu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&Pu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Pu(t,n))+(63&Pu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Pu(t,n))+64*(63&Pu(t,n))+(63&Pu(t,n))),i}function Uu(t,n){return function(t,n,i){var e=[],r=function(t,n){return n.offset+3<=t.byteLength&&239===t.getUint8(n.offset)&&187===t.getUint8(n.offset+1)&&191===t.getUint8(n.offset+2)}(t,n);r&&n.shift(3);for(;n.offset<t.byteLength;){var o=Mu(t,n);if(void 0===o)break;if(i&&0===o)break;e.push(o)}return function(t){for(var n=[],i=0,e=t;i<e.length;i++){var r=e[i];r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Ou(n)}(e)}(t,n,!0)}function Lu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new S(t.buffer,t.byteOffset+n,i-n)}function Fu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function zu(t){return new S(t.buffer,t.byteOffset,t.byteLength)}var Wu=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 ku(this.offset<<3)},t}(),qu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Pu(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 Cu(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=Cu(t,n,i),r=Cu(t,n,i),o=i?r:e,u=i?e:r;return Bn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return xu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Au(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(Cu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Bu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Uu(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function Hu(t,n){return t.type===n}var Vu=8;function Xu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=ju(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new w("Data incomplete");return n.boxes}function ju(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Du(t,n,Vu)){return{complete:!1,neededOffset:o=n.offset+Vu}}var e=Cu(t,n),r=Bu(t,n,4);if(1===e){if(!Du(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=xu(t,n).toNumber()}if("uuid"===r){if(!Du(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Bu(t,n,16)}var u=n.offset,s={type:r,size:e,headerSize:u-i};return{complete:!0,header:s}}(t,n);if(!e.complete)return e;var r=e.header,o=r.size;0===o&&(o=t.byteLength-i);var u=i+o;if(u>t.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new qu(Fu(t,i,u),new Wu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Yu(t){return{version:t>>24,flags:new Nu(16777215&t)}}function Ku(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Gu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function $u(t){var n=t.nextUint32Array(9);return{a:Tu(n[0],16),b:Tu(n[1],16),u:Tu(n[2],30),c:Tu(n[3],16),d:Tu(n[4],16),v:Tu(n[5],30),x:Tu(n[6],16),y:Tu(n[7],16),w:Tu(n[8],30)}}function Zu(t){return new Iu(t.type,Lu(zu(t.data.data),t.data.cursor.offset))}var Ju=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return hu(n,t),g.defineProperty(n.prototype,"handlerType",{get:function(){return this.Sx},set:function(t){this.Sx=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Eu);function Qu(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new Ju(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}hu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Ju);var ts=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},g.defineProperty(t.prototype,"tag",{get:function(){return this.Nx},set:function(t){if(!yu(t,8))throw new w("Provided tag does not fit in 8 bits.");this.Nx=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}(),ns=(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}hu(n,t),g.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.Ix},set:function(t){if(!yu(t,8))throw new w("Provided objectTypeIndication does not fit in 8 bits.");this.Ix=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"streamType",{get:function(){return this.Dx},set:function(t){if(!yu(t,6))throw new w("Provided streamType does not fit in 6 bits.");this.Dx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ex},set:function(t){if(!yu(t,24))throw new w("Provided bufferSizeDb does not fit in 24 bits.");this.Ex=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.kx},set:function(t){if(!yu(t,32))throw new w("Provided maxBitrate does not fit in 32 bits.");this.kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.Lx},set:function(t){if(!yu(t,32))throw new w("Provided avgBitrate does not fit in 32 bits.");this.Lx=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var n=0,i=this.decoderSpecificInfo;n<i.length;n++){i[n].serialize(t)}}}(ts),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}hu(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(bu.from(this.data))}}(ts),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return hu(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(ts)),is=(function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,3,r.fixed28BitMode)||this;return o.decoderConfigDescriptor=e,o.esId=n,o.streamPriority=i,o.dependsOnEsId=null==r?void 0:r.dependsOnEsId,o.urlString=null==r?void 0:r.url,o.ocrEsId=null==r?void 0:r.ocrEsId,o.slConfigDescriptor=new ns(r.fixed28BitMode),o}hu(n,t),g.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"esId",{get:function(){return this.xx},set:function(t){if(!yu(t,16))throw new w("Provided esId does not fit in 16 bits.");this.xx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Cx},set:function(t){if(!yu(t,5))throw new w("Provided streamPriority does not fit in 5 bits.");this.Cx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.jx},set:function(t){if(t&&!yu(t,16))throw new w("Provided dependsOnEsId does not fit in 16 bits.");this.jx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.Ox},set:function(t){if(t&&!yu(t,16))throw new w("Provided ocrEsId does not fit in 16 bits.");this.Ox=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},n.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(ts),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return hu(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}(pu)),es=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return hu(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(is),rs=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return hu(n,t),g.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.Rx},set:function(t){if(!yu(t,16))throw new w("Provided dataReferenceIndex does not fit in 16 bits.");this.Rx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){for(var n=0;n<6;n++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},n}(es),os=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return hu(n,t),g.defineProperty(n.prototype,"channelCount",{get:function(){return this.Px},set:function(t){if(!yu(t,16))throw new w("Provided channelCount does not fit in 16 bits.");this.Px=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleSize",{get:function(){return this.zx},set:function(t){if(!yu(t,16))throw new w("Provided sampleSize does not fit in 16 bits.");this.zx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Bx},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided rate does not fit in 32 bits (fixed 16.16).");this.Bx=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(_u(this.sampleRate,16),32),this.extra&&Su(n.writer,this.extra)},n}(rs),us=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Ux},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t,32)})))throw new w("Not all entries can be represented in 32 bits.");this.Ux=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Eu),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}hu(n,t),g.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Qx},set:function(t){if(!yu(t,32))throw new w("Provided cleanApertureWidthN does not fit in 32 bits.");this.Qx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.Fx},set:function(t){if(!yu(t,32))throw new w("Provided cleanApertureWidthD does not fit in 32 bits.");this.Fx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Yx},set:function(t){if(!yu(t,32))throw new w("Provided cleanApertureHeightN does not fit in 32 bits.");this.Yx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.Gx},set:function(t){if(!yu(t,32))throw new w("Provided cleanApertureHeightD does not fit in 32 bits.");this.Gx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Vx},set:function(t){if(!yu(t,32))throw new w("Provided horizOffN does not fit in 32 bits.");this.Vx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizOffD",{get:function(){return this.Wx},set:function(t){if(!yu(t,32))throw new w("Provided horizOffD does not fit in 32 bits.");this.Wx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vertOffN",{get:function(){return this.Hx},set:function(t){if(!yu(t,32))throw new w("Provided vertOffN does not fit in 32 bits.");this.Hx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Xx},set:function(t){if(!yu(t,32))throw new w("Provided vertOffD does not fit in 32 bits.");this.Xx=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)}}(pu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Ux},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t.sampleCount,32)||!yu(t.sampleOffset,32)})))throw new w("Not all entries can be represented in 64 bits.");this.Ux=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(Eu),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}hu(n,t),g.defineProperty(n.prototype,"location",{get:function(){return this.Zx},set:function(t){this.flags=void 0===t?1:0,this.Zx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Eu),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}hu(n,t),g.defineProperty(n.prototype,"location",{get:function(){return this.Zx},set:function(t){if(1&this.flags)throw new w("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.Zx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Eu),function(t){function n(){return t.call(this,"dinf")||this}hu(n,t)}(es),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!yu(i,8))throw new w("the provided version cannot fit in 8 bits.");return r.flags=e,r}return hu(n,t),g.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new w("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(is)),ss=(function(t){function n(){return t.call(this,"dref",0,0)||this}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(us),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 hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"entries",{get:function(){return this.Ux},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!yu(e.segmentDuration,this.bitSize))throw new w("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!yu(e.mediaTime,this.bitSize))throw new w("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!yu(e.mediaRateInteger,16))throw new w("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!yu(e.mediaRateFraction,16))throw new w("Provided mediaRateFraction does not fit in 16 bits.")}this.Ux=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(Eu)),fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return hu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration,32),t.writer.writeInt(r.mediaTime,32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(ss),hs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return hu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(r.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(r.mediaTime.getHighBits(),32),t.writer.writeInt(r.mediaTime.getLowBits(),32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(ss);function cs(t){for(var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=[],s=0;s<o;s++){var f=void 0,h=void 0;0===e?(f=n.nextUint32(),h=n.nextInt32()):(f=n.nextUint64(),h=n.nextInt64());var c=n.nextInt16(),a=n.nextInt16();u.push({segmentDuration:f,mediaTime:h,mediaRateFraction:a,mediaRateInteger:c})}return 0===e?new fs(u,r.raw):new hs(u,r.raw)}var as=function(t){function n(){return t.call(this,"edts")||this}return hu(n,t),n}(es);function vs(t){for(var n=new as,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"elst")?n.boxes.push(cs(r)):n.boxes.push(Zu(r))}return n}var ds=function(t){function n(n,i,e,r){var o=t.call(this,n)||this;return o.majorBrand=i,o.minorVersion=e,o.compatibleBrands=r,o}return hu(n,t),g.defineProperty(n.prototype,"majorBrand",{get:function(){return this.qx},set:function(t){if(4!==t.length)throw new w("the provided major brand does not conform to the 4 character requirement");this.qx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"minorVersion",{get:function(){return this.Kx},set:function(t){if(!yu(t,32))throw new w("the provided minor version does not fit in 32 bits.");this.Kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.Jx},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new w("Some of the compatible brands do not conform to the 4 character requirement");this.Jx=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}(pu),ls=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}hu(n,t)}(ds),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}hu(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(bu.from(this.data))}}(pu),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 hu(n,t),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.$x},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$x=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.tC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.iC},set:function(t){if(!yu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.iC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.eC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.eC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"language",{get:function(){return this.sC},set:function(t){if(!ms(t))throw new w("Expected an ISO-639-2/T language code");this.sC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Eu)),ws=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return hu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(ls),bs=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return hu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(ls);function gs(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=Ku(n,e),u=new lu(bu.from(n.nextUint8Array(2)));u.skipBits(1);for(var s=[],f=0;f<3;f++)s.push(u.readUInt(5));var h=s.map((function(t){return String.fromCharCode(t+96)})).join("");return ms(h)||(h="und"),n.skip(2),0===e?new ws(o,h,r.raw):new bs(o,h,r.raw)}function ms(t){return/^[a-z]{3}$/.test(t)}var ps=function(t){function n(){return t.call(this,"mdia")||this}return hu(n,t),n}(es);function ys(t){for(var n=new ps,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mdhd")?n.boxes.push(gs(r)):Hu(r,"hdlr")?n.boxes.push(Qu(r)):n.boxes.push(Zu(r))}return n}var _s;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new bu,n}hu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(pu),function(t){function n(){return t.call(this,"minf")||this}hu(n,t)}(es),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.handler.serialize())}}(us);!function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(_s||(_s={}));var Ss,Ts,Es={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Is(t,n){n.writer.writeUInt(_u(t.a,16),32),n.writer.writeUInt(_u(t.b,16),32),n.writer.writeUInt(_u(0,30),32),n.writer.writeUInt(_u(t.c,16),32),n.writer.writeUInt(_u(t.d,16),32),n.writer.writeUInt(_u(0,30),32),n.writer.writeUInt(_u(t.x,16),32),n.writer.writeUInt(_u(t.y,16),32),n.writer.writeUInt(_u(1,30),32)}function ks(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Ss.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Ts.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Ts.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Ts.UNKNOWN,2)}function Rs(t,n){var i,e,r;n.writer.writeUInt(0,4),ks(t,n),n.writer.writeUInt(null!==(i=t.samplePaddingValue)&&void 0!==i?i:0,3),n.writer.writeBool(null!==(e=t.sampleIsNonSyncSample)&&void 0!==e&&e),n.writer.writeUInt(null!==(r=t.sampleDegradationPriority)&&void 0!==r?r:0,16)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(Ss||(Ss={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Ts||(Ts={}));var Os=function(){},Ns=function(t){function n(n,i,e){var r=t.call(this,"pssh",n,0)||this;return r.systemId=i,r.data=e,r}return hu(n,t),g.defineProperty(n.prototype,"systemId",{get:function(){return this.nC},set:function(t){if(16!==t.length)throw new w("Provided systemId length is not 16.");this.nC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"data",{get:function(){return this.rC},set:function(t){if(!yu(t.length,32))throw new w("Provided data length does not fit in 32 bits.");this.rC=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(bu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(bu.from(this.data))},n}(Eu),Ps=function(t){function n(n,i){return t.call(this,0,n,i)||this}return hu(n,t),n}(Ns),As=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return hu(n,t),g.defineProperty(n.prototype,"kIds",{get:function(){return this.oC},set:function(t){if(!yu(t.length,32))throw new w("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new w("Not all provided key ids are 16 bytes long.");this.oC=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(bu.from(e))}},n}(Ns);function Ds(t){var n=t.data.nextUint8();t.data.skip(3);var i=t.data.nextUint8Array(16),e=[];if(1===n)for(var r=t.data.nextUint32(),o=0;o<r;o++)e.push(t.data.nextUint8Array(16));var u=t.data.nextUint32(),s=t.data.nextUint8Array(u);return 1===n?new As(i,s,e):new Ps(i,s)}var Cs=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"mehd",i,e)||this;return r.fragmentDuration=n,r}return hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.hC},set:function(t){if(!yu(t,this.bitSize))throw new w("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.hC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Eu),xs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return hu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Cs),Bs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return hu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),n.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},n}(Cs);function Ms(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new xs(n.nextUint32(),r.raw):new Bs(n.nextUint64(),r.raw)}var Us=function(t){function n(n,i,e,r){void 0===i&&(i={}),void 0===e&&(e=0),void 0===r&&(r=0);var o,u,s,f=this;return(f=t.call(this,"trex",e,r)||this).trackId=n,f.defaultSampleDescriptionIndex=null!==(o=null==i?void 0:i.sampleDescriptionIndex)&&void 0!==o?o:0,f.defaultSampleDuration=null!==(u=i.sampleDuration)&&void 0!==u?u:0,f.defaultSampleSize=null!==(s=i.sampleSize)&&void 0!==s?s:0,f.defaultSampleFlags=i.sampleFlags,f}return hu(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.aC},set:function(t){if(!yu(t,32))throw new w("Provided track id does not fit in 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.uC},set:function(t){if(!yu(t,32))throw new w("Provided default sample description index does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.cC},set:function(t){if(!yu(t,32))throw new w("Provided default sample duration does not fit in 32 bits.");this.cC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.lC},set:function(t){if(!yu(t,32))throw new w("Provided default sample size does not fit in 32 bits.");this.lC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.dC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!yu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!yu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.dC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},n.prototype.serializeBoxContent=function(n){var i;t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),n.writer.writeUInt(this.defaultSampleDescriptionIndex,32),n.writer.writeUInt(this.defaultSampleDuration,32),n.writer.writeUInt(this.defaultSampleSize,32),Rs(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Eu);function Ls(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Gu(new lu(bu.from(n.nextUint8Array(4))));return new Us(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Fs=function(t){function n(){return t.call(this,"mvex")||this}return hu(n,t),n}(es);function zs(t){for(var n=new Fs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mehd")?n.boxes.push(Ms(r)):Hu(r,"trex")?n.boxes.push(Ls(r)):n.boxes.push(Zu(r))}return n}var Ws=function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,h,c=this;return(c=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,c.modificationTime=i.modification,c.timescale=i.scale,c.duration=i.duration,c.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,c.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,c.matrix=null!==(h=r.matrix)&&void 0!==h?h:Es,c.fC=e,c}return hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.$x},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$x=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.tC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.iC},set:function(t){if(!yu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.iC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.eC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.eC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"rate",{get:function(){return this._C},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided rate does not fit in 32 bits (fixed 16.16).");this._C=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"volume",{get:function(){return this.gC},set:function(t){if(!yu(_u(t,8),16))throw new w("Provided volume does not fit in 16 bits (fixed 8.8).");this.gC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"matrix",{get:function(){return this.vC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new w("(u, v, w) does not match the required (0, 0, 1)");this.vC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.fC},set:function(t){if(0===t)throw new w("NextTrackId cannot be 0.");if(!yu(t,32))throw new w("NextTrackId cannot exceed 32 bits.");this.fC=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(_u(this.rate,16),32),n.writer.writeUInt(_u(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Is(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(Eu),qs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return hu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(Ws),Hs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,1,r)||this}return hu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Ws);function Vs(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=Ku(n,e),u=Tu(n.nextUint32(),16),s=Tu(n.nextUint16(),8);n.skip(2),n.skip(8);var f=$u(n);n.skip(24);var h=n.nextUint32();return 0===e?new qs(o,h,{rate:u,volume:s,matrix:f},r.raw):new Hs(o,h,{rate:u,volume:s,matrix:f},r.raw)}var Xs=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,h,c,a=this;return a=t.call(this,"tkhd",n,function(t){var n,i,e,r;return{trackEnabled:null===(n=null==t?void 0:t.trackEnabled)||void 0===n||n,trackInMovie:null===(i=null==t?void 0:t.trackInMovie)||void 0===i||i,trackInPreview:null===(e=null==t?void 0:t.trackInPreview)||void 0===e||e,trackSizeIsAspectRatio:null!==(r=null==t?void 0:t.trackSizeIsAspectRatio)&&void 0!==r&&r}}(s))||this,a.creationTime=i.creation,a.modificationTime=i.modification,a.trackId=e,a.duration=i.duration,a.volume=r,a.width=o,a.height=u,a.layer=null!==(f=s.layer)&&void 0!==f?f:0,a.alternateGroup=null!==(h=s.alternateGroup)&&void 0!==h?h:0,a.matrix=null!==(c=s.matrix)&&void 0!==c?c:Es,a}return hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.$x},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$x=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.tC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"trackId",{get:function(){return this.aC},set:function(t){if(0===t)throw new w("trackId cannot be 0.");if(!yu(t,32))throw new w("trackId cannot exceed 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.eC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.eC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"volume",{get:function(){return this.gC},set:function(t){if(!yu(_u(t,8),16))throw new w("Provided volume does not fit in 16 bits (fixed 8.8).");this.gC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"width",{get:function(){return this.wC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided width does not fit in 32 bits (fixed 16.16).");this.wC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"height",{get:function(){return this.mC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided height does not fit in 32 bits (fixed 16.16).");this.mC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"layer",{get:function(){return this.pC},set:function(t){if(!yu(t,16))throw new w("Provided layer does not fit in 16 bits.");this.pC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.AC},set:function(t){if(!yu(t,16))throw new w("Provided alternateGroup does not fit in 16 bits.");this.AC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"matrix",{get:function(){return this.vC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new w("(u, v, w) does not match the required (0, 0, 1)");this.vC=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(_u(this.volume,8),16),n.writer.writeUInt(0,16),Is(this.matrix,n),n.writer.writeUInt(_u(this.width,16),32),n.writer.writeUInt(_u(this.height,16),32)},n}(Eu),js=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return hu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},n}(Xs),Ys=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return hu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Xs);function Ks(t){var n,i,e,r,o=t.data,u=Yu(o.nextUint32()),s=u.version,f=u.flags,h=f.isSet(8),c=f.isSet(4),a=f.isSet(2),v=f.isSet(1);0===s?(n=o.nextUint32(),i=o.nextUint32(),e=o.nextUint32(),o.skip(4),r=o.nextUint32()):(n=o.nextUint64(),i=o.nextUint64(),e=o.nextUint32(),o.skip(4),r=o.nextUint64()),o.skip(8);var d=o.nextInt16(),l=o.nextInt16(),w=Tu(o.nextInt16(),8);o.skip(2);var b=$u(o),g=Tu(o.nextUint32(),16),m=Tu(o.nextUint32(),16);return 0===s?new js({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a}):new Ys({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var Gs=function(t){function n(){return t.call(this,"trak")||this}return hu(n,t),n}(es);function $s(t){for(var n=new Gs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"tkhd")?n.boxes.push(Ks(r)):Hu(r,"mdia")?n.boxes.push(ys(r)):Hu(r,"edts")?n.boxes.push(vs(r)):n.boxes.push(Zu(r))}return n}var Zs=function(t){function n(){return t.call(this,"moov")||this}return hu(n,t),n}(es);var Js=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"tfdt",i,e)||this;return r.baseMediaDecodeTime=n,r}return hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.yC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.yC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Eu),Qs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return hu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(Js),tf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return hu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},n}(Js);function nf(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Qs(n.nextUint32(),r.raw):new tf(n.nextUint64(),r.raw)}var ef=function(t){function n(n,i){void 0===i&&(i=0);var e=t.call(this,"tfhd",i,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(n))||this;return e.trackId=n.trackId,e.baseDataOffset=n.baseDataOffset,e.sampleDescriptionIndex=n.sampleDescriptionIndex,e.defaultSampleDuration=n.defaultSampleDuration,e.defaultSampleSize=n.defaultSampleSize,e.defaultSampleFlags=n.defaultSampleFlags,e}return hu(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.aC},set:function(t){if(!yu(t,32))throw new w("Provided track id does not fit in 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.MC},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new w("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new w("The base data offset present flag is not set.");if(t&&!yu(t,64))throw new w("Provided baseDataOffset does not fit in 32 bits.");this.MC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.bC},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new w("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new w("The sample description index flag is not set.");if(t&&!yu(t,32))throw new w("Provided sampleDescriptionIndex does not fit in 32 bits.");this.bC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.cC},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new w("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new w("The default sample duration present flag is not set.");if(t&&!yu(t,32))throw new w("Provided defaultSampleDuration does not fit in 32 bits.");this.cC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.lC},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new w("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new w("The default sample size present flag is not set.");if(t&&!yu(t,32))throw new w("Provided defaultSampleSize does not fit in 32 bits.");this.lC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.dC},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new w("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new w("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!yu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!yu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.dC=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(n+=8),this.flags.sampleDescriptionIndexPresent&&(n+=4),this.flags.defaultSampleDurationPresent&&(n+=4),this.flags.defaultSampleSizePresent&&(n+=4),this.flags.defaultSampleFlagsPresent&&(n+=4),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(n.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&n.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&n.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&n.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&Rs(this.defaultSampleFlags,n)},n}(Eu);function rf(t){var n=t.data,i=n.nextUint8(),e=new lu(bu.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=Boolean(e.readBit()),a=n.nextUint32(),v=c?n.nextUint64():void 0,d=h?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?Gu(new lu(bu.from(n.nextUint8Array(4)))):void 0;return new ef({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var of=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return hu(n,t),g.defineProperty(n.prototype,"dataOffset",{get:function(){return this.TC},set:function(t){if(t&&!yu(t,32))throw new w("Provided data offset does not fit in 32 bits.");this.TC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.SC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!yu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!yu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.SC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"samples",{get:function(){return this.NC},set:function(t){var n,i;if(!yu(t.length,32))throw new w("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 w("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new w("The sample duration present flag is not set.");if(o.duration&&!yu(o.duration,32))throw new w("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new w("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new w("The sample size present flag is not set.");if(o.size&&!yu(o.size,32))throw new w("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new w("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new w("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!yu(o.flags.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!yu(o.flags.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new w("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new w("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!yu(o.compositionTimeOffset,32))throw new w("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.NC=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(n+=4),this.flags.firstSampleFlagsPresent&&(n+=4),this.flags.sampleDurationPresent&&(n+=4*this.samples.length),this.flags.sampleSizePresent&&(n+=4*this.samples.length),this.flags.sampleFlagsPresent&&(n+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(n+=4*this.samples.length),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&n.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&Rs(this.firstSampleFlags,n);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];this.flags.sampleDurationPresent&&n.writer.writeUInt(r.duration,32),this.flags.sampleSizePresent&&n.writer.writeUInt(r.size,32),this.flags.sampleFlagsPresent&&Rs(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Eu);function uf(t){var n=t.data,i=n.nextUint8(),e=new lu(bu.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Gu(new lu(bu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Gu(new lu(bu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new of(i,a,v)}var sf=function(t){function n(){return t.call(this,"traf")||this}return hu(n,t),n}(es);function ff(t){for(var n=new sf,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"tfhd")?n.boxes.push(rf(r)):Hu(r,"tfdt")?n.boxes.push(nf(r)):Hu(r,"trun")?n.boxes.push(uf(r)):n.boxes.push(Zu(r))}return n}var hf=function(t){function n(){return t.call(this,"moof")||this}return hu(n,t),n}(es);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}hu(n,t),g.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.IC},set:function(t){if(!yu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(Eu);var cf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return hu(n,t),g.defineProperty(n.prototype,"codingName",{get:function(){return this.DC},set:function(t){if(4!==t.length)throw new w("Provided coding name was not 4 characters long.");this.DC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(pu),af=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}hu(n,t),g.defineProperty(n.prototype,"hSpacing",{get:function(){return this.EC},set:function(t){if(!yu(t,32))throw new w("Provided hSpacing does not fit in 32 bits.");this.EC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vSpacing",{get:function(){return this.kC},set:function(t){if(!yu(t,32))throw new w("Provided vSpacing does not fit in 32 bits.");this.kC=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)}}(pu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}hu(n,t),n.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},n.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(es),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new cf(n),r}hu(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())}}(pu),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 hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"entries",{get:function(){return this.Ux},set:function(t){var n=this;if(!yu(t.length,32))throw new w("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!yu(t,n.bitSize)})))throw new w("Not all provided entries fit in ".concat(this.bitSize," bits."));this.Ux=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.LC},set:function(t){if(void 0===t)this.flags=0;else{if(!yu(t.auxInfoType,32))throw new w("Provided auxInfoType does not fit in 32 bits.");if(!yu(t.auxInfoTypeParameter,32))throw new w("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.LC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(Eu)),vf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}hu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e,32)}}}(af),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}hu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.getHighBitsUnsigned(),32),t.writer.writeUInt(e.getLowBitsUnsigned(),32)}}}(af),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}hu(n,t),g.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.xC},set:function(t){if(!yu(t,8))throw new w("Provided defaultSampleInfoSize does not fit in a single byte.");this.xC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.jC},set:function(t){if(!yu(t.length,32))throw new w("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!yu(t,8)})))throw new w("Not all provided sampleInfoSizes fit in a byte.");this.jC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.LC},set:function(t){if(void 0===t)this.flags=0;else{if(!yu(t.auxInfoType,32))throw new w("Provided auxInfoType does not fit in 32 bits.");if(!yu(t.auxInfoTypeParameter,32))throw new w("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.LC=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 w("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Eu),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n);for(var i=0,e=this.samples;i<e.length;i++){ks(e[i],n)}}}(Eu),function(t){function n(n){return t.call(this,"stsd",n,0)||this}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(us),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 hu(n,t),g.defineProperty(n.prototype,"groupingType",{get:function(){return this.OC},set:function(t){if(4!==t.length)throw new w("The provided groupingType does not equal 4 characters.");this.OC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(Eu)),df=(function(t){function n(n,i){return t.call(this,0,n,i)||this}hu(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(vf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}hu(n,t),g.defineProperty(n.prototype,"defaultLength",{get:function(){return this.RC},set:function(t){if(!yu(t,32))throw new w("The provided defaultLength does not fit in 32 bits.");this.RC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},n.prototype.serializeEntryBoxContent=function(t,n){0===this.defaultLength&&t.writer.writeUInt(n.getBoxContentSize(),32),n.serializeBoxContent(t)}}(vf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new w("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}hu(n,t),g.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.uC},set:function(t){if(!yu(t,32))throw new w("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(vf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}hu(n,t),g.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.zC},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!yu(t,32)})))throw new w("Not all sampleSizes can be represented in 32 bits.");this.zC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Eu),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}hu(n,t),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.lC},set:function(t){if(!yu(t,32))throw new w("Provided defaultSampleSize does not fit in 32 bits.");this.lC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"samples",{get:function(){return this.NC},set:function(t){if(!yu(t,32))throw new w("Number of allowed samples cannot fit in 32 bits.");this.NC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(Eu),function(t){function n(){return t.call(this,"stbl")||this}hu(n,t)}(es),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Ux},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t.firstChunk,32)||!yu(t.sampleDescriptionIndex,32)||!yu(t.samplesPerChunk,32)})))throw new w("Not all entries can be represented in 96 bits.");this.Ux=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(Eu),function(t){function n(){return t.call(this,"schi")||this}hu(n,t)}(es),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}hu(n,t),g.defineProperty(n.prototype,"schemeType",{get:function(){return this.BC},set:function(t){if(4!==t.length)throw new w("The provided schemeType does not have a length of 4.");this.BC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.QC},set:function(t){if(!yu(t,32))throw new w("The provided schemeVersion does not fit in 23 bits.");this.QC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"schemeUri",{get:function(){return this.FC},set:function(t){if(t&&4!==t.length)throw new w("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.FC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(Eu),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 hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"referenceId",{get:function(){return this.YC},set:function(t){if(!yu(t,32))throw new w("Provided referenceId does not fit in 32 bits.");this.YC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.iC},set:function(t){if(!yu(t,32))throw new w("Provided timescale does not fit in 32 bits.");this.iC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.GC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.GC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"firstOffset",{get:function(){return this.VC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.VC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"references",{get:function(){return this.WC},set:function(t){if(!yu(t.length,16))throw new w("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(!yu(e.referencedSize,31))throw new w("Provided referenced size does not fit in 31 bits.");if(!yu(e.subsegmentDuration,32))throw new w("Provided subsegment duration does not fit in 31 bits.");if(!yu(e.sapType,3))throw new w("Provided SAP type does not fit in 3 bits.");if(!yu(e.sapDeltaTime,28))throw new w("Provided SAP delta time does not fit in 28 bits.")}this.WC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(Eu)),lf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,0,n,i,e,r,o,u)||this}return hu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(df),wf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,1,n,i,e,r,o,u)||this}return hu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},n}(df);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}hu(n,t)})(ds),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}hu(n,t),g.defineProperty(n.prototype,"balance",{get:function(){return this.HC},set:function(t){if(t<-1||t>1)throw new w("Provided balance does not fit in the allowed range [-1, 1].");if(!yu(_u(t,8),16))throw new w("Provided balance does not fit in 16 bits (fixed 8.8).");this.HC=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(_u(this.balance,8),16),n.writer.writeUInt(0,16)}}(Eu),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Ux},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t,32)})))throw new w("Not all entries can be represented in 32 bits.");this.Ux=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Eu),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Ux},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t.sampleCount,32)||!yu(t.sampleDelta,32)})))throw new w("Not all entries can be represented in 64 bits.");this.Ux=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(Eu),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}hu(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.aC},set:function(t){if(!yu(t,32))throw new w("The provided trackId does not fit in 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32)}}(us),function(t){function n(){return t.call(this,"udta")||this}hu(n,t)}(es);var bf={red:0,green:0,blue:0},gf=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=bf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}hu(n,t),g.defineProperty(n.prototype,"opColor",{get:function(){return this.XC},set:function(t){if(!yu(t.red,16)||!yu(t.green,16)||!yu(t.blue,16))throw new w("Not all colors could be represented in 16 bits.");this.XC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(Eu),function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,h,c,a=this;return(a=t.call(this,n,i)||this).width=e.width,a.height=e.height,a.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,a.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,a.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",a.frameCount=null!==(h=r.frameCount)&&void 0!==h?h:1,a.depth=null!==(c=r.depth)&&void 0!==c?c:24,a.clap=r.clap,a.pasp=r.pasp,a.extra=o,a}return hu(n,t),g.defineProperty(n.prototype,"width",{get:function(){return this.wC},set:function(t){if(!yu(t,16))throw new w("Provided width does not fit in 16 bits.");this.wC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"height",{get:function(){return this.mC},set:function(t){if(!yu(t,16))throw new w("Provided height does not fit in 16 bits.");this.mC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.ZC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.ZC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.qC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.qC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"compressorName",{get:function(){return this.KC},set:function(t){if(t.length>31)throw new w("The provided compressorName should at most be 31 characters long.");this.KC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"frameCount",{get:function(){return this.JC},set:function(t){if(!yu(t,16))throw new w("Provided frameCount does not fit in 16 bits.");this.JC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"depth",{get:function(){return this.$C},set:function(t){if(!yu(t,16))throw new w("Provided depth does not fit in 16 bits.");this.$C=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(_u(this.horizontalResolution,16),32),n.writer.writeUInt(_u(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&&Su(n.writer,this.extra)},n}(rs)),mf=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof S?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof S?n.concat(bu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Eu),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(os),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}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(gf),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(rs),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}hu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(pu),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}g.defineProperty(t.prototype,"version",{get:function(){return this.tj},set:function(t){if(!yu(t,8))throw new w("Provided version does not fit in 8 bits.");this.tj=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"profileIndication",{get:function(){return this.ij},set:function(t){if(!yu(t,8))throw new w("Provided profileIndication does not fit in 8 bits.");this.ij=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.ej},set:function(t){if(!yu(t,8))throw new w("Provided profileCompatibility does not fit in 8 bits.");this.ej=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"levelIndication",{get:function(){return this.sj},set:function(t){if(!yu(t,8))throw new w("Provided levelIndication does not fit in 8 bits.");this.sj=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"spsSets",{get:function(){return this.nj},set:function(t){if(!yu(t.length,5))throw new w("Provided number of spsSets exceeds the max (32)");this.nj=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"ppsSets",{get:function(){return this.rj},set:function(t){if(!yu(t.length,8))throw new w("Provided number of ppsSets exceeds the max (256)");this.rj=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(bu.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(bu.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}hu(n,t),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(i=null===(n=this.bitrateBox)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.configurationBox.serialize()),this.bitrateBox&&n.concat(this.bitrateBox.serialize())}}(gf),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}hu(n,t),g.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ex},set:function(t){if(!yu(t,32))throw new w("Provided bufferSizeDb does not fit in 32 bits.");this.Ex=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"max",{get:function(){return this.nf},set:function(t){if(!yu(t,32))throw new w("Provided max does not fit in 32 bits.");this.nf=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"avg",{get:function(){return this.hj},set:function(t){if(!yu(t,32))throw new w("Provided avg does not fit in 32 bits.");this.hj=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)}}(pu),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 w("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 S(0),s}return hu(n,t),g.defineProperty(n.prototype,"isProtected",{get:function(){return this.aj},set:function(t){if(!yu(t,8))throw new w("Provided isProtected does not fit in 1 byte.");this.aj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.uj},set:function(t){if(![8,16].includes(t))throw new w("Provided perSampleIvSize does not match any allowed value [8, 16].");this.uj=t,this.cj=new S(0)},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"kId",{get:function(){return this.lj},set:function(t){if(16!==t.length)throw new w("Provided kId length is not 16.");this.lj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"constantIv",{get:function(){return this.cj},set:function(t){if(![8,16].includes(t.length))throw new w("Provided constant IV length does not match any allowed value [8, 16].");this.cj=t,this.uj=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),Su(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Su(t.writer,this.constantIv))},n}(Eu)),pf=(function(t){function n(n){return t.call(this,0,n)||this}hu(n,t)}(mf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return hu(n,t),g.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.dj},set:function(t){if(!yu(t,4))throw new w("Provided cryptByteBlocks does not fit in 4 bits.");this.dj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this._j},set:function(t){if(!yu(t,4))throw new w("Provided skipByteBlocks does not fit in 4 bits.");this._j=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(mf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new pf(n),i}hu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Os);function yf(t){return void 0!==t.iv}function _f(t){return void 0!==t.subsamples}(function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}hu(n,t),g.defineProperty(n.prototype,"samples",{get:function(){return this.NC},set:function(t){var n;if(!yu(t.length,32))throw new w("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(yf(r)&&![8,16].includes(r.iv.length))throw new w("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=_f(r)),!0===n&&!_f(r)||!1===n&&_f(r))throw new w("Mix of samples with and without subsamples detected.");if(_f(r)){if(!yu(r.subsamples.length,16))throw new w("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(!yu(s.clearData,16))throw new w("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!yu(s.protectedData,23))throw new w("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.NC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];yf(r)&&(n+=r.iv.length),_f(r)&&(n+=2+6*r.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];if(yf(r)&&Su(n.writer,r.iv),_f(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}})(Eu),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}hu(n,t),g.defineProperty(n.prototype,"timescale",{get:function(){return this.iC},set:function(t){if(!yu(t,32))throw new w("The provided timescale does not fit in 32 bits.");this.iC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.gj},set:function(t){if(!yu(t,32))throw new w("The provided presentationTimeDelta does not fit in 32 bits.");this.gj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"eventDuration",{get:function(){return this.vj},set:function(t){if(!yu(t,32))throw new w("The provided eventDuration does not fit in 32 bits.");this.vj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"id",{get:function(){return this.LS},set:function(t){if(!yu(t,32))throw new w("The provided id does not fit in 32 bits.");this.LS=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(bu.from(this.data))}}(Eu),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new mu,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function Sf(t,n){return function(i){var e=new qu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Wu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=ju(i,e);if(!r.complete)return;if(Hu(r.box,n))return r.box}}(e,t);if(!r)throw new w("".concat(t," box not found"));return n(r)}}Sf("moov",(function(t){for(var n=new Zs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mvhd")?n.boxes.push(Vs(r)):Hu(r,"trak")?n.boxes.push($s(r)):Hu(r,"mvex")?n.boxes.push(zs(r)):Hu(r,"pssh")?n.boxes.push(Ds(r)):n.boxes.push(Zu(r))}return n})),Sf("sidx",(function(t){var n,i,e=t.data,r=Yu(e.nextUint32()),o=r.version,u=r.flags,s=e.nextUint32(),f=e.nextUint32();0===o?(n=e.nextUint32(),i=e.nextUint32()):(n=e.nextUint64(),i=e.nextUint64()),e.skip(2);for(var h=e.nextUint16(),c=[],a=0;a<h;a++){var v=new lu(bu.from(e.nextUint8Array(12))),d=v.readBit(),l=v.readUInt(31),w=v.readUInt(32),b=Boolean(v.readBit()),g=v.readUInt(3),m=v.readUInt(28);c.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new lf(s,f,n,i,c,u.raw):new wf(s,f,n,i,c,u.raw)})),Sf("moof",(function(t){for(var n=new hf,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"traf")?n.boxes.push(ff(r)):Hu(r,"pssh")?n.boxes.push(Ds(r)):n.boxes.push(Zu(r))}return n}));var Tf=Sf("pssh",Ds),Ef=function(t){function n(n,i){var e;(e=t.call(this)||this).Aj=n,e.Fw=i,e.bj=!1,e.Dj=function(){e.Nj()},e.Ej=function(t){e.yo(new tu(e,t.messageType,ou(e.Fw,t.message)))},e.Lj=function(){e.bj=!0,e.yj.jp>0&&(e.yj.KL(),e.yo(new Qo(e.yj))),e.Aj.removeEventListener("keystatuseschange",e.Dj),e.Aj.removeEventListener("message",e.Ej)},e.Aj.addEventListener("keystatuseschange",e.Dj),e.Aj.addEventListener("message",e.Ej),e.yj=new eu;var r=[];return e.Aj.closed&&r.push(Z.resolve(e.Aj.closed)),e.Tj=new ru,r.push(e.Tj.ix),e.mj=Z.race(r).then(e.Lj,e.Lj),e.Nj(),e}Dt(n,t);var i=n.prototype;return i.Ws=function(){if(this.bj)return this.mj;var t=[];return t.push(Z.resolve(this.Aj.close())),t.push(un(1e3)),this.Tj.e_(Z.race(t).catch(If)),this.bj=!0,this.mj},i.Sj=function(t,n,i){if(Yi.Mk){var e=Tf(li(n));if(1===e.version)n=new Ps(e.systemId,e.data).serialize().join()}return Z.resolve(this.Aj.generateRequest(t,n)).catch(If)},i.$n=function(t){return Z.resolve(this.Aj.load(t)).catch(If)},i.IS=function(){return Z.resolve(this.Aj.remove()).catch(If)},i.Yn=function(t){return Z.resolve(this.Aj.update(t)).catch(If)},i.Nj=function(){var t=this;this.yj.KL(),this.Aj.keyStatuses.forEach((function(n,i){t.Ij(i,n)})),this.yo(new Qo(this.yj))},i.Ij=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=li(t);if(this.Fw===Co&&16===e.byteLength){var r=vi(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.Fw===Co&&"status-pending"===n&&(n="usable"),this.yj.ZL(e,n)},Nt(n,[{key:"wj",get:function(){return this.mj}},{key:"pj",get:function(){return this.Aj.expiration}},{key:"zL",get:function(){return this.yj}},{key:"Mj",get:function(){return this.Aj.sessionId}}]),n}(_i);function If(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|p(i[1],16))}throw new su(t.message,void 0,n,t)}var kf=function(){function t(t,n,i){this.Cj=t,this.Qw=n,this.sd=i}var n=t.prototype;return n.xj=function(t){var n=this;return ut((function(){return st(this,(function(i){return[2,new Ef(n.Cj.createSession(t),n.Qw)]}))}))()},n.jj=function(t){return Z.resolve(this.Cj.setServerCertificate(t))},n.bn=function(t){return Z.resolve(t.setMediaKeys(this.Cj))},n.Oj=function(t){return Z.resolve(t.setMediaKeys(null))},n.tr=function(){return Z.resolve()},t}(),Rf=function(){function t(t,n,i){this.Rj=t,this.Fw=n,this.zj=i}var n=t.prototype;return n.Pj=function(){var t=this;return ut((function(){var n;return st(this,(function(i){switch(i.label){case 0:return[4,t.Rj.createMediaKeys()];case 1:return n=i.sent(),[2,new kf(n,t.Fw,t.zj)]}}))}))()},n.Bj=function(){return this.zj},Nt(t,[{key:"Qw",get:function(){return this.Rj.keySystem}}]),t}();function Of(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Nf(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,Xj:e.Xj},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter((function(t){return Boolean(t.contentType)}));s.length&&(o.audioCapabilities=s.filter((function(e){return Pf(t,n,i,e)})),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter((function(t){return Boolean(t.contentType)}));f.length&&(o.videoCapabilities=f.filter((function(e){return Pf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Pf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!St(n,e.encryptionScheme))&&(!e.robustness&&t(i,Of(e.contentType))))}function Af(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Df(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 Cf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(xf))||!(!t.videoCapabilities||!t.videoCapabilities.some(xf))}function xf(t){return!t.robustness}function Bf(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(Po({},r,{robustness:n}))}return i}var Mf=function(){function t(){}return t.prototype.Yj=function(t,n){return ut((function(){var i,e,r,o,u,s,f;return st(this,(function(h){switch(h.label){case 0:for(n=n.filter((function(t){return!t.Xj})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Df(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Df(e.videoCapabilities));if(t!==Mo||!n.some(Cf))return[3,4];r=n.map((function(t){return function(t,n){return Po({},t,{videoCapabilities:t.videoCapabilities?Bf(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Bf(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,c.requestMediaKeySystemAccess(t,r)];case 2:return o=h.sent(),u=o.getConfiguration(),[2,new Rf(o,t,u)];case 3:return h.sent(),[3,4];case 4:return[4,c.requestMediaKeySystemAccess(t,n)];case 5:return s=h.sent(),f=s.getConfiguration(),[2,new Rf(s,t,f)]}}))}))()},t.Zj=function(){return void 0!==c&&"function"==typeof c.requestMediaKeySystemAccess},t}(),Uf=function(t){function n(n,i){var e;return(e=t.call(this)||this).eO=n,e.sO=i,e.bj=!1,e.hO=void 0,e.tO=void 0,e.qj=void 0,e.Lj=function(){e.bj=!0,e.Kj.JL(void 0),e.qj&&(e.qj.removeEventListener("mskeyclose",e.Lj),e.qj.removeEventListener("mskeymessage",e.nO),e.qj.removeEventListener("mskeyerror",e.Ss),e.qj.removeEventListener("mskeyadded",e.rO))},e.nO=function(t){e.tO&&(e.tO.JL(void 0),e.tO=void 0),e.yo(new tu(e,"license-request",wi(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.qj&&e.qj.error;if(t){var n=new su("Unknown CDM error",t.code,t.systemCode);if(e.tO)e.tO.$L(n),e.tO=void 0;else if(e.hO)e.hO.$L(n),e.hO=void 0;else switch(n.sx){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.oO("output-not-allowed");break;default:e.oO("internal-error")}}},e.rO=function(){e.tO&&(e.oO("usable"),e.tO.JL(void 0),e.tO=void 0),e.hO&&(e.oO("usable"),e.hO.JL(void 0),e.hO=void 0)},e.Kj=new ru,e.Jj=new eu,e}Dt(n,t);var i=n.prototype;return i.Sj=function(t,n,i){var e=this;return ut((function(){return st(this,(function(t){switch(t.label){case 0:return e.$j(),e.tO=new ru,e.xj(li(n),i),[4,e.tO.ix];case 1:return t.sent(),[2]}}))}))()},i.xj=function(t,n){if(!t)throw new b("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.iO;return(i=n?this.eO.createSession(this.sO,t,e):this.eO.createSession(this.sO,t)).addEventListener("mskeyclose",this.Lj),i.addEventListener("mskeymessage",this.nO),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.rO),this.qj=i,this.oO("status-pending"),i},i.$n=function(t){var n=this;return ut((function(){return st(this,(function(t){return n.$j(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return ut((function(){var i;return st(this,(function(e){switch(e.label){case 0:if(n.hO=new ru,n.$j(),!n.qj)return[2,Z.resolve()];if(0===(i=li(t)).byteLength)throw new b("Cannot call update with an empty response.");return n.qj.update(i),[4,n.hO.ix];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.bj&&this.qj&&(this.bj=!0,this.qj.close()),this.Kj.ix},i.IS=function(){var t=this;return ut((function(){return st(this,(function(n){return t.$j(),[2]}))}))()},i.$j=function(){if(this.bj)throw new b("Already closing or closed.")},i.oO=function(t){this.Jj.KL(),this.Jj.ZL(iu,t),this.yo(new Qo(this.Jj))},Nt(n,[{key:"Mj",get:function(){return this.qj&&this.qj.sessionId||""}},{key:"pj",get:function(){return NaN}},{key:"wj",get:function(){return this.Kj.ix}},{key:"zL",get:function(){return this.Jj}}]),n}(_i),Lf=function(){function t(t,n,i){this.eO=t,this.Qw=n,this.sd=i;var e=Af(i)||"video/mp4";this.sO=Of(e)}var n=t.prototype;return n.xj=function(t){var n=this;return ut((function(){return st(this,(function(t){return[2,new Uf(n.eO,n.sO)]}))}))()},n.jj=function(t){return Z.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.eO),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.eO):t.addEventListener("loadedmetadata",i),Z.resolve()},n.Oj=function(t){return Z.resolve()},n.tr=function(){return Z.resolve()},t}(),Ff=function(){function t(t,n){this.Fw=t,this.aO=n}var n=t.prototype;return n.Bj=function(){return this.aO},n.Pj=function(){var t=new eo.MSMediaKeys(this.Fw);return Z.resolve(new Lf(t,this.Fw,this.aO))},Nt(t,[{key:"Qw",get:function(){return this.Fw}}]),t}(),zf=function(){function t(){}return t.prototype.Yj=function(t,n){try{return Z.resolve(function(t,n){if(!Wf())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Nf(qf,Zo,t,e);if(r)return new Ff(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.Zj=function(){return Wf()},t}();function Wf(){return void 0!==eo.MSMediaKeys&&"function"==typeof eo.MSMediaKeys.isTypeSupported}function qf(t,n){return eo.MSMediaKeys.isTypeSupported(t,n)}var Hf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).dO=n,r.sO=i,r.lO=e,r.Kj=new ru,r._O=void 0,r.Jj=new eu,r.uO=void 0,r.fO=new ru,r.Ss=function(){var t=r.uO&&r.uO.error;if(t){var n=new su("Unknown CDM error",t.code,t.systemCode);r._O?(r._O.$L(n),r._O=void 0):n.sx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.oO("output-not-allowed"):r.oO("internal-error"),r.yo(new nu)}},r.nO=function(t){r.yo(new tu(r,"license-request",wi(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.rO=function(){r._O&&(r._O.JL(void 0),r._O=void 0),r.oO("usable")},r}Dt(n,t);var i=n.prototype;return i.Sj=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.cO;if(!e)throw new b("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=ci(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new gi;return si(s,f,r,!0),fi(s,f,e,!0),si(s,f,o,!0),fi(s,f,n,!0),si(s,f,i.byteLength,!0),function(t,n,i){di(t).set(di(i),n.Lu),n.ep(i.byteLength)}(s,f,i),new S(u)}(li(n),e,this.lO);return this.uO=this.dO.createSession(this.sO,r),this.uO.addEventListener("webkitkeymessage",this.nO,!1),this.uO.addEventListener("webkitkeyadded",this.rO,!1),this.uO.addEventListener("webkitkeyerror",this.Ss,!1),this.oO("status-pending"),this.fO.JL(this.uO),this.fO=new ru,Z.resolve()},i.$n=function(t){return Z.resolve(!0)},i.Yn=function(t){var n=this;return ut((function(){var i,e;return st(this,(function(r){switch(r.label){case 0:if(0===(i=li(t)).byteLength)throw new b("Cannot call update with an empty response.");return n._O=new ru,(e=n.uO)?[3,2]:[4,n.fO.ix];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n._O.ix];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.uO;return n&&(n.removeEventListener("webkitkeymessage",this.nO,!1),n.removeEventListener("webkitkeyadded",this.rO,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.fO.i_(),null==(t=this._O)||t.i_(),this.Kj.JL(void 0),this.Kj.ix},i.IS=function(){return Z.resolve(void 0)},i.oO=function(t){this.Jj.KL(),this.Jj.ZL(iu,t),this.yo(new Qo(this.Jj))},Nt(n,[{key:"Mj",get:function(){return this.uO?this.uO.sessionId:""}},{key:"pj",get:function(){return NaN}},{key:"wj",get:function(){return this.Kj.ix}},{key:"zL",get:function(){return this.Jj}}]),n}(_i);var Vf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Xf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=m.floor(n/1e3);if(i in t)return i;throw new b("Invalid error code: "+n)}}(Xf||(Xf={}));var jf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Xf.fromCode(this.code)}}]),n}(Jt),Yf=function(){function t(t,n,i){this.dO=t,this.Qw=n,this.sd=i,this.lO=void 0;var e=Af(i)||"video/mp4";this.sO=Of(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.dO},n.xj=function(t){var n=this;return ut((function(){return st(this,(function(t){if(!n.lO)throw new jf(Vf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Hf(n.dO,n.sO,n.lO)]}))}))()},n.jj=function(t){return this.lO=li(t),Z.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.dO),Z.resolve()},n.Oj=function(t){return t.webkitSetMediaKeys(null),Z.resolve()},n.tr=function(){return Z.resolve()},t}(),Kf=function(){function t(t,n){this.Fw=t,this.aO=n}var n=t.prototype;return n.Bj=function(){return this.aO},n.Pj=function(){var t=new eo.WebKitMediaKeys(this.Fw);return Z.resolve(new Yf(t,this.Fw,this.aO))},Nt(t,[{key:"Qw",get:function(){return this.Fw}}]),t}(),Gf=function(){function t(){}return t.prototype.Yj=function(t,n){try{return Z.resolve(function(t,n){if(t!==Wo)throw new b(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!$f())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Nf(Zf,Jo,t,e);if(r)return new Kf(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.Zj=function(){return $f()},t}();function $f(){return void 0!==eo.WebKitMediaKeys&&"function"==typeof eo.WebKitMediaKeys.isTypeSupported}function Zf(t,n){return eo.WebKitMediaKeys.isTypeSupported(t,n)}var Jf,Qf=function(){function t(t){this.gO=t}return t.prototype.Yj=function(t,n){var i=this;return ut((function(){var e,r,o;return st(this,(function(u){switch(u.label){case 0:e=0,r=i.gO,u.label=1;case 1:if(!(e<r.length))return[3,6];o=r[e],u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o.Yj(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new b("Unsupported key system configuration for "+t)}}))}))()},t}(),th=new sn,nh=function(t){function n(n){var i;return(i=t.call(this)||this).Fw=n,i.tO=void 0,i._O=void 0,i.Ax=!1,i.CO=void 0,i.EO=void 0,i.Kj=new ru,i.xO="",i.kO=new ru,i.LO=new eu,i}Dt(n,t);var i=n.prototype;return i.TO=function(){this._O&&(this.oO("usable"),this._O.JL(void 0),this._O=void 0)},i.SO=function(t){var n=new su("Unknown CDM error",t.errorCode,t.systemCode);this._O?(this._O.$L(n),this._O=void 0):this.tO?(this.tO.$L(n),this.tO=void 0):n.sx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.oO("output-restricted"):1===n.nx?this.oO("expired"):this.oO("internal-error")},i.IO=function(t){0!==t.message.byteLength?(this.tO&&(this.tO.JL(void 0),this.tO=void 0),this.yo(new tu(this,"license-request",ou(this.Fw,wi(t.message).buffer),t.defaultURL||void 0))):this.tO&&(this.tO.$L("Empty key message"),this.tO=void 0)},i.DO=function(t){this.EO||(this.EO=t,this.kO.JL(t))},i.Ws=function(){var t=this;return ut((function(){return st(this,(function(n){return t.throwIfClosed(),t._O&&(t._O.$L(void 0),t._O=void 0),t.Ax=!0,t.Kj.JL(void 0),[2]}))}))()},i.Sj=function(t,n){var i=this;return ut((function(){var t;return st(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.tO=new ru,i.CO=li(n),(t=i.EO)?[3,2]:[4,i.kO.ix];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.Fw,i.CO),[4,i.tO.ix];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return ut((function(){return st(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.IS=function(){var t=this;return ut((function(){return st(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return ut((function(){return st(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n._O=new ru,Yi.Yk||Yi.Bk?[2,th.vO(ut((function(){return st(this,(function(i){switch(i.label){case 0:return[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))})))]:[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))}))()},i.doUpdate=function(t){var n=this;return ut((function(){var i;return st(this,(function(e){switch(e.label){case 0:return void 0===n._O?[2]:(i=n.EO)?[3,2]:[4,n.kO.ix];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.Fw,li(t),n.CO,n.Mj),[4,n._O.ix];case 3:return e.sent(),Yi.Bk?[4,un(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.Ax)throw new b("Already closing or closed.")},i.oO=function(t){this.LO.KL(),this.LO.ZL(iu,t),this.yo(new Qo(this.LO))},i.jO=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:return(i=t.EO)?[3,2]:[4,t.kO.ix];case 1:i=e.sent(),e.label=2;case 2:if(!(n=i).webkitCancelKeyRequest)return[3,7];e.label=3;case 3:return e.trys.push([3,4,5,7]),n.webkitCancelKeyRequest(t.Fw,t.xO),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,un(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},Nt(n,[{key:"zL",get:function(){return this.LO}},{key:"Mj",get:function(){return this.xO},set:function(t){this.xO=t}},{key:"wj",get:function(){return this.Kj.ix}},{key:"pj",get:function(){return NaN}}]),n}(_i),ih=function(){function t(t,n){var i=this;this.Qw=t,this.sd=n,this.EO=void 0,this.PO=Bt(),this.zO=[],this.rO=function(t){var n=i.BO(t.sessionId);n&&n.TO()},this.OO=function(t){var n=i.BO(t.sessionId);n&&n.SO(t)},this.RO=function(t){var n=i.BO(t.sessionId);n&&n.IO(t)}}var n=t.prototype;return n.bn=function(t){return this.EO=t,this.EO.addEventListener("webkitkeyadded",this.rO),this.EO.addEventListener("webkitkeyerror",this.OO),this.EO.addEventListener("webkitkeymessage",this.RO),this.PO.forEach((function(n,i){return n.DO(t)})),this.zO.forEach((function(n){return n.DO(t)})),Z.resolve()},n.Oj=function(t){return t.removeEventListener("webkitkeyadded",this.rO),t.removeEventListener("webkitkeyerror",this.OO),t.removeEventListener("webkitkeymessage",this.RO),this.EO=void 0,Z.resolve()},n.tr=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:n=t.PO.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].jO()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.PO.clear(),[2]}}))}))()},n.xj=function(t,n,i){var e=this;return ut((function(){var t;return st(this,(function(n){return t=new nh(e.Qw),e.EO&&t.DO(e.EO),e.zO.push(t),[2,t]}))}))()},n.jj=function(t){return Z.resolve(!1)},n.BO=function(t){if(t){var n=this.PO.get(t);return n||((n=this.zO.shift())?(n.Mj=t,this.PO.set(t,n),n):void 0)}},t}(),eh=function(){function t(t,n){this.Qw=t,this.UO=n}var n=t.prototype;return n.Pj=function(){return Z.resolve(new ih(this.Qw,this.UO))},n.Bj=function(){return this.UO},t}(),rh=function(){function t(){}return t.prototype.Yj=function(t,n){try{return Z.resolve(function(t,n){if(!rh.Zj())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Nf(oh,Zo,t,e);if(r)return new eh(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.Zj=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function oh(t,n){var i=fo();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function uh(){return Jf||(Jf=function(){var t=[];Gf.Zj()&&t.push(new Gf);Mf.Zj()&&t.push(new Mf);zf.Zj()&&t.push(new zf);rh.Zj()&&t.push(new rh);return new Qf(t)}()),Jf}var sh=function(){function t(){this.AF=Bt()}var n=t.prototype;return n.KL=function(t){this.AF.delete(t)},n.yF=function(){this.AF.clear()},n.XL=function(t){return this.AF.get(t)},n.ZL=function(t,n){this.AF.set(t,n)},t}(),fh=function(){function t(){}return t.MF=function(){return t.xL||(t.xL=hh.Zj()?new hh:new sh),t.xL},t.KL=function(n){t.MF().KL(n)},t.yF=function(){t.MF().yF()},t.XL=function(n){return t.MF().XL(n)},t.ZL=function(n,i){t.MF().ZL(n,i)},t}();fh.xL=void 0;var hh=function(t){function n(){return t.apply(this,arguments)||this}Dt(n,t);var i=n.prototype;return i.KL=function(t){self.sessionStorage.removeItem(t)},i.yF=function(){self.sessionStorage.clear()},i.XL=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.ZL=function(t,n){self.sessionStorage.setItem(t,n)},n.Zj=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(fh);var ch=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r=0;r<n.length;r++){var o=n[r];e.append(o)}return e.getBlob(i&&i.type||"")}}(n)}();function ah(t,n,i){var e=ch([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=h.createElement("a");u.href=r,u.download=o,h.body.appendChild(u),u.click(),h.body.removeChild(u),URL.revokeObjectURL(r)}var vh=function(t){return t.XD="arraybuffer",t.ZD="json",t.qD="stream",t.RM="text",t}({}),dh=function(){function t(n){var i=this;this.$d={},n instanceof t?n.asList().forEach((function(t){var n=Ct(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Ct(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&g.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=lh(i),e=wh(e);var r=i.toLowerCase();if(this.$d.hasOwnProperty(r)){var o=this.$d[r],u=o[1];o[1]=u?u+", "+e:e}else this.$d[r]=[i,e]},n.delete=function(t){var n=lh(t).toLowerCase();delete this.$d[n]},n.get=function(t){var n=lh(t).toLowerCase();return this.$d.hasOwnProperty(n)?this.$d[n][1]:null},n.has=function(t){var n=lh(t).toLowerCase();return this.$d.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=lh(i)).toLowerCase();this.$d[e]=[i,wh(n)]},n.forEach=function(t,n){for(var i in this.$d)this.$d.hasOwnProperty(i)&&t.call(n,this.$d[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.$d)if(this.$d.hasOwnProperty(n)){var i=Ct(this.$d[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.KD=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.JD=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.$D=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function lh(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new b("Invalid character in header field name");return n}function wh(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var bh="function"==typeof n&&"symbol"==typeof i?n:function(t){return"Symbol("+t+")"};function gh(){}var mh=Number.isNaN||function(t){return t!=t},ph=gh;function yh(t){return"object"==typeof t&&null!==t||"function"==typeof t}function _h(t){return t.slice()}function Sh(t,n,i,e,r){new S(t).set(new S(i,e,r),n)}function Th(t){return!1!==function(t){if("number"!=typeof t)return!1;if(mh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Eh(t,n,i){if("function"!=typeof t)throw new b("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Ih(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new b(r+" is not a method");switch(i){case 0:return function(){return Rh(r,t,e)};case 1:return function(n){var i=[n].concat(e);return Rh(r,t,i)}}}return function(){return Bh(void 0)}}function kh(t,n,i){var e=t[n];if(void 0!==e)return Eh(e,t,i)}function Rh(t,n,i){try{return Bh(Eh(t,n,i))}catch(t){return Mh(t)}}function Oh(t){if(t=Number(t),mh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function Nh(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new b("size property of a queuing strategy must be a function");return function(n){return t(n)}}var Ph=Z,Ah=Z.prototype.then,Dh=Z.resolve.bind(Ph),Ch=Z.reject.bind(Ph);function xh(t){return new Ph(t)}function Bh(t){return Dh(t)}function Mh(t){return Ch(t)}function Uh(t,n,i){return Ah.call(t,n,i)}function Lh(t,n,i){Uh(Uh(t,n,i),void 0,ph)}function Fh(t,n){Lh(t,n)}function zh(t,n){Lh(t,void 0,n)}function Wh(t,n,i){return Uh(t,n,i)}function qh(t){Uh(t,void 0,ph)}var Hh=function(){function t(){this.pV=0,this.AV=0,this.yV={MV:[],bV:void 0},this.TV=this.yV,this.pV=0,this.AV=0}return g.defineProperty(t.prototype,"length",{get:function(){return this.AV},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.TV,i=n;16383===n.MV.length&&(i={MV:[],bV:void 0}),n.MV.push(t),i!==n&&(this.TV=i,n.bV=i),++this.AV},t.prototype.shift=function(){var t=this.yV,n=t,i=this.pV,e=i+1,r=t.MV,o=r[i];return 16384===e&&(n=t.bV,e=0),--this.AV,this.pV=e,t!==n&&(this.yV=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.pV,i=this.yV,e=i.MV;!(n===e.length&&void 0===i.bV||n===e.length&&(n=0,0===(e=(i=i.bV).MV).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.yV,n=this.pV;return t.MV[n]},t}();function Vh(t,n,i){var e=null;!0===i&&(e=g.prototype);var r=g.create(e);return r.value=t,r.done=n,r}function Xh(t,n){t.SV=!0,t.NV=n,n.DV=t,"readable"===n.wa?Gh(t):"closed"===n.wa?function(t){Gh(t),Jh(t)}(t):$h(t,n.EV)}function jh(t,n){return nv(t.NV,n)}function Yh(t){"readable"===t.NV.wa?Zh(t,new b("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){$h(t,n)}(t,new b("Reader was released and can no longer be used to monitor the stream's closedness")),t.NV.DV=void 0,t.NV=void 0}function Kh(t){return new b("Cannot "+t+" a stream using a released reader")}function Gh(t){t.mj=xh((function(n,i){t.kV=n,t.LV=i}))}function $h(t,n){Gh(t),Zh(t,n)}function Zh(t,n){qh(t.mj),t.LV(n),t.kV=void 0,t.LV=void 0}function Jh(t){t.kV(void 0),t.kV=void 0,t.LV=void 0}var Qh=bh("[[CancelSteps]]"),tc=bh("[[PullSteps]]");function nc(t,n){void 0===n&&(n=!1);var i=new fc(t);return i.SV=n,i}function ic(t){var n=xh((function(n,i){var e={Hd:n,tx:i};t.DV.xV.push(e)}));return n}function ec(t,n,i){var e=t.DV;e.xV.shift().Hd(Vh(n,i,e.SV))}function rc(t){return t.DV.xV.length}function oc(t){var n=t.DV;return void 0!==n&&!!hc(n)}var uc,sc,fc=function(){function t(t){if(!1===Qa(t))throw new b("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===tv(t))throw new b("This stream has already been locked for exclusive reading by another reader");Xh(this,t),this.xV=new Hh}return g.defineProperty(t.prototype,"closed",{get:function(){return hc(this)?this.mj:Mh(ac("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return hc(this)?void 0===this.NV?Mh(Kh("cancel")):jh(this,t):Mh(ac("cancel"))},t.prototype.read=function(){return hc(this)?void 0===this.NV?Mh(Kh("read from")):cc(this):Mh(ac("read"))},t.prototype.releaseLock=function(){if(!hc(this))throw ac("releaseLock");if(void 0!==this.NV){if(this.xV.length>0)throw new b("Tried to release a reader lock when that reader has pending read() calls un-settled");Yh(this)}},t}();function hc(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"xV")}function cc(t){var n=t.NV;return n.CV=!0,"closed"===n.wa?Bh(Vh(void 0,!0,t.SV)):"errored"===n.wa?Mh(n.EV):n.jV[tc]()}function ac(t){return new b("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof bh.asyncIterator&&((uc={})[bh.asyncIterator]=function(){return this},sc=uc,g.defineProperty(sc,bh.asyncIterator,{enumerable:!1}));var vc={next:function(){if(!1===dc(this))return Mh(lc("next"));var t=this.OV;return void 0===t.NV?Mh(Kh("iterate")):Wh(cc(t),(function(n){var i=n.done;return i&&Yh(t),Vh(n.value,i,!0)}))},return:function(t){if(!1===dc(this))return Mh(lc("next"));var n=this.OV;if(void 0===n.NV)return Mh(Kh("finish iterating"));if(n.xV.length>0)return Mh(new b("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.RV){var i=jh(n,t);return Yh(n),Wh(i,(function(){return Vh(t,!0,!0)}))}return Yh(n),Bh(Vh(t,!0,!0))}};function dc(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"OV")}function lc(t){return new b("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function wc(t){var n=t.PV.shift();return t.zV-=n.size,t.zV<0&&(t.zV=0),n.value}function bc(t,n,i){if(!Th(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.PV.push({value:n,size:i}),t.zV+=i}function gc(t){t.PV=new Hh,t.zV=0}void 0!==sc&&g.setPrototypeOf(vc,sc),g.defineProperty(vc,"next",{enumerable:!1}),g.defineProperty(vc,"return",{enumerable:!1});var mc=bh("[[AbortSteps]]"),pc=bh("[[ErrorSteps]]"),yc=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Sc(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=Nh(i);void 0===e&&(e=1),function(t,n,i,e){var r=g.create(zc.prototype);function o(){return kh(n,"start",[r])}var u=Ih(n,"write",1,[r]),s=Ih(n,"close",0,[]),f=Ih(n,"abort",1,[]);Wc(t,r,o,u,s,f,i,e)}(this,t,e=Oh(e),r)}return g.defineProperty(t.prototype,"locked",{get:function(){if(!1===Tc(this))throw Kc("locked");return Ec(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Tc(this)?Mh(Kc("abort")):!0===Ec(this)?Mh(new b("Cannot abort a stream that already has a writer")):Ic(this,t)},t.prototype.close=function(){return!1===Tc(this)?Mh(Kc("close")):!0===Ec(this)?Mh(new b("Cannot close a stream that already has a writer")):!0===Pc(this)?Mh(new b("Cannot close an already-closing stream")):kc(this)},t.prototype.getWriter=function(){if(!1===Tc(this))throw Kc("getWriter");return _c(this)},t}();function _c(t){return new Cc(t)}function Sc(t){t.wa="writable",t.EV=void 0,t.Tx=void 0,t.BV=void 0,t.QV=new Hh,t.FV=void 0,t.YV=void 0,t.GV=void 0,t.VV=void 0,t.WV=!1}function Tc(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"BV")}function Ec(t){return void 0!==t.Tx}function Ic(t,n){var i=t.wa;if("closed"===i||"errored"===i)return Bh(void 0);if(void 0!==t.VV)return t.VV.HV;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=xh((function(i,r){t.VV={HV:void 0,Hd:i,tx:r,XV:n,ZV:e}}));return t.VV.HV=r,!1===e&&Oc(t,n),r}function kc(t){var n=t.wa;if("closed"===n||"errored"===n)return Mh(new b("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=xh((function(n,i){var e={Hd:n,tx:i};t.YV=e})),e=t.Tx;return void 0!==e&&!0===t.WV&&"writable"===n&&oa(e),function(t){bc(t,"close",0),Vc(t)}(t.BV),i}function Rc(t,n){"writable"!==t.wa?Nc(t):Oc(t,n)}function Oc(t,n){var i=t.BV;t.wa="erroring",t.EV=n;var e=t.Tx;void 0!==e&&Uc(e,n),!1===function(t){if(void 0===t.FV&&void 0===t.GV)return!1;return!0}(t)&&!0===i.qV&&Nc(t)}function Nc(t){t.wa="errored",t.BV[pc]();var n=t.EV;if(t.QV.forEach((function(t){t.tx(n)})),t.QV=new Hh,void 0!==t.VV){var i=t.VV;if(t.VV=void 0,!0===i.ZV)return i.tx(n),void Ac(t);Lh(t.BV[mc](i.XV),(function(){i.Hd(),Ac(t)}),(function(n){i.tx(n),Ac(t)}))}else Ac(t)}function Pc(t){return void 0!==t.YV||void 0!==t.GV}function Ac(t){void 0!==t.YV&&(t.YV.tx(t.EV),t.YV=void 0);var n=t.Tx;void 0!==n&&Qc(n,t.EV)}function Dc(t,n){var i=t.Tx;void 0!==i&&n!==t.WV&&(!0===n?function(t){na(t)}(i):oa(i)),t.WV=n}var Cc=function(){function t(t){if(!1===Tc(t))throw new b("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===Ec(t))throw new b("This stream has already been locked for exclusive writing by another writer");this.KV=t,t.Tx=this;var n=t.wa;if("writable"===n)!1===Pc(t)&&!0===t.WV?na(this):ea(this),Zc(this);else if("erroring"===n)ia(this,t.EV),Zc(this);else if("closed"===n)ea(this),function(t){Zc(t),ta(t)}(this);else{var i=t.EV;ia(this,i),Jc(this,i)}}return g.defineProperty(t.prototype,"closed",{get:function(){return!1===xc(this)?Mh(Gc("closed")):this.mj},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===xc(this))throw Gc("desiredSize");if(void 0===this.KV)throw $c("desiredSize");return function(t){var n=t.KV,i=n.wa;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Hc(n.BV)}(this)},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"ready",{get:function(){return!1===xc(this)?Mh(Gc("ready")):this.JV},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===xc(this)?Mh(Gc("abort")):void 0===this.KV?Mh($c("abort")):function(t,n){var i=t.KV;return Ic(i,n)}(this,t)},t.prototype.close=function(){if(!1===xc(this))return Mh(Gc("close"));var t=this.KV;return void 0===t?Mh($c("close")):!0===Pc(t)?Mh(new b("Cannot close an already-closing stream")):Bc(this)},t.prototype.releaseLock=function(){if(!1===xc(this))throw Gc("releaseLock");void 0!==this.KV&&Lc(this)},t.prototype.write=function(t){return!1===xc(this)?Mh(Gc("write")):void 0===this.KV?Mh($c("write to")):Fc(this,t)},t}();function xc(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"KV")}function Bc(t){return kc(t.KV)}function Mc(t,n){"pending"===t.$V?Qc(t,n):function(t,n){Jc(t,n)}(t,n)}function Uc(t,n){"pending"===t.tW?ra(t,n):function(t,n){ia(t,n)}(t,n)}function Lc(t){var n=t.KV,i=new b("Writer was released and can no longer be used to monitor the stream's closedness");Uc(t,i),Mc(t,i),n.Tx=void 0,t.KV=void 0}function Fc(t,n){var i=t.KV,e=i.BV,r=function(t,n){try{return t.iW(n)}catch(n){return Xc(t,n),1}}(e,n);if(i!==t.KV)return Mh($c("write to"));var o=i.wa;if("errored"===o)return Mh(i.EV);if(!0===Pc(i)||"closed"===o)return Mh(new b("The stream is closing or closed and cannot be written to"));if("erroring"===o)return Mh(i.EV);var u=function(t){var n=xh((function(n,i){var e={Hd:n,tx:i};t.QV.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{bc(t,e,i)}catch(n){return void Xc(t,n)}var r=t.eW;if(!1===Pc(r)&&"writable"===r.wa){Dc(r,jc(t))}Vc(t)}(e,n,r),u}var zc=function(){function t(){throw new b("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!yh(t))return!1;if(!g.prototype.hasOwnProperty.call(t,"eW"))return!1;return!0}(this))throw new b("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.eW.wa&&Yc(this,t)},t.prototype[mc]=function(t){var n=this.sW(t);return qc(this),n},t.prototype[pc]=function(){gc(this)},t}();function Wc(t,n,i,e,r,o,u,s){n.eW=t,t.BV=n,n.PV=void 0,n.zV=void 0,gc(n),n.qV=!1,n.iW=s,n.nW=u,n.rW=e,n.oW=r,n.sW=o;var f=jc(n);Dc(t,f),Lh(Bh(i()),(function(){n.qV=!0,Vc(n)}),(function(i){n.qV=!0,Rc(t,i)}))}function qc(t){t.rW=void 0,t.oW=void 0,t.sW=void 0,t.iW=void 0}function Hc(t){return t.nW-t.zV}function Vc(t){var n=t.eW;if(!1!==t.qV&&void 0===n.FV)if("erroring"!==n.wa){if(0!==t.PV.length){var i=function(t){return t.PV.peek().value}(t);"close"===i?function(t){var n=t.eW;(function(t){t.GV=t.YV,t.YV=void 0})(n),wc(t);var i=t.oW();qc(t),Lh(i,(function(){!function(t){t.GV.Hd(void 0),t.GV=void 0,"erroring"===t.wa&&(t.EV=void 0,void 0!==t.VV&&(t.VV.Hd(),t.VV=void 0)),t.wa="closed";var n=t.Tx;void 0!==n&&ta(n)}(n)}),(function(t){!function(t,n){t.GV.tx(n),t.GV=void 0,void 0!==t.VV&&(t.VV.tx(n),t.VV=void 0),Rc(t,n)}(n,t)}))}(t):function(t,n){var i=t.eW;!function(t){t.FV=t.QV.shift()}(i);var e=t.rW(n);Lh(e,(function(){!function(t){t.FV.Hd(void 0),t.FV=void 0}(i);var n=i.wa;if(wc(t),!1===Pc(i)&&"writable"===n){var e=jc(t);Dc(i,e)}Vc(t)}),(function(n){"writable"===i.wa&&qc(t),function(t,n){t.FV.tx(n),t.FV=void 0,Rc(t,n)}(i,n)}))}(t,i.chunk)}}else Nc(n)}function Xc(t,n){"writable"===t.eW.wa&&Yc(t,n)}function jc(t){return Hc(t)<=0}function Yc(t,n){var i=t.eW;qc(t),Oc(i,n)}function Kc(t){return new b("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Gc(t){return new b("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function $c(t){return new b("Cannot "+t+" a stream using a released writer")}function Zc(t){t.mj=xh((function(n,i){t.kV=n,t.LV=i,t.$V="pending"}))}function Jc(t,n){Zc(t),Qc(t,n)}function Qc(t,n){qh(t.mj),t.LV(n),t.kV=void 0,t.LV=void 0,t.$V="rejected"}function ta(t){t.kV(void 0),t.kV=void 0,t.LV=void 0,t.$V="resolved"}function na(t){t.JV=xh((function(n,i){t.hW=n,t.aW=i})),t.tW="pending"}function ia(t,n){na(t),ra(t,n)}function ea(t){na(t),oa(t)}function ra(t,n){qh(t.JV),t.aW(n),t.hW=void 0,t.aW=void 0,t.tW="rejected"}function oa(t){t.hW(void 0),t.hW=void 0,t.aW=void 0,t.tW="fulfilled"}function ua(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var sa="undefined"!=typeof DOMException?DOMException:void 0;var fa=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(sa)?sa:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",w.captureStackTrace&&w.captureStackTrace(this,this.constructor)};return t.prototype=g.create(w.prototype),g.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function ha(t,n,i,e,r,o){var u=nc(t),s=_c(n);t.CV=!0;var f=!1,h=Bh(void 0);return xh((function(c,a){var v,d,l,w;if(void 0!==o){if(v=function(){var i=new fa("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.wa?Ic(n,i):Bh(void 0)})),!1===r&&o.push((function(){return"readable"===t.wa?nv(t,i):Bh(void 0)})),y((function(){return Z.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void v();o.addEventListener("abort",v)}if(p(t,u.mj,(function(t){!1===e?y((function(){return Ic(n,t)}),!0,t):_(!0,t)})),p(n,s.mj,(function(n){!1===r?y((function(){return nv(t,n)}),!0,n):_(!0,n)})),d=t,l=u.mj,w=function(){!1===i?y((function(){return function(t){var n=t.KV,i=n.wa;return!0===Pc(n)||"closed"===i?Bh(void 0):"errored"===i?Mh(n.EV):Bc(t)}(s)})):_()},"closed"===d.wa?w():Fh(l,w),!0===Pc(n)||"closed"===n.wa){var g=new b("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return nv(t,g)}),!0,g):_(!0,g)}function m(){var t=h;return Uh(h,(function(){return t!==h?m():void 0}))}function p(t,n,i){"errored"===t.wa?i(t.EV):zh(n,i)}function y(t,i,e){function r(){Lh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.wa&&!1===Pc(n)?Fh(m(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.wa&&!1===Pc(n)?Fh(m(),(function(){return S(t,i)})):S(t,i))}function S(t,n){Lc(s),Yh(u),void 0!==o&&o.removeEventListener("abort",v),t?a(n):c(void 0)}qh(xh((function(t,n){!function i(e){e?t():Uh(!0===f?Bh(!0):Uh(s.JV,(function(){return Uh(cc(u),(function(t){return!0===t.done||(h=Uh(Fc(s,t.value),void 0,gh),!1)}))})),i,n)}(!1)})))}))}var ca=function(){function t(){throw new b}return g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===aa(this))throw _a("desiredSize");return ma(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===aa(this))throw _a("close");if(!1===pa(this))throw new b("The stream is not in a state that permits close");wa(this)},t.prototype.enqueue=function(t){if(!1===aa(this))throw _a("enqueue");if(!1===pa(this))throw new b("The stream is not in a state that permits enqueue");return ba(this,t)},t.prototype.error=function(t){if(!1===aa(this))throw _a("error");ga(this,t)},t.prototype[Qh]=function(t){gc(this);var n=this.uW(t);return la(this),n},t.prototype[tc]=function(){var t=this.cW;if(this.PV.length>0){var n=wc(this);return!0===this.lW&&0===this.PV.length?(la(this),iv(t)):va(this),Bh(Vh(n,!1,t.DV.SV))}var i=ic(t);return va(this),i},t}();function aa(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"cW")}function va(t){!1!==da(t)&&(!0!==t.dW?(t.dW=!0,Lh(t.fW(),(function(){t.dW=!1,!0===t._W&&(t._W=!1,va(t))}),(function(n){ga(t,n)}))):t._W=!0)}function da(t){var n=t.cW;return!1!==pa(t)&&(!1!==t.qV&&(!0===tv(n)&&rc(n)>0||ma(t)>0))}function la(t){t.fW=void 0,t.uW=void 0,t.iW=void 0}function wa(t){var n=t.cW;t.lW=!0,0===t.PV.length&&(la(t),iv(n))}function ba(t,n){var i=t.cW;if(!0===tv(i)&&rc(i)>0)ec(i,n,!1);else{var e=void 0;try{e=t.iW(n)}catch(n){throw ga(t,n),n}try{bc(t,n,e)}catch(n){throw ga(t,n),n}}va(t)}function ga(t,n){var i=t.cW;"readable"===i.wa&&(gc(t),la(t),ev(i,n))}function ma(t){var n=t.cW.wa;return"errored"===n?null:"closed"===n?0:t.nW-t.zV}function pa(t){var n=t.cW.wa;return!1===t.lW&&"readable"===n}function ya(t,n,i,e,r,o,u){n.cW=t,n.PV=void 0,n.zV=void 0,gc(n),n.qV=!1,n.lW=!1,n._W=!1,n.dW=!1,n.iW=u,n.nW=o,n.fW=e,n.uW=r,t.jV=n,Lh(Bh(i()),(function(){n.qV=!0,va(n)}),(function(t){ga(n,t)}))}function _a(t){return new b("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var Sa=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&m.floor(t)===t},Ta=function(){function t(){throw new b("ReadableStreamBYOBRequest cannot be used directly")}return g.defineProperty(t.prototype,"view",{get:function(){if(!1===ka(this))throw qa("view");return this.uD},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===ka(this))throw qa("respond");if(void 0===this.gW)throw new b("This BYOB request has been invalidated");this.uD.buffer,function(t,n){if(n=Number(n),!1===Th(n))throw new RangeError("bytesWritten must be a finite");Ma(t,n)}(this.gW,t)},t.prototype.respondWithNewView=function(t){if(!1===ka(this))throw qa("respond");if(void 0===this.gW)throw new b("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new b("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.vW.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Ma(t,n.byteLength)}(this.gW,t)},t}(),Ea=function(){function t(){throw new b("ReadableByteStreamController constructor cannot be used directly")}return g.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Ia(this))throw Ha("byobRequest");if(void 0===this.wW&&this.vW.length>0){var t=this.vW.peek(),n=new S(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=g.create(Ta.prototype);!function(t,n,i){t.gW=n,t.uD=i}(i,this,n),this.wW=i}return this.wW},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ia(this))throw Ha("desiredSize");return za(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Ia(this))throw Ha("close");if(!0===this.lW)throw new b("The stream has already been closed; do not close it again!");var t=this.mW.wa;if("readable"!==t)throw new b("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.mW;if(t.zV>0)return void(t.lW=!0);if(t.vW.length>0){if(t.vW.peek().bytesFilled>0){var i=new b("Insufficient bytes to fill elements in the given buffer");throw Fa(t,i),i}}La(t),iv(n)}(this)},t.prototype.enqueue=function(t){if(!1===Ia(this))throw Ha("enqueue");if(!0===this.lW)throw new b("stream is closed or draining");var n=this.mW.wa;if("readable"!==n)throw new b("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new b("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.mW,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===oc(i)){if(0===rc(i))Pa(t,u,r,o);else ec(i,new S(u,r,o),!1)}else!0===ja(i)?(Pa(t,u,r,o),Ba(t)):Pa(t,u,r,o);Ra(t)}(this,t)},t.prototype.error=function(t){if(!1===Ia(this))throw Ha("error");Fa(this,t)},t.prototype[Qh]=function(t){this.vW.length>0&&(this.vW.peek().bytesFilled=0);gc(this);var n=this.uW(t);return La(this),n},t.prototype[tc]=function(){var t=this.mW;if(this.zV>0){var n=this.PV.shift();this.zV-=n.byteLength,Ca(this);var i=void 0;try{i=new S(n.buffer,n.byteOffset,n.byteLength)}catch(t){return Mh(t)}return Bh(Vh(i,!1,t.DV.SV))}var e=this.pW;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return Mh(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:S,readerType:"default"};this.vW.push(o)}var u=ic(t);return Ra(this),u},t}();function Ia(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"mW")}function ka(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"gW")}function Ra(t){var n=function(t){var n=t.mW;if("readable"!==n.wa)return!1;if(!0===t.lW)return!1;if(!1===t.qV)return!1;if(!0===oc(n)&&rc(n)>0)return!0;if(!0===ja(n)&&Xa(n)>0)return!0;var i=za(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.dW?(t.dW=!0,Lh(t.fW(),(function(){t.dW=!1,!0===t._W&&(t._W=!1,Ra(t))}),(function(n){Fa(t,n)}))):t._W=!0)}function Oa(t,n){var i=!1;"closed"===t.wa&&(i=!0);var e=Na(n);"default"===n.readerType?ec(t,e,i):function(t,n,i){var e=t.DV,r=e.AW.shift();r.Hd(Vh(n,i,e.SV))}(t,e,i)}function Na(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function Pa(t,n,i,e){t.PV.push({buffer:n,byteOffset:i,byteLength:e}),t.zV+=e}function Aa(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=m.min(t.zV,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.PV;s>0;){var c=h.peek(),a=m.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;Sh(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.zV-=a,Da(t,a,n),s-=a}return f}function Da(t,n,i){xa(t),i.bytesFilled+=n}function Ca(t){0===t.zV&&!0===t.lW?(La(t),iv(t.mW)):Ra(t)}function xa(t){void 0!==t.wW&&(t.wW.gW=void 0,t.wW.uD=void 0,t.wW=void 0)}function Ba(t){for(;t.vW.length>0;){if(0===t.zV)return;var n=t.vW.peek();!0===Aa(t,n)&&(Ua(t),Oa(t.mW,n))}}function Ma(t,n){var i=t.vW.peek();if("closed"===t.mW.wa){if(0!==n)throw new b("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.mW;if(!0===ja(i))for(;Xa(i)>0;)Oa(i,Ua(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Da(t,n,i),!(i.bytesFilled<i.elementSize)){Ua(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);Pa(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,Oa(t.mW,i),Ba(t)}}(t,n,i);Ra(t)}function Ua(t){var n=t.vW.shift();return xa(t),n}function La(t){t.fW=void 0,t.uW=void 0}function Fa(t,n){var i=t.mW;"readable"===i.wa&&(!function(t){xa(t),t.vW=new Hh}(t),gc(t),La(t),ev(i,n))}function za(t){var n=t.mW.wa;return"errored"===n?null:"closed"===n?0:t.nW-t.zV}function Wa(t,n,i){var e=g.create(Ea.prototype);var r=Ih(n,"pull",0,[e]),o=Ih(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===Sa(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.mW=t,n._W=!1,n.dW=!1,n.wW=void 0,n.PV=n.zV=void 0,gc(n),n.lW=!1,n.qV=!1,n.nW=Oh(o),n.fW=e,n.uW=r,n.pW=u,n.vW=new Hh,t.jV=n,Lh(Bh(i()),(function(){n.qV=!0,Ra(n)}),(function(t){Fa(n,t)}))}(t,e,(function(){return kh(n,"start",[e])}),r,o,i,u)}function qa(t){return new b("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Ha(t){return new b("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Va(t){var n=xh((function(n,i){var e={Hd:n,tx:i};t.DV.AW.push(e)}));return n}function Xa(t){return t.DV.AW.length}function ja(t){var n=t.DV;return void 0!==n&&!!Ka(n)}var Ya=function(){function t(t){if(!Qa(t))throw new b("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Ia(t.jV))throw new b("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(tv(t))throw new b("This stream has already been locked for exclusive reading by another reader");Xh(this,t),this.AW=new Hh}return g.defineProperty(t.prototype,"closed",{get:function(){return Ka(this)?this.mj:Mh(Ga("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Ka(this)?void 0===this.NV?Mh(Kh("cancel")):jh(this,t):Mh(Ga("cancel"))},t.prototype.read=function(t){return Ka(this)?void 0===this.NV?Mh(Kh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?Mh(new b("view must have non-zero byteLength")):function(t,n){var i=t.NV;if(i.CV=!0,"errored"===i.wa)return Mh(i.EV);return function(t,n){var i=t.mW,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.vW.length>0)return t.vW.push(o),Va(i);if("closed"===i.wa)return Bh(Vh(new r(o.buffer,o.byteOffset,0),!0,i.DV.SV));if(t.zV>0){if(!0===Aa(t,o)){var u=Na(o);return Ca(t),Bh(Vh(u,!1,i.DV.SV))}if(!0===t.lW){var s=new b("Insufficient bytes to fill elements in the given buffer");return Fa(t,s),Mh(s)}}t.vW.push(o);var f=Va(i);return Ra(t),f}(i.jV,n)}(this,t)):Mh(new b("view must be an array buffer view")):Mh(Ga("read"))},t.prototype.releaseLock=function(){if(!Ka(this))throw Ga("releaseLock");if(void 0!==this.NV){if(this.AW.length>0)throw new b("Tried to release a reader lock when that reader has pending read() calls un-settled");Yh(this)}},t}();function Ka(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"AW")}function Ga(t){return new b("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var $a=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Ja(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Wa(this,t,e=Oh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=Nh(i);void 0===e&&(e=1),function(t,n,i,e){var r=g.create(ca.prototype),o=Ih(n,"pull",0,[r]),u=Ih(n,"cancel",1,[]);ya(t,r,(function(){return kh(n,"start",[r])}),o,u,i,e)}(this,t,e=Oh(e),o)}}return g.defineProperty(t.prototype,"locked",{get:function(){if(!1===Qa(this))throw rv("locked");return tv(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Qa(this)?Mh(rv("cancel")):!0===tv(this)?Mh(new b("Cannot cancel a stream that already has a reader")):nv(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Qa(this))throw rv("getReader");if(void 0===n)return nc(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Ya(t);return i.SV=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Qa(this))throw rv("pipeThrough");if(!1===Tc(i))throw new b("writable argument to pipeThrough must be a WritableStream");if(!1===Qa(e))throw new b("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!ua(f))throw new b("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===tv(this))throw new b("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===Ec(i))throw new b("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return qh(ha(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Qa(this)?Mh(rv("pipeTo")):!1===Tc(t)?Mh(new b("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||ua(u)?!0===tv(this)?Mh(new b("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===Ec(t)?Mh(new b("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ha(this,t,e,r,o,u):Mh(new b("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Qa(this))throw rv("tee");var t=function(t,n){var i,e,r,o,u,s=nc(t),f=!1,h=!1,c=!1,a=xh((function(t){u=t}));function v(){return!0===f||(f=!0,qh(Wh(cc(s),(function(t){if(f=!1,!0===t.done)return!1===h&&wa(r.jV),void(!1===c&&wa(o.jV));var n=t.value,i=n,e=n;!1===h&&ba(r.jV,i),!1===c&&ba(o.jV,e)})))),Bh(void 0)}function d(){}return r=Za(d,v,(function(n){if(h=!0,i=n,!0===c){var r=_h([i,e]),o=nv(t,r);u(o)}return a})),o=Za(d,v,(function(n){if(c=!0,e=n,!0===h){var r=_h([i,e]),o=nv(t,r);u(o)}return a})),zh(s.mj,(function(t){ga(r.jV,t),ga(o.jV,t)})),[r,o]}(this);return _h(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Qa(this))throw rv("getIterator");return function(t,n){void 0===n&&(n=!1);var i=nc(t),e=g.create(vc);return e.OV=i,e.RV=Boolean(n),e}(this,i)},t}();function Za(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=g.create($a.prototype);return Ja(o),ya(o,g.create(ca.prototype),t,n,i,e,r),o}function Ja(t){t.wa="readable",t.DV=void 0,t.EV=void 0,t.CV=!1}function Qa(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"jV")}function tv(t){return void 0!==t.DV}function nv(t,n){return t.CV=!0,"closed"===t.wa?Bh(void 0):"errored"===t.wa?Mh(t.EV):(iv(t),Wh(t.jV[Qh](n),gh))}function iv(t){t.wa="closed";var n=t.DV;void 0!==n&&(hc(n)&&(n.xV.forEach((function(t){t.Hd(Vh(void 0,!0,n.SV))})),n.xV=new Hh),Jh(n))}function ev(t,n){t.wa="errored",t.EV=n;var i=t.DV;void 0!==i&&(hc(i)?(i.xV.forEach((function(t){t.tx(n)})),i.xV=new Hh):(i.AW.forEach((function(t){t.tx(n)})),i.AW=new Hh),Zh(i,n))}function rv(t){return new b("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof bh.asyncIterator&&g.defineProperty($a.prototype,bh.asyncIterator,{value:$a.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});(function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(t){return t.byteLength}})(),function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(){return 1}}();var ov=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=Nh(e);if(void 0===r&&(r=1),r=Oh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=Nh(o);void 0===u&&(u=0),u=Oh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.yW;if(!0===t.WV){return Wh(t.MW,(function(){var e=t.bW;if("erroring"===e.wa)throw e.EV;return lv(i,n)}))}return lv(i,n)}(t,n)}function f(n){return function(t,n){return sv(t,n),Bh(void 0)}(t,n)}function h(){return function(t){var n=t.TW,i=t.yW,e=i.SW();return vv(i),Wh(e,(function(){if("errored"===n.wa)throw n.EV;var t=n.jV;!0===pa(t)&&wa(t)}),(function(i){throw sv(t,i),n.EV}))}(t)}function c(){return function(t){return hv(t,!1),t.MW}(t)}function a(n){return fv(t,n),Bh(void 0)}t.bW=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=g.create(yc.prototype);return Sc(u),Wc(u,g.create(zc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.TW=Za(u,c,a,r,o),t.WV=void 0,t.MW=void 0,t.NW=void 0,hv(t,!0),t.yW=void 0}(this,xh((function(t){f=t})),r,s,u,h),function(t,n){var i=g.create(cv.prototype),e=function(t){try{return dv(i,t),Bh(void 0)}catch(t){return Mh(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new b("transform is not a method");e=function(t){return Rh(r,n,[t,i])}}var o=Ih(n,"flush",0,[i]);!function(t,n,i,e){n.IW=t,t.yW=n,n.DW=i,n.SW=e}(t,i,e,o)}(this,t);var c=kh(t,"start",[this.yW]);f(c)}return g.defineProperty(t.prototype,"readable",{get:function(){if(!1===uv(this))throw bv("readable");return this.TW},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"writable",{get:function(){if(!1===uv(this))throw bv("writable");return this.bW},enumerable:!0,configurable:!0}),t}();function uv(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"yW")}function sv(t,n){ga(t.TW.jV,n),fv(t,n)}function fv(t,n){vv(t.yW),Xc(t.bW.BV,n),!0===t.WV&&hv(t,!1)}function hv(t,n){void 0!==t.MW&&t.NW(),t.MW=xh((function(n){t.NW=n})),t.WV=n}var cv=function(){function t(){throw new b("TransformStreamDefaultController instances cannot be created directly")}return g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===av(this))throw wv("desiredSize");return ma(this.IW.TW.jV)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===av(this))throw wv("enqueue");dv(this,t)},t.prototype.error=function(t){if(!1===av(this))throw wv("error");!function(t,n){sv(t.IW,n)}(this,t)},t.prototype.terminate=function(){if(!1===av(this))throw wv("terminate");!function(t){var n=t.IW,i=n.TW.jV;!0===pa(i)&&wa(i);var e=new b("TransformStream terminated");fv(n,e)}(this)},t}();function av(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"IW")}function vv(t){t.DW=void 0,t.SW=void 0}function dv(t,n){var i=t.IW,e=i.TW.jV;if(!1===pa(e))throw new b("Readable side is not in a state that permits enqueue");try{ba(e,n)}catch(t){throw fv(i,t),i.TW.EV}var r=function(t){return!0!==da(t)}(e);r!==i.WV&&hv(i,!0)}function lv(t,n){return Wh(t.DW(n),void 0,(function(n){throw sv(t.IW,n),n}))}function wv(t){return new b("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function bv(t){return new b("TransformStream.prototype."+t+" can only be used on a TransformStream")}function gv(t){return function(t){return new $a({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function mv(t){return gv(function(t){return new S(t)}(t))}function pv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new ru,o=function(){u();var t=new nn;e.cancel(t).catch(kt),r.$L(t)},u=function(){i&&(i.qf(o),i=void 0)};i&&(i.Gf?o():i.Zf(o));var s=[],f=function(t){return t.done?(u(),Z.resolve(s)):(s.push(t.value),Z.resolve(e.read()).then(f))};return Z.resolve(e.read()).then(f).then((function(t){u(),r.JL(t)}),(function(t){u(),r.$L(t)})),r.ix}(t,n).then((function(t){return Vn(t).buffer}))}function yv(t,n){var i=n,e=new ov,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.i_()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(kt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(kt)})),r}function _v(t){return ci(new S(t))}function Sv(t){return ai(t).buffer}var Tv="content-type",Ev="text/plain;charset=UTF-8",Iv=function(){function t(){}var n=t.prototype;return n.YR=function(t){return this.xE(t).then(JSON.parse)},n.pR=function(t,n){switch(t){case vh.XD:return this.hP(n);case vh.ZD:return this.YR(n);case vh.qD:return this.EW();case vh.RM:return this.xE(n);default:throw new b}},t}();function kv(t,n,i){if(t instanceof Iv)return t;if(t instanceof $a)return function(t,n){return new Ov({ow:0,EW:t,Fz:Rv(n)})}(t,i);var e=Rv(i),r=Z.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{ow:vh.RM,gE:t,Fz:n||Ev};if(t instanceof ArrayBuffer||qn(t))return{ow:vh.XD,gE:Bv(t),Fz:n};if(function(t){return lt(t)&&t.constructor&&t.constructor===g}(t)||dt(t))return{ow:vh.ZD,gE:t,Fz:n};throw new b("Unsupported BodyInit type")}return{ow:vh.RM,gE:null,Fz:n}}(t,e)}));return new Ov({ow:1,ix:r,kW:n})}function Rv(t){return(t.get(Tv)||"").toLowerCase()}var Ov=function(t){function n(n){var i;return(i=t.call(this)||this).xW=!1,i.PW=new ru,i.PW.ix.catch(kt),i.UW(n),i}Dt(n,t);var i=n.prototype;return i.RW=function(){return this.PW.ix},i.xE=function(t){return this.zW(Nv,t)},i.YR=function(t){return this.zW(Av,t)},i.hP=function(t){return this.zW(Cv,t)},i.EW=function(){return this.BW(function(t){return 0===t.ow?t.EW:yv(t.ix.then(xv).then(mv),t.kW)}(this.OW))},i.zW=function(t,n){if(this.xW)return Z.reject(new b("Already used"));this.xW=!0;var i=t(this.OW,n);return this.PW.e_(i.then(kt)),i},i.BW=function(t){if(this.xW)throw new b("Already used");if(t.locked)throw new b("Body stream is locked");this.xW=!0;var n=new ov,i=Z.resolve(t.pipeTo(n.writable));return this.PW.e_(i),n.readable},i.UW=function(t){this.OW=t,1===t.ow&&t.ix.catch(kt)},i.QW=function(){if(this.xW)throw new b("Already used");var t=function(t){if(0===t.ow){var n=Ct(t.EW.tee(),2),i=n[0],e=n[1];return[{ow:t.ow,EW:i,Fz:t.Fz},{ow:t.ow,EW:e,Fz:t.Fz}]}var r=Ct(t.kW.s_(),2),o=r[0],u=r[1];return[{ow:t.ow,ix:t.ix,kW:o},{ow:t.ow,ix:t.ix,kW:u}]}(this.OW),i=t[0],e=t[1];return this.UW(i),new n(e)},Nt(n,[{key:"LW",get:function(){return this.xW}},{key:"jW",get:function(){return 0===this.OW.ow}}]),n}(Iv);function Nv(t,n){return 0===t.ow?pv(t.EW,n).then(_v):(n&&t.kW.e_(n),on(t.ix.then(Pv),t.kW))}function Pv(t){switch(t.ow){case vh.RM:return Z.resolve(t.gE||"");case vh.XD:return Z.resolve(t.gE).then(_v);case vh.ZD:return Z.resolve(t.gE).then(JSON.stringify)}}function Av(t,n){return 0===t.ow?Nv(t,n).then(JSON.parse):(n&&t.kW.e_(n),on(t.ix.then(Dv),t.kW))}function Dv(t){return t.ow===vh.ZD?Z.resolve(t.gE):Pv(t).then(JSON.parse)}function Cv(t,n){return 0===t.ow?pv(t.EW,n):(n&&t.kW.e_(n),on(t.ix.then(xv),t.kW))}function xv(t){switch(t.ow){case vh.XD:return Z.resolve(t.gE);case vh.RM:case vh.ZD:return Pv(t).then(Sv)}}function Bv(t){return t instanceof ArrayBuffer?t:wi(di(t)).buffer}var Mv=function(t){function n(n){var i;return(i=t.call(this)||this).FW=n,i}Dt(n,t);var i=n.prototype;return i.RW=function(){return this.FW.RW()},i.xE=function(t){return this.FW.xE(t)},i.YR=function(t){return this.FW.YR(t)},i.hP=function(t){return this.FW.hP(t)},i.EW=function(t){return this.FW.EW(t)},i.QW=function(){return this.FW.QW()},Nt(n,[{key:"LW",get:function(){return this.FW.LW}},{key:"jW",get:function(){return this.FW.jW}}]),n}(Iv);var Uv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.vE,o=i.mE,u=i.BD,s=i.GR,f=i.YW):(r=[],o=vh.RM,u=200,s="OK",f=!1);var h=n.OD,c=new dh(n.vE||r),a=n.mE||o,v=n.CE||(i&&i.OD===h?i.CE:h.Iu),d=i?i.FW:null,l=kv(void 0!==n.lp?n.lp:d,n.kW||new tn,c);return(e=t.call(this,l)||this).vE=c,e.OD=h,e.CE=v,e.mE=a,e.BD=void 0!==n.BD?n.BD:u,e.GR=void 0!==n.GR?String(n.GR):s,e.YW=n.YW||f,e}Dt(n,t);var i=n.prototype;return i.lp=function(t){return this.pR(this.mE,t)},i.np=function(){return new n({lp:this.QW(),OD:this.OD},this)},n}(Mv),Lv=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Fv=function(t){return t.dE="same-origin",t.fw="no-cors",t.fE="cors",t._E="navigate",t}({}),zv=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Iu;n?(i=n.gE,e=n.vE,r=n.wE,o=n.mE,u=n.UD,s=n.pE,f=n.$f,h=n.ow,c=n.AE,a=n.yE,v=n.bE,d=n.TE,l=n.iw,w=n.SE,b=n.NE):(i=null,e={},r="GET",o=vh.RM,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Iu=y,this.gE=t.gE||i,this.vE=new dh(t.vE||e),this.wE=t.wE||r,this.mE=t.mE||o,this.UD=void 0!==t.UD?Number(t.UD)||0:u,this.pE=void 0!==t.pE?Number(t.pE)||0:s,this.$f=t.$f||f||(new tn).$f,this.ow=t.ow||h,this.AE=t.AE||c,this.yE=t.yE||a,this.bE=void 0!==t.bE?Boolean(t.bE):v,this.TE=t.TE||d,this.iw=null!=(g=t.iw)?g:l,this.SE=null!=(m=t.SE)?m:w,this.NE=null!=(p=t.NE)?p:b},Wv=function(){function t(){}var n=t.prototype;return n.OD=function(t){var n=function(t){return new Uv({lp:null,vE:{},OD:t,CE:t.Iu,mE:t.mE,BD:0,GR:$o.gb})}(new zv(t));return Z.resolve(n)},n.dG=function(t){},n.gn=function(){},t}();var qv=function(){function t(t,n){void 0===n&&(n=!0),this.HW=t,this.ZW=n}var n=t.prototype;return n.OD=function(t){var n=this.WW(t);return this.HW.OD(n)},n.dG=function(t){return this.HW.dG(this.XW(t))},n.WW=function(n){var i=new zv(n);if(!this.ZW){var e=t.qW(i.Iu);i=new zv({Iu:e},i)}return i},n.XW=function(n){var i=n.Iu;return this.ZW||(i=t.qW(i)),{Iu:i,gE:n.gE}},n.gn=function(){this.HW.gn()},t.qW=function(t){return Et.KW&&Yn(t,"http://")?t.replace(":","s:"):t},Nt(t,null,[{key:"GW",get:function(){return t.VW||(t.VW=new t(new Wv)),t.VW}}]),t}();qv.VW=void 0;var Hv=function(t){return t.xD="HttpOpenError",t.CD="HttpResponseError",t.jD="HttpTimeoutError",t}({}),Vv=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).RD=n,r}return Dt(n,t),Nt(n,[{key:"OD",get:function(){return this.RD}}]),n}(Jt);var Xv=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Iu),i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return Hv.xD}}]),n}(Vv);var jv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.OD,null!=e?e:function(t){return"Error while loading "+t.OD.Iu+", status code "+t.BD}(n),i)||this).zD=n,r}return Dt(n,t),Nt(n,[{key:"name",get:function(){return Hv.CD}},{key:"PD",get:function(){return this.zD}}]),n}(Vv);var Yv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Iu+" timed out after "+t.UD+" seconds."}(n),i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return Hv.jD}}]),n}(Vv),Kv=self.fetch,Gv=self.Request,$v=self.Response,Zv=self.Headers,Jv=self.ReadableStream,Qv=self.AbortSignal,td=self.AbortController,nd=Rt((function(){try{return wt(Kv)&&bt(Gv)&&bt($v)&&bt(Zv)&&"forEach"in Zv.prototype&&No()}catch(t){return!1}})),id=["http:","https:"];var ed=Rt((function(){try{return nd()&&bt(Qv)&&bt(td)&&"signal"in Gv.prototype}catch(t){return!1}})),rd=Rt((function(){try{return nd()&&bt(Jv)&&"body"in $v.prototype&&!Yi.Mk}catch(t){return!1}}));function od(t,n){var i,e=t.vE.has("content-length")?Number(t.vE.get("content-length")):void 0;return i=t.jW?function(t,n,i){return t.pipeThrough(new ov(new ud(n,i)))}(t.EW(),n,e):function(t,n,i){return sd.apply(this,arguments)}(t.hP(),n,e),new Uv({lp:i,OD:t.OD},t)}var ud=function(){function t(t,n){this.Yet=t,this.Get=n,this.P3=0}var n=t.prototype;return n.transform=function(t,n){this.P3+=t.byteLength,this.Yet(this.P3,this.Get),n.enqueue(t)},n.flush=function(t){var n;this.Yet(this.P3,null!=(n=this.Get)?n:this.P3)},t}();function sd(){return sd=ut((function(t,n,i){var e,r;return st(this,(function(o){switch(o.label){case 0:return[4,Z.resolve()];case 1:return o.sent(),n(0,i),[4,t];case 2:return e=o.sent(),r=e.byteLength,n(r,null!=i?i:r),[2,e]}}))})),sd.apply(this,arguments)}var fd=function(){function t(t){this.wO=new tn,this.zD=void 0,this.UT=0,this.Wet=!1,this.RD=t,this.wO.e_(t.$f),this.PD=this.Vet()}var n=t.prototype;return n.Vet=function(){var t=this;return ut((function(){var n,i,e,r,o,u,s,f,h;return st(this,(function(c){switch(c.label){case 0:(n=t.RD).UD&&(t.UT=a((function(){t.Wet=!0,t.wO.i_()}),n.UD),t.wO.$f.Kf((function(){v(t.UT)})));try{i=Kv(n.Iu,{method:n.wE,headers:n.vE.KD(),body:n.gE,credentials:n.bE?"include":"same-origin",signal:ad(t.wO.$f),mode:n.iw,keepalive:n.NE})}catch(t){throw new Xv(n,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i];case 2:return e=c.sent(),[3,4];case 3:throw r=c.sent(),en(o=t.Het(r))&&t.wO.i_(),o;case 4:if(u=e.url||n.Iu,s=0===e.status&&"file:"===function(t){return Et.Ah(t).protocol}(u)?200:e.status,f=new hd(t,e,t.wO),!function(t){return t.BD>=200&&t.BD<=299||304===t.BD}(h=new Uv({lp:f,OD:n,mE:n.mE,vE:vd(e.headers),BD:s,GR:e.statusText,CE:u})))throw new jv(h);return n.TE&&(h=od(h,n.TE)),[2,h]}}))}))()},n.Het=function(t){return function(t){return t instanceof Vv}(t)?t:en(t)?this.Wet?new Yv(this.RD):new nn(t.message,t):this.zD?new jv(this.zD,t):new Xv(this.RD,t)},t}(),hd=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).PW=new ru,r.Zet=n,r.Xet=i,r.wO=e,r.PW.ix.catch(kt),r}Dt(n,t);var i=n.prototype;return i.RW=function(){return this.PW.ix},i.xE=function(t){return this.zW(this.Xet.text(),t)},i.hP=function(t){return this.zW(this.Xet.arrayBuffer(),t)},i.EW=function(){var t=this.Xet.body;return t?this.BW(t):yv(this.hP().then(mv),this.wO)},i.QW=function(){var t=this.Xet.clone(),i=Ct(this.wO.s_(),2),e=i[0],r=i[1];return this.wO=e,new n(this.Zet,t,r)},i.zW=function(t,n){var i=this;n&&this.wO.e_(n);var e=rn(Z.resolve(t),this.wO.$f).catch((function(t){throw i.Zet.Het(t)}));return e=on(e,this.wO),this.PW.e_(e.then(kt)),e},i.BW=function(t){var n=this;return new $a(new dd(t,(function(t){return n.Zet.Het(t)}),this.wO,this.PW),{highWaterMark:0})},Nt(n,[{key:"LW",get:function(){return this.Xet.bodyUsed}},{key:"jW",get:function(){return vt(this.Xet.body)}}]),n}(Iv),cd="abort";function ad(t){if(ed()){var n=new td;if(t.Gf)n.abort();else if(!t.Vf){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(cd,i),t.qf(i),t.Jf(e)};n.signal.addEventListener(cd,i),t.Zf(i),t.Kf(e)}return n.signal}}function vd(t){if(function(t){return lt(t)&&"function"==typeof t.forEach}(t)){var n=new dh;return t.forEach((function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)})),n}return new dh(t)}var dd=function(){function t(t,n,i,e){this.qet=t,this.Ket=n,this.wO=i,this.PW=e}var n=t.prototype;return n.start=function(t){this.DV=this.qet.getReader()},n.pull=function(t){var n=this;return ut((function(){var i,e,r;return st(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,rn(n.DV.read(),n.wO.$f)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.Ket(e),n.PW.$L(r),n.wO.i_(),n.DV.cancel(r).catch(kt),t.error(r),[2];case 3:return i.done?(n.PW.JL(),n.wO.i_(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.wO.i_(),this.PW.$L(t),this.DV.cancel(t)},t}(),ld=function(){function t(t){var n=this;this.wO=new tn,this.zD=void 0,this.Jet=new ru,this.hst=!1,this.ost=function(){var t;n.tst(),null==(t=n.$et)||t.abort()},this.RD=t,this.wO.e_(t.$f),this.$et=new T,this.Vet()}var n=t.prototype;return n.Vet=function(){var t=this,n=this.$et,i=this.RD;if(i.$f.Gf)return this.tst();n.onreadystatechange=function(){return t.ist()},n.onprogress=function(n){return t.Yet(n)},n.onload=function(){return t.sst()},n.onloadend=function(){return t.nst()},n.onerror=function(){return t._q()},n.ontimeout=function(){return t.rst()},n.onabort=function(){return t.tst()},n.open(i.wE,i.Iu,!0),n.withCredentials=Boolean(i.bE),"responseType"in n&&i.mE&&(i.mE===vh.RM?n.responseType="text":n.responseType="arraybuffer"),i.vE.forEach((function(t,i){n.setRequestHeader(i,t)})),i.UD&&(n.timeout=i.UD),this.wO.$f.Zf(this.ost);var e=i.gE;e?n.send(e):n.send()},n.ist=function(){var t=this.$et;void 0!==t&&t.readyState>=2&&!this.hst&&(this.hst=!0,this.ast())},n.ast=function(){var t,n,i=this.$et,e=function(t){var n=new dh,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach((function(t){var i=t.split(":"),e=i.shift().trim();if(e){var r=i.join(":").trim();n.append(e,r)}})),n}(i.getAllResponseHeaders()||""),r=this.RD;this.ust=new ru,this.zD=new Uv({OD:r,mE:r.mE,lp:this.ust.ix,BD:i.status,GR:i.statusText,vE:e,CE:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.Jet)||t.JL(this.zD)},n.sst=function(){var t,n=this.$et;if(void 0!==n){var i=n.response;if(!vt(i)){var e=this.RD.mE;i=e===vh.RM?n.responseText:e===vh.XD?new ArrayBuffer(0):{}}null==(t=this.ust)||t.JL(i)}},n.nst=function(){this.gn()},n.Yet=function(t){void 0!==this.$et&&(null==this.RD.TE||this.RD.TE.call(this.RD,t.loaded,t.lengthComputable?t.total:void 0))},n._q=function(){var t=new w("Network request failed");this.zD?this.Ss(new jv(this.zD,t)):this.Ss(new Xv(this.RD,t))},n.rst=function(){this.Ss(new Yv(this.RD))},n.tst=function(){this.Ss(new nn),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.ust)?i:this.Jet)||n.$L(t)},n.gn=function(){this.$et=void 0,this.zD=void 0,this.Jet=void 0,this.ust=void 0,this.wO.Hf()},Nt(t,[{key:"PD",get:function(){return this.Jet.ix}}]),t}();var wd=function(){function t(){}var n=t.prototype;return n.OD=function(t){return function(t){if(!nd()||!function(t){try{return id.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Iu))return!1;if(!rd()&&t.TE)return!1;if(!t.SE){if(Yi.Yk&&Yi.xk<=68)return!1;if(Yi.Bk)return!1}return!0}(t)?new fd(t).PD:new ld(t).PD},n.dG=function(t){var n=t.Fz?{"Content-type":t.Fz}:void 0;this.OD(new zv({wE:Lv.POST,Iu:t.Iu,gE:t.gE,vE:n,iw:Fv.fw})).then((function(t){!function(t){t.then(kt,kt)}(t.hP())}),kt)},n.gn=function(){},t}();var bd=function(t){return t[t.eD=1]="eD",t[t.sD=2]="sD",t[t.RM=3]="RM",t[t.nD=4]="nD",t[t.rD=9]="rD",t}({});var gd=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Dt(n,t),n}(Jt),md=function(){function t(){}return t.prototype.pD=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new gd(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new gd;return new Id(n)},t}(),pd=function(){function t(t){this.cst=t}var n=t.prototype;return n.iD=function(t){return this.cst.isEqualNode(t.cst)},n.aD=function(n){return new t(this.cst.cloneNode(n))},Nt(t,[{key:"oD",get:function(){return bd.sD}},{key:"mD",get:function(){var t;return null!=(t=this.cst.localName)?t:Od(this.cst.nodeName)}},{key:"l",get:function(){return this.cst.nodeName}},{key:"lst",get:function(){var t;return null!=(t=this.cst.namespaceURI)?t:void 0}},{key:"dst",get:function(){var t;return null!=(t=this.cst.prefix)?t:void 0}},{key:"cM",get:function(){return this.cst.nodeValue}}]),t}(),yd=function(){function t(t){this.fst=void 0,this._st=t}var n=t.prototype;return n.vD=function(t){return this.TD.filter((function(n){return kd(n)&&n.aP===t}))},n.gD=function(t,n){return this.TD.filter((function(i){return kd(i)&&i.mD===n&&i.lst===t}))},n.SD=function(t){this._st.appendChild(t.HI),this.fst&&this.fst.push(t)},n.iD=function(t){return this._st.isEqualNode(t.HI)},Nt(t,[{key:"TD",get:function(){return void 0===this.fst&&(this.fst=function(t){for(var n=[],i=0;i<t.length;i++){var e=Rd(t.item(i));e&&n.push(e)}return n}(this._st.childNodes)),this.fst}},{key:"m",get:function(){return this.TD.filter(kd)}},{key:"HI",get:function(){return this._st}}]),t}(),_d=function(t){function n(n){return t.call(this,n)||this}Dt(n,t);var i=n.prototype;return i.MD=function(t){if(this._st.hasAttribute(t))return this._st.getAttribute(t)},i.bD=function(t,n){if(this._st.hasAttributeNS(t,n))return this._st.getAttributeNS(t,n)},i.dD=function(t){this._st.removeAttribute(t)},i.gst=function(t,n){this._st.removeAttributeNS(t,n)},i.vst=function(t,n){this._st.setAttribute(t,n)},i.wst=function(t,n,i){this._st.setAttributeNS(t,n,i)},i.aD=function(t){return new n(this._st.cloneNode(t))},Nt(n,[{key:"oD",get:function(){return bd.eD}},{key:"mD",get:function(){var t;return null!=(t=this._st.localName)?t:Od(this._st.nodeName)}},{key:"lst",get:function(){var t;return null!=(t=this._st.namespaceURI)?t:void 0}},{key:"dst",get:function(){var t;return null!=(t=this._st.prefix)?t:void 0}},{key:"aP",get:function(){return this._st.nodeName}},{key:"wD",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new pd(t.item(i)));return n}(this._st.attributes)}},{key:"iP",get:function(){return this._st.textContent}}]),n}(yd),Sd=function(){function t(t){this._st=t}return t.prototype.iD=function(t){return this.lp===t.lp},Nt(t,[{key:"lp",get:function(){return this._st.nodeValue}},{key:"HI",get:function(){return this._st}}]),t}(),Td=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.aD=function(t){return new n(this._st.cloneNode(t))},Nt(n,[{key:"oD",get:function(){return bd.RM}}]),n}(Sd),Ed=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.aD=function(t){return new n(this._st.cloneNode(t))},Nt(n,[{key:"oD",get:function(){return bd.nD}}]),n}(Sd),Id=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.aD=function(t){return new n(this._st.cloneNode(t))},Nt(n,[{key:"oD",get:function(){return bd.rD}},{key:"yD",get:function(){return new _d(this._st.documentElement)}}]),n}(yd);function kd(t){return function(t){return 1===t.oD}(t)}function Rd(t){switch(t.nodeType){case bd.eD:return new _d(t);case bd.RM:return new Td(t);case bd.nD:return new Ed(t)}}function Od(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Nd=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).mst=void 0,n.Ast=rd(),n.yst=Yi.wL||Yi.Mk,n.Mst=(Yi.wL||Yi.Yk&&Yi.xk<=68||Yi.Mk)&&!(Yi.Bk&&Yi.Qk<3),n.Dst=void 0,n.Est=new md,n}return Dt(n,t),n.prototype.pD=function(t){return this.Est.pD(t)},Nt(n,[{key:"Oet",get:function(){return this.mst||(this.mst=new Go(uh())),this.mst}},{key:"pst",get:function(){return this.Ast}},{key:"O0",get:function(){return this.yst}},{key:"q0",get:function(){return this.Mst}},{key:"bst",get:function(){return!1}},{key:"QP",get:function(){return fh.MF()}},{key:"Tst",get:function(){return{Sst:ah}}},{key:"Nst",get:function(){return c.connection&&c.connection.effectiveType||"default"}},{key:"Ist",get:function(){return c.connection&&c.connection.type||"unknown"}},{key:"uR",get:function(){return this.Dst||(this.Dst=new qv(new wd)),this.Dst}}]),n}(Ro);It(new Nd),It(new Nd);var Pd=self;Pd.addEventListener("install",(function(t){t.waitUntil(Pd.skipWaiting())})),Pd.addEventListener("activate",(function(t){t.waitUntil(Pd.clients.claim())})),xi.TR.ur(Pd)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
30
+ !function(t){"use strict";var n,i,e,r,o,u,s,f=t.window,h=t.document,c=(t.location,t.navigator),a=t.setTimeout,v=t.clearTimeout,d=t.setInterval,l=t.clearInterval,w=t.Error,b=t.TypeError,g=(t.SyntaxError,t.Object),m=t.Math,p=t.parseInt,y=t.parseFloat,_=t.isNaN,S=t.Uint8Array,T=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function E(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=Symbol.iterator,e=null!=(o=Symbol.dispose)?o:n("Symbol.dispose"),r=null!=(u=Symbol.asyncDispose)?u:n("Symbol.asyncDispose")):(s=0,i=(n=function(t){return"ul"+t+"_"+ ++s})("Symbol.iterator"),e=n("Symbol.dispose"),r=n("Symbol.asyncDispose"),n.iterator=i,n.dispose=e,n.asyncDispose=r);var I=a;function k(t){return Boolean(t&&void 0!==t.length)}function R(){}function O(t){if(!(this instanceof O))throw new b("Promises must be constructed via new");if("function"!=typeof t)throw new b("not a function");this.wa=0,this.ttn=!1,this.Obt=void 0,this.ntn=[],x(t,this)}function N(t,n){for(;3===t.wa;)t=t.Obt;0!==t.wa?(t.ttn=!0,O.itn((function(){var i=1===t.wa?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.Obt)}catch(t){return void A(n.promise,t)}P(n.promise,e)}else(1===t.wa?P:A)(n.promise,t.Obt)}))):t.ntn.push(n)}function P(t,n){try{if(n===t)throw new b("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":E(n))||"function"==typeof n)){var i=n.then;if(n instanceof O)return t.wa=3,t.Obt=n,void D(t);if("function"==typeof i)return void x(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.wa=1,t.Obt=n,D(t)}catch(n){A(t,n)}}function A(t,n){t.wa=2,t.Obt=n,D(t)}function D(t){2===t.wa&&0===t.ntn.length&&O.itn((function(){t.ttn||O.rtn(t.Obt)}));for(var n=0,i=t.ntn.length;n<i;n++)N(t,t.ntn[n]);t.ntn=null}function C(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function x(t,n){var i=!1;try{t((function(t){i||(i=!0,P(n,t))}),(function(t){i||(i=!0,A(n,t))}))}catch(t){if(i)return;i=!0,A(n,t)}}O.prototype.catch=function(t){return this.then(null,t)},O.prototype.then=function(t,n){var i=new this.constructor(R);return N(this,new C(t,n,i)),i},O.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)}))}))},O.all=function(t){return new O((function(n,i){if(!k(t))return i(new b("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":E(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])}))},O.allSettled=function(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new b((void 0===t?"undefined":E(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":E(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])}))},O.resolve=function(t){return t&&"object"===(void 0===t?"undefined":E(t))&&t.constructor===O?t:new O((function(n){n(t)}))},O.reject=function(t){return new O((function(n,i){i(t)}))},O.race=function(t){return new O((function(n,i){if(!k(t))return i(new b("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)O.resolve(t[e]).then(n,i)}))},O.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){I(t,0)},O.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var B=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),M=c?c.userAgent:"",U=M.match(/Firefox\/([0-9]+)/i),L=null!=U,F=U?Number(U[1]):0,z=M.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),W=null!=z,q=z?Number(z[3]):0,H=function(){function t(t){this.mx=0,this.MV=0,this.oC=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.MV+n&this.etn-1;this.oC[i]=t,this.mx=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.MV+n-1,e=this.etn-1;this.oC[i&e]=t,this.mx=n}},t.prototype.shift=function(){var t=this.MV,n=this.oC[t];return this.oC[t]=void 0,this.MV=t+1&this.etn-1,this.mx--,n},t.prototype.length=function(){return this.mx},t.prototype.stn=function(t){this.etn<t&&this.otn(this.etn<<1)},t.prototype.otn=function(t){var n=this.etn;this.etn=t;var i=this.MV+this.mx&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.oC,0,n,i)},t}();var V="unhandledrejection",X=self.PromiseRejectionEvent,j=self.CustomEvent;function Y(t){return new X(V,{reason:t,promise:B.reject(t).catch((function(){})),cancelable:!0})}function K(t){var n=new j(V,{detail:{reason:t},cancelable:!0});return g.defineProperty(n,"reason",{value:t}),n}function G(t){var n=h.createEvent("CustomEvent");return n.initCustomEvent(V,!1,!0,{reason:t}),n}var $,Z,J,Q,tt,nt,it,et,rt=function(t){return rt=function(){try{var t=B.resolve(),n="error",i=new X(V,{reason:n,promise:t});return V===i.type&&n===i.reason}catch(t){}return!1}()?Y:function(){try{var t="error",n=new j(V,{detail:{reason:t}});return V===n.type&&t===n.detail.reason}catch(t){}return!1}()?K:G,rt(t)};function ot(t,n,i,e,r,o,u){try{var s=t[o](u),f=s.value}catch(t){return void i(t)}s.done?n(f):Z.resolve(f).then(e,r)}function ut(t){return function(){var n=this,i=arguments;return new Z((function(e,r){var o=t.apply(n,i);function u(t){ot(o,e,r,u,s,"next",t)}function s(t){ot(o,e,r,u,s,"throw",t)}u(void 0)}))}}function st(t,e){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=g.create(("function"==typeof Iterator?Iterator:g).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[i]=function(){return this}),f;function h(n){return function(i){return function(n){if(r)throw new b("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,i])}}}function ft(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}function ht(t,n){if(t){if("string"==typeof t)return ft(t,n);var i=g.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ft(t,n):void 0}}function ct(t){return function(t){if(Array.isArray(t))return ft(t)}(t)||function(t){if(void 0!==n&&null!=t[i]||null!=t["@@iterator"])return Array.from(t)}(t)||ht(t)||function(){throw new b("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}B&&!(L&&F<60||W&&q<15)?Z=B:(Z=O,it=null!==($=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=B;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==$?$:O.itn,J=it,Q=new H(16),tt=!1,(et={M4:function(t){Q.push(t),tt||(tt=!0,J(nt))},uG:nt=function(){for(;Q.length()>0;)Q.shift()();tt=!1}}).uG,O.itn=et.M4,O.rtn=function(t){try{var n=rt(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}a((function(){throw new w("Unhandled promise rejection: ".concat(t))}),0)});var at={}.toString;function vt(t){return null!=t}var dt=Array.isArray||function(t){return"[object Array]"===at.call(t)};function lt(t){return"object"===(void 0===t?"undefined":E(t))&&null!==t}function wt(t){return"function"==typeof t}function bt(t){return wt(t)||lt(t)}var gt=9007199254740991,mt=(m.pow(2,-52),Array.prototype.find,Array.prototype.findLast,"function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1}),pt="function"==typeof Array.prototype.findLastIndex?function(t,n){return t.findLastIndex(n)}:function(t,n){for(var i=t.length-1;i>=0;i-=1){if(n(t[i],i,t))return i}return-1};function yt(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,i),!0)}function _t(t,n){for(var i=new Array(t.length),e=0,r=0;r<t.length;){if(t[r]===n){r++,i.length-=1;break}i[e++]=t[r++]}for(;r<t.length;)i[e++]=t[r++];return i}function St(t,n){return-1!==t.indexOf(n)}function Tt(t){t.length=0}var Et;Array.prototype.flat,Array.prototype.flatMap;function It(t){Et=t}var kt=function(){};function Rt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Ot(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),g.defineProperty(t,e.key,e)}}function Nt(t,n,i){return n&&Ot(t.prototype,n),i&&Ot(t,i),t}var Pt=function(t){return t.jM="audio",t.OM="video",t.LD="metadata",t}({});function At(t,n){return At=g.setPrototypeOf||function(t,n){return t.__proto__=n,t},At(t,n)}function Dt(t,n){if("function"!=typeof n&&null!==n)throw new b("Super expression must either be null or a function");t.prototype=g.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&At(t,n)}function Ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:void 0!==n&&t[i]||t["@@iterator"];if(null!=r){var o,u,s=[],f=!0,h=!1;try{for(r=r.call(t);!(f=(o=r.next()).done)&&(s.push(o.value),!e||s.length!==e);f=!0);}catch(t){h=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(h)throw u}}return s}}(t,e)||ht(t,e)||function(){throw new b("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xt(){var t=g.create(null);return t.Uf=void 0,delete t.Uf,t}function Bt(){return new Ut}var Mt="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Ut=Mt||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=g.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=xt(),this.size=0}var i=n.prototype;return i.get=function(t){return this.data[t]},i.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},i.has=function(t){return t in this.data},i.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},i.clear=function(){this.data=xt(),this.size=0},i.keys=function(){return new t(this.data,(function(t,n){return n}))},i.values=function(){return new t(this.data,(function(t,n){return t[n]}))},i.entries=function(){return new t(this.data,(function(t,n){return[n,t[n]]}))},i.forEach=function(t){for(var n in this.data)t(this.data[n],n)},n}()}();Mt||function(){var t=function(){function t(t,n){this.Qf=t,this.Ff=n}return t.prototype.next=function(){var t=this.Qf.next();return t.done?t:{value:this.Ff(t.value),done:!1}},t}();(function(){function n(){this.$d=Bt()}var i=n.prototype;i.get=function(t){return this.$d.get(""+t)},i.set=function(t,n){return this.$d.set(""+t,n),this},i.has=function(t){return this.$d.has(""+t)},i.delete=function(t){return this.$d.delete(""+t)},i.clear=function(){this.$d.clear()},i.keys=function(){return new t(this.$d.keys(),(function(t){return Number(t)}))},i.values=function(){return this.$d.values()},i.entries=function(){return new t(this.$d.entries(),(function(t){var n=Ct(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.$d.forEach((function(n,i){t(n,Number(i))}))},Nt(n,[{key:"size",get:function(){return this.$d.size}}])})()}();var Lt=function(t){return t.eE="#EXTINF",t.XOt="#EXT-X-MAP",t.i="#EXTM3U",t.p="#EXT-X-VERSION",t.en="#EXT-X-TARGETDURATION",t.hbt="#EXT-X-START",t.ui="#EXT-X-INDEPENDENT-SEGMENTS",t.KD="#EXT-X-STREAM-INF",t.li="#EXT-X-MEDIA-SEQUENCE",t.vr="#EXT-X-ENDLIST",t.if="#EXT-X-MEDIA",t.sf="#EXT-X-DISCONTINUITY",t.ff="#EXT-X-DISCONTINUITY-SEQUENCE",t.af="#EXT-X-PLAYLIST-TYPE",t.tv="#EXT-X-KEY",t}({}),Ft=function(){function t(t,n){this.ow="#EXTINF",this.nv=t,this.ev=n}return t.prototype.Yw=function(){return this.ow+":"+this.nv+",\n"+this.ev},t}(),zt=function(){function t(t){this.ow="#EXT-X-MAP",this.ev=t}return t.prototype.Yw=function(){return this.ow+':URI="'+this.ev+'"'},t}(),Wt=function(){function t(){this.ow="#EXTM3U"}return t.prototype.Yw=function(){return this.ow},t}(),qt=function(){function t(t){this.ow="#EXT-X-VERSION",this.Bp=t}return t.prototype.Yw=function(){return this.ow+":"+this.Bp},t}(),Ht=function(){function t(t){this.ow="#EXT-X-TARGETDURATION",this.BOt=t}return t.prototype.Yw=function(){return this.ow+":"+this.BOt},t}(),Vt=function(){function t(t){this.ow="#EXT-X-START",this.URt=t}return t.prototype.Yw=function(){return this.ow+":TIME-OFFSET="+this.URt},t}(),Xt=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.ow="#EXT-X-KEY"}return t.prototype.Yw=function(){return this.ow+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),jt=function(){function t(t){this.ow="#EXT-X-STREAM-INF",this.oz=1,this.ev=t}return t.prototype.Yw=function(){return this.ow+":BANDWIDTH="+this.oz+',AUDIO="audio"\n'+this.ev},t}(),Yt=function(){function t(t){this.ow="#EXT-X-MEDIA-SEQUENCE",this.qy=t}return t.prototype.Yw=function(){return this.ow+":"+this.qy},t}(),Kt=function(){function t(t){this.ow="#EXT-X-MEDIA",this.ev=t}return t.prototype.Yw=function(){var t=Bt();t.set("TYPE","AUDIO"),t.set("GROUP-ID",'"audio"'),t.set("NAME",'"audio"'),t.set("AUTOSELECT","YES"),t.set("DEFAULT","YES"),t.set("CHANNELS",'"2"'),t.set("URI",'"'+this.ev+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.ow+":"+n.join(",")},t}(),Gt=function(){function t(t){this.Qx=[],this.Qx=t}var n=t.prototype;return n.EA=function(){return this.Qx},n.sv=function(t){this.Qx.push(t)},n.fBt=function(){for(var t="",n=0,i=this.EA();n<i.length;n++){t+=i[n].Yw()+"\n"}return t},n.Hf=function(){this.Qx.length=0},t}(),$t=function(t){function n(n,i){var e;return e=t.call(this,[new Wt,new qt(8)])||this,i&&e.sv(new jt("video/index.m3u8")),n&&e.sv(new Kt("audio/index.m3u8")),e}return Dt(n,t),n}(Gt),Zt=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];w.apply(this,n)};(Zt.prototype=g.create(w.prototype)).constructor=Zt;var Jt=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,w.captureStackTrace&&w.captureStackTrace(e,e.constructor),e}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(Zt),Qt=function(){function t(){this.Gf=!1,this.Vf=!1,this.Wf=[],this.Xf=[]}var n=t.prototype;return n.Yf=function(){if(!this.Gf&&!this.Vf){this.Gf=!0;for(var t=0,n=this.Wf.slice();t<n.length;t++){(0,n[t])()}this.Hf()}},n.Hf=function(){if(!this.Vf){this.Vf=!0;for(var t=0,n=this.Xf.slice();t<n.length;t++){(0,n[t])()}Tt(this.Wf),Tt(this.Xf)}},n.Zf=function(t){this.Vf||this.Wf.push(t)},n.qf=function(t){this.Vf||yt(this.Wf,t)},n.Kf=function(t){this.Vf||this.Xf.push(t)},n.Jf=function(t){this.Vf||yt(this.Xf,t)},t}(),tn=function(){function t(){this.t_=new Qt}var n=t.prototype;return n.i_=function(){this.t_.Yf()},n.Hf=function(){this.t_.Hf()},n.e_=function(t){var n=this.t_;if(!n.Gf)if(t.Gf)n.Yf();else if(!n.Vf&&!t.Vf){var i=function(){e(),n.Yf()},e=function(){t.qf(i),t.Jf(e),n.qf(i),n.Jf(e)};t.Zf(i),t.Kf(e),n.Zf(i),n.Kf(e)}},n.s_=function(){var n=new t,i=new t,e=n.$f,r=i.$f,o=this.t_,u=function(){e.Gf&&r.Vf||r.Gf&&e.Vf?o.Yf():e.Vf&&r.Vf&&o.Hf()};e.Zf(u),r.Zf(u),e.Kf(u),r.Kf(u),n.e_(o),i.e_(o);return o.Kf((function(){e.qf(u),r.qf(u),e.Jf(u),r.Jf(u)})),[n,i]},Nt(t,[{key:"$f",get:function(){return this.t_}}]),t}(),nn=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(Jt);function en(t){return t instanceof w&&"AbortError"===t.name}function rn(t,n){return n?new Z((function(i,e){if(n.Gf)return t.catch(kt),e(new nn);var r=function(){n.qf(r),e(new nn)};n.Zf(r),t.then((function(t){n.qf(r),i(t)}),(function(t){n.qf(r),e(t)}))})):t}function on(t,n){return t.then((function(t){return n.i_(),t}),(function(t){throw n.i_(),t}))}Z.resolve();function un(t,n){return new Z((function(i,e){if(void 0!==n&&n.Gf)e(new nn);else{var r=Et.o_((function(){void 0!==n&&n.qf(o),i()}),t),o=function(){Et.r_(r),e(new nn)};void 0!==n&&n.Zf(o)}}))}var sn=function(){function t(t){var n=this;this.pO=[],this.AO=void 0,this.mO=new tn,this.yO=function(){return 0===n.pO.length?n.bO?fn(n.bO,n.mO.$f).then(n.TO,n.TO):n.TO():n.pO.shift()().then(n.yO)},this.TO=function(){if(0!==n.pO.length)return n.yO();n.AO=void 0},this.bO=t}var n=t.prototype;return n.wO=function(t,n){var i=this;return new Z((function(e){var r=new tn;r.e_(i.mO.$f),n&&r.e_(n);var o=function(){r.Hf()};i.pO.push((function(){var n=fn(t,r.$f);return e(n),n.then(o,o)})),i.AO||(i.AO=i.yO())}))},n.i_=function(){return this.MO(!0)},n.gn=function(){return this.bO=void 0,this.MO(!1)},n.MO=function(t){var n=this.AO;return this.mO.i_(),t&&(this.mO=new tn),Z.resolve(n)},t}();function fn(t,n){return new Z((function(i){return i(t(n))}))}var hn=function(t){return t.n7="HELLO",t.r7="HI_THERE",t.o7="INITIALIZE",t.h7="APPEND_INIT",t.a7="APPEND_DATA",t.u7="ACK",t.l7="REMOVE",t.d7="DESTROY_SESSION",t}({}),cn=null;try{cn=new WebAssembly.Instance(new WebAssembly.Module(new S([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(J){}function an(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function vn(t){return!0===(t&&t.rp)}function dn(t){var n=m.clz32(t&-t);return t?31-n:n}an.prototype.rp,g.defineProperty(an.prototype,"rp",{value:!0}),an.isLong=vn;var ln={},wn={};function bn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=wn[t])?e:(i=mn(t,0,!0),r&&(wn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=ln[t])?e:(i=mn(t,t<0?-1:0,!1),r&&(ln[t]=i),i)}function gn(t,n){if(_(t))return n?Rn:kn;if(n){if(t<0)return Rn;if(t>=Tn)return Dn}else{if(t<=-En)return Cn;if(t+1>=En)return An}return t<0?gn(-t,n).neg():mn(t%Sn|0,t/Sn|0,n)}function mn(t,n,i){return new an(t,n,i)}an.fromInt=bn,an.fromNumber=gn,an.fromBits=mn;var pn=m.pow;function yn(t,n,i){if(0===t.length)throw w("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?Rn:kn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw w("interior hyphen");if(0===e)return yn(t.substring(1),n,i).neg();for(var r=gn(pn(i,8)),o=kn,u=0;u<t.length;u+=8){var s=m.min(8,t.length-u),f=p(t.substring(u,u+s),i);if(s<8){var h=gn(pn(i,s));o=o.mul(h).add(gn(f))}else o=(o=o.mul(r)).add(gn(f))}return o.unsigned=n,o}function _n(t,n){return"number"==typeof t?gn(t,n):"string"==typeof t?yn(t,n):mn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}an.fromString=yn,an.fromValue=_n;var Sn=4294967296,Tn=Sn*Sn,En=Tn/2,In=bn(1<<24),kn=bn(0);an.ZERO=kn;var Rn=bn(0,!0);an.UZERO=Rn;var On=bn(1);an.ONE=On;var Nn=bn(1,!0);an.UONE=Nn;var Pn=bn(-1);an.NEG_ONE=Pn;var An=mn(-1,2147483647,!1);an.MAX_VALUE=An;var Dn=mn(-1,-1,!0);an.MAX_UNSIGNED_VALUE=Dn;var Cn=mn(0,-2147483648,!1);an.MIN_VALUE=Cn;var xn=an.prototype;xn.toInt=function(){return this.unsigned?this.low>>>0:this.low},xn.toNumber=function(){return this.unsigned?(this.high>>>0)*Sn+(this.low>>>0):this.high*Sn+(this.low>>>0)},xn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Cn)){var n=gn(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=gn(pn(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}},xn.getHighBits=function(){return this.high},xn.getHighBitsUnsigned=function(){return this.high>>>0},xn.getLowBits=function(){return this.low},xn.getLowBitsUnsigned=function(){return this.low>>>0},xn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Cn)?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},xn.isZero=function(){return 0===this.high&&0===this.low},xn.eqz=xn.isZero,xn.isNegative=function(){return!this.unsigned&&this.high<0},xn.isPositive=function(){return this.unsigned||this.high>=0},xn.isOdd=function(){return 1==(1&this.low)},xn.isEven=function(){return 0==(1&this.low)},xn.equals=function(t){return vn(t)||(t=_n(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},xn.eq=xn.equals,xn.notEquals=function(t){return!this.eq(t)},xn.neq=xn.notEquals,xn.ne=xn.notEquals,xn.lessThan=function(t){return this.comp(t)<0},xn.lt=xn.lessThan,xn.lessThanOrEqual=function(t){return this.comp(t)<=0},xn.lte=xn.lessThanOrEqual,xn.le=xn.lessThanOrEqual,xn.greaterThan=function(t){return this.comp(t)>0},xn.gt=xn.greaterThan,xn.greaterThanOrEqual=function(t){return this.comp(t)>=0},xn.gte=xn.greaterThanOrEqual,xn.ge=xn.greaterThanOrEqual,xn.compare=function(t){if(vn(t)||(t=_n(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},xn.comp=xn.compare,xn.negate=function(){return!this.unsigned&&this.eq(Cn)?Cn:this.not().add(On)},xn.neg=xn.negate,xn.add=function(t){vn(t)||(t=_n(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,h=0,c=0,a=0;return c+=(a+=r+(65535&t.low))>>>16,h+=(c+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,mn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},xn.subtract=function(t){return vn(t)||(t=_n(t)),this.add(t.neg())},xn.sub=xn.subtract,xn.multiply=function(t){if(this.isZero())return this;if(vn(t)||(t=_n(t)),cn)return mn(cn.mul(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Rn:kn;if(this.eq(Cn))return t.isOdd()?Cn:kn;if(t.eq(Cn))return this.isOdd()?Cn:kn;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(In)&&t.lt(In))return gn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,c=0,a=0,v=0;return a+=(v+=r*f)>>>16,c+=(a+=e*f)>>>16,a&=65535,c+=(a+=r*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=e*s)>>>16,c&=65535,h+=(c+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,mn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},xn.mul=xn.multiply,xn.divide=function(t){if(vn(t)||(t=_n(t)),t.isZero())throw w("division by zero");var n,i,e;if(cn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?mn((this.unsigned?cn.div_u:cn.div_s)(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Rn:kn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Rn;if(t.gt(this.shru(1)))return Nn;e=Rn}else{if(this.eq(Cn))return t.eq(On)||t.eq(Pn)?Cn:t.eq(Cn)?On:(n=this.shr(1).div(t).shl(1)).eq(kn)?t.isNegative()?On:Pn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Cn))return this.unsigned?Rn:kn;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=kn}for(i=this;i.gte(t);){n=m.max(1,m.floor(i.toNumber()/t.toNumber()));for(var r=m.ceil(m.log(n)/m.LN2),o=r<=48?1:pn(2,r-48),u=gn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=gn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=On),e=e.add(u),i=i.sub(s)}return e},xn.div=xn.divide,xn.modulo=function(t){return vn(t)||(t=_n(t)),cn?mn((this.unsigned?cn.rem_u:cn.rem_s)(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},xn.mod=xn.modulo,xn.rem=xn.modulo,xn.not=function(){return mn(~this.low,~this.high,this.unsigned)},xn.countLeadingZeros=function(){return this.high?m.clz32(this.high):m.clz32(this.low)+32},xn.clz=xn.countLeadingZeros,xn.countTrailingZeros=function(){return this.low?dn(this.low):dn(this.high)+32},xn.ctz=xn.countTrailingZeros,xn.and=function(t){return vn(t)||(t=_n(t)),mn(this.low&t.low,this.high&t.high,this.unsigned)},xn.or=function(t){return vn(t)||(t=_n(t)),mn(this.low|t.low,this.high|t.high,this.unsigned)},xn.xor=function(t){return vn(t)||(t=_n(t)),mn(this.low^t.low,this.high^t.high,this.unsigned)},xn.shiftLeft=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):mn(0,this.low<<t-32,this.unsigned)},xn.shl=xn.shiftLeft,xn.shiftRight=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):mn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},xn.shr=xn.shiftRight,xn.shiftRightUnsigned=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):mn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},xn.shru=xn.shiftRightUnsigned,xn.shr_u=xn.shiftRightUnsigned,xn.rotateLeft=function(t){var n;return vn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?mn(this.high,this.low,this.unsigned):t<32?(n=32-t,mn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),mn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},xn.rotl=xn.rotateLeft,xn.rotateRight=function(t){var n;return vn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?mn(this.high,this.low,this.unsigned):t<32?(n=32-t,mn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),mn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},xn.rotr=xn.rotateRight,xn.toSigned=function(){return this.unsigned?mn(this.low,this.high,!1):this},xn.toUnsigned=function(){return this.unsigned?this:mn(this.low,this.high,!0)},xn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},xn.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]},xn.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]},an.fromBytes=function(t,n,i){return i?an.fromBytesLE(t,n):an.fromBytesBE(t,n)},an.fromBytesLE=function(t,n){return new an(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},an.fromBytesBE=function(t,n){return new an(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Bn=an;function Mn(){return Date.now()||(new Date).getTime()}Bn.fromNumber(gt);var Un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Ln=16383;function Fn(t,n,i){return Un[t>>2]+Un[(3&t)<<4|n>>4]+Un[(15&n)<<2|i>>6]+Un[63&i]}function zn(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Fn(t[r],t[r+1],t[r+2]));return e.join("")}var Wn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],qn=ArrayBuffer.isView||function(t){return t&&St(Wn,at.call(t))};function Hn(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(li(t),li(n))}function Vn(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new S(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 Xn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Ln)e.push(zn(t,o,m.min(r,o+Ln)));if(1===i){var u=t[n-1];e.push(Un[u>>2]+Un[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Un[s>>2]+Un[(3&s)<<4|f>>4]+Un[(15&f)<<2]+"=")}return e.join("")}(new S(t))}var jn=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.ep=function(t){this.Hu+=t},n.sp=function(t){this.Hu=t},n.np=function(){return new t(this.Lu)},Nt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}();String.prototype.replaceAll;var Yn="function"==typeof String.prototype.startsWith?function(t,n){return vt(t)&&t.startsWith(n)}:function(t,n){return vt(t)&&t.substr(0,n.length)===n},Kn=(String.prototype.endsWith,"function"==typeof String.prototype.repeat?function(t,n){return t.repeat(n)}:function(t,n){var i=0|n;if(0===t.length||0===i)return"";for(var e=t,r="";1==(1&i)&&(r+=e),0!=(i>>>=1);)e+=e;return r}),Gn=(String.prototype.padStart,String.prototype.padEnd,16384),$n="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Gn?(n=String).fromCodePoint.apply(n,ct(t)):Jn(t,String.fromCodePoint)}:function(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return Zn(n)};function Zn(t){var n;return t.length<=Gn?(n=String).fromCharCode.apply(n,ct(t)):Jn(t,String.fromCharCode)}function Jn(t,n){for(var i=[],e=0;e<t.length;e+=Gn)i.push(n.apply(void 0,ct(t.slice(e,e+Gn))));return i.join("")}function Qn(t){if(t>=55296&&t<=57343)throw new w("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ti(t,n){return t>>n&63|128}function ni(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(ti(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ti(t,12)),n.push(ti(t,6))),n.push(63&t|128)):n.push(t)}function ii(t,n){if(n.Lu>=t.length)throw new w("Invalid byte index");var i=255&t[n.Lu];if(n.ep(1),128==(192&i))return 63&i;throw new w("Invalid continuation byte")}function ei(t,n){var i=n.Lu;if(i>t.length)throw new w("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.ep(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|ii(t,n);if(r>=128)return r;throw new w("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|ii(t,n)<<6|ii(t,n);if(o>=2048)return Qn(o),o;throw new w("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|ii(t,n)<<12|ii(t,n)<<6|ii(t,n);if(u>=65536&&u<=1114111)return u}throw new w("Invalid UTF-8 detected")}var ri=65279;function oi(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Lu,i);return n.ep(2),e}function ui(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Lu,i,e),n.ep(2)}function si(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Lu,i,e),n.ep(4)}function fi(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){ui(t,n,i.charCodeAt(o),e)}}function hi(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Lu+2<=t.byteLength;){var o=oi(t,n,i);if(e&&!o)break;r.push(o)}return Zn(r)}(vi(t),new gi,n,!1)}function ci(t){return function(t){return $n(t)}(function(t,n){var i,e=[],r=new gi;if(!n){if(!1===(i=ei(t,r)))return e;i===ri||e.push(i)}for(;!1!==(i=ei(t,r));)e.push(i);return e}(di(t)))}function ai(t){return new S(function(t){for(var n=[],i=0;i<t.length;i++)ni(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 vi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function di(t){return new S(t.buffer,t.byteOffset,t.byteLength)}function li(t){return t instanceof ArrayBuffer?new S(t):di(t)}function wi(t){if(t.slice)return t.slice(0);var n=new S(t.byteLength);return n.set(t,0),n}var bi,gi=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.ep=function(t){this.Hu+=t},n.sp=function(t){this.Hu=t},n.np=function(){return new t(this.Lu)},n.ap=function(){return new jn(this.Lu<<3)},Nt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}(),mi=new Array(256);for(bi=0;bi<256;bi+=1)mi[bi]=(bi<16?"0":"")+bi.toString(16);function pi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*m.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function yi(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var _i=function(){function t(t){var n=this;this.a_=xt(),this.l_=void 0,this.u_=0,this.Ds=function(t){n.yo(t)},this.d_=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.h_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.h_(e,n)}},n.h_=function(t,n){var i=this.a_[t];void 0===i?this.a_[t]=n:"function"==typeof i?this.a_[t]=[i,n]:0===this.u_?i.push(n):this.a_[t]=i.concat(n)},n.c_=function(t){if("function"==typeof t){var n=this.l_;void 0===n?this.l_=t:"function"==typeof n?this.l_=[n,t]:0===this.u_?n.push(t):this.l_=n.concat(t)}},n.Bo=function(){this.a_=xt(),this.l_=void 0},n.yo=function(t){this.u_++;var n=this.a_[t.type],i=this.l_;void 0!==n&&yi(this.d_,t,n),void 0!==i&&yi(this.d_,t,i),this.u_--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.f_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.f_(e,n)}},n.f_=function(t,n){var i=this.a_[t];void 0!==i&&("function"==typeof i?i===n&&(this.a_[t]=void 0):0===this.u_?yt(i,n):this.a_[t]=_t(i,n))},n.__=function(t){if("string"==typeof t)this.a_[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.a_[i]=void 0}},n.g_=function(t){var n=this.l_;void 0!==n&&("function"==typeof n?n===t&&(this.l_=void 0):0===this.u_?yt(n,t):this.l_=_t(n,t))},n.v_=function(t,n){var i=this;return new Z((function(e,r){if(n&&n.Gf)return r(new nn);var o=function(t){s(),e(t)},u=function(){s(),r(new nn)},s=function(){i.fn(t,o),n&&n.qf(u)};i.yn(t,o),n&&n.Zf(u)}))},t}(),Si=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},Ti=function(t){function n(n){var i;return(i=t.call(this,"append")||this).lp=n,i}return Dt(n,t),n}(Si),Ei=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).TNt=0,n.oC=new S(0),n.yx=!1,n.cv=!1,n}Dt(n,t);var i=n.prototype;return i.b$=function(t,n){this.TNt+=n,this.oC=Vn([this.oC,t]),this.yo(new Ti(t))},i.Ws=function(){this.mj||(this.yo(new Si("close")),this.yx=!0)},Nt(n,[{key:"A_",get:function(){return this.TNt}},{key:"lp",get:function(){return this.oC}},{key:"mj",get:function(){return this.yx}},{key:"av",get:function(){return this.cv},set:function(t){this.cv=t}}]),n}(_i),Ii="sync-seg-",ki=function(){function t(t,n){this.dv=!1,this.lv=!1,this.o=Ii+pi(),this.wv=n?new Ei:void 0,this.gv=t?new Ei:void 0}return t.prototype.Ws=function(){this.wv&&this.wv.Ws(),this.gv&&this.gv.Ws()},Nt(t,[{key:"kv",get:function(){return this.dv},set:function(t){this.dv=t}},{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}}]),t}(),Ri=1.1,Oi=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Wt,new qt(8),new Ht(1),new Vt(0)])||this).gd=[],r.BAt=Bt(),r.Ad=0,r.tw=function(t){if(t.XS>=gt)for(;r.gd.length>0;)r.rw()},e&&r.sv(new Xt(e,"com.apple.streamingkeydelivery","1")),r.vat=n,r.mrt=i,r.mrt.yn("remove",r.tw),r.sw=new Yt(0),r.sv(r.sw),r}Dt(n,t);var i=n.prototype;return i.gEt=function(){return this.vat===Pt.OM?this.mrt.bw:this.vat===Pt.jM?this.mrt.kw:void 0},i.dat=function(t){return this.BAt.get(t)},i.Hf=function(){this.gd.length=0,this.sw.qy=0,this.BAt.clear(),this.Ad=0},i.EA=function(){return this.tb(),ct(t.prototype.EA.call(this)).concat(ct(this.gd))},i.tb=function(){for(var t=this.mrt.nb(),n=0;n<t.length;n++){var i=t[n];if(!this.BAt.has(i.o)){var e=void 0;if(this.vat===Pt.OM?(e=i.wv,i.jv=!0):(e=i.gv,i.kv=!0),!e)return;this.BAt.set(i.o,e),e.av&&this.gd.push(new zt(i.o+"-init")),this.gd.push(new Ft(Ri,i.o)),this.Ad+=Ri}}this.cb()},i.cb=function(){for(;this.Ad>60;)this.rw()},i.rw=function(){var t=this.gd.shift();void 0!==t&&function(t){return t.ow===Lt.eE}(t)&&(this.BAt.delete(t.ev),this.Ad-=t.nv,this.sw.qy++)},n}(Gt);var Ni=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).XS=n,i}return Dt(n,t),n}(Si),Pi=function(t){function n(n,i){var e;return(e=t.call(this)||this).ab=n,e.lb=i,e.tg=[],e.ng=[],e.ig=Bt(),e.ug=Bt(),e.sg=Bt(),e.lg=0,e}Dt(n,t);var i=n.prototype;return i.nb=function(){return this.bg?(this.tg=this.tg.filter((function(t){return!(t.jv&&t.kv)})),ct(this.tg).concat([this.bg],ct(this.ng))):[]},i.N$=function(t){this.mg(t)},i.b$=function(t){this.mg(t),this.kg(t),this.tm(t)},i.DS=function(t){this.mg(t),this.tm(t)},i.Hf=function(){var t;null==(t=this.bg)||t.Ws(),this.bg=void 0,this.ng.forEach((function(t){return t.Ws()})),this.ng.length=0,this.tg.length=0,this.sg=Bt(),this.lg=0},i.kg=function(t){var n=t.startPts,i=t.totalDuration;this.ug.set(t.mediaType,n+i)},i.rm=function(){if(this.bg){this.bg.Ws(),this.tg.push(this.bg);var t=this.ng.shift(),n=new ki(this.ab,this.lb);t?(this.bg=t,this.ng.push(n)):this.bg=n}},i.om=function(t){if(this.bg){var n=!this.bg.gv||0===this.bg.gv.A_,i=!this.bg.wv||0===this.bg.wv.A_,e=this.bg.gv&&this.bg.gv.av,r=this.bg.wv&&this.bg.wv.av,o=i&&(n&&!(this.bg.kv||this.bg.jv)||e),u=n&&(i&&!(this.bg.kv||this.bg.jv)||r);(t===Pt.jM&&!u||t===Pt.OM&&!o)&&(this.rm(),this.rm())}},i.mg=function(t){var n=t.mediaType,i=t.kind,e=this.ig.get(n);if(void 0===e){if(i===hn.h7||i===hn.a7){var r=[t];this.ig.set(n,r)}}else e.push(t)},i.tm=function(t){var n=this.sm(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case hn.h7:this.am(e),this.sg=Bt(),this.lg=0;break;case hn.l7:this.bm(e);break;case hn.a7:this.km(e)}}},i.am=function(t){var n=t.mediaType;void 0===this.bg?(this.bg=new ki(this.ab,this.lb),this.ng.push(new ki(this.ab,this.lb))):this.om(n),n===Pt.OM?(this.ip=t.segment,this.bg.wv.av=!0):n===Pt.jM&&(this.up=t.segment,this.bg.gv.av=!0)},i.km=function(t){var n,i,e=t.mediaType===Pt.jM,r=t.totalDuration,o=null!=(n=this.sg.get(t.mediaType))?n:0;e?(this.bg.gv.b$(t.segment,r),i=o+this.bg.gv.A_):(this.bg.wv.b$(t.segment,r),i=o+this.bg.wv.A_),i>=this.lg+Ri&&(this.sg.set(t.mediaType,i),this.lg+=Ri,this.rm())},i.bm=function(t){this.ug.set(t.mediaType,void 0),this.om(t.mediaType),this.tg.length=0,this.yo(new Ni(t.endTime))},i.sm=function(t){var n=this;if(t.kind===hn.l7)return this.ty(t);var i=[];return this.ig.forEach((function(t){if(t&&t.length>0){var e=mt(t,(function(t){return t.kind===hn.l7}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!St(i,u)){var s,f=n.ty(u);if(f.length>0)(s=i).push.apply(s,ct(f));else if(u.kind===hn.a7)break}}}})),i},i.ty=function(t){var n=this.ig.get(t.mediaType),i=function(t){return t===Pt.OM?Pt.jM:Pt.OM}(t.mediaType);if(!(i===Pt.OM?this.lb:this.ab))return n.splice(0,n.indexOf(t)+1);if(t.kind===hn.h7)return[];var e=this.ug.get(i);if(void 0===e)return[];if(t.kind===hn.l7){var r=this.ny(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),ct(o).concat(ct(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.hy(t,u,i);return ct(u).concat(ct(s),[t])}return[]},i.hy=function(t,n,i){var e=this.ig.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=mt(e,(function(t){return t.kind===hn.l7})),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var h=e[f];h.kind===hn.a7&&h.startPts>r&&(s=f)}var c=-1;return-1!==mt(n,(function(t){return t.kind===hn.h7}))&&(c=mt(e,(function(t){return t.kind===hn.h7}))),c>s&&(s=c+1),s>0?(e[s-1].kind===hn.h7&&(s-=1),e.splice(0,s)):[]},i.ny=function(t){var n=this.ig.get(t);if(n){var i=mt(n,(function(t){return t.kind===hn.l7}));if(i>=0)return n.splice(0,i+1)}return[]},i.by=function(){var t="[MEDIABUFFER] endPTS: ";this.ug.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),Et.Cet(t)},i.my=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),Et.Cet(i)},Nt(n,[{key:"kw",get:function(){var t;return null==(t=this.up)?void 0:t.slice()}},{key:"bw",get:function(){var t;return null==(t=this.ip)?void 0:t.slice()}}]),n}(_i);var Ai=function(){function t(t,n){var i=t.some((function(t){return t.match("audio")})),e=t.some((function(t){return t.match("video")}));this.ky=new Pi(i,e),this.OS=new $t(i,e),i&&(this.AS=new Oi(Pt.jM,this.ky,n)),e&&(this.BS=new Oi(Pt.OM,this.ky,n))}var n=t.prototype;return n.RT=function(t){var n,i,e=Di(t);return e===Pt.OM?null==(n=this.BS)?void 0:n.gEt():e===Pt.jM?null==(i=this.AS)?void 0:i.gEt():void 0},n.dat=function(t){var n,i,e=t.split("/")[1],r=Di(t);return r===Pt.OM?null==(n=this.BS)?void 0:n.dat(e):r===Pt.jM?null==(i=this.AS)?void 0:i.dat(e):void 0},n.N$=function(t){this.ky.N$(t)},n.b$=function(t){this.ky.b$(t)},n.Yct=function(t){this.ky.DS(t)},n.Hf=function(){var t,n;this.ky.Hf(),this.OS.Hf(),null==(t=this.AS)||t.Hf(),null==(n=this.BS)||n.Hf()},Nt(t,[{key:"IE",get:function(){return this.OS}},{key:"ME",get:function(){return this.AS}},{key:"tk",get:function(){return this.BS}}]),t}();function Di(t){return t.match(/video/)?Pt.OM:Pt.jM}var Ci=function(){function t(t,n){var i=this;this.ik=t,this.uk=n,this.Fat=void 0,this.TWt=ut((function(t){var n,e;return st(this,(function(r){switch((n=t.data).kind){case hn.o7:i.Fat=new Ai(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case hn.h7:i.Fat.N$(n);break;case hn.a7:i.Fat.b$(n);break;case hn.l7:i.Fat.Yct(n)}return e={kind:hn.u7},i.ik.postMessage(e),[2]}))})),this.ik.onmessage=this.TWt}var n=t.prototype;return n.fBt=function(t){return"master.m3u8"===t?this.Fat.IE:"video/index.m3u8"===t?this.Fat.tk:"audio/index.m3u8"===t?this.Fat.ME:void 0},n.sk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.fBt(t))?void 0:n.fBt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Ii)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Fat)?void 0:r.RT(t);return new Response(o,{headers:e})}var u=this.aat(t);if(!u)return new Response(void 0,{status:404,statusText:"Not Found"});var s=function(t){var n,i=function(t){n.enqueue(t.lp)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.lp),t.mj?n.close():(t.yn("append",i),t.yn("close",e))},cancel:function(){t.fn("append",i),t.fn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.aat=function(t){return this.Fat.dat(t)},n.close=function(){var t;this.ik.close(),null==(t=this.Fat)||t.Hf()},t}(),xi=function(){function t(){var t=this;this.e3=Bt(),this.TWt=function(n){var i=n.data;if(i.kind===hn.n7){t.ak().catch(kt);var e=i.port,r=pi(),o=new Ci(e,n.source.id);t.e3.set(r,o);var u=function(n){n.data.kind===hn.d7&&(t.mk(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:hn.r7,sessionId:r};e.postMessage(s)}},this.kk=function(n){if(Yn(n.request.url,"https://theo.proxy")){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/"),o=t.e3.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.sk(r);n.respondWith(f)}}}var n=t.prototype;return n.ur=function(t){this.iWt=t,t.addEventListener("message",this.TWt),t.addEventListener("fetch",this.kk)},n.mk=function(t){var n=this.e3.get(t);n&&n.close(),this.e3.delete(t)},n.ak=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:return[4,t.iWt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.e3.forEach((function(n,e){St(i,n.uk)||t.mk(e)})),[2]}}))}))()},t}();xi.TR=new xi;var Bi=function(t){return t.BE="web",t.UE="android",t.QE="android-tv",t.FE="ios",t.YE="tvos",t.GE="chromecast",t.VE="theoliveweb",t}({});var Mi=c?c.userAgent:"",Ui=Mi.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Li=Mi.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Fi=Mi.match(/Android ([0-9\.]+)/i),zi=Mi.match(/Windows NT ([0-9\.]+)/i),Wi=Mi.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),qi=Mi.match(/Firefox\/([0-9\.]+)/i),Hi=Mi.match(/OPR\/(\d+\.\d+)/i),Vi=Mi.match(/Tizen ([0-9\.]+)/i),Xi=Mi.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),ji=function(){function t(){this.WE=Boolean("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch||c&&c.msMaxTouchPoints),this.XE=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Mi)||/(macintosh|mac(?=_powerpc)\s)/i.test(Mi),this.qE=/Windows NT/i.test(Mi),this.JE=zi?y(zi[1]):0,this.ek=/Android/i.test(Mi),this.rk=Fi?y(Fi[1]):0,this.ck=/windows phone (8|8\.1)/i.test(Mi),this.dk=/iPhone/i.test(Mi),this._k=/iPad/i.test(Mi),this.vk=this.XE&&this.WE&&!this._k,this.pk=/iPod/i.test(Mi),this.Nk=/Mobile Safari/i.test(Mi),this.Tk=/EOS\d*STB/i.test(Mi),this.Sk=/APP\d*STB/i.test(Mi),this.Ak=(this.dk||this._k||this.vk||this.pk)&&!this.ck,this.Mk=Xi?y(Xi[2]):0,this.Ik=this.ck||this.Ak||this.ek||this.Nk,this.Ek=/CriOS/i.test(Mi),this.xk=Boolean(self.chrome&&/google/i.test(c.vendor))||this.Ek,this.Pk=this.xk&&/Edg\//i.test(c.userAgent),this.Bk=Li?p(Li[1],10):0,this.xL=Boolean(self.chrome||/Chrome/i.test(Mi)||/CriOS/i.test(Mi)),this.Ok=Ui?p(Ui[1],10):0,this.Qk=/SMART-TV.*Tizen/i.test(Mi),this.Yk=Vi?y(Vi[1]):0,this.jk=this.Yk>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.Yk):void 0,this.Vk=/webos|web0s/i.test(Mi),this.Hk=/VIZIO/i.test(Mi),this.Zk=/Edge\/\d+/i.test(Mi),this.Kk=/Trident/i.test(Mi),this.$k=this.Kk&&!self.ActiveXObject&&"ActiveXObject"in self,this.iL=/Vivaldi/i.test(Mi),this.sL=/Firefox/i.test(Mi)&&!/Seamonkey/i.test(Mi),this.rL=qi?y(qi[1]):0,this.hL=/Safari/i.test(Mi)&&!/Chrome/i.test(Mi)&&!this.ck&&!this.Qk,this.uL=Wi?y(Wi[2]):0,this.lL=Boolean(Hi),this.fL=Hi?y(Hi[1]):0,this.gL=/CrKey/.test(Mi),this.wL=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Mi),this.AL="web"===Bi.QE,this.ML="web"===Bi.UE,this.TL=this.ML||this.AL,this.NL="web"===Bi.FE,this.DL="web"===Bi.YE,this.kL="web"===Bi.GE}return Nt(t,[{key:"Je",get:function(){return this.WE}},{key:"HE",get:function(){return this.XE}},{key:"ZE",get:function(){return this.qE}},{key:"KE",get:function(){return this.JE}},{key:"$E",get:function(){return this.ek}},{key:"nk",get:function(){return this.rk}},{key:"hk",get:function(){return this.ck}},{key:"lk",get:function(){return this.dk}},{key:"fk",get:function(){return this._k}},{key:"gk",get:function(){return this.vk}},{key:"wk",get:function(){return this.pk}},{key:"Ua",get:function(){return this.Ak}},{key:"yk",get:function(){return this.Mk}},{key:"bk",get:function(){return this.Tk||this.Sk}},{key:"ql",get:function(){return this.Nk}},{key:"Qs",get:function(){return this.Ik}},{key:"Dk",get:function(){return this.Ek}},{key:"Lk",get:function(){return this.xk}},{key:"Ck",get:function(){var t;return null!=(t=this.jk)?t:this.Ok}},{key:"Rk",get:function(){return this.Pk}},{key:"zk",get:function(){return this.Bk}},{key:"Uk",get:function(){return this.Qk}},{key:"Fk",get:function(){return this.Yk}},{key:"Gk",get:function(){return this.Vk}},{key:"Wk",get:function(){return this.Hk}},{key:"Xk",get:function(){return this.Zk}},{key:"qk",get:function(){return this.Kk}},{key:"Jk",get:function(){return this.$k}},{key:"tL",get:function(){return this.iL}},{key:"eL",get:function(){return this.sL}},{key:"nL",get:function(){return this.rL}},{key:"oL",get:function(){return this.hL}},{key:"aL",get:function(){return this.uL}},{key:"cL",get:function(){return this.lL}},{key:"dL",get:function(){return this.fL}},{key:"_L",get:function(){return this.gL}},{key:"vL",get:function(){return this.wL}},{key:"mL",get:function(){return!(!this.Gk&&!this.Uk)&&this.Ck<=56}},{key:"pL",get:function(){return this.AL}},{key:"yL",get:function(){return this.ML}},{key:"bL",get:function(){return this.TL}},{key:"SL",get:function(){return this.NL}},{key:"IL",get:function(){return this.DL}},{key:"EL",get:function(){return this.kL}},{key:"LL",get:function(){return this.xL}}]),t}();ji.CL=new ji;var Yi=ji.CL,Ki=!(Yi.qk&&!Yi.Jk),Gi=self.console;function $i(t){if(lt(t))try{return JSON.stringify(t)}catch(t){}return t}function Zi(t){return t.map($i).join(" ")}function Ji(t){var n=Gi&&Gi[t];return n?n.bind&&Ki?n.bind(Gi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Gi[t](Zi(i))}:void 0}var Qi=Ji("log")||kt,te=Ji("warn")||Qi.bind(void 0,"WARNING:"),ne=Ji("error")||Qi.bind(void 0,"ERROR:"),ie=function(){var t=Gi&&Gi.assert;return t?t.bind&&Ki?t.bind(Gi):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];Gi.assert(t,Zi(i))}:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];t||ne.apply(void 0,["Assertion failed:"].concat(ct(i)))}}();function ee(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),g.defineProperty(t,e.key,e)}}function re(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){oe(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&oe(i,null,t.length,t),t}function oe(t,n,i,e){var r,o,u,s,f,h=t.length,c=0,a=2*i;for(r=0;r<h;r+=a)for(u=(o=r+i)+i,o>h&&(o=h),u>h&&(u=h),s=r,f=o;;)if(s<o&&f<u)n(t[s],t[f])<=0?e[c++]=t[s++]:e[c++]=t[f++];else if(s<o)e[c++]=t[s++];else{if(!(f<u))break;e[c++]=t[f++]}}var ue=/[a-zA-Z]/,se=/[0-9]/,fe=/[0-9a-fA-F]/,he=/^0x/i,ce=/^[0-9]+$/,ae=/^[0-9a-fA-F]+$/,ve=/^[0-7]+$/,de=g.prototype.toString,le=Array.isArray||function(t){return"[object Array]"===de.call(t)},we=void 0!==n&&"symbol"==typeof i;function be(t){return le(t)?t:Array.from(t)}function ge(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}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 Te(t){return me(t)?t+32:t}function Ee(t){return ye(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ie(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=m.min,Re=String.fromCharCode,Oe=16384;function Ne(t){for(var n=t.length,i=[],e=0;e<n;e+=Oe){var r=ke(e+Oe,n);i.push(Re.apply(null,t.slice(e,r)))}return i.join("")}var Pe=2147483647,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=m.floor,Be=String.fromCharCode;function Me(t){throw new RangeError(Ce[t])}function Ue(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,Fe,ze,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))},He=function(t){return function(t,n){var i=t.split("@"),e="";i.length>1&&(e=i[0]+"@",t=i[1]);var r=function(t,n){for(var i=[],e=t.length;e--;)i[e]=n(t[e]);return i}((t=t.replace(De,".")).split("."),n).join(".");return e+r}(t,(function(t){return Ae.test(t)?"xn--"+function(t){for(var n=[],i=(t=Ue(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,c=h;for(h&&n.push("-");c<i;){for(var a=Pe,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>xe((Pe-r)/w)&&Me("overflow"),r+=(a-e)*w,e=a;for(var b=0,g=t;b<g.length;b++){var m=g[b];if(m<e&&++r>Pe&&Me("overflow"),m==e){for(var p=r,y=36;;y+=36){var _=y<=o?1:y>=o+26?26:y-o;if(p<_)break;var S=p-_,T=36-_;n.push(Be(We(_+S%T,0))),p=xe(S/T)}n.push(Be(We(p,0))),o=qe(r,w,c==h),r=0,++c}}++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 Ne(n)}function Xe(t){if(t>=55296&&t<=57343)throw new w("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function je(t,n){return t>>n&63|128}function Ye(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Xe(t),n.push(t>>12&15|224),n.push(je(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(je(t,12)),n.push(je(t,6))),n.push(63&t|128)):n.push(t)}function Ke(t){for(var n=[],i=0;i<t.length;i++){Ye(t[i],n)}return n}function Ge(){if(ze>=Fe)throw new w("Invalid byte index");var t=255&Le[ze];if(ze++,128==(192&t))return 63&t;throw new w("Invalid continuation byte")}function $e(){var t,n;if(ze>Fe)throw new w("Invalid byte index");if(ze===Fe)return!1;if(t=255&Le[ze],ze++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ge())>=128)return n;throw new w("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ge()<<6|Ge())>=2048)return Xe(n),n;throw new w("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ge()<<12|Ge()<<6|Ge())>=65536&&n<=1114111)return n;throw new w("Invalid UTF-8 detected")}function Ze(t){return[37,Ie(t>>4),Ie(15&t)]}function Je(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Qe(t){return Je(t)||32===t||34===t||60===t||62===t||96===t}function tr(t){return Qe(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=Ke([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,Ze(o))}return e}function or(t,n){for(var i=[],e=0,r=Ue(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&&Se(t[e+1])&&Se(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}(Ke(t))}function sr(t){return Ve(function(t){Le=t.slice(),Fe=Le.length,ze=0;for(var n,i=[];!1!==(n=$e());)i.push(n);return i}(ur(Ue(t))))}function fr(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new b;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new b("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&fe.test(t[o]);)u=u<<4|p(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new b;if(o-=s,e>6)throw new b;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new b;o+=1}if(!se.test(t[o]))throw new b;for(;o<n&&se.test(t[o]);){var c=p(t[o],10);if(null===h)h=c;else{if(0===h)throw new b;if((h=10*h+c)>255)throw new b}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new b;break}if(":"===t[o]){if((o+=1)===n)throw new b}else if(o<n)throw new b;i[e]=u,e+=1}else{if(null!==r)throw new b("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)ge(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new b;return i}function hr(t){var n=10,i=ce;return he.test(t)?(t=t.slice(2),n=16,i=ae):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ve),""===t?0:i.test(t)?p(t,n):void 0}var cr={u2:4},ar=/[\0\t\n\r #%/:?@\[\\\]]/,vr=/[\0\t\n\r #/:?@\[\\\]]/;function dr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new b("Invalid IPv6 address");return{u2:2,iet:fr(t.slice(1,-1))}}if(!n)return function(t){if(vr.test(t))throw new b("Invalid code point in opaque host");var n=or(t,Je);return""===n?cr:{u2:3,oC:n}}(t);var i=function(t){var n=function(t){return He(t.toLowerCase())}(t);return n}(sr(t));if(ar.test(i))throw new b("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 b;if(i[i.length-1]>=m.pow(256,5-i.length))throw new b;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*m.pow(256,3-f);return s}}(i);return void 0!==e?{u2:1,iet:e}:""===i?cr:{u2:0,eet:i}}function lr(t){switch(t.u2){case 0:return t.eet;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.iet);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.iet)+"]";case 3:return t.oC;case 4:return""}}var wr=/\+/g;function br(t){return 42===t||45===t||46===t||95===t||_e(t)}function gr(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 mr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=pr(Ke(Ue(e[0])))+"="+pr(Ke(Ue(e[1])))}return n}function pr(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):br(e)?n.push(e):n.push.apply(n,Ze(e))}return Ne(n)}var yr=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function _r(t){var n=""+t,i=yr.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Tr(o))if(Er(o)||r===i-1)e.push(Sr);else{var u=t.charCodeAt(r+1);Er(u)?(e.push(o,u),r++):e.push(Sr)}else e.push(o)}return t.slice(0,n)+Ne(e)}(n,i.index):n}var Sr=65533,Tr=function(t){return 55296==(63488&t)},Er=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 kr(t){t.tf.length=0}function Rr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.tf,gr(n))}function Or(t){if(t.Vu){var n=mr(t.tf);""===n&&(n=null),t.Vu.Vu.net=n}}var Nr=function(){function t(t){if(void 0===t&&(t=void 0),this.Vu=null,null==t)this.tf=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Nr&&!!le(t.tf)&&(!we||t[i]===Pr)}(t))this.tf=t.tf.slice();else if(function(t){return null!=t&&(!!le(t)||!!we&&"function"==typeof t[i])}(t)){this.tf=[];for(var n=0,e=be(t);n<e.length;n++){var r=be(e[n]);if(2!==r.length)throw new b("Invalid name-value pair");this.tf.push([_r(r[0]),_r(r[1])])}}else for(var o in this.tf=[],t)g.prototype.hasOwnProperty.call(t,o)&&this.tf.push([_r(o),_r(t[o])]);else(t=_r(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.tf=gr(t)}var n=t.prototype;return n.append=function(t,n){t=_r(t),n=_r(n),this.tf.push([t,n]),Or(this)},n.delete=function(t){t=_r(t);for(var n=this.tf,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Or(this)},n.get=function(t){t=_r(t);for(var n=this.tf,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=_r(t);for(var n=this.tf,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=_r(t);for(var n=this.tf,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=_r(t),n=_r(n);for(var i=this.tf,e=!1,r=0;r<i.length;){var o=i[r];o[0]===t?e?i.splice(r,1):(o[1]=n,e=!0,r++):r++}e||i.push([t,n]),Or(this)},n.sort=function(){re(this.tf,Ir),Or(this)},n.toString=function(){return mr(this.tf)},n.entries=function(){return new xr(this.tf,Ar)},n.keys=function(){return new xr(this.tf,Dr)},n.values=function(){return new xr(this.tf,Cr)},n.forEach=function(t){var n=this;this.tf.forEach((function(i){return t(i[1],i[0],n)}))},t}(),Pr=Nr.prototype.entries;we&&(Nr.prototype[i]=Pr);var Ar=function(t){return[t[0],t[1]]},Dr=function(t){return t[0]},Cr=function(t){return t[1]},xr=function(){function t(t,n){this.ret=0,this.tf=t,this.oet=n}return t.prototype.next=function(){return this.ret<this.tf.length?{done:!1,value:this.oet(this.tf[this.ret++])}:{done:!0,value:void 0}},t}(),Br="null";var Mr=g.create(null);Mr.ftp=21,Mr.file=0,Mr.gopher=70,Mr.http=80,Mr.https=443,Mr.ws=80,Mr.wss=443;var Ur=/^(?:\.|%2e)$/i,Lr=/^(?:\.|%2e){2}$/i;function Fr(t){return Ur.test(t)}function zr(t){return Lr.test(t)}function Wr(t){return void 0!==Mr[t]}function qr(t){return Wr(t.EP)}function Hr(t){return""!==t.het||""!==t.aet}function Vr(t){var n=t.length;if(!(n>=2))return!1;if(!jr(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 Xr(t){return 2===t.length&&ue.test(t[0])&&(":"===t[1]||"|"===t[1])}function jr(t){return 2===t.length&&Xr(Ne(t))}function Yr(t){return Xr(t)&&":"===t[1]}function Kr(t){var n=t.uet;0!==n.length&&("file"===t.EP&&1===n.length&&Yr(n[0])||n.pop())}function Gr(t){return null===t.cet||cr===t.cet||t.let||"file"===t.EP}var $r=-1,Zr=/\t|\n|\r/g,Jr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Qr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new no,t=t.replace(Jr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=Ue(t=t.replace(Zr,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:$r;switch(r){case 0:if(!pe(v)){if(null===e){o.length=0,r=2;continue}throw new b("Invalid scheme")}o.push(Te(v)),r=1;break;case 1:if(_e(v)||43===v||45===v||46===v)o.push(Te(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new b("Invalid scheme")}var d=Ve(o);if(null!==e){if(Wr(i.EP)&&!Wr(d))return;if(!Wr(i.EP)&&Wr(d))return;if((Hr(i)||null!==i._7)&&"file"===d)return;if("file"===i.EP&&(i.cet===cr||null===i.cet))return}if(i.EP=d,null!==e)return void(qr(i)&&i._7===Mr[i.EP]&&(i._7=null));o.length=0,"file"===i.EP?r=13:qr(i)&&n&&n.EP===i.EP?r=3:qr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.let=!0,i.uet.push(""),r=18)}break;case 2:if(!n||n.let&&35!==v)throw new b("Invalid scheme");n.let&&35===v?(i.EP=n.EP,i.uet=n.uet.slice(),i.net=n.net,i.det="",i.let=!0,r=20):"file"!==n.EP?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===h[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.EP=n.EP,$r===v?(i.het=n.het,i.aet=n.aet,i.cet=n.cet,i._7=n._7,i.uet=n.uet.slice(),i.net=n.net):47===v?r=6:63===v?(i.het=n.het,i.aet=n.aet,i.cet=n.cet,i._7=n._7,i.uet=n.uet.slice(),i.net="",r=19):35===v?(i.het=n.het,i.aet=n.aet,i.cet=n.cet,i._7=n._7,i.uet=n.uet.slice(),i.net=n.net,i.det="",r=20):92===v&&qr(i)?r=6:(i.het=n.het,i.aet=n.aet,i.cet=n.cet,i._7=n._7,i.uet=n.uet.slice(),i.uet.pop(),r=17,a-=1);break;case 6:!qr(i)||47!==v&&92!==v?47===v?r=9:(i.het=n.het,i.aet=n.aet,i.cet=n.cet,i._7=n._7,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var g=Ve(rr(w,nr));f?i.aet+=g:i.het+=g}else f=!0}o.length=0}else if($r===v||47===v||63===v||35===v||qr(i)&&92===v){if(u&&0===o.length)throw new b("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.EP)a-=1,r=15;else if(58!==v||s)if($r===v||47===v||63===v||35===v||qr(i)&&92===v){if(a-=1,qr(i)&&0===o.length)throw new b("Invalid host");if(null!==e&&0===o.length&&(Hr(i)||null!==i._7))return;var m=dr(Ve(o),qr(i));if(i.cet=m,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new b("Invalid host");var y=dr(Ve(o),qr(i));if(i.cet=y,o.length=0,r=12,11===e)return}break;case 12:if(ye(v))o.push(v);else{if(!($r===v||47===v||63===v||35===v||qr(i)&&92===v||null!==e))throw new b("Invalid port");if(0!==o.length){var _=p(Ve(o),10);if(_>65535)throw new b("Invalid port");i._7=_===Mr[i.EP]?null:_,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.EP="file",47===v||92===v?r=14:n&&"file"===n.EP?$r===v?(i.cet=n.cet,i.uet=n.uet.slice(),i.net=n.net):63===v?(i.cet=n.cet,i.uet=n.uet.slice(),i.net="",r=19):35===v?(i.cet=n.cet,i.uet=n.uet.slice(),i.net=n.net,i.det="",r=20):(Vr(h.slice(a))||(i.cet=n.cet,i.uet=n.uet.slice(),Kr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.EP&&!Vr(h.slice(a))&&(Yr(n.uet[0])?i.uet.push(n.uet[0]):i.cet=n.cet),r=17,a-=1);break;case 15:if($r===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&jr(o))r=17;else if(0===o.length){if(i.cet=cr,null!==e)return;r=16}else{var S=dr(Ve(o),qr(i));if(0===S.u2&&"localhost"===S.eet&&(S=cr),i.cet=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:qr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.net="",r=19):null===e&&35===v?(i.det="",r=20):$r!==v&&(r=17,47!==v&&(a-=1));break;case 17:if($r===v||47===v||qr(i)&&92===v||null===e&&(63===v||35===v)){var T=Ve(o);if(zr(T)?(Kr(i),47===v||qr(i)&&92===v||i.uet.push("")):!Fr(T)||47===v||qr(i)&&92===v?Fr(T)||("file"===i.EP&&0===i.uet.length&&jr(o)&&(cr!==i.cet&&null!==i.cet&&(i.cet=cr),o[1]=58,T=Ve(o)),i.uet.push(T)):i.uet.push(""),o.length=0,"file"===i.EP&&($r===v||63===v||35===v))for(;i.uet.length>1&&""===i.uet[0];)i.uet.shift();63===v?(i.net="",r=19):35===v&&(i.det="",r=20)}else o.push.apply(o,rr(v,tr));break;case 18:63===v?(i.net="",r=19):35===v?(i.det="",r=20):$r!==v&&(i.uet[0]+=Ve(rr(v,Je)));break;case 19:null===e&&35===v?(i.det="",r=20):$r!==v&&(i.net+=Ve(rr(v,qr(i)?er:ir)));break;case 20:$r===v||0===v||(i.det+=Ve(rr(v,Qe)))}a++}return i}function to(t,n,i,e){try{Qr(t,n,i,e)}catch(t){}}var no=function(){this.EP="",this.het="",this.aet="",this.cet=null,this._7=null,this.uet=[],this.net=null,this.det=null,this.let=!1};function io(t){switch(t.EP){case"blob":var n;try{n=Qr(t.uet[0],null)}catch(t){return Br}return io(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+lr(n)+(null===i?"":":"+i)}(t.EP,t.cet,t._7);default:return Br}}var eo,ro,oo=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof oo&&"object"==typeof t.Vu}(n))e=n.Vu;else try{e=Qr(String(n),null)}catch(t){throw new b("Invalid base URL: "+t.message)}try{i=Qr(String(t),e)}catch(t){throw new b("Invalid URL: "+t.message)}var r=i.net;this.Vu=i,this.net=function(t){var n=new Nr;return null!==t&&Rr(n,t),n}(r),this.net.Vu=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&ee(t.prototype,n),i&&ee(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.EP+":";if(null!==t.cet?(i+="//",Hr(t)&&(i+=t.het,""!==t.aet&&(i+=":"+t.aet),i+="@"),i+=lr(t.cet),null!==t._7&&(i+=":"+t._7)):null===t.cet&&"file"===t.EP&&(i+="//"),t.let)i+=t.uet[0];else for(var e=0,r=t.uet;e<r.length;e++)i+="/"+r[e];return null!==t.net&&(i+="?"+t.net),n||null===t.det||(i+="#"+t.det),i}(this.Vu)},set:function(t){var n;try{n=Qr(String(t),null)}catch(t){throw new b("Invalid URL: "+t.message)}this.Vu=n,kr(this.net);var i=this.Vu.net;null!==i&&Rr(this.net,i)}},{key:"origin",get:function(){return io(this.Vu)}},{key:"protocol",get:function(){return this.Vu.EP+":"},set:function(t){to(t+":",null,this.Vu,0)}},{key:"username",get:function(){return this.Vu.het},set:function(t){Gr(this.Vu)||(this.Vu.het=or(t,nr))}},{key:"password",get:function(){return this.Vu.aet},set:function(t){Gr(this.Vu)||(this.Vu.aet=or(t,nr))}},{key:"host",get:function(){var t=this.Vu,n=t.cet;if(null===n)return"";var i=t._7,e=lr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Vu.let||to(t,null,this.Vu,10)}},{key:"hostname",get:function(){var t=this.Vu.cet;return null===t?"":lr(t)},set:function(t){this.Vu.let||to(t,null,this.Vu,11)}},{key:"port",get:function(){var t=this.Vu._7;return null===t?"":""+t},set:function(t){Gr(this.Vu)||(""===t?this.Vu._7=null:to(t,null,this.Vu,12))}},{key:"pathname",get:function(){var t=this.Vu.uet;return this.Vu.let?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Vu.let||(this.Vu.uet.length=0,to(t,null,this.Vu,16))}},{key:"search",get:function(){var t=this.Vu.net;return null===t||""===t?"":"?"+t},set:function(t){t=_r(t);var n=this.Vu;if(""===t)return n.net=null,void kr(this.net);"?"===t[0]&&(t=t.slice(1)),n.net="",to(t,null,n,19),Rr(this.net,t)}},{key:"searchParams",get:function(){return this.net}},{key:"hash",get:function(){var t=this.Vu.det;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Vu.det="",to(t,null,this.Vu,20)):this.Vu.det=null}}]),t}();function uo(t){return t.document&&t.document.baseURI||t.location.href||""}function so(){return void 0!==h?h.createElement("video"):void 0}function fo(){return ro||(ro=so()),ro}var ho=!!("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch)||!(!c||!c.msMaxTouchPoints),co=fo(),ao=!(!co||!co.webkitShowPlaybackTargetPicker),vo=function(){function t(){this._et=void 0,this.Eet=!1,this.Je=ho,this.Qs=!1,this.ott=!0}var n=t.prototype;return n.vet=function(){return 0},n.Iet=function(t,n){return!0},n.Det=function(t){return t>=.3333333333333333},Nt(t,[{key:"fet",get:function(){return void 0===this._et&&(this._et=this.vet()),this._et}},{key:"wet",get:function(){return!Yi.vL}},{key:"met",get:function(){if(f.screen)return{width:f.screen.width,height:f.screen.height}}},{key:"Z3",get:function(){return f.devicePixelRatio||1}},{key:"pet",get:function(){return ao}},{key:"D3",get:function(){return!1}},{key:"M3",get:function(){return!0}},{key:"eS",get:function(){return!(!Yi.oL&&!Yi.Ua)||!!Yi.Wk}},{key:"sS",get:function(){return Yi.Wk}},{key:"Aet",get:function(){return!Yi.Ua}},{key:"XR",get:function(){return!0}},{key:"yet",get:function(){return!0}},{key:"Met",get:function(){return!1}},{key:"bet",get:function(){}},{key:"Tet",get:function(){return!0}},{key:"o0",get:function(){return!1}},{key:"Net",get:function(){return Yi.Wk}}]),t}(),lo=function(){var t=so();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Yi.gk)return!1;var t=so();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var wo=function(t){function n(n){var i;return(i=t.call(this)||this).ket=n,i.ket&&(i.Eet=i.ket.Eet,i.Je=i.ket.Je,i.ott=lo&&i.ket.ott),i}Dt(n,t);var i=n.prototype;return i.vet=function(){return this.ket?this.ket.fet:t.prototype.vet.call(this)},i.Iet=function(n,i){return this.ket?this.ket.Iet(n,i):t.prototype.Iet.call(this,n,i)},i.Det=function(n){return this.ket?this.ket.Det(n):t.prototype.Det.call(this,n)},Nt(n,[{key:"bet",get:function(){var t;return null==(t=this.ket)?void 0:t.bet}},{key:"Tet",get:function(){var t,n;return null==(n=null==(t=this.ket)?void 0:t.Tet)||n}}]),n}(vo),bo=function(t){function n(n){var i;return(i=t.call(this,n)||this).Eet=!0,i.Qs=!0,i}return Dt(n,t),Nt(n,[{key:"Met",get:function(){return Yi.Ua}}]),n}(wo);var go=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.vet=function(){return function(t){return t&&bt(eo.ManagedMediaSource)?eo.ManagedMediaSource:bt(eo.MediaSource)?eo.MediaSource:void 0}(!0)?t.prototype.vet.call(this):1},Nt(n,[{key:"Met",get:function(){return!0}}]),n}(bo),mo=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.Iet=function(n,i){return t.prototype.Iet.call(this,n,i)},Nt(n,[{key:"D3",get:function(){return Yi.Fk<3}},{key:"M3",get:function(){return Yi.Fk>=3}},{key:"met",get:function(){var t=this;return f.tizen&&!this.Let&&f.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Let={width:i,height:e})})),this.Let}},{key:"o0",get:function(){return Yi.Fk<3}}]),n}(wo),po=function(t){function n(){return t.call(this)||this}return Dt(n,t),n}(vo),yo=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.Iet=function(t,n){if(t&&t.xet&&n&&n.xet){var i=_o(t.xet,"mp4a.40.2")&&_o(n.xet,"mp4a.40.5"),e=_o(t.xet,"mp4a.40.5")&&_o(n.xet,"mp4a.40.2"),r=_o(t.xet,"mp4a.40.2")&&_o(n.xet,"mp4a.40.34"),o=_o(t.xet,"mp4a.40.34")&&_o(n.xet,"mp4a.40.2"),u=_o(t.xet,"mp4a.40.5")&&_o(n.xet,"mp4a.40.34"),s=_o(t.xet,"mp4a.40.34")&&_o(n.xet,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Nt(n,[{key:"bet",get:function(){if(Yi.HE)return 4096}}]),n}(po);function _o(t,n){return t.indexOf(n)>-1}var So=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.Det=function(t){return t>=2},n}(po),To=function(t){function n(){var n;return(n=t.call(this)||this).Eet=Yi.aL>=11,n.ott=Yi.oL&&!(Yi.Ua&&Yi.aL<10),n}return Dt(n,t),n}(po),Eo=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"met",get:function(){var t=this;return f.webOS&&!this.Let&&f.webOS.deviceInfo((function(n){t.Let={width:n.screenWidth,height:n.screenHeight}})),this.Let}},{key:"XR",get:function(){return!1}}]),n}(wo),Io=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"Tet",get:function(){return!Yi.ZE||(Yi.Rk?92!==Yi.zk:Yi.Ck>=100)}}]),n}(po),ko=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"Met",get:function(){return!0}}]),n}(wo),Ro=function(){function t(){this.Pet=new Oo,this.Bet=function(){var t=function(){if(Yi.eL)return new yo;if(Yi.Xk||Yi.qk)return new So;if(Yi.oL)return new To;if(Yi.Lk)return new Io;return new po}();return Yi.Ua?new go(t):Yi.Qs?new bo(t):Yi.Uk?new mo(t):Yi.Gk?new Eo(t):Yi.HE?new ko(t):new wo(t)}(),this.zet=No(),self.performance&&self.performance.now?this.n_=function(){return self.performance.now()}:this.n_=Mn}var n=t.prototype;return n.Cet=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Qi.apply(void 0,ct(n))},n.Nw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];te.apply(void 0,ct(n))},n.jet=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];ne.apply(void 0,ct(n))},n.Oet=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];ie.apply(void 0,[t].concat(ct(i)))},n.o_=function(t,n){return a(t,n)},n.GT=function(t,n){return d(t,n)},n.r_=function(t){v(t)},n.WT=function(t){l(t)},n.Wj=function(){return this.Ret.Wj()},n.xM=function(){return this.Ret.xM()},n.CM=function(){return this.Ret.CM()},n.LM=function(){return this.Ret.LM()},n.kM=function(){return this.Ret.kM()},n.Yj=function(t,n){return this.Ret.Yj(t,n)},n.Qj=function(t){return this.Ret.Qj(t)},n.Ah=function(t,n){var i;return void 0===n&&(n=uo(eo)),i="object"!==(void 0===n?"undefined":E(n))||n instanceof oo?n:n.href,new oo(t,i)},n.dw=function(t,n){if(void 0===n&&(n=uo(eo)),this.zet){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Ah(t,n).href},Nt(t,[{key:"UR",get:function(){return this.Pet}},{key:"Ys",get:function(){return this.Bet}},{key:"Uet",get:function(){return{Qet:c&&c.userAgent.match(/Android /i)?"Android":"other",Fet:Boolean(c&&c.userAgent.match(/Android 8.0.0/i))}}},{key:"JW",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Yet",get:function(){return"languages"in c?c.languages.slice():[c.language]}}]),t}(),Oo=function(){function t(){}return Nt(t,[{key:"QR",get:function(){return c.oscpu}},{key:"Ys",get:function(){return c.platform}},{key:"FR",get:function(){return c.vendor}},{key:"YR",get:function(){return c.vendorSub}}]),t}();function No(){if(self.URL)try{var t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}function Po(){return Po=g.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)g.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},Po.apply(this,arguments)}var Ao="9a04f079-9840-4286-ab92-e65be0885f95",Do="urn:uuid:"+Ao,Co="com.microsoft.playready",xo="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Bo="urn:uuid:"+xo,Mo="com.widevine.alpha",Uo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Lo="urn:uuid:"+Uo,Fo="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",zo="urn:uuid:"+Fo,Wo="com.apple.fps.1_0",qo=function(t){return t.Iw="playready",t.Dw="widevine",t.Ew="fairplay",t.Lw="clearkey",t.xw="aes128",t}({}),Ho={ow:qo.Iw,jL:Co,OL:"cenc",RL:Ao,PL:Do,zL:"PlayReady"},Vo={ow:qo.Dw,jL:Mo,OL:"cenc",RL:xo,PL:Bo,zL:"Widevine"},Xo={ow:qo.Ew,jL:Wo,OL:"skd",RL:Fo,PL:zo,zL:"FairPlay"},jo=(qo.Ew,{ow:qo.Lw,jL:"org.w3.clearkey",OL:"cenc",RL:Uo,PL:Lo,zL:"ClearKey"}),Yo=Yi.Lk&&Yi.Ck>=42||Yi.eL&&Yi.nL>=38||Yi.Xk||Yi.Jk||Yi.cL&&Yi.dL>=29;function Ko(t,n){return function(t,n){return vt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Po({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Po({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var Go=function(){function t(t){this.Fj=Bt(),this.Hj=void 0,this.Vj=t}var n=t.prototype;return n.kM=function(){return this.Qj(Vo)},n.xM=function(){return this.Qj(jo)},n.LM=function(){return this.Qj(Ho)},n.CM=function(){return this.Qj(Xo)},n.Qj=function(t){var n=t.PL,i=this.Fj.get(n);if(i)return i;var e=this.Yj(t,'video/mp4; codecs="avc1.42000a"');return this.Fj.set(n,e),e},n.Yj=function(t,n){var i=this;return ut((function(){return st(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.Vj.Gj(t.jL,[Ko(n,!0)])];case 1:return e.sent(),[2,!0];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,i.Vj.Gj(t.jL,[Ko(n,!1)])];case 4:return e.sent(),[2,!0];case 5:return e.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}}))}))()},n.Wj=function(){return this.Hj||(this.Hj=this.Xj()),this.Hj},n.Xj=function(){var t=this;return ut((function(){return st(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:Yo?[4,t.xM()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),$o=function(t){return t.BM="UM",t.QM="FM",t.YM="contentprotectionerror",t.GM="contentprotectionsuccess",t.VM="currentsourcechange",t.WM="destroy",t.HM="durationchange",t.XM="emptied",t.ZM="encrypted",t.qM="ended",t.KM="JM",t.$M="ib",t.eb="sb",t.ob="hb",t.ub="loadstart",t.fb="manifestupdate",t._b="nosupportedrepresentationfound",t.gb="offline",t.vb="online",t.wb="pause",t.so="play",t.mb="progress",t.pb="ratechange",t.Ab="representationchange",t.yb="resize",t.Mb="seeked",t.bb="seeking",t.Tb="segmentnotfound",t.Sb="Nb",t.Ib="Db",t.ro="sourcechange",t.Eb="timeupdate",t.kb="volumechange",t.Lb="xb",t.Cb="jb",t.Ob="metricschange",t}({}),Zo=["cenc"],Jo=["cbcs","cbcs-1-9"],Qo=function(t){function n(n){var i;return(i=t.call(this,$o.Cb)||this).BL=n,i}return Dt(n,t),n}(Si),tu=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"UL")||this).QL=n,o.FL=i,o.UL=e,o.YL=r,o}return Dt(n,t),n}(Si),nu=function(t){function n(){return t.call(this,"lt")||this}return Dt(n,t),n}(Si),iu=new S([0]).buffer,eu=function(){function t(){this.Ou=[]}var n=t.prototype;return n.XL=function(t){for(var n=0,i=this.Ou;n<i.length;n++){if(Hn(i[n][0],t))return!0}return!1},n.ZL=function(t){for(var n=0,i=this.Ou;n<i.length;n++){var e=i[n];if(Hn(e[0],t))return e[1]}},n.qL=function(t,n){for(var i=0,e=this.Ou;i<e.length;i++){var r=e[i];if(Hn(r[0],t))return void(r[1]=n)}this.Ou.push([t,n])},n.KL=function(t,n){this.Ou.forEach((function(n){return t(n[1],n[0])}),n)},n.JL=function(){Tt(this.Ou)},Nt(t,[{key:"jp",get:function(){return this.Ou.length}}]),t}(),ru=function(){function t(){var t=this;this.sx=new Z((function(n,i){t.Hd=n,t.ix=i}))}var n=t.prototype;return n.$L=function(t){this.Hd&&(this.Hd(t),this.Hf())},n.tx=function(t){this.ix&&(this.ix(t),this.Hf())},n.i_=function(){this.sx.catch(kt),this.tx(new nn)},n.e_=function(t){var n=this;t.then((function(t){return n.$L(t)}),(function(t){return n.tx(t)}))},n.Hf=function(){this.Hd=void 0,this.ix=void 0},t}();function ou(t,n){return t===Co?function(t){if(t.byteLength<2*uu.length)return t;var n=new DataView(t,0,2*uu.length),i=hi(n,!0);if(i===uu)return t;return function(t){var n='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',i='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',e=""+n+Xn(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new S(2*t.length);return fi(vi(i),new gi,t,n),i}(e,!0).buffer}(t)}(n):n}var uu="<PlayReady";var su=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).nx=i,o.ox=e,o}return Dt(n,t),n}(Jt),fu=function(t,n){return fu=g.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)g.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},fu(t,n)};function hu(t,n){if("function"!=typeof n&&null!==n)throw new b("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}fu(t,n),t.prototype=null===n?g.create(n):(i.prototype=n.prototype,new i)}function cu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.hx=t,this.ux=n}t.prototype.get=function(t){var n=this.hx.get(t);if(0===this.ux||void 0===n)return n;var i=this.hx.get(t+1)||0,e=n&(1<<8-this.ux)-1,r=i>>8-this.ux;return(e<<this.ux)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.hx.get(m.floor((t+this.ux)/8));if(void 0!==n)return(n&1<<7-this.ux-t%8)>0?1:0}},g.defineProperty(t.prototype,"bitLength",{get:function(){return this.hx.bitLength-this.ux},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"length",{get:function(){return this.hx.length},enumerable:!1,configurable:!0})})(),m.pow(2,-52);function au(t,n,i){return m.min(m.max(t,n),i)}function vu(t,n){return t>>8-n}function du(t,n){return t&(1<<n)-1}var lu=function(){function t(t){this.lx=t,this._x=0,this.gx=0}return g.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this._x+this.gx},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"done",{get:function(){return this._x===this.lx.length&&0===this.gx},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"location",{get:function(){return{byte:this._x,bit:this.gx}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.lx);return n.seek(this._x,this.gx),n},t.prototype.canReadBits=function(t){return 8*this._x+t+this.gx<=8*this.lx.length},t.prototype.canReadBytes=function(t){return 0===this.gx?this._x+t<=this.lx.length:this._x+t<this.lx.length},t.prototype.incBit=function(){this.gx++,this.gx>7&&(this._x++,this.gx=0)},t.prototype.seek=function(t,n){this._x=t,this.gx=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new w("Cannot read past end of buffer.");return this.lx.get(this._x)>>7-this.gx&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new w("Cannot read past end of buffer.");if(0===this.gx)return this.lx.get(this._x++);var t=du(this.lx.get(this._x),8-this.gx),n=vu(this.lx.get(this._x+1),this.gx);return this._x++,t<<this.gx|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new w("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 w("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new w("Cannot read past end of buffer.");var n=0;if(0===this.gx&&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 w("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new w("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-m.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 w("Skipping over the buffer edge is not allowed.");var n=this.gx+t;this._x+=n>>3,this.gx=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new w("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}(),wu=function(t,n){return t===n?0:t<n?-1:t>n?1:_(t)?_(n)?0:1:-1},bu=function(){function t(){this.vx=[],this.wx=[],this.mx=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 w("The buffer length must be positive.");if(0!==i){if(0===this.wx.length)this.wx.push(0);else{var e=this.wx[this.wx.length-1]+this.vx[this.vx.length-1].length;this.wx.push(e)}this.vx.push(t.subarray(n,n+i)),this.mx+=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.vx;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.vx=[],this.wx=[],this.mx=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.wx[n];return this.vx[n][i]}},g.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.vx.length<1)return-1;if(this.vx.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.vx[0];return"number"==typeof t?cu(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=cu(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=m.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.wx,t,wu)},t.prototype.join=function(){if(1===this.vx.length)return this.vx[0];var t=new S(this.length);return this.copyInternal(t,0),t},g.defineProperty(t.prototype,"length",{get:function(){return this.mx},enumerable:!1,configurable:!0}),g.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 w("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new w("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)*m.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=au(n,0,this.length),r=au(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.vx[u],f=e,h=f-this.wx[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.wx[u],s=this.vx[u];var c=r-f;return o.pushRange(s,h,c),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.vx.length-1,e=this.vx[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.vx[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),gu=function(){function t(n){this.Ax=n||t.BUFFER_CHUNK_SIZE,this.yx=!1,this.Mx=new bu,this.lx=new S(this.Ax),this.bx=0,this.Tx=0,this.gx=7}return t.prototype.closeByte=function(){this.lx[this.bx++]=this.Tx,this.bx>=this.Ax&&this.closeBuffer(),this.Tx=0,this.gx=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.bx&&(this.Mx.pushRange(this.lx,0,this.bx),t&&(this.lx=new S(this.Ax)),this.bx=0)},g.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.gx},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.yx)throw new w("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.yx=!0,this.Mx},t.prototype.writeBit=function(t){if(this.yx)throw new w("Cannot write to a closed BitWriter.");this.Tx|=t<<this.gx,0===this.gx?this.closeByte():this.gx--},t.prototype.writeByte=function(t){if(this.yx)throw new w("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.Tx=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.gx;this.Tx|=vu(t,n+1),this.closeByte(),this.Tx=du(t,8-n)<<n+1,this.gx=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.yx)throw new w("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.bx+t.length<=this.Ax?(this.lx.set(t,this.bx),this.bx+=t.length,this.bx===this.Ax&&this.closeBuffer()):(this.closeBuffer(),this.Mx.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.gx;this.Tx|=vu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=du(t[i-1],8-n),r=vu(t[i],n+1);this.Tx=e<<n+1|r,this.closeByte()}this.Tx=du(t[t.length-1],8-n)<<n+1,this.gx=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new w("Received a negative number.");if(n>32)throw new w("The max bitlength that can be provided is 32.");if(t>=m.pow(2,n))throw new w("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 w("The max bitlength that can be provided is 32.");if(m.abs(t)>=m.pow(2,n-1))throw new w("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+m.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new w("Received a negative number.");for(var n=m.floor(m.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 S(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}(),mu=function(){function t(t){this.rb=new bu,this.Sx=t}return t.prototype.closeWriter=function(){void 0!==this.Sx&&(this.rb=this.rb.concat(this.Sx.close()),this.Sx=void 0)},g.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Sx&&(this.Sx=new gu),this.Sx},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}(),pu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new w("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(m.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 mu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=m.pow(2,32),t}();function yu(t,n){return t instanceof Bn?64===n:t<m.pow(2,n)}function _u(t,n){return m.round(t*m.pow(2,n))}function Su(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Tu(t,n){return t/m.pow(2,n)}var Eu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!yu(i,8))throw new w("the provided version cannot fit in 8 bits.");return r.flags=e,r}return hu(n,t),g.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new w("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(pu),Iu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return hu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(bu.from(this.data))},n}(pu),ku=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();var Ru=16384;function Ou(t){var n=t.length;if(n<=Ru)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Ru)i.push(String.fromCharCode.apply(String,t.slice(e,e+Ru)));return i.join("")}var Nu=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function Pu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Au(t,n,i){var e=Lu(zu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Du(t,n,i){return n.offset+i<=t.byteLength}function Cu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function xu(t,n,i){void 0===i&&(i=!1);var e=Cu(t,n,i),r=Cu(t,n,i),o=i?r:e,u=i?e:r;return Bn.fromBits(u,o,!0)}function Bu(t,n,i){return Ou(function(t){return[].slice.call(t)}(Au(t,n,i)))}function Mu(t,n){var i,e=Pu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&Pu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Pu(t,n))+(63&Pu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Pu(t,n))+64*(63&Pu(t,n))+(63&Pu(t,n))),i}function Uu(t,n){return function(t,n,i){var e=[],r=function(t,n){return n.offset+3<=t.byteLength&&239===t.getUint8(n.offset)&&187===t.getUint8(n.offset+1)&&191===t.getUint8(n.offset+2)}(t,n);r&&n.shift(3);for(;n.offset<t.byteLength;){var o=Mu(t,n);if(void 0===o)break;if(i&&0===o)break;e.push(o)}return function(t){for(var n=[],i=0,e=t;i<e.length;i++){var r=e[i];r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Ou(n)}(e)}(t,n,!0)}function Lu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new S(t.buffer,t.byteOffset+n,i-n)}function Fu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function zu(t){return new S(t.buffer,t.byteOffset,t.byteLength)}var Wu=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 ku(this.offset<<3)},t}(),qu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Pu(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 Cu(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=Cu(t,n,i),r=Cu(t,n,i),o=i?r:e,u=i?e:r;return Bn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return xu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Au(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(Cu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Bu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Uu(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function Hu(t,n){return t.type===n}var Vu=8;function Xu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=ju(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new w("Data incomplete");return n.boxes}function ju(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Du(t,n,Vu)){return{complete:!1,neededOffset:o=n.offset+Vu}}var e=Cu(t,n),r=Bu(t,n,4);if(1===e){if(!Du(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=xu(t,n).toNumber()}if("uuid"===r){if(!Du(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Bu(t,n,16)}var u=n.offset,s={type:r,size:e,headerSize:u-i};return{complete:!0,header:s}}(t,n);if(!e.complete)return e;var r=e.header,o=r.size;0===o&&(o=t.byteLength-i);var u=i+o;if(u>t.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new qu(Fu(t,i,u),new Wu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Yu(t){return{version:t>>24,flags:new Nu(16777215&t)}}function Ku(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Gu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function $u(t){var n=t.nextUint32Array(9);return{a:Tu(n[0],16),b:Tu(n[1],16),u:Tu(n[2],30),c:Tu(n[3],16),d:Tu(n[4],16),v:Tu(n[5],30),x:Tu(n[6],16),y:Tu(n[7],16),w:Tu(n[8],30)}}function Zu(t){return new Iu(t.type,Lu(zu(t.data.data),t.data.cursor.offset))}var Ju=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return hu(n,t),g.defineProperty(n.prototype,"handlerType",{get:function(){return this.Nx},set:function(t){this.Nx=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Eu);function Qu(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new Ju(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}hu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Ju);var ts=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},g.defineProperty(t.prototype,"tag",{get:function(){return this.Ix},set:function(t){if(!yu(t,8))throw new w("Provided tag does not fit in 8 bits.");this.Ix=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}(),ns=(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}hu(n,t),g.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.Dx},set:function(t){if(!yu(t,8))throw new w("Provided objectTypeIndication does not fit in 8 bits.");this.Dx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"streamType",{get:function(){return this.Ex},set:function(t){if(!yu(t,6))throw new w("Provided streamType does not fit in 6 bits.");this.Ex=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.kx},set:function(t){if(!yu(t,24))throw new w("Provided bufferSizeDb does not fit in 24 bits.");this.kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.Lx},set:function(t){if(!yu(t,32))throw new w("Provided maxBitrate does not fit in 32 bits.");this.Lx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.xx},set:function(t){if(!yu(t,32))throw new w("Provided avgBitrate does not fit in 32 bits.");this.xx=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var n=0,i=this.decoderSpecificInfo;n<i.length;n++){i[n].serialize(t)}}}(ts),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}hu(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(bu.from(this.data))}}(ts),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return hu(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(ts)),is=(function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,3,r.fixed28BitMode)||this;return o.decoderConfigDescriptor=e,o.esId=n,o.streamPriority=i,o.dependsOnEsId=null==r?void 0:r.dependsOnEsId,o.urlString=null==r?void 0:r.url,o.ocrEsId=null==r?void 0:r.ocrEsId,o.slConfigDescriptor=new ns(r.fixed28BitMode),o}hu(n,t),g.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"esId",{get:function(){return this.Cx},set:function(t){if(!yu(t,16))throw new w("Provided esId does not fit in 16 bits.");this.Cx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"streamPriority",{get:function(){return this.jx},set:function(t){if(!yu(t,5))throw new w("Provided streamPriority does not fit in 5 bits.");this.jx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.Ox},set:function(t){if(t&&!yu(t,16))throw new w("Provided dependsOnEsId does not fit in 16 bits.");this.Ox=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.Rx},set:function(t){if(t&&!yu(t,16))throw new w("Provided ocrEsId does not fit in 16 bits.");this.Rx=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},n.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(ts),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return hu(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}(pu)),es=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return hu(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(is),rs=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return hu(n,t),g.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.Px},set:function(t){if(!yu(t,16))throw new w("Provided dataReferenceIndex does not fit in 16 bits.");this.Px=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){for(var n=0;n<6;n++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},n}(es),os=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return hu(n,t),g.defineProperty(n.prototype,"channelCount",{get:function(){return this.zx},set:function(t){if(!yu(t,16))throw new w("Provided channelCount does not fit in 16 bits.");this.zx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleSize",{get:function(){return this.Bx},set:function(t){if(!yu(t,16))throw new w("Provided sampleSize does not fit in 16 bits.");this.Bx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Ux},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided rate does not fit in 32 bits (fixed 16.16).");this.Ux=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(_u(this.sampleRate,16),32),this.extra&&Su(n.writer,this.extra)},n}(rs),us=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Qx},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t,32)})))throw new w("Not all entries can be represented in 32 bits.");this.Qx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Eu),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}hu(n,t),g.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Fx},set:function(t){if(!yu(t,32))throw new w("Provided cleanApertureWidthN does not fit in 32 bits.");this.Fx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.Yx},set:function(t){if(!yu(t,32))throw new w("Provided cleanApertureWidthD does not fit in 32 bits.");this.Yx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Gx},set:function(t){if(!yu(t,32))throw new w("Provided cleanApertureHeightN does not fit in 32 bits.");this.Gx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.Vx},set:function(t){if(!yu(t,32))throw new w("Provided cleanApertureHeightD does not fit in 32 bits.");this.Vx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Wx},set:function(t){if(!yu(t,32))throw new w("Provided horizOffN does not fit in 32 bits.");this.Wx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizOffD",{get:function(){return this.Hx},set:function(t){if(!yu(t,32))throw new w("Provided horizOffD does not fit in 32 bits.");this.Hx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vertOffN",{get:function(){return this.Xx},set:function(t){if(!yu(t,32))throw new w("Provided vertOffN does not fit in 32 bits.");this.Xx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Zx},set:function(t){if(!yu(t,32))throw new w("Provided vertOffD does not fit in 32 bits.");this.Zx=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)}}(pu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Qx},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t.sampleCount,32)||!yu(t.sampleOffset,32)})))throw new w("Not all entries can be represented in 64 bits.");this.Qx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(Eu),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}hu(n,t),g.defineProperty(n.prototype,"location",{get:function(){return this.qx},set:function(t){this.flags=void 0===t?1:0,this.qx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Eu),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}hu(n,t),g.defineProperty(n.prototype,"location",{get:function(){return this.qx},set:function(t){if(1&this.flags)throw new w("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.qx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Eu),function(t){function n(){return t.call(this,"dinf")||this}hu(n,t)}(es),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!yu(i,8))throw new w("the provided version cannot fit in 8 bits.");return r.flags=e,r}return hu(n,t),g.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new w("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(is)),ss=(function(t){function n(){return t.call(this,"dref",0,0)||this}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(us),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 hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"entries",{get:function(){return this.Qx},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!yu(e.segmentDuration,this.bitSize))throw new w("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!yu(e.mediaTime,this.bitSize))throw new w("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!yu(e.mediaRateInteger,16))throw new w("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!yu(e.mediaRateFraction,16))throw new w("Provided mediaRateFraction does not fit in 16 bits.")}this.Qx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(Eu)),fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return hu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration,32),t.writer.writeInt(r.mediaTime,32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(ss),hs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return hu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(r.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(r.mediaTime.getHighBits(),32),t.writer.writeInt(r.mediaTime.getLowBits(),32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(ss);function cs(t){for(var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=[],s=0;s<o;s++){var f=void 0,h=void 0;0===e?(f=n.nextUint32(),h=n.nextInt32()):(f=n.nextUint64(),h=n.nextInt64());var c=n.nextInt16(),a=n.nextInt16();u.push({segmentDuration:f,mediaTime:h,mediaRateFraction:a,mediaRateInteger:c})}return 0===e?new fs(u,r.raw):new hs(u,r.raw)}var as=function(t){function n(){return t.call(this,"edts")||this}return hu(n,t),n}(es);function vs(t){for(var n=new as,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"elst")?n.boxes.push(cs(r)):n.boxes.push(Zu(r))}return n}var ds=function(t){function n(n,i,e,r){var o=t.call(this,n)||this;return o.majorBrand=i,o.minorVersion=e,o.compatibleBrands=r,o}return hu(n,t),g.defineProperty(n.prototype,"majorBrand",{get:function(){return this.Kx},set:function(t){if(4!==t.length)throw new w("the provided major brand does not conform to the 4 character requirement");this.Kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"minorVersion",{get:function(){return this.Jx},set:function(t){if(!yu(t,32))throw new w("the provided minor version does not fit in 32 bits.");this.Jx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.$x},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new w("Some of the compatible brands do not conform to the 4 character requirement");this.$x=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}(pu),ls=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}hu(n,t)}(ds),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}hu(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(bu.from(this.data))}}(pu),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 hu(n,t),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.tC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.iC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.iC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.eC},set:function(t){if(!yu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.eC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.sC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.sC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"language",{get:function(){return this.nC},set:function(t){if(!ms(t))throw new w("Expected an ISO-639-2/T language code");this.nC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Eu)),ws=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return hu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(ls),bs=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return hu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(ls);function gs(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=Ku(n,e),u=new lu(bu.from(n.nextUint8Array(2)));u.skipBits(1);for(var s=[],f=0;f<3;f++)s.push(u.readUInt(5));var h=s.map((function(t){return String.fromCharCode(t+96)})).join("");return ms(h)||(h="und"),n.skip(2),0===e?new ws(o,h,r.raw):new bs(o,h,r.raw)}function ms(t){return/^[a-z]{3}$/.test(t)}var ps=function(t){function n(){return t.call(this,"mdia")||this}return hu(n,t),n}(es);function ys(t){for(var n=new ps,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mdhd")?n.boxes.push(gs(r)):Hu(r,"hdlr")?n.boxes.push(Qu(r)):n.boxes.push(Zu(r))}return n}var _s;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new bu,n}hu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(pu),function(t){function n(){return t.call(this,"minf")||this}hu(n,t)}(es),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.handler.serialize())}}(us);!function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(_s||(_s={}));var Ss,Ts,Es={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Is(t,n){n.writer.writeUInt(_u(t.a,16),32),n.writer.writeUInt(_u(t.b,16),32),n.writer.writeUInt(_u(0,30),32),n.writer.writeUInt(_u(t.c,16),32),n.writer.writeUInt(_u(t.d,16),32),n.writer.writeUInt(_u(0,30),32),n.writer.writeUInt(_u(t.x,16),32),n.writer.writeUInt(_u(t.y,16),32),n.writer.writeUInt(_u(1,30),32)}function ks(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Ss.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Ts.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Ts.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Ts.UNKNOWN,2)}function Rs(t,n){var i,e,r;n.writer.writeUInt(0,4),ks(t,n),n.writer.writeUInt(null!==(i=t.samplePaddingValue)&&void 0!==i?i:0,3),n.writer.writeBool(null!==(e=t.sampleIsNonSyncSample)&&void 0!==e&&e),n.writer.writeUInt(null!==(r=t.sampleDegradationPriority)&&void 0!==r?r:0,16)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(Ss||(Ss={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Ts||(Ts={}));var Os=function(){},Ns=function(t){function n(n,i,e){var r=t.call(this,"pssh",n,0)||this;return r.systemId=i,r.data=e,r}return hu(n,t),g.defineProperty(n.prototype,"systemId",{get:function(){return this.rC},set:function(t){if(16!==t.length)throw new w("Provided systemId length is not 16.");this.rC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"data",{get:function(){return this.oC},set:function(t){if(!yu(t.length,32))throw new w("Provided data length does not fit in 32 bits.");this.oC=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(bu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(bu.from(this.data))},n}(Eu),Ps=function(t){function n(n,i){return t.call(this,0,n,i)||this}return hu(n,t),n}(Ns),As=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return hu(n,t),g.defineProperty(n.prototype,"kIds",{get:function(){return this.hC},set:function(t){if(!yu(t.length,32))throw new w("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new w("Not all provided key ids are 16 bytes long.");this.hC=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(bu.from(e))}},n}(Ns);function Ds(t){var n=t.data.nextUint8();t.data.skip(3);var i=t.data.nextUint8Array(16),e=[];if(1===n)for(var r=t.data.nextUint32(),o=0;o<r;o++)e.push(t.data.nextUint8Array(16));var u=t.data.nextUint32(),s=t.data.nextUint8Array(u);return 1===n?new As(i,s,e):new Ps(i,s)}var Cs=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"mehd",i,e)||this;return r.fragmentDuration=n,r}return hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.aC},set:function(t){if(!yu(t,this.bitSize))throw new w("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.aC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Eu),xs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return hu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Cs),Bs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return hu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),n.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},n}(Cs);function Ms(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new xs(n.nextUint32(),r.raw):new Bs(n.nextUint64(),r.raw)}var Us=function(t){function n(n,i,e,r){void 0===i&&(i={}),void 0===e&&(e=0),void 0===r&&(r=0);var o,u,s,f=this;return(f=t.call(this,"trex",e,r)||this).trackId=n,f.defaultSampleDescriptionIndex=null!==(o=null==i?void 0:i.sampleDescriptionIndex)&&void 0!==o?o:0,f.defaultSampleDuration=null!==(u=i.sampleDuration)&&void 0!==u?u:0,f.defaultSampleSize=null!==(s=i.sampleSize)&&void 0!==s?s:0,f.defaultSampleFlags=i.sampleFlags,f}return hu(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.uC},set:function(t){if(!yu(t,32))throw new w("Provided track id does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.cC},set:function(t){if(!yu(t,32))throw new w("Provided default sample description index does not fit in 32 bits.");this.cC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.lC},set:function(t){if(!yu(t,32))throw new w("Provided default sample duration does not fit in 32 bits.");this.lC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.dC},set:function(t){if(!yu(t,32))throw new w("Provided default sample size does not fit in 32 bits.");this.dC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.fC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!yu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!yu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.fC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},n.prototype.serializeBoxContent=function(n){var i;t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),n.writer.writeUInt(this.defaultSampleDescriptionIndex,32),n.writer.writeUInt(this.defaultSampleDuration,32),n.writer.writeUInt(this.defaultSampleSize,32),Rs(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Eu);function Ls(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Gu(new lu(bu.from(n.nextUint8Array(4))));return new Us(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Fs=function(t){function n(){return t.call(this,"mvex")||this}return hu(n,t),n}(es);function zs(t){for(var n=new Fs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mehd")?n.boxes.push(Ms(r)):Hu(r,"trex")?n.boxes.push(Ls(r)):n.boxes.push(Zu(r))}return n}var Ws=function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,h,c=this;return(c=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,c.modificationTime=i.modification,c.timescale=i.scale,c.duration=i.duration,c.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,c.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,c.matrix=null!==(h=r.matrix)&&void 0!==h?h:Es,c._C=e,c}return hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.tC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.iC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.iC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.eC},set:function(t){if(!yu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.eC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.sC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.sC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"rate",{get:function(){return this.gC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided rate does not fit in 32 bits (fixed 16.16).");this.gC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"volume",{get:function(){return this.vC},set:function(t){if(!yu(_u(t,8),16))throw new w("Provided volume does not fit in 16 bits (fixed 8.8).");this.vC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"matrix",{get:function(){return this.wC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new w("(u, v, w) does not match the required (0, 0, 1)");this.wC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"nextTrackId",{get:function(){return this._C},set:function(t){if(0===t)throw new w("NextTrackId cannot be 0.");if(!yu(t,32))throw new w("NextTrackId cannot exceed 32 bits.");this._C=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(_u(this.rate,16),32),n.writer.writeUInt(_u(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Is(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(Eu),qs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return hu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(Ws),Hs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,1,r)||this}return hu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Ws);function Vs(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=Ku(n,e),u=Tu(n.nextUint32(),16),s=Tu(n.nextUint16(),8);n.skip(2),n.skip(8);var f=$u(n);n.skip(24);var h=n.nextUint32();return 0===e?new qs(o,h,{rate:u,volume:s,matrix:f},r.raw):new Hs(o,h,{rate:u,volume:s,matrix:f},r.raw)}var Xs=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,h,c,a=this;return a=t.call(this,"tkhd",n,function(t){var n,i,e,r;return{trackEnabled:null===(n=null==t?void 0:t.trackEnabled)||void 0===n||n,trackInMovie:null===(i=null==t?void 0:t.trackInMovie)||void 0===i||i,trackInPreview:null===(e=null==t?void 0:t.trackInPreview)||void 0===e||e,trackSizeIsAspectRatio:null!==(r=null==t?void 0:t.trackSizeIsAspectRatio)&&void 0!==r&&r}}(s))||this,a.creationTime=i.creation,a.modificationTime=i.modification,a.trackId=e,a.duration=i.duration,a.volume=r,a.width=o,a.height=u,a.layer=null!==(f=s.layer)&&void 0!==f?f:0,a.alternateGroup=null!==(h=s.alternateGroup)&&void 0!==h?h:0,a.matrix=null!==(c=s.matrix)&&void 0!==c?c:Es,a}return hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.tC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.iC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.iC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"trackId",{get:function(){return this.uC},set:function(t){if(0===t)throw new w("trackId cannot be 0.");if(!yu(t,32))throw new w("trackId cannot exceed 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.sC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.sC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"volume",{get:function(){return this.vC},set:function(t){if(!yu(_u(t,8),16))throw new w("Provided volume does not fit in 16 bits (fixed 8.8).");this.vC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"width",{get:function(){return this.mC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided width does not fit in 32 bits (fixed 16.16).");this.mC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"height",{get:function(){return this.pC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided height does not fit in 32 bits (fixed 16.16).");this.pC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"layer",{get:function(){return this.AC},set:function(t){if(!yu(t,16))throw new w("Provided layer does not fit in 16 bits.");this.AC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.yC},set:function(t){if(!yu(t,16))throw new w("Provided alternateGroup does not fit in 16 bits.");this.yC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"matrix",{get:function(){return this.wC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new w("(u, v, w) does not match the required (0, 0, 1)");this.wC=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(_u(this.volume,8),16),n.writer.writeUInt(0,16),Is(this.matrix,n),n.writer.writeUInt(_u(this.width,16),32),n.writer.writeUInt(_u(this.height,16),32)},n}(Eu),js=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return hu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},n}(Xs),Ys=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return hu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Xs);function Ks(t){var n,i,e,r,o=t.data,u=Yu(o.nextUint32()),s=u.version,f=u.flags,h=f.isSet(8),c=f.isSet(4),a=f.isSet(2),v=f.isSet(1);0===s?(n=o.nextUint32(),i=o.nextUint32(),e=o.nextUint32(),o.skip(4),r=o.nextUint32()):(n=o.nextUint64(),i=o.nextUint64(),e=o.nextUint32(),o.skip(4),r=o.nextUint64()),o.skip(8);var d=o.nextInt16(),l=o.nextInt16(),w=Tu(o.nextInt16(),8);o.skip(2);var b=$u(o),g=Tu(o.nextUint32(),16),m=Tu(o.nextUint32(),16);return 0===s?new js({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a}):new Ys({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var Gs=function(t){function n(){return t.call(this,"trak")||this}return hu(n,t),n}(es);function $s(t){for(var n=new Gs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"tkhd")?n.boxes.push(Ks(r)):Hu(r,"mdia")?n.boxes.push(ys(r)):Hu(r,"edts")?n.boxes.push(vs(r)):n.boxes.push(Zu(r))}return n}var Zs=function(t){function n(){return t.call(this,"moov")||this}return hu(n,t),n}(es);var Js=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"tfdt",i,e)||this;return r.baseMediaDecodeTime=n,r}return hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.MC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.MC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Eu),Qs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return hu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(Js),tf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return hu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},n}(Js);function nf(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Qs(n.nextUint32(),r.raw):new tf(n.nextUint64(),r.raw)}var ef=function(t){function n(n,i){void 0===i&&(i=0);var e=t.call(this,"tfhd",i,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(n))||this;return e.trackId=n.trackId,e.baseDataOffset=n.baseDataOffset,e.sampleDescriptionIndex=n.sampleDescriptionIndex,e.defaultSampleDuration=n.defaultSampleDuration,e.defaultSampleSize=n.defaultSampleSize,e.defaultSampleFlags=n.defaultSampleFlags,e}return hu(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.uC},set:function(t){if(!yu(t,32))throw new w("Provided track id does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.bC},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new w("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new w("The base data offset present flag is not set.");if(t&&!yu(t,64))throw new w("Provided baseDataOffset does not fit in 32 bits.");this.bC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.TC},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new w("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new w("The sample description index flag is not set.");if(t&&!yu(t,32))throw new w("Provided sampleDescriptionIndex does not fit in 32 bits.");this.TC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.lC},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new w("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new w("The default sample duration present flag is not set.");if(t&&!yu(t,32))throw new w("Provided defaultSampleDuration does not fit in 32 bits.");this.lC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.dC},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new w("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new w("The default sample size present flag is not set.");if(t&&!yu(t,32))throw new w("Provided defaultSampleSize does not fit in 32 bits.");this.dC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.fC},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new w("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new w("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!yu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!yu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.fC=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(n+=8),this.flags.sampleDescriptionIndexPresent&&(n+=4),this.flags.defaultSampleDurationPresent&&(n+=4),this.flags.defaultSampleSizePresent&&(n+=4),this.flags.defaultSampleFlagsPresent&&(n+=4),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(n.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&n.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&n.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&n.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&Rs(this.defaultSampleFlags,n)},n}(Eu);function rf(t){var n=t.data,i=n.nextUint8(),e=new lu(bu.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=Boolean(e.readBit()),a=n.nextUint32(),v=c?n.nextUint64():void 0,d=h?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?Gu(new lu(bu.from(n.nextUint8Array(4)))):void 0;return new ef({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var of=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return hu(n,t),g.defineProperty(n.prototype,"dataOffset",{get:function(){return this.SC},set:function(t){if(t&&!yu(t,32))throw new w("Provided data offset does not fit in 32 bits.");this.SC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.NC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!yu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!yu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.NC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"samples",{get:function(){return this.IC},set:function(t){var n,i;if(!yu(t.length,32))throw new w("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 w("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new w("The sample duration present flag is not set.");if(o.duration&&!yu(o.duration,32))throw new w("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new w("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new w("The sample size present flag is not set.");if(o.size&&!yu(o.size,32))throw new w("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new w("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new w("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!yu(o.flags.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!yu(o.flags.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new w("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new w("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!yu(o.compositionTimeOffset,32))throw new w("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.IC=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(n+=4),this.flags.firstSampleFlagsPresent&&(n+=4),this.flags.sampleDurationPresent&&(n+=4*this.samples.length),this.flags.sampleSizePresent&&(n+=4*this.samples.length),this.flags.sampleFlagsPresent&&(n+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(n+=4*this.samples.length),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&n.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&Rs(this.firstSampleFlags,n);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];this.flags.sampleDurationPresent&&n.writer.writeUInt(r.duration,32),this.flags.sampleSizePresent&&n.writer.writeUInt(r.size,32),this.flags.sampleFlagsPresent&&Rs(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Eu);function uf(t){var n=t.data,i=n.nextUint8(),e=new lu(bu.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Gu(new lu(bu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Gu(new lu(bu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new of(i,a,v)}var sf=function(t){function n(){return t.call(this,"traf")||this}return hu(n,t),n}(es);function ff(t){for(var n=new sf,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"tfhd")?n.boxes.push(rf(r)):Hu(r,"tfdt")?n.boxes.push(nf(r)):Hu(r,"trun")?n.boxes.push(uf(r)):n.boxes.push(Zu(r))}return n}var hf=function(t){function n(){return t.call(this,"moof")||this}return hu(n,t),n}(es);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}hu(n,t),g.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.DC},set:function(t){if(!yu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.DC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(Eu);var cf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return hu(n,t),g.defineProperty(n.prototype,"codingName",{get:function(){return this.EC},set:function(t){if(4!==t.length)throw new w("Provided coding name was not 4 characters long.");this.EC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(pu),af=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}hu(n,t),g.defineProperty(n.prototype,"hSpacing",{get:function(){return this.kC},set:function(t){if(!yu(t,32))throw new w("Provided hSpacing does not fit in 32 bits.");this.kC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vSpacing",{get:function(){return this.LC},set:function(t){if(!yu(t,32))throw new w("Provided vSpacing does not fit in 32 bits.");this.LC=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)}}(pu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}hu(n,t),n.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},n.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(es),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new cf(n),r}hu(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())}}(pu),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 hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"entries",{get:function(){return this.Qx},set:function(t){var n=this;if(!yu(t.length,32))throw new w("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!yu(t,n.bitSize)})))throw new w("Not all provided entries fit in ".concat(this.bitSize," bits."));this.Qx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.xC},set:function(t){if(void 0===t)this.flags=0;else{if(!yu(t.auxInfoType,32))throw new w("Provided auxInfoType does not fit in 32 bits.");if(!yu(t.auxInfoTypeParameter,32))throw new w("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.xC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(Eu)),vf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}hu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e,32)}}}(af),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}hu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.getHighBitsUnsigned(),32),t.writer.writeUInt(e.getLowBitsUnsigned(),32)}}}(af),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}hu(n,t),g.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.jC},set:function(t){if(!yu(t,8))throw new w("Provided defaultSampleInfoSize does not fit in a single byte.");this.jC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.OC},set:function(t){if(!yu(t.length,32))throw new w("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!yu(t,8)})))throw new w("Not all provided sampleInfoSizes fit in a byte.");this.OC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.xC},set:function(t){if(void 0===t)this.flags=0;else{if(!yu(t.auxInfoType,32))throw new w("Provided auxInfoType does not fit in 32 bits.");if(!yu(t.auxInfoTypeParameter,32))throw new w("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.xC=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 w("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Eu),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n);for(var i=0,e=this.samples;i<e.length;i++){ks(e[i],n)}}}(Eu),function(t){function n(n){return t.call(this,"stsd",n,0)||this}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(us),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 hu(n,t),g.defineProperty(n.prototype,"groupingType",{get:function(){return this.RC},set:function(t){if(4!==t.length)throw new w("The provided groupingType does not equal 4 characters.");this.RC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(Eu)),df=(function(t){function n(n,i){return t.call(this,0,n,i)||this}hu(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(vf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}hu(n,t),g.defineProperty(n.prototype,"defaultLength",{get:function(){return this.zC},set:function(t){if(!yu(t,32))throw new w("The provided defaultLength does not fit in 32 bits.");this.zC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},n.prototype.serializeEntryBoxContent=function(t,n){0===this.defaultLength&&t.writer.writeUInt(n.getBoxContentSize(),32),n.serializeBoxContent(t)}}(vf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new w("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}hu(n,t),g.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.cC},set:function(t){if(!yu(t,32))throw new w("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.cC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(vf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}hu(n,t),g.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.BC},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!yu(t,32)})))throw new w("Not all sampleSizes can be represented in 32 bits.");this.BC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Eu),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}hu(n,t),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.dC},set:function(t){if(!yu(t,32))throw new w("Provided defaultSampleSize does not fit in 32 bits.");this.dC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"samples",{get:function(){return this.IC},set:function(t){if(!yu(t,32))throw new w("Number of allowed samples cannot fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(Eu),function(t){function n(){return t.call(this,"stbl")||this}hu(n,t)}(es),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Qx},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t.firstChunk,32)||!yu(t.sampleDescriptionIndex,32)||!yu(t.samplesPerChunk,32)})))throw new w("Not all entries can be represented in 96 bits.");this.Qx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(Eu),function(t){function n(){return t.call(this,"schi")||this}hu(n,t)}(es),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}hu(n,t),g.defineProperty(n.prototype,"schemeType",{get:function(){return this.QC},set:function(t){if(4!==t.length)throw new w("The provided schemeType does not have a length of 4.");this.QC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.FC},set:function(t){if(!yu(t,32))throw new w("The provided schemeVersion does not fit in 23 bits.");this.FC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"schemeUri",{get:function(){return this.YC},set:function(t){if(t&&4!==t.length)throw new w("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.YC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(Eu),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 hu(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"referenceId",{get:function(){return this.GC},set:function(t){if(!yu(t,32))throw new w("Provided referenceId does not fit in 32 bits.");this.GC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.eC},set:function(t){if(!yu(t,32))throw new w("Provided timescale does not fit in 32 bits.");this.eC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.VC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.VC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"firstOffset",{get:function(){return this.WC},set:function(t){if(!yu(t,this.bitSize))throw new w("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.WC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"references",{get:function(){return this.HC},set:function(t){if(!yu(t.length,16))throw new w("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(!yu(e.referencedSize,31))throw new w("Provided referenced size does not fit in 31 bits.");if(!yu(e.subsegmentDuration,32))throw new w("Provided subsegment duration does not fit in 31 bits.");if(!yu(e.sapType,3))throw new w("Provided SAP type does not fit in 3 bits.");if(!yu(e.sapDeltaTime,28))throw new w("Provided SAP delta time does not fit in 28 bits.")}this.HC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(Eu)),lf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,0,n,i,e,r,o,u)||this}return hu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(df),wf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,1,n,i,e,r,o,u)||this}return hu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},n}(df);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}hu(n,t)})(ds),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}hu(n,t),g.defineProperty(n.prototype,"balance",{get:function(){return this.XC},set:function(t){if(t<-1||t>1)throw new w("Provided balance does not fit in the allowed range [-1, 1].");if(!yu(_u(t,8),16))throw new w("Provided balance does not fit in 16 bits (fixed 8.8).");this.XC=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(_u(this.balance,8),16),n.writer.writeUInt(0,16)}}(Eu),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Qx},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t,32)})))throw new w("Not all entries can be represented in 32 bits.");this.Qx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Eu),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}hu(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.Qx},set:function(t){if(!yu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!yu(t.sampleCount,32)||!yu(t.sampleDelta,32)})))throw new w("Not all entries can be represented in 64 bits.");this.Qx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(Eu),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}hu(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.uC},set:function(t){if(!yu(t,32))throw new w("The provided trackId does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32)}}(us),function(t){function n(){return t.call(this,"udta")||this}hu(n,t)}(es);var bf={red:0,green:0,blue:0},gf=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=bf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}hu(n,t),g.defineProperty(n.prototype,"opColor",{get:function(){return this.ZC},set:function(t){if(!yu(t.red,16)||!yu(t.green,16)||!yu(t.blue,16))throw new w("Not all colors could be represented in 16 bits.");this.ZC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(Eu),function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,h,c,a=this;return(a=t.call(this,n,i)||this).width=e.width,a.height=e.height,a.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,a.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,a.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",a.frameCount=null!==(h=r.frameCount)&&void 0!==h?h:1,a.depth=null!==(c=r.depth)&&void 0!==c?c:24,a.clap=r.clap,a.pasp=r.pasp,a.extra=o,a}return hu(n,t),g.defineProperty(n.prototype,"width",{get:function(){return this.mC},set:function(t){if(!yu(t,16))throw new w("Provided width does not fit in 16 bits.");this.mC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"height",{get:function(){return this.pC},set:function(t){if(!yu(t,16))throw new w("Provided height does not fit in 16 bits.");this.pC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.qC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.qC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.KC},set:function(t){if(!yu(_u(t,16),32))throw new w("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.KC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"compressorName",{get:function(){return this.JC},set:function(t){if(t.length>31)throw new w("The provided compressorName should at most be 31 characters long.");this.JC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"frameCount",{get:function(){return this.$C},set:function(t){if(!yu(t,16))throw new w("Provided frameCount does not fit in 16 bits.");this.$C=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"depth",{get:function(){return this.tj},set:function(t){if(!yu(t,16))throw new w("Provided depth does not fit in 16 bits.");this.tj=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(_u(this.horizontalResolution,16),32),n.writer.writeUInt(_u(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&&Su(n.writer,this.extra)},n}(rs)),mf=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof S?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof S?n.concat(bu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Eu),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(os),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}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(gf),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}hu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(rs),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}hu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(pu),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}g.defineProperty(t.prototype,"version",{get:function(){return this.ij},set:function(t){if(!yu(t,8))throw new w("Provided version does not fit in 8 bits.");this.ij=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"profileIndication",{get:function(){return this.ej},set:function(t){if(!yu(t,8))throw new w("Provided profileIndication does not fit in 8 bits.");this.ej=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.sj},set:function(t){if(!yu(t,8))throw new w("Provided profileCompatibility does not fit in 8 bits.");this.sj=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"levelIndication",{get:function(){return this.nj},set:function(t){if(!yu(t,8))throw new w("Provided levelIndication does not fit in 8 bits.");this.nj=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"spsSets",{get:function(){return this.rj},set:function(t){if(!yu(t.length,5))throw new w("Provided number of spsSets exceeds the max (32)");this.rj=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"ppsSets",{get:function(){return this.hj},set:function(t){if(!yu(t.length,8))throw new w("Provided number of ppsSets exceeds the max (256)");this.hj=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(bu.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(bu.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}hu(n,t),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(i=null===(n=this.bitrateBox)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.configurationBox.serialize()),this.bitrateBox&&n.concat(this.bitrateBox.serialize())}}(gf),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}hu(n,t),g.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.kx},set:function(t){if(!yu(t,32))throw new w("Provided bufferSizeDb does not fit in 32 bits.");this.kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"max",{get:function(){return this.nf},set:function(t){if(!yu(t,32))throw new w("Provided max does not fit in 32 bits.");this.nf=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"avg",{get:function(){return this.aj},set:function(t){if(!yu(t,32))throw new w("Provided avg does not fit in 32 bits.");this.aj=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)}}(pu),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 w("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 S(0),s}return hu(n,t),g.defineProperty(n.prototype,"isProtected",{get:function(){return this.uj},set:function(t){if(!yu(t,8))throw new w("Provided isProtected does not fit in 1 byte.");this.uj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.cj},set:function(t){if(![8,16].includes(t))throw new w("Provided perSampleIvSize does not match any allowed value [8, 16].");this.cj=t,this.lj=new S(0)},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"kId",{get:function(){return this.dj},set:function(t){if(16!==t.length)throw new w("Provided kId length is not 16.");this.dj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"constantIv",{get:function(){return this.lj},set:function(t){if(![8,16].includes(t.length))throw new w("Provided constant IV length does not match any allowed value [8, 16].");this.lj=t,this.cj=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),Su(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Su(t.writer,this.constantIv))},n}(Eu)),pf=(function(t){function n(n){return t.call(this,0,n)||this}hu(n,t)}(mf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return hu(n,t),g.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this._j},set:function(t){if(!yu(t,4))throw new w("Provided cryptByteBlocks does not fit in 4 bits.");this._j=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.gj},set:function(t){if(!yu(t,4))throw new w("Provided skipByteBlocks does not fit in 4 bits.");this.gj=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(mf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new pf(n),i}hu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Os);function yf(t){return void 0!==t.iv}function _f(t){return void 0!==t.subsamples}(function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}hu(n,t),g.defineProperty(n.prototype,"samples",{get:function(){return this.IC},set:function(t){var n;if(!yu(t.length,32))throw new w("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(yf(r)&&![8,16].includes(r.iv.length))throw new w("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=_f(r)),!0===n&&!_f(r)||!1===n&&_f(r))throw new w("Mix of samples with and without subsamples detected.");if(_f(r)){if(!yu(r.subsamples.length,16))throw new w("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(!yu(s.clearData,16))throw new w("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!yu(s.protectedData,23))throw new w("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.IC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];yf(r)&&(n+=r.iv.length),_f(r)&&(n+=2+6*r.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];if(yf(r)&&Su(n.writer,r.iv),_f(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}})(Eu),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}hu(n,t),g.defineProperty(n.prototype,"timescale",{get:function(){return this.eC},set:function(t){if(!yu(t,32))throw new w("The provided timescale does not fit in 32 bits.");this.eC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.vj},set:function(t){if(!yu(t,32))throw new w("The provided presentationTimeDelta does not fit in 32 bits.");this.vj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"eventDuration",{get:function(){return this.wj},set:function(t){if(!yu(t,32))throw new w("The provided eventDuration does not fit in 32 bits.");this.wj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"id",{get:function(){return this.xS},set:function(t){if(!yu(t,32))throw new w("The provided id does not fit in 32 bits.");this.xS=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(bu.from(this.data))}}(Eu),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new mu,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function Sf(t,n){return function(i){var e=new qu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Wu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=ju(i,e);if(!r.complete)return;if(Hu(r.box,n))return r.box}}(e,t);if(!r)throw new w("".concat(t," box not found"));return n(r)}}Sf("moov",(function(t){for(var n=new Zs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mvhd")?n.boxes.push(Vs(r)):Hu(r,"trak")?n.boxes.push($s(r)):Hu(r,"mvex")?n.boxes.push(zs(r)):Hu(r,"pssh")?n.boxes.push(Ds(r)):n.boxes.push(Zu(r))}return n})),Sf("sidx",(function(t){var n,i,e=t.data,r=Yu(e.nextUint32()),o=r.version,u=r.flags,s=e.nextUint32(),f=e.nextUint32();0===o?(n=e.nextUint32(),i=e.nextUint32()):(n=e.nextUint64(),i=e.nextUint64()),e.skip(2);for(var h=e.nextUint16(),c=[],a=0;a<h;a++){var v=new lu(bu.from(e.nextUint8Array(12))),d=v.readBit(),l=v.readUInt(31),w=v.readUInt(32),b=Boolean(v.readBit()),g=v.readUInt(3),m=v.readUInt(28);c.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new lf(s,f,n,i,c,u.raw):new wf(s,f,n,i,c,u.raw)})),Sf("moof",(function(t){for(var n=new hf,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"traf")?n.boxes.push(ff(r)):Hu(r,"pssh")?n.boxes.push(Ds(r)):n.boxes.push(Zu(r))}return n}));var Tf=Sf("pssh",Ds),Ef=function(t){function n(n,i){var e;(e=t.call(this)||this).yj=n,e.Fw=i,e.Tj=!1,e.Ej=function(){e.Ij()},e.Lj=function(t){e.yo(new tu(e,t.messageType,ou(e.Fw,t.message)))},e.xj=function(){e.Tj=!0,e.Mj.jp>0&&(e.Mj.JL(),e.yo(new Qo(e.Mj))),e.yj.removeEventListener("keystatuseschange",e.Ej),e.yj.removeEventListener("message",e.Lj)},e.yj.addEventListener("keystatuseschange",e.Ej),e.yj.addEventListener("message",e.Lj),e.Mj=new eu;var r=[];return e.yj.closed&&r.push(Z.resolve(e.yj.closed)),e.Sj=new ru,r.push(e.Sj.sx),e.pj=Z.race(r).then(e.xj,e.xj),e.Ij(),e}Dt(n,t);var i=n.prototype;return i.Ws=function(){if(this.Tj)return this.pj;var t=[];return t.push(Z.resolve(this.yj.close())),t.push(un(1e3)),this.Sj.e_(Z.race(t).catch(If)),this.Tj=!0,this.pj},i.Nj=function(t,n,i){if(Yi.bk){var e=Tf(li(n));if(1===e.version)n=new Ps(e.systemId,e.data).serialize().join()}return Z.resolve(this.yj.generateRequest(t,n)).catch(If)},i.$n=function(t){return Z.resolve(this.yj.load(t)).catch(If)},i.DS=function(){return Z.resolve(this.yj.remove()).catch(If)},i.Yn=function(t){return Z.resolve(this.yj.update(t)).catch(If)},i.Ij=function(){var t=this;this.Mj.JL(),this.yj.keyStatuses.forEach((function(n,i){t.Dj(i,n)})),this.yo(new Qo(this.Mj))},i.Dj=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=li(t);if(this.Fw===Co&&16===e.byteLength){var r=vi(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.Fw===Co&&"status-pending"===n&&(n="usable"),this.Mj.qL(e,n)},Nt(n,[{key:"mj",get:function(){return this.pj}},{key:"Aj",get:function(){return this.yj.expiration}},{key:"BL",get:function(){return this.Mj}},{key:"bj",get:function(){return this.yj.sessionId}}]),n}(_i);function If(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|p(i[1],16))}throw new su(t.message,void 0,n,t)}var kf=function(){function t(t,n,i){this.jj=t,this.Qw=n,this.sd=i}var n=t.prototype;return n.Cj=function(t){var n=this;return ut((function(){return st(this,(function(i){return[2,new Ef(n.jj.createSession(t),n.Qw)]}))}))()},n.Oj=function(t){return Z.resolve(this.jj.setServerCertificate(t))},n.bn=function(t){return Z.resolve(t.setMediaKeys(this.jj))},n.Rj=function(t){return Z.resolve(t.setMediaKeys(null))},n.tr=function(){return Z.resolve()},t}(),Rf=function(){function t(t,n,i){this.Pj=t,this.Fw=n,this.Bj=i}var n=t.prototype;return n.zj=function(){var t=this;return ut((function(){var n;return st(this,(function(i){switch(i.label){case 0:return[4,t.Pj.createMediaKeys()];case 1:return n=i.sent(),[2,new kf(n,t.Fw,t.Bj)]}}))}))()},n.Uj=function(){return this.Bj},Nt(t,[{key:"Qw",get:function(){return this.Pj.keySystem}}]),t}();function Of(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Nf(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,Zj:e.Zj},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter((function(t){return Boolean(t.contentType)}));s.length&&(o.audioCapabilities=s.filter((function(e){return Pf(t,n,i,e)})),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter((function(t){return Boolean(t.contentType)}));f.length&&(o.videoCapabilities=f.filter((function(e){return Pf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Pf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!St(n,e.encryptionScheme))&&(!e.robustness&&t(i,Of(e.contentType))))}function Af(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Df(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 Cf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(xf))||!(!t.videoCapabilities||!t.videoCapabilities.some(xf))}function xf(t){return!t.robustness}function Bf(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(Po({},r,{robustness:n}))}return i}var Mf=function(){function t(){}return t.prototype.Gj=function(t,n){return ut((function(){var i,e,r,o,u,s,f;return st(this,(function(h){switch(h.label){case 0:for(n=n.filter((function(t){return!t.Zj})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Df(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Df(e.videoCapabilities));if(t!==Mo||!n.some(Cf))return[3,4];r=n.map((function(t){return function(t,n){return Po({},t,{videoCapabilities:t.videoCapabilities?Bf(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Bf(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,c.requestMediaKeySystemAccess(t,r)];case 2:return o=h.sent(),u=o.getConfiguration(),[2,new Rf(o,t,u)];case 3:return h.sent(),[3,4];case 4:return[4,c.requestMediaKeySystemAccess(t,n)];case 5:return s=h.sent(),f=s.getConfiguration(),[2,new Rf(s,t,f)]}}))}))()},t.qj=function(){return void 0!==c&&"function"==typeof c.requestMediaKeySystemAccess},t}(),Uf=function(t){function n(n,i){var e;return(e=t.call(this)||this).sO=n,e.nO=i,e.Tj=!1,e.aO=void 0,e.iO=void 0,e.Kj=void 0,e.xj=function(){e.Tj=!0,e.Jj.$L(void 0),e.Kj&&(e.Kj.removeEventListener("mskeyclose",e.xj),e.Kj.removeEventListener("mskeymessage",e.rO),e.Kj.removeEventListener("mskeyerror",e.Ss),e.Kj.removeEventListener("mskeyadded",e.oO))},e.rO=function(t){e.iO&&(e.iO.$L(void 0),e.iO=void 0),e.yo(new tu(e,"license-request",wi(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.Kj&&e.Kj.error;if(t){var n=new su("Unknown CDM error",t.code,t.systemCode);if(e.iO)e.iO.tx(n),e.iO=void 0;else if(e.aO)e.aO.tx(n),e.aO=void 0;else switch(n.nx){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.hO("output-not-allowed");break;default:e.hO("internal-error")}}},e.oO=function(){e.iO&&(e.hO("usable"),e.iO.$L(void 0),e.iO=void 0),e.aO&&(e.hO("usable"),e.aO.$L(void 0),e.aO=void 0)},e.Jj=new ru,e.$j=new eu,e}Dt(n,t);var i=n.prototype;return i.Nj=function(t,n,i){var e=this;return ut((function(){return st(this,(function(t){switch(t.label){case 0:return e.tO(),e.iO=new ru,e.Cj(li(n),i),[4,e.iO.sx];case 1:return t.sent(),[2]}}))}))()},i.Cj=function(t,n){if(!t)throw new b("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.eO;return(i=n?this.sO.createSession(this.nO,t,e):this.sO.createSession(this.nO,t)).addEventListener("mskeyclose",this.xj),i.addEventListener("mskeymessage",this.rO),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.oO),this.Kj=i,this.hO("status-pending"),i},i.$n=function(t){var n=this;return ut((function(){return st(this,(function(t){return n.tO(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return ut((function(){var i;return st(this,(function(e){switch(e.label){case 0:if(n.aO=new ru,n.tO(),!n.Kj)return[2,Z.resolve()];if(0===(i=li(t)).byteLength)throw new b("Cannot call update with an empty response.");return n.Kj.update(i),[4,n.aO.sx];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.Tj&&this.Kj&&(this.Tj=!0,this.Kj.close()),this.Jj.sx},i.DS=function(){var t=this;return ut((function(){return st(this,(function(n){return t.tO(),[2]}))}))()},i.tO=function(){if(this.Tj)throw new b("Already closing or closed.")},i.hO=function(t){this.$j.JL(),this.$j.qL(iu,t),this.yo(new Qo(this.$j))},Nt(n,[{key:"bj",get:function(){return this.Kj&&this.Kj.sessionId||""}},{key:"Aj",get:function(){return NaN}},{key:"mj",get:function(){return this.Jj.sx}},{key:"BL",get:function(){return this.$j}}]),n}(_i),Lf=function(){function t(t,n,i){this.sO=t,this.Qw=n,this.sd=i;var e=Af(i)||"video/mp4";this.nO=Of(e)}var n=t.prototype;return n.Cj=function(t){var n=this;return ut((function(){return st(this,(function(t){return[2,new Uf(n.sO,n.nO)]}))}))()},n.Oj=function(t){return Z.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.sO),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.sO):t.addEventListener("loadedmetadata",i),Z.resolve()},n.Rj=function(t){return Z.resolve()},n.tr=function(){return Z.resolve()},t}(),Ff=function(){function t(t,n){this.Fw=t,this.uO=n}var n=t.prototype;return n.Uj=function(){return this.uO},n.zj=function(){var t=new eo.MSMediaKeys(this.Fw);return Z.resolve(new Lf(t,this.Fw,this.uO))},Nt(t,[{key:"Qw",get:function(){return this.Fw}}]),t}(),zf=function(){function t(){}return t.prototype.Gj=function(t,n){try{return Z.resolve(function(t,n){if(!Wf())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Nf(qf,Zo,t,e);if(r)return new Ff(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.qj=function(){return Wf()},t}();function Wf(){return void 0!==eo.MSMediaKeys&&"function"==typeof eo.MSMediaKeys.isTypeSupported}function qf(t,n){return eo.MSMediaKeys.isTypeSupported(t,n)}var Hf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).fO=n,r.nO=i,r.dO=e,r.Jj=new ru,r.gO=void 0,r.$j=new eu,r.cO=void 0,r._O=new ru,r.Ss=function(){var t=r.cO&&r.cO.error;if(t){var n=new su("Unknown CDM error",t.code,t.systemCode);r.gO?(r.gO.tx(n),r.gO=void 0):n.nx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.hO("output-not-allowed"):r.hO("internal-error"),r.yo(new nu)}},r.rO=function(t){r.yo(new tu(r,"license-request",wi(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.oO=function(){r.gO&&(r.gO.$L(void 0),r.gO=void 0),r.hO("usable")},r}Dt(n,t);var i=n.prototype;return i.Nj=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.lO;if(!e)throw new b("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=ci(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new gi;return si(s,f,r,!0),fi(s,f,e,!0),si(s,f,o,!0),fi(s,f,n,!0),si(s,f,i.byteLength,!0),function(t,n,i){di(t).set(di(i),n.Lu),n.ep(i.byteLength)}(s,f,i),new S(u)}(li(n),e,this.dO);return this.cO=this.fO.createSession(this.nO,r),this.cO.addEventListener("webkitkeymessage",this.rO,!1),this.cO.addEventListener("webkitkeyadded",this.oO,!1),this.cO.addEventListener("webkitkeyerror",this.Ss,!1),this.hO("status-pending"),this._O.$L(this.cO),this._O=new ru,Z.resolve()},i.$n=function(t){return Z.resolve(!0)},i.Yn=function(t){var n=this;return ut((function(){var i,e;return st(this,(function(r){switch(r.label){case 0:if(0===(i=li(t)).byteLength)throw new b("Cannot call update with an empty response.");return n.gO=new ru,(e=n.cO)?[3,2]:[4,n._O.sx];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.gO.sx];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.cO;return n&&(n.removeEventListener("webkitkeymessage",this.rO,!1),n.removeEventListener("webkitkeyadded",this.oO,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this._O.i_(),null==(t=this.gO)||t.i_(),this.Jj.$L(void 0),this.Jj.sx},i.DS=function(){return Z.resolve(void 0)},i.hO=function(t){this.$j.JL(),this.$j.qL(iu,t),this.yo(new Qo(this.$j))},Nt(n,[{key:"bj",get:function(){return this.cO?this.cO.sessionId:""}},{key:"Aj",get:function(){return NaN}},{key:"mj",get:function(){return this.Jj.sx}},{key:"BL",get:function(){return this.$j}}]),n}(_i);var Vf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Xf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=m.floor(n/1e3);if(i in t)return i;throw new b("Invalid error code: "+n)}}(Xf||(Xf={}));var jf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Xf.fromCode(this.code)}}]),n}(Jt),Yf=function(){function t(t,n,i){this.fO=t,this.Qw=n,this.sd=i,this.dO=void 0;var e=Af(i)||"video/mp4";this.nO=Of(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.fO},n.Cj=function(t){var n=this;return ut((function(){return st(this,(function(t){if(!n.dO)throw new jf(Vf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Hf(n.fO,n.nO,n.dO)]}))}))()},n.Oj=function(t){return this.dO=li(t),Z.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.fO),Z.resolve()},n.Rj=function(t){return t.webkitSetMediaKeys(null),Z.resolve()},n.tr=function(){return Z.resolve()},t}(),Kf=function(){function t(t,n){this.Fw=t,this.uO=n}var n=t.prototype;return n.Uj=function(){return this.uO},n.zj=function(){var t=new eo.WebKitMediaKeys(this.Fw);return Z.resolve(new Yf(t,this.Fw,this.uO))},Nt(t,[{key:"Qw",get:function(){return this.Fw}}]),t}(),Gf=function(){function t(){}return t.prototype.Gj=function(t,n){try{return Z.resolve(function(t,n){if(t!==Wo)throw new b(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!$f())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Nf(Zf,Jo,t,e);if(r)return new Kf(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.qj=function(){return $f()},t}();function $f(){return void 0!==eo.WebKitMediaKeys&&"function"==typeof eo.WebKitMediaKeys.isTypeSupported}function Zf(t,n){return eo.WebKitMediaKeys.isTypeSupported(t,n)}var Jf,Qf=function(){function t(t){this.vO=t}return t.prototype.Gj=function(t,n){var i=this;return ut((function(){var e,r,o;return st(this,(function(u){switch(u.label){case 0:e=0,r=i.vO,u.label=1;case 1:if(!(e<r.length))return[3,6];o=r[e],u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o.Gj(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new b("Unsupported key system configuration for "+t)}}))}))()},t}(),th=new sn,nh=function(t){function n(n){var i;return(i=t.call(this)||this).Fw=n,i.iO=void 0,i.gO=void 0,i.yx=!1,i.jO=void 0,i.kO=void 0,i.Jj=new ru,i.CO="",i.LO=new ru,i.xO=new eu,i}Dt(n,t);var i=n.prototype;return i.SO=function(){this.gO&&(this.hO("usable"),this.gO.$L(void 0),this.gO=void 0)},i.IO=function(t){var n=new su("Unknown CDM error",t.errorCode,t.systemCode);this.gO?(this.gO.tx(n),this.gO=void 0):this.iO?(this.iO.tx(n),this.iO=void 0):n.nx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.hO("output-restricted"):1===n.ox?this.hO("expired"):this.hO("internal-error")},i.DO=function(t){0!==t.message.byteLength?(this.iO&&(this.iO.$L(void 0),this.iO=void 0),this.yo(new tu(this,"license-request",ou(this.Fw,wi(t.message).buffer),t.defaultURL||void 0))):this.iO&&(this.iO.tx("Empty key message"),this.iO=void 0)},i.EO=function(t){this.kO||(this.kO=t,this.LO.$L(t))},i.Ws=function(){var t=this;return ut((function(){return st(this,(function(n){return t.throwIfClosed(),t.gO&&(t.gO.tx(void 0),t.gO=void 0),t.yx=!0,t.Jj.$L(void 0),[2]}))}))()},i.Nj=function(t,n){var i=this;return ut((function(){var t;return st(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.iO=new ru,i.jO=li(n),(t=i.kO)?[3,2]:[4,i.LO.sx];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.Fw,i.jO),[4,i.iO.sx];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return ut((function(){return st(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.DS=function(){var t=this;return ut((function(){return st(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return ut((function(){return st(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.gO=new ru,Yi.Gk||Yi.Uk?[2,th.wO(ut((function(){return st(this,(function(i){switch(i.label){case 0:return[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))})))]:[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))}))()},i.doUpdate=function(t){var n=this;return ut((function(){var i;return st(this,(function(e){switch(e.label){case 0:return void 0===n.gO?[2]:(i=n.kO)?[3,2]:[4,n.LO.sx];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.Fw,li(t),n.jO,n.bj),[4,n.gO.sx];case 3:return e.sent(),Yi.Uk?[4,un(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.yx)throw new b("Already closing or closed.")},i.hO=function(t){this.xO.JL(),this.xO.qL(iu,t),this.yo(new Qo(this.xO))},i.OO=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:return(i=t.kO)?[3,2]:[4,t.LO.sx];case 1:i=e.sent(),e.label=2;case 2:if(!(n=i).webkitCancelKeyRequest)return[3,7];e.label=3;case 3:return e.trys.push([3,4,5,7]),n.webkitCancelKeyRequest(t.Fw,t.CO),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,un(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},Nt(n,[{key:"BL",get:function(){return this.xO}},{key:"bj",get:function(){return this.CO},set:function(t){this.CO=t}},{key:"mj",get:function(){return this.Jj.sx}},{key:"Aj",get:function(){return NaN}}]),n}(_i),ih=function(){function t(t,n){var i=this;this.Qw=t,this.sd=n,this.kO=void 0,this.zO=Bt(),this.BO=[],this.oO=function(t){var n=i.UO(t.sessionId);n&&n.SO()},this.RO=function(t){var n=i.UO(t.sessionId);n&&n.IO(t)},this.PO=function(t){var n=i.UO(t.sessionId);n&&n.DO(t)}}var n=t.prototype;return n.bn=function(t){return this.kO=t,this.kO.addEventListener("webkitkeyadded",this.oO),this.kO.addEventListener("webkitkeyerror",this.RO),this.kO.addEventListener("webkitkeymessage",this.PO),this.zO.forEach((function(n,i){return n.EO(t)})),this.BO.forEach((function(n){return n.EO(t)})),Z.resolve()},n.Rj=function(t){return t.removeEventListener("webkitkeyadded",this.oO),t.removeEventListener("webkitkeyerror",this.RO),t.removeEventListener("webkitkeymessage",this.PO),this.kO=void 0,Z.resolve()},n.tr=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:n=t.zO.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].OO()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.zO.clear(),[2]}}))}))()},n.Cj=function(t,n,i){var e=this;return ut((function(){var t;return st(this,(function(n){return t=new nh(e.Qw),e.kO&&t.EO(e.kO),e.BO.push(t),[2,t]}))}))()},n.Oj=function(t){return Z.resolve(!1)},n.UO=function(t){if(t){var n=this.zO.get(t);return n||((n=this.BO.shift())?(n.bj=t,this.zO.set(t,n),n):void 0)}},t}(),eh=function(){function t(t,n){this.Qw=t,this.QO=n}var n=t.prototype;return n.zj=function(){return Z.resolve(new ih(this.Qw,this.QO))},n.Uj=function(){return this.QO},t}(),rh=function(){function t(){}return t.prototype.Gj=function(t,n){try{return Z.resolve(function(t,n){if(!rh.qj())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Nf(oh,Zo,t,e);if(r)return new eh(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.qj=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function oh(t,n){var i=fo();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function uh(){return Jf||(Jf=function(){var t=[];Gf.qj()&&t.push(new Gf);Mf.qj()&&t.push(new Mf);zf.qj()&&t.push(new zf);rh.qj()&&t.push(new rh);return new Qf(t)}()),Jf}var sh=function(){function t(){this.yF=Bt()}var n=t.prototype;return n.JL=function(t){this.yF.delete(t)},n.MF=function(){this.yF.clear()},n.ZL=function(t){return this.yF.get(t)},n.qL=function(t,n){this.yF.set(t,n)},t}(),fh=function(){function t(){}return t.bF=function(){return t.CL||(t.CL=hh.qj()?new hh:new sh),t.CL},t.JL=function(n){t.bF().JL(n)},t.MF=function(){t.bF().MF()},t.ZL=function(n){return t.bF().ZL(n)},t.qL=function(n,i){t.bF().qL(n,i)},t}();fh.CL=void 0;var hh=function(t){function n(){return t.apply(this,arguments)||this}Dt(n,t);var i=n.prototype;return i.JL=function(t){self.sessionStorage.removeItem(t)},i.MF=function(){self.sessionStorage.clear()},i.ZL=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.qL=function(t,n){self.sessionStorage.setItem(t,n)},n.qj=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(fh);var ch=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r=0;r<n.length;r++){var o=n[r];e.append(o)}return e.getBlob(i&&i.type||"")}}(n)}();function ah(t,n,i){var e=ch([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=h.createElement("a");u.href=r,u.download=o,h.body.appendChild(u),u.click(),h.body.removeChild(u),URL.revokeObjectURL(r)}var vh=function(t){return t.ZD="arraybuffer",t.qD="json",t.KD="stream",t.RM="text",t}({}),dh=function(){function t(n){var i=this;this.$d={},n instanceof t?n.asList().forEach((function(t){var n=Ct(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Ct(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&g.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=lh(i),e=wh(e);var r=i.toLowerCase();if(this.$d.hasOwnProperty(r)){var o=this.$d[r],u=o[1];o[1]=u?u+", "+e:e}else this.$d[r]=[i,e]},n.delete=function(t){var n=lh(t).toLowerCase();delete this.$d[n]},n.get=function(t){var n=lh(t).toLowerCase();return this.$d.hasOwnProperty(n)?this.$d[n][1]:null},n.has=function(t){var n=lh(t).toLowerCase();return this.$d.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=lh(i)).toLowerCase();this.$d[e]=[i,wh(n)]},n.forEach=function(t,n){for(var i in this.$d)this.$d.hasOwnProperty(i)&&t.call(n,this.$d[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.$d)if(this.$d.hasOwnProperty(n)){var i=Ct(this.$d[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.JD=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.$D=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.tE=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function lh(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new b("Invalid character in header field name");return n}function wh(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var bh="function"==typeof n&&"symbol"==typeof i?n:function(t){return"Symbol("+t+")"};function gh(){}var mh=Number.isNaN||function(t){return t!=t},ph=gh;function yh(t){return"object"==typeof t&&null!==t||"function"==typeof t}function _h(t){return t.slice()}function Sh(t,n,i,e,r){new S(t).set(new S(i,e,r),n)}function Th(t){return!1!==function(t){if("number"!=typeof t)return!1;if(mh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Eh(t,n,i){if("function"!=typeof t)throw new b("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Ih(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new b(r+" is not a method");switch(i){case 0:return function(){return Rh(r,t,e)};case 1:return function(n){var i=[n].concat(e);return Rh(r,t,i)}}}return function(){return Bh(void 0)}}function kh(t,n,i){var e=t[n];if(void 0!==e)return Eh(e,t,i)}function Rh(t,n,i){try{return Bh(Eh(t,n,i))}catch(t){return Mh(t)}}function Oh(t){if(t=Number(t),mh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function Nh(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new b("size property of a queuing strategy must be a function");return function(n){return t(n)}}var Ph=Z,Ah=Z.prototype.then,Dh=Z.resolve.bind(Ph),Ch=Z.reject.bind(Ph);function xh(t){return new Ph(t)}function Bh(t){return Dh(t)}function Mh(t){return Ch(t)}function Uh(t,n,i){return Ah.call(t,n,i)}function Lh(t,n,i){Uh(Uh(t,n,i),void 0,ph)}function Fh(t,n){Lh(t,n)}function zh(t,n){Lh(t,void 0,n)}function Wh(t,n,i){return Uh(t,n,i)}function qh(t){Uh(t,void 0,ph)}var Hh=function(){function t(){this.AV=0,this.yV=0,this.MV={bV:[],TV:void 0},this.SV=this.MV,this.AV=0,this.yV=0}return g.defineProperty(t.prototype,"length",{get:function(){return this.yV},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.SV,i=n;16383===n.bV.length&&(i={bV:[],TV:void 0}),n.bV.push(t),i!==n&&(this.SV=i,n.TV=i),++this.yV},t.prototype.shift=function(){var t=this.MV,n=t,i=this.AV,e=i+1,r=t.bV,o=r[i];return 16384===e&&(n=t.TV,e=0),--this.yV,this.AV=e,t!==n&&(this.MV=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.AV,i=this.MV,e=i.bV;!(n===e.length&&void 0===i.TV||n===e.length&&(n=0,0===(e=(i=i.TV).bV).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.MV,n=this.AV;return t.bV[n]},t}();function Vh(t,n,i){var e=null;!0===i&&(e=g.prototype);var r=g.create(e);return r.value=t,r.done=n,r}function Xh(t,n){t.NV=!0,t.DV=n,n.EV=t,"readable"===n.wa?Gh(t):"closed"===n.wa?function(t){Gh(t),Jh(t)}(t):$h(t,n.kV)}function jh(t,n){return nv(t.DV,n)}function Yh(t){"readable"===t.DV.wa?Zh(t,new b("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){$h(t,n)}(t,new b("Reader was released and can no longer be used to monitor the stream's closedness")),t.DV.EV=void 0,t.DV=void 0}function Kh(t){return new b("Cannot "+t+" a stream using a released reader")}function Gh(t){t.pj=xh((function(n,i){t.LV=n,t.xV=i}))}function $h(t,n){Gh(t),Zh(t,n)}function Zh(t,n){qh(t.pj),t.xV(n),t.LV=void 0,t.xV=void 0}function Jh(t){t.LV(void 0),t.LV=void 0,t.xV=void 0}var Qh=bh("[[CancelSteps]]"),tc=bh("[[PullSteps]]");function nc(t,n){void 0===n&&(n=!1);var i=new fc(t);return i.NV=n,i}function ic(t){var n=xh((function(n,i){var e={Hd:n,ix:i};t.EV.CV.push(e)}));return n}function ec(t,n,i){var e=t.EV;e.CV.shift().Hd(Vh(n,i,e.NV))}function rc(t){return t.EV.CV.length}function oc(t){var n=t.EV;return void 0!==n&&!!hc(n)}var uc,sc,fc=function(){function t(t){if(!1===Qa(t))throw new b("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===tv(t))throw new b("This stream has already been locked for exclusive reading by another reader");Xh(this,t),this.CV=new Hh}return g.defineProperty(t.prototype,"closed",{get:function(){return hc(this)?this.pj:Mh(ac("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return hc(this)?void 0===this.DV?Mh(Kh("cancel")):jh(this,t):Mh(ac("cancel"))},t.prototype.read=function(){return hc(this)?void 0===this.DV?Mh(Kh("read from")):cc(this):Mh(ac("read"))},t.prototype.releaseLock=function(){if(!hc(this))throw ac("releaseLock");if(void 0!==this.DV){if(this.CV.length>0)throw new b("Tried to release a reader lock when that reader has pending read() calls un-settled");Yh(this)}},t}();function hc(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"CV")}function cc(t){var n=t.DV;return n.jV=!0,"closed"===n.wa?Bh(Vh(void 0,!0,t.NV)):"errored"===n.wa?Mh(n.kV):n.OV[tc]()}function ac(t){return new b("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof bh.asyncIterator&&((uc={})[bh.asyncIterator]=function(){return this},sc=uc,g.defineProperty(sc,bh.asyncIterator,{enumerable:!1}));var vc={next:function(){if(!1===dc(this))return Mh(lc("next"));var t=this.RV;return void 0===t.DV?Mh(Kh("iterate")):Wh(cc(t),(function(n){var i=n.done;return i&&Yh(t),Vh(n.value,i,!0)}))},return:function(t){if(!1===dc(this))return Mh(lc("next"));var n=this.RV;if(void 0===n.DV)return Mh(Kh("finish iterating"));if(n.CV.length>0)return Mh(new b("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.PV){var i=jh(n,t);return Yh(n),Wh(i,(function(){return Vh(t,!0,!0)}))}return Yh(n),Bh(Vh(t,!0,!0))}};function dc(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"RV")}function lc(t){return new b("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function wc(t){var n=t.zV.shift();return t.BV-=n.size,t.BV<0&&(t.BV=0),n.value}function bc(t,n,i){if(!Th(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.zV.push({value:n,size:i}),t.BV+=i}function gc(t){t.zV=new Hh,t.BV=0}void 0!==sc&&g.setPrototypeOf(vc,sc),g.defineProperty(vc,"next",{enumerable:!1}),g.defineProperty(vc,"return",{enumerable:!1});var mc=bh("[[AbortSteps]]"),pc=bh("[[ErrorSteps]]"),yc=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Sc(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=Nh(i);void 0===e&&(e=1),function(t,n,i,e){var r=g.create(zc.prototype);function o(){return kh(n,"start",[r])}var u=Ih(n,"write",1,[r]),s=Ih(n,"close",0,[]),f=Ih(n,"abort",1,[]);Wc(t,r,o,u,s,f,i,e)}(this,t,e=Oh(e),r)}return g.defineProperty(t.prototype,"locked",{get:function(){if(!1===Tc(this))throw Kc("locked");return Ec(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Tc(this)?Mh(Kc("abort")):!0===Ec(this)?Mh(new b("Cannot abort a stream that already has a writer")):Ic(this,t)},t.prototype.close=function(){return!1===Tc(this)?Mh(Kc("close")):!0===Ec(this)?Mh(new b("Cannot close a stream that already has a writer")):!0===Pc(this)?Mh(new b("Cannot close an already-closing stream")):kc(this)},t.prototype.getWriter=function(){if(!1===Tc(this))throw Kc("getWriter");return _c(this)},t}();function _c(t){return new Cc(t)}function Sc(t){t.wa="writable",t.kV=void 0,t.Sx=void 0,t.QV=void 0,t.FV=new Hh,t.YV=void 0,t.GV=void 0,t.VV=void 0,t.WV=void 0,t.HV=!1}function Tc(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"QV")}function Ec(t){return void 0!==t.Sx}function Ic(t,n){var i=t.wa;if("closed"===i||"errored"===i)return Bh(void 0);if(void 0!==t.WV)return t.WV.XV;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=xh((function(i,r){t.WV={XV:void 0,Hd:i,ix:r,ZV:n,qV:e}}));return t.WV.XV=r,!1===e&&Oc(t,n),r}function kc(t){var n=t.wa;if("closed"===n||"errored"===n)return Mh(new b("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=xh((function(n,i){var e={Hd:n,ix:i};t.GV=e})),e=t.Sx;return void 0!==e&&!0===t.HV&&"writable"===n&&oa(e),function(t){bc(t,"close",0),Vc(t)}(t.QV),i}function Rc(t,n){"writable"!==t.wa?Nc(t):Oc(t,n)}function Oc(t,n){var i=t.QV;t.wa="erroring",t.kV=n;var e=t.Sx;void 0!==e&&Uc(e,n),!1===function(t){if(void 0===t.YV&&void 0===t.VV)return!1;return!0}(t)&&!0===i.KV&&Nc(t)}function Nc(t){t.wa="errored",t.QV[pc]();var n=t.kV;if(t.FV.forEach((function(t){t.ix(n)})),t.FV=new Hh,void 0!==t.WV){var i=t.WV;if(t.WV=void 0,!0===i.qV)return i.ix(n),void Ac(t);Lh(t.QV[mc](i.ZV),(function(){i.Hd(),Ac(t)}),(function(n){i.ix(n),Ac(t)}))}else Ac(t)}function Pc(t){return void 0!==t.GV||void 0!==t.VV}function Ac(t){void 0!==t.GV&&(t.GV.ix(t.kV),t.GV=void 0);var n=t.Sx;void 0!==n&&Qc(n,t.kV)}function Dc(t,n){var i=t.Sx;void 0!==i&&n!==t.HV&&(!0===n?function(t){na(t)}(i):oa(i)),t.HV=n}var Cc=function(){function t(t){if(!1===Tc(t))throw new b("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===Ec(t))throw new b("This stream has already been locked for exclusive writing by another writer");this.JV=t,t.Sx=this;var n=t.wa;if("writable"===n)!1===Pc(t)&&!0===t.HV?na(this):ea(this),Zc(this);else if("erroring"===n)ia(this,t.kV),Zc(this);else if("closed"===n)ea(this),function(t){Zc(t),ta(t)}(this);else{var i=t.kV;ia(this,i),Jc(this,i)}}return g.defineProperty(t.prototype,"closed",{get:function(){return!1===xc(this)?Mh(Gc("closed")):this.pj},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===xc(this))throw Gc("desiredSize");if(void 0===this.JV)throw $c("desiredSize");return function(t){var n=t.JV,i=n.wa;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Hc(n.QV)}(this)},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"ready",{get:function(){return!1===xc(this)?Mh(Gc("ready")):this.$V},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===xc(this)?Mh(Gc("abort")):void 0===this.JV?Mh($c("abort")):function(t,n){var i=t.JV;return Ic(i,n)}(this,t)},t.prototype.close=function(){if(!1===xc(this))return Mh(Gc("close"));var t=this.JV;return void 0===t?Mh($c("close")):!0===Pc(t)?Mh(new b("Cannot close an already-closing stream")):Bc(this)},t.prototype.releaseLock=function(){if(!1===xc(this))throw Gc("releaseLock");void 0!==this.JV&&Lc(this)},t.prototype.write=function(t){return!1===xc(this)?Mh(Gc("write")):void 0===this.JV?Mh($c("write to")):Fc(this,t)},t}();function xc(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"JV")}function Bc(t){return kc(t.JV)}function Mc(t,n){"pending"===t.tW?Qc(t,n):function(t,n){Jc(t,n)}(t,n)}function Uc(t,n){"pending"===t.iW?ra(t,n):function(t,n){ia(t,n)}(t,n)}function Lc(t){var n=t.JV,i=new b("Writer was released and can no longer be used to monitor the stream's closedness");Uc(t,i),Mc(t,i),n.Sx=void 0,t.JV=void 0}function Fc(t,n){var i=t.JV,e=i.QV,r=function(t,n){try{return t.eW(n)}catch(n){return Xc(t,n),1}}(e,n);if(i!==t.JV)return Mh($c("write to"));var o=i.wa;if("errored"===o)return Mh(i.kV);if(!0===Pc(i)||"closed"===o)return Mh(new b("The stream is closing or closed and cannot be written to"));if("erroring"===o)return Mh(i.kV);var u=function(t){var n=xh((function(n,i){var e={Hd:n,ix:i};t.FV.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{bc(t,e,i)}catch(n){return void Xc(t,n)}var r=t.sW;if(!1===Pc(r)&&"writable"===r.wa){Dc(r,jc(t))}Vc(t)}(e,n,r),u}var zc=function(){function t(){throw new b("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!yh(t))return!1;if(!g.prototype.hasOwnProperty.call(t,"sW"))return!1;return!0}(this))throw new b("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.sW.wa&&Yc(this,t)},t.prototype[mc]=function(t){var n=this.nW(t);return qc(this),n},t.prototype[pc]=function(){gc(this)},t}();function Wc(t,n,i,e,r,o,u,s){n.sW=t,t.QV=n,n.zV=void 0,n.BV=void 0,gc(n),n.KV=!1,n.eW=s,n.rW=u,n.oW=e,n.hW=r,n.nW=o;var f=jc(n);Dc(t,f),Lh(Bh(i()),(function(){n.KV=!0,Vc(n)}),(function(i){n.KV=!0,Rc(t,i)}))}function qc(t){t.oW=void 0,t.hW=void 0,t.nW=void 0,t.eW=void 0}function Hc(t){return t.rW-t.BV}function Vc(t){var n=t.sW;if(!1!==t.KV&&void 0===n.YV)if("erroring"!==n.wa){if(0!==t.zV.length){var i=function(t){return t.zV.peek().value}(t);"close"===i?function(t){var n=t.sW;(function(t){t.VV=t.GV,t.GV=void 0})(n),wc(t);var i=t.hW();qc(t),Lh(i,(function(){!function(t){t.VV.Hd(void 0),t.VV=void 0,"erroring"===t.wa&&(t.kV=void 0,void 0!==t.WV&&(t.WV.Hd(),t.WV=void 0)),t.wa="closed";var n=t.Sx;void 0!==n&&ta(n)}(n)}),(function(t){!function(t,n){t.VV.ix(n),t.VV=void 0,void 0!==t.WV&&(t.WV.ix(n),t.WV=void 0),Rc(t,n)}(n,t)}))}(t):function(t,n){var i=t.sW;!function(t){t.YV=t.FV.shift()}(i);var e=t.oW(n);Lh(e,(function(){!function(t){t.YV.Hd(void 0),t.YV=void 0}(i);var n=i.wa;if(wc(t),!1===Pc(i)&&"writable"===n){var e=jc(t);Dc(i,e)}Vc(t)}),(function(n){"writable"===i.wa&&qc(t),function(t,n){t.YV.ix(n),t.YV=void 0,Rc(t,n)}(i,n)}))}(t,i.chunk)}}else Nc(n)}function Xc(t,n){"writable"===t.sW.wa&&Yc(t,n)}function jc(t){return Hc(t)<=0}function Yc(t,n){var i=t.sW;qc(t),Oc(i,n)}function Kc(t){return new b("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Gc(t){return new b("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function $c(t){return new b("Cannot "+t+" a stream using a released writer")}function Zc(t){t.pj=xh((function(n,i){t.LV=n,t.xV=i,t.tW="pending"}))}function Jc(t,n){Zc(t),Qc(t,n)}function Qc(t,n){qh(t.pj),t.xV(n),t.LV=void 0,t.xV=void 0,t.tW="rejected"}function ta(t){t.LV(void 0),t.LV=void 0,t.xV=void 0,t.tW="resolved"}function na(t){t.$V=xh((function(n,i){t.aW=n,t.uW=i})),t.iW="pending"}function ia(t,n){na(t),ra(t,n)}function ea(t){na(t),oa(t)}function ra(t,n){qh(t.$V),t.uW(n),t.aW=void 0,t.uW=void 0,t.iW="rejected"}function oa(t){t.aW(void 0),t.aW=void 0,t.uW=void 0,t.iW="fulfilled"}function ua(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var sa="undefined"!=typeof DOMException?DOMException:void 0;var fa=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(sa)?sa:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",w.captureStackTrace&&w.captureStackTrace(this,this.constructor)};return t.prototype=g.create(w.prototype),g.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function ha(t,n,i,e,r,o){var u=nc(t),s=_c(n);t.jV=!0;var f=!1,h=Bh(void 0);return xh((function(c,a){var v,d,l,w;if(void 0!==o){if(v=function(){var i=new fa("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.wa?Ic(n,i):Bh(void 0)})),!1===r&&o.push((function(){return"readable"===t.wa?nv(t,i):Bh(void 0)})),y((function(){return Z.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void v();o.addEventListener("abort",v)}if(p(t,u.pj,(function(t){!1===e?y((function(){return Ic(n,t)}),!0,t):_(!0,t)})),p(n,s.pj,(function(n){!1===r?y((function(){return nv(t,n)}),!0,n):_(!0,n)})),d=t,l=u.pj,w=function(){!1===i?y((function(){return function(t){var n=t.JV,i=n.wa;return!0===Pc(n)||"closed"===i?Bh(void 0):"errored"===i?Mh(n.kV):Bc(t)}(s)})):_()},"closed"===d.wa?w():Fh(l,w),!0===Pc(n)||"closed"===n.wa){var g=new b("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return nv(t,g)}),!0,g):_(!0,g)}function m(){var t=h;return Uh(h,(function(){return t!==h?m():void 0}))}function p(t,n,i){"errored"===t.wa?i(t.kV):zh(n,i)}function y(t,i,e){function r(){Lh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.wa&&!1===Pc(n)?Fh(m(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.wa&&!1===Pc(n)?Fh(m(),(function(){return S(t,i)})):S(t,i))}function S(t,n){Lc(s),Yh(u),void 0!==o&&o.removeEventListener("abort",v),t?a(n):c(void 0)}qh(xh((function(t,n){!function i(e){e?t():Uh(!0===f?Bh(!0):Uh(s.$V,(function(){return Uh(cc(u),(function(t){return!0===t.done||(h=Uh(Fc(s,t.value),void 0,gh),!1)}))})),i,n)}(!1)})))}))}var ca=function(){function t(){throw new b}return g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===aa(this))throw _a("desiredSize");return ma(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===aa(this))throw _a("close");if(!1===pa(this))throw new b("The stream is not in a state that permits close");wa(this)},t.prototype.enqueue=function(t){if(!1===aa(this))throw _a("enqueue");if(!1===pa(this))throw new b("The stream is not in a state that permits enqueue");return ba(this,t)},t.prototype.error=function(t){if(!1===aa(this))throw _a("error");ga(this,t)},t.prototype[Qh]=function(t){gc(this);var n=this.cW(t);return la(this),n},t.prototype[tc]=function(){var t=this.lW;if(this.zV.length>0){var n=wc(this);return!0===this.dW&&0===this.zV.length?(la(this),iv(t)):va(this),Bh(Vh(n,!1,t.EV.NV))}var i=ic(t);return va(this),i},t}();function aa(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"lW")}function va(t){!1!==da(t)&&(!0!==t.fW?(t.fW=!0,Lh(t._W(),(function(){t.fW=!1,!0===t.gW&&(t.gW=!1,va(t))}),(function(n){ga(t,n)}))):t.gW=!0)}function da(t){var n=t.lW;return!1!==pa(t)&&(!1!==t.KV&&(!0===tv(n)&&rc(n)>0||ma(t)>0))}function la(t){t._W=void 0,t.cW=void 0,t.eW=void 0}function wa(t){var n=t.lW;t.dW=!0,0===t.zV.length&&(la(t),iv(n))}function ba(t,n){var i=t.lW;if(!0===tv(i)&&rc(i)>0)ec(i,n,!1);else{var e=void 0;try{e=t.eW(n)}catch(n){throw ga(t,n),n}try{bc(t,n,e)}catch(n){throw ga(t,n),n}}va(t)}function ga(t,n){var i=t.lW;"readable"===i.wa&&(gc(t),la(t),ev(i,n))}function ma(t){var n=t.lW.wa;return"errored"===n?null:"closed"===n?0:t.rW-t.BV}function pa(t){var n=t.lW.wa;return!1===t.dW&&"readable"===n}function ya(t,n,i,e,r,o,u){n.lW=t,n.zV=void 0,n.BV=void 0,gc(n),n.KV=!1,n.dW=!1,n.gW=!1,n.fW=!1,n.eW=u,n.rW=o,n._W=e,n.cW=r,t.OV=n,Lh(Bh(i()),(function(){n.KV=!0,va(n)}),(function(t){ga(n,t)}))}function _a(t){return new b("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var Sa=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&m.floor(t)===t},Ta=function(){function t(){throw new b("ReadableStreamBYOBRequest cannot be used directly")}return g.defineProperty(t.prototype,"view",{get:function(){if(!1===ka(this))throw qa("view");return this.cD},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===ka(this))throw qa("respond");if(void 0===this.vW)throw new b("This BYOB request has been invalidated");this.cD.buffer,function(t,n){if(n=Number(n),!1===Th(n))throw new RangeError("bytesWritten must be a finite");Ma(t,n)}(this.vW,t)},t.prototype.respondWithNewView=function(t){if(!1===ka(this))throw qa("respond");if(void 0===this.vW)throw new b("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new b("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.wW.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Ma(t,n.byteLength)}(this.vW,t)},t}(),Ea=function(){function t(){throw new b("ReadableByteStreamController constructor cannot be used directly")}return g.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Ia(this))throw Ha("byobRequest");if(void 0===this.mW&&this.wW.length>0){var t=this.wW.peek(),n=new S(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=g.create(Ta.prototype);!function(t,n,i){t.vW=n,t.cD=i}(i,this,n),this.mW=i}return this.mW},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ia(this))throw Ha("desiredSize");return za(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Ia(this))throw Ha("close");if(!0===this.dW)throw new b("The stream has already been closed; do not close it again!");var t=this.pW.wa;if("readable"!==t)throw new b("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.pW;if(t.BV>0)return void(t.dW=!0);if(t.wW.length>0){if(t.wW.peek().bytesFilled>0){var i=new b("Insufficient bytes to fill elements in the given buffer");throw Fa(t,i),i}}La(t),iv(n)}(this)},t.prototype.enqueue=function(t){if(!1===Ia(this))throw Ha("enqueue");if(!0===this.dW)throw new b("stream is closed or draining");var n=this.pW.wa;if("readable"!==n)throw new b("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new b("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.pW,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===oc(i)){if(0===rc(i))Pa(t,u,r,o);else ec(i,new S(u,r,o),!1)}else!0===ja(i)?(Pa(t,u,r,o),Ba(t)):Pa(t,u,r,o);Ra(t)}(this,t)},t.prototype.error=function(t){if(!1===Ia(this))throw Ha("error");Fa(this,t)},t.prototype[Qh]=function(t){this.wW.length>0&&(this.wW.peek().bytesFilled=0);gc(this);var n=this.cW(t);return La(this),n},t.prototype[tc]=function(){var t=this.pW;if(this.BV>0){var n=this.zV.shift();this.BV-=n.byteLength,Ca(this);var i=void 0;try{i=new S(n.buffer,n.byteOffset,n.byteLength)}catch(t){return Mh(t)}return Bh(Vh(i,!1,t.EV.NV))}var e=this.AW;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return Mh(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:S,readerType:"default"};this.wW.push(o)}var u=ic(t);return Ra(this),u},t}();function Ia(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"pW")}function ka(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"vW")}function Ra(t){var n=function(t){var n=t.pW;if("readable"!==n.wa)return!1;if(!0===t.dW)return!1;if(!1===t.KV)return!1;if(!0===oc(n)&&rc(n)>0)return!0;if(!0===ja(n)&&Xa(n)>0)return!0;var i=za(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.fW?(t.fW=!0,Lh(t._W(),(function(){t.fW=!1,!0===t.gW&&(t.gW=!1,Ra(t))}),(function(n){Fa(t,n)}))):t.gW=!0)}function Oa(t,n){var i=!1;"closed"===t.wa&&(i=!0);var e=Na(n);"default"===n.readerType?ec(t,e,i):function(t,n,i){var e=t.EV,r=e.yW.shift();r.Hd(Vh(n,i,e.NV))}(t,e,i)}function Na(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function Pa(t,n,i,e){t.zV.push({buffer:n,byteOffset:i,byteLength:e}),t.BV+=e}function Aa(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=m.min(t.BV,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.zV;s>0;){var c=h.peek(),a=m.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;Sh(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.BV-=a,Da(t,a,n),s-=a}return f}function Da(t,n,i){xa(t),i.bytesFilled+=n}function Ca(t){0===t.BV&&!0===t.dW?(La(t),iv(t.pW)):Ra(t)}function xa(t){void 0!==t.mW&&(t.mW.vW=void 0,t.mW.cD=void 0,t.mW=void 0)}function Ba(t){for(;t.wW.length>0;){if(0===t.BV)return;var n=t.wW.peek();!0===Aa(t,n)&&(Ua(t),Oa(t.pW,n))}}function Ma(t,n){var i=t.wW.peek();if("closed"===t.pW.wa){if(0!==n)throw new b("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.pW;if(!0===ja(i))for(;Xa(i)>0;)Oa(i,Ua(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Da(t,n,i),!(i.bytesFilled<i.elementSize)){Ua(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);Pa(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,Oa(t.pW,i),Ba(t)}}(t,n,i);Ra(t)}function Ua(t){var n=t.wW.shift();return xa(t),n}function La(t){t._W=void 0,t.cW=void 0}function Fa(t,n){var i=t.pW;"readable"===i.wa&&(!function(t){xa(t),t.wW=new Hh}(t),gc(t),La(t),ev(i,n))}function za(t){var n=t.pW.wa;return"errored"===n?null:"closed"===n?0:t.rW-t.BV}function Wa(t,n,i){var e=g.create(Ea.prototype);var r=Ih(n,"pull",0,[e]),o=Ih(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===Sa(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.pW=t,n.gW=!1,n.fW=!1,n.mW=void 0,n.zV=n.BV=void 0,gc(n),n.dW=!1,n.KV=!1,n.rW=Oh(o),n._W=e,n.cW=r,n.AW=u,n.wW=new Hh,t.OV=n,Lh(Bh(i()),(function(){n.KV=!0,Ra(n)}),(function(t){Fa(n,t)}))}(t,e,(function(){return kh(n,"start",[e])}),r,o,i,u)}function qa(t){return new b("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Ha(t){return new b("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Va(t){var n=xh((function(n,i){var e={Hd:n,ix:i};t.EV.yW.push(e)}));return n}function Xa(t){return t.EV.yW.length}function ja(t){var n=t.EV;return void 0!==n&&!!Ka(n)}var Ya=function(){function t(t){if(!Qa(t))throw new b("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Ia(t.OV))throw new b("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(tv(t))throw new b("This stream has already been locked for exclusive reading by another reader");Xh(this,t),this.yW=new Hh}return g.defineProperty(t.prototype,"closed",{get:function(){return Ka(this)?this.pj:Mh(Ga("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Ka(this)?void 0===this.DV?Mh(Kh("cancel")):jh(this,t):Mh(Ga("cancel"))},t.prototype.read=function(t){return Ka(this)?void 0===this.DV?Mh(Kh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?Mh(new b("view must have non-zero byteLength")):function(t,n){var i=t.DV;if(i.jV=!0,"errored"===i.wa)return Mh(i.kV);return function(t,n){var i=t.pW,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.wW.length>0)return t.wW.push(o),Va(i);if("closed"===i.wa)return Bh(Vh(new r(o.buffer,o.byteOffset,0),!0,i.EV.NV));if(t.BV>0){if(!0===Aa(t,o)){var u=Na(o);return Ca(t),Bh(Vh(u,!1,i.EV.NV))}if(!0===t.dW){var s=new b("Insufficient bytes to fill elements in the given buffer");return Fa(t,s),Mh(s)}}t.wW.push(o);var f=Va(i);return Ra(t),f}(i.OV,n)}(this,t)):Mh(new b("view must be an array buffer view")):Mh(Ga("read"))},t.prototype.releaseLock=function(){if(!Ka(this))throw Ga("releaseLock");if(void 0!==this.DV){if(this.yW.length>0)throw new b("Tried to release a reader lock when that reader has pending read() calls un-settled");Yh(this)}},t}();function Ka(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"yW")}function Ga(t){return new b("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var $a=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Ja(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Wa(this,t,e=Oh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=Nh(i);void 0===e&&(e=1),function(t,n,i,e){var r=g.create(ca.prototype),o=Ih(n,"pull",0,[r]),u=Ih(n,"cancel",1,[]);ya(t,r,(function(){return kh(n,"start",[r])}),o,u,i,e)}(this,t,e=Oh(e),o)}}return g.defineProperty(t.prototype,"locked",{get:function(){if(!1===Qa(this))throw rv("locked");return tv(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Qa(this)?Mh(rv("cancel")):!0===tv(this)?Mh(new b("Cannot cancel a stream that already has a reader")):nv(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Qa(this))throw rv("getReader");if(void 0===n)return nc(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Ya(t);return i.NV=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Qa(this))throw rv("pipeThrough");if(!1===Tc(i))throw new b("writable argument to pipeThrough must be a WritableStream");if(!1===Qa(e))throw new b("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!ua(f))throw new b("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===tv(this))throw new b("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===Ec(i))throw new b("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return qh(ha(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Qa(this)?Mh(rv("pipeTo")):!1===Tc(t)?Mh(new b("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||ua(u)?!0===tv(this)?Mh(new b("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===Ec(t)?Mh(new b("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ha(this,t,e,r,o,u):Mh(new b("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Qa(this))throw rv("tee");var t=function(t,n){var i,e,r,o,u,s=nc(t),f=!1,h=!1,c=!1,a=xh((function(t){u=t}));function v(){return!0===f||(f=!0,qh(Wh(cc(s),(function(t){if(f=!1,!0===t.done)return!1===h&&wa(r.OV),void(!1===c&&wa(o.OV));var n=t.value,i=n,e=n;!1===h&&ba(r.OV,i),!1===c&&ba(o.OV,e)})))),Bh(void 0)}function d(){}return r=Za(d,v,(function(n){if(h=!0,i=n,!0===c){var r=_h([i,e]),o=nv(t,r);u(o)}return a})),o=Za(d,v,(function(n){if(c=!0,e=n,!0===h){var r=_h([i,e]),o=nv(t,r);u(o)}return a})),zh(s.pj,(function(t){ga(r.OV,t),ga(o.OV,t)})),[r,o]}(this);return _h(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Qa(this))throw rv("getIterator");return function(t,n){void 0===n&&(n=!1);var i=nc(t),e=g.create(vc);return e.RV=i,e.PV=Boolean(n),e}(this,i)},t}();function Za(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=g.create($a.prototype);return Ja(o),ya(o,g.create(ca.prototype),t,n,i,e,r),o}function Ja(t){t.wa="readable",t.EV=void 0,t.kV=void 0,t.jV=!1}function Qa(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"OV")}function tv(t){return void 0!==t.EV}function nv(t,n){return t.jV=!0,"closed"===t.wa?Bh(void 0):"errored"===t.wa?Mh(t.kV):(iv(t),Wh(t.OV[Qh](n),gh))}function iv(t){t.wa="closed";var n=t.EV;void 0!==n&&(hc(n)&&(n.CV.forEach((function(t){t.Hd(Vh(void 0,!0,n.NV))})),n.CV=new Hh),Jh(n))}function ev(t,n){t.wa="errored",t.kV=n;var i=t.EV;void 0!==i&&(hc(i)?(i.CV.forEach((function(t){t.ix(n)})),i.CV=new Hh):(i.yW.forEach((function(t){t.ix(n)})),i.yW=new Hh),Zh(i,n))}function rv(t){return new b("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof bh.asyncIterator&&g.defineProperty($a.prototype,bh.asyncIterator,{value:$a.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});(function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(t){return t.byteLength}})(),function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(){return 1}}();var ov=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=Nh(e);if(void 0===r&&(r=1),r=Oh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=Nh(o);void 0===u&&(u=0),u=Oh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.MW;if(!0===t.HV){return Wh(t.bW,(function(){var e=t.TW;if("erroring"===e.wa)throw e.kV;return lv(i,n)}))}return lv(i,n)}(t,n)}function f(n){return function(t,n){return sv(t,n),Bh(void 0)}(t,n)}function h(){return function(t){var n=t.SW,i=t.MW,e=i.NW();return vv(i),Wh(e,(function(){if("errored"===n.wa)throw n.kV;var t=n.OV;!0===pa(t)&&wa(t)}),(function(i){throw sv(t,i),n.kV}))}(t)}function c(){return function(t){return hv(t,!1),t.bW}(t)}function a(n){return fv(t,n),Bh(void 0)}t.TW=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=g.create(yc.prototype);return Sc(u),Wc(u,g.create(zc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.SW=Za(u,c,a,r,o),t.HV=void 0,t.bW=void 0,t.IW=void 0,hv(t,!0),t.MW=void 0}(this,xh((function(t){f=t})),r,s,u,h),function(t,n){var i=g.create(cv.prototype),e=function(t){try{return dv(i,t),Bh(void 0)}catch(t){return Mh(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new b("transform is not a method");e=function(t){return Rh(r,n,[t,i])}}var o=Ih(n,"flush",0,[i]);!function(t,n,i,e){n.DW=t,t.MW=n,n.EW=i,n.NW=e}(t,i,e,o)}(this,t);var c=kh(t,"start",[this.MW]);f(c)}return g.defineProperty(t.prototype,"readable",{get:function(){if(!1===uv(this))throw bv("readable");return this.SW},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"writable",{get:function(){if(!1===uv(this))throw bv("writable");return this.TW},enumerable:!0,configurable:!0}),t}();function uv(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"MW")}function sv(t,n){ga(t.SW.OV,n),fv(t,n)}function fv(t,n){vv(t.MW),Xc(t.TW.QV,n),!0===t.HV&&hv(t,!1)}function hv(t,n){void 0!==t.bW&&t.IW(),t.bW=xh((function(n){t.IW=n})),t.HV=n}var cv=function(){function t(){throw new b("TransformStreamDefaultController instances cannot be created directly")}return g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===av(this))throw wv("desiredSize");return ma(this.DW.SW.OV)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===av(this))throw wv("enqueue");dv(this,t)},t.prototype.error=function(t){if(!1===av(this))throw wv("error");!function(t,n){sv(t.DW,n)}(this,t)},t.prototype.terminate=function(){if(!1===av(this))throw wv("terminate");!function(t){var n=t.DW,i=n.SW.OV;!0===pa(i)&&wa(i);var e=new b("TransformStream terminated");fv(n,e)}(this)},t}();function av(t){return!!yh(t)&&!!g.prototype.hasOwnProperty.call(t,"DW")}function vv(t){t.EW=void 0,t.NW=void 0}function dv(t,n){var i=t.DW,e=i.SW.OV;if(!1===pa(e))throw new b("Readable side is not in a state that permits enqueue");try{ba(e,n)}catch(t){throw fv(i,t),i.SW.kV}var r=function(t){return!0!==da(t)}(e);r!==i.HV&&hv(i,!0)}function lv(t,n){return Wh(t.EW(n),void 0,(function(n){throw sv(t.DW,n),n}))}function wv(t){return new b("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function bv(t){return new b("TransformStream.prototype."+t+" can only be used on a TransformStream")}function gv(t){return function(t){return new $a({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function mv(t){return gv(function(t){return new S(t)}(t))}function pv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new ru,o=function(){u();var t=new nn;e.cancel(t).catch(kt),r.tx(t)},u=function(){i&&(i.qf(o),i=void 0)};i&&(i.Gf?o():i.Zf(o));var s=[],f=function(t){return t.done?(u(),Z.resolve(s)):(s.push(t.value),Z.resolve(e.read()).then(f))};return Z.resolve(e.read()).then(f).then((function(t){u(),r.$L(t)}),(function(t){u(),r.tx(t)})),r.sx}(t,n).then((function(t){return Vn(t).buffer}))}function yv(t,n){var i=n,e=new ov,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.i_()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(kt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(kt)})),r}function _v(t){return ci(new S(t))}function Sv(t){return ai(t).buffer}var Tv="content-type",Ev="text/plain;charset=UTF-8",Iv=function(){function t(){}var n=t.prototype;return n.GR=function(t){return this.CE(t).then(JSON.parse)},n.AR=function(t,n){switch(t){case vh.ZD:return this.aP(n);case vh.qD:return this.GR(n);case vh.KD:return this.kW();case vh.RM:return this.CE(n);default:throw new b}},t}();function kv(t,n,i){if(t instanceof Iv)return t;if(t instanceof $a)return function(t,n){return new Ov({ow:0,kW:t,Yz:Rv(n)})}(t,i);var e=Rv(i),r=Z.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{ow:vh.RM,vE:t,Yz:n||Ev};if(t instanceof ArrayBuffer||qn(t))return{ow:vh.ZD,vE:Bv(t),Yz:n};if(function(t){return lt(t)&&t.constructor&&t.constructor===g}(t)||dt(t))return{ow:vh.qD,vE:t,Yz:n};throw new b("Unsupported BodyInit type")}return{ow:vh.RM,vE:null,Yz:n}}(t,e)}));return new Ov({ow:1,sx:r,LW:n})}function Rv(t){return(t.get(Tv)||"").toLowerCase()}var Ov=function(t){function n(n){var i;return(i=t.call(this)||this).jW=!1,i.zW=new ru,i.zW.sx.catch(kt),i.QW(n),i}Dt(n,t);var i=n.prototype;return i.PW=function(){return this.zW.sx},i.CE=function(t){return this.BW(Nv,t)},i.GR=function(t){return this.BW(Av,t)},i.aP=function(t){return this.BW(Cv,t)},i.kW=function(){return this.UW(function(t){return 0===t.ow?t.kW:yv(t.sx.then(xv).then(mv),t.LW)}(this.RW))},i.BW=function(t,n){if(this.jW)return Z.reject(new b("Already used"));this.jW=!0;var i=t(this.RW,n);return this.zW.e_(i.then(kt)),i},i.UW=function(t){if(this.jW)throw new b("Already used");if(t.locked)throw new b("Body stream is locked");this.jW=!0;var n=new ov,i=Z.resolve(t.pipeTo(n.writable));return this.zW.e_(i),n.readable},i.QW=function(t){this.RW=t,1===t.ow&&t.sx.catch(kt)},i.FW=function(){if(this.jW)throw new b("Already used");var t=function(t){if(0===t.ow){var n=Ct(t.kW.tee(),2),i=n[0],e=n[1];return[{ow:t.ow,kW:i,Yz:t.Yz},{ow:t.ow,kW:e,Yz:t.Yz}]}var r=Ct(t.LW.s_(),2),o=r[0],u=r[1];return[{ow:t.ow,sx:t.sx,LW:o},{ow:t.ow,sx:t.sx,LW:u}]}(this.RW),i=t[0],e=t[1];return this.QW(i),new n(e)},Nt(n,[{key:"xW",get:function(){return this.jW}},{key:"OW",get:function(){return 0===this.RW.ow}}]),n}(Iv);function Nv(t,n){return 0===t.ow?pv(t.kW,n).then(_v):(n&&t.LW.e_(n),on(t.sx.then(Pv),t.LW))}function Pv(t){switch(t.ow){case vh.RM:return Z.resolve(t.vE||"");case vh.ZD:return Z.resolve(t.vE).then(_v);case vh.qD:return Z.resolve(t.vE).then(JSON.stringify)}}function Av(t,n){return 0===t.ow?Nv(t,n).then(JSON.parse):(n&&t.LW.e_(n),on(t.sx.then(Dv),t.LW))}function Dv(t){return t.ow===vh.qD?Z.resolve(t.vE):Pv(t).then(JSON.parse)}function Cv(t,n){return 0===t.ow?pv(t.kW,n):(n&&t.LW.e_(n),on(t.sx.then(xv),t.LW))}function xv(t){switch(t.ow){case vh.ZD:return Z.resolve(t.vE);case vh.RM:case vh.qD:return Pv(t).then(Sv)}}function Bv(t){return t instanceof ArrayBuffer?t:wi(di(t)).buffer}var Mv=function(t){function n(n){var i;return(i=t.call(this)||this).YW=n,i}Dt(n,t);var i=n.prototype;return i.PW=function(){return this.YW.PW()},i.CE=function(t){return this.YW.CE(t)},i.GR=function(t){return this.YW.GR(t)},i.aP=function(t){return this.YW.aP(t)},i.kW=function(t){return this.YW.kW(t)},i.FW=function(){return this.YW.FW()},Nt(n,[{key:"xW",get:function(){return this.YW.xW}},{key:"OW",get:function(){return this.YW.OW}}]),n}(Iv);var Uv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.wE,o=i.pE,u=i.UD,s=i.WR,f=i.GW):(r=[],o=vh.RM,u=200,s="OK",f=!1);var h=n.RD,c=new dh(n.wE||r),a=n.pE||o,v=n.jE||(i&&i.RD===h?i.jE:h.Iu),d=i?i.YW:null,l=kv(void 0!==n.lp?n.lp:d,n.LW||new tn,c);return(e=t.call(this,l)||this).wE=c,e.RD=h,e.jE=v,e.pE=a,e.UD=void 0!==n.UD?n.UD:u,e.WR=void 0!==n.WR?String(n.WR):s,e.GW=n.GW||f,e}Dt(n,t);var i=n.prototype;return i.lp=function(t){return this.AR(this.pE,t)},i.np=function(){return new n({lp:this.FW(),RD:this.RD},this)},n}(Mv),Lv=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Fv=function(t){return t.fE="same-origin",t.fw="no-cors",t._E="cors",t.gE="navigate",t}({}),zv=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Iu;n?(i=n.vE,e=n.wE,r=n.mE,o=n.pE,u=n.QD,s=n.AE,f=n.$f,h=n.ow,c=n.yE,a=n.bE,v=n.TE,d=n.SE,l=n.iw,w=n.NE,b=n.DE):(i=null,e={},r="GET",o=vh.RM,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Iu=y,this.vE=t.vE||i,this.wE=new dh(t.wE||e),this.mE=t.mE||r,this.pE=t.pE||o,this.QD=void 0!==t.QD?Number(t.QD)||0:u,this.AE=void 0!==t.AE?Number(t.AE)||0:s,this.$f=t.$f||f||(new tn).$f,this.ow=t.ow||h,this.yE=t.yE||c,this.bE=t.bE||a,this.TE=void 0!==t.TE?Boolean(t.TE):v,this.SE=t.SE||d,this.iw=null!=(g=t.iw)?g:l,this.NE=null!=(m=t.NE)?m:w,this.DE=null!=(p=t.DE)?p:b},Wv=function(){function t(){}var n=t.prototype;return n.RD=function(t){var n=function(t){return new Uv({lp:null,wE:{},RD:t,jE:t.Iu,pE:t.pE,UD:0,WR:$o.gb})}(new zv(t));return Z.resolve(n)},n.fG=function(t){},n.gn=function(){},t}();var qv=function(){function t(t,n){void 0===n&&(n=!0),this.XW=t,this.qW=n}var n=t.prototype;return n.RD=function(t){var n=this.HW(t);return this.XW.RD(n)},n.fG=function(t){return this.XW.fG(this.ZW(t))},n.HW=function(n){var i=new zv(n);if(!this.qW){var e=t.KW(i.Iu);i=new zv({Iu:e},i)}return i},n.ZW=function(n){var i=n.Iu;return this.qW||(i=t.KW(i)),{Iu:i,vE:n.vE}},n.gn=function(){this.XW.gn()},t.KW=function(t){return Et.JW&&Yn(t,"http://")?t.replace(":","s:"):t},Nt(t,null,[{key:"VW",get:function(){return t.WW||(t.WW=new t(new Wv)),t.WW}}]),t}();qv.WW=void 0;var Hv=function(t){return t.CD="HttpOpenError",t.jD="HttpResponseError",t.OD="HttpTimeoutError",t}({}),Vv=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).PD=n,r}return Dt(n,t),Nt(n,[{key:"RD",get:function(){return this.PD}}]),n}(Jt);var Xv=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Iu),i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return Hv.CD}}]),n}(Vv);var jv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.RD,null!=e?e:function(t){return"Error while loading "+t.RD.Iu+", status code "+t.UD}(n),i)||this).BD=n,r}return Dt(n,t),Nt(n,[{key:"name",get:function(){return Hv.jD}},{key:"zD",get:function(){return this.BD}}]),n}(Vv);var Yv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Iu+" timed out after "+t.QD+" seconds."}(n),i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return Hv.OD}}]),n}(Vv),Kv=self.fetch,Gv=self.Request,$v=self.Response,Zv=self.Headers,Jv=self.ReadableStream,Qv=self.AbortSignal,td=self.AbortController,nd=Rt((function(){try{return wt(Kv)&&bt(Gv)&&bt($v)&&bt(Zv)&&"forEach"in Zv.prototype&&No()}catch(t){return!1}})),id=["http:","https:"];var ed=Rt((function(){try{return nd()&&bt(Qv)&&bt(td)&&"signal"in Gv.prototype}catch(t){return!1}})),rd=Rt((function(){try{return nd()&&bt(Jv)&&"body"in $v.prototype&&!Yi.bk}catch(t){return!1}}));function od(t,n){var i,e=t.wE.has("content-length")?Number(t.wE.get("content-length")):void 0;return i=t.OW?function(t,n,i){return t.pipeThrough(new ov(new ud(n,i)))}(t.kW(),n,e):function(t,n,i){return sd.apply(this,arguments)}(t.aP(),n,e),new Uv({lp:i,RD:t.RD},t)}var ud=function(){function t(t,n){this.Get=t,this.Vet=n,this.z3=0}var n=t.prototype;return n.transform=function(t,n){this.z3+=t.byteLength,this.Get(this.z3,this.Vet),n.enqueue(t)},n.flush=function(t){var n;this.Get(this.z3,null!=(n=this.Vet)?n:this.z3)},t}();function sd(){return sd=ut((function(t,n,i){var e,r;return st(this,(function(o){switch(o.label){case 0:return[4,Z.resolve()];case 1:return o.sent(),n(0,i),[4,t];case 2:return e=o.sent(),r=e.byteLength,n(r,null!=i?i:r),[2,e]}}))})),sd.apply(this,arguments)}var fd=function(){function t(t){this.mO=new tn,this.BD=void 0,this.UT=0,this.Het=!1,this.PD=t,this.mO.e_(t.$f),this.zD=this.Wet()}var n=t.prototype;return n.Wet=function(){var t=this;return ut((function(){var n,i,e,r,o,u,s,f,h;return st(this,(function(c){switch(c.label){case 0:(n=t.PD).QD&&(t.UT=a((function(){t.Het=!0,t.mO.i_()}),n.QD),t.mO.$f.Kf((function(){v(t.UT)})));try{i=Kv(n.Iu,{method:n.mE,headers:n.wE.JD(),body:n.vE,credentials:n.TE?"include":"same-origin",signal:ad(t.mO.$f),mode:n.iw,keepalive:n.DE})}catch(t){throw new Xv(n,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i];case 2:return e=c.sent(),[3,4];case 3:throw r=c.sent(),en(o=t.Xet(r))&&t.mO.i_(),o;case 4:if(u=e.url||n.Iu,s=0===e.status&&"file:"===function(t){return Et.Ah(t).protocol}(u)?200:e.status,f=new hd(t,e,t.mO),!function(t){return t.UD>=200&&t.UD<=299||304===t.UD}(h=new Uv({lp:f,RD:n,pE:n.pE,wE:vd(e.headers),UD:s,WR:e.statusText,jE:u})))throw new jv(h);return n.SE&&(h=od(h,n.SE)),[2,h]}}))}))()},n.Xet=function(t){return function(t){return t instanceof Vv}(t)?t:en(t)?this.Het?new Yv(this.PD):new nn(t.message,t):this.BD?new jv(this.BD,t):new Xv(this.PD,t)},t}(),hd=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).zW=new ru,r.qet=n,r.Zet=i,r.mO=e,r.zW.sx.catch(kt),r}Dt(n,t);var i=n.prototype;return i.PW=function(){return this.zW.sx},i.CE=function(t){return this.BW(this.Zet.text(),t)},i.aP=function(t){return this.BW(this.Zet.arrayBuffer(),t)},i.kW=function(){var t=this.Zet.body;return t?this.UW(t):yv(this.aP().then(mv),this.mO)},i.FW=function(){var t=this.Zet.clone(),i=Ct(this.mO.s_(),2),e=i[0],r=i[1];return this.mO=e,new n(this.qet,t,r)},i.BW=function(t,n){var i=this;n&&this.mO.e_(n);var e=rn(Z.resolve(t),this.mO.$f).catch((function(t){throw i.qet.Xet(t)}));return e=on(e,this.mO),this.zW.e_(e.then(kt)),e},i.UW=function(t){var n=this;return new $a(new dd(t,(function(t){return n.qet.Xet(t)}),this.mO,this.zW),{highWaterMark:0})},Nt(n,[{key:"xW",get:function(){return this.Zet.bodyUsed}},{key:"OW",get:function(){return vt(this.Zet.body)}}]),n}(Iv),cd="abort";function ad(t){if(ed()){var n=new td;if(t.Gf)n.abort();else if(!t.Vf){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(cd,i),t.qf(i),t.Jf(e)};n.signal.addEventListener(cd,i),t.Zf(i),t.Kf(e)}return n.signal}}function vd(t){if(function(t){return lt(t)&&"function"==typeof t.forEach}(t)){var n=new dh;return t.forEach((function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)})),n}return new dh(t)}var dd=function(){function t(t,n,i,e){this.Ket=t,this.Jet=n,this.mO=i,this.zW=e}var n=t.prototype;return n.start=function(t){this.EV=this.Ket.getReader()},n.pull=function(t){var n=this;return ut((function(){var i,e,r;return st(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,rn(n.EV.read(),n.mO.$f)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.Jet(e),n.zW.tx(r),n.mO.i_(),n.EV.cancel(r).catch(kt),t.error(r),[2];case 3:return i.done?(n.zW.$L(),n.mO.i_(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.mO.i_(),this.zW.tx(t),this.EV.cancel(t)},t}(),ld=function(){function t(t){var n=this;this.mO=new tn,this.BD=void 0,this.$et=new ru,this.ast=!1,this.hst=function(){var t;n.ist(),null==(t=n.tst)||t.abort()},this.PD=t,this.mO.e_(t.$f),this.tst=new T,this.Wet()}var n=t.prototype;return n.Wet=function(){var t=this,n=this.tst,i=this.PD;if(i.$f.Gf)return this.ist();n.onreadystatechange=function(){return t.sst()},n.onprogress=function(n){return t.Get(n)},n.onload=function(){return t.nst()},n.onloadend=function(){return t.rst()},n.onerror=function(){return t.gq()},n.ontimeout=function(){return t.ost()},n.onabort=function(){return t.ist()},n.open(i.mE,i.Iu,!0),n.withCredentials=Boolean(i.TE),"responseType"in n&&i.pE&&(i.pE===vh.RM?n.responseType="text":n.responseType="arraybuffer"),i.wE.forEach((function(t,i){n.setRequestHeader(i,t)})),i.QD&&(n.timeout=i.QD),this.mO.$f.Zf(this.hst);var e=i.vE;e?n.send(e):n.send()},n.sst=function(){var t=this.tst;void 0!==t&&t.readyState>=2&&!this.ast&&(this.ast=!0,this.ust())},n.ust=function(){var t,n,i=this.tst,e=function(t){var n=new dh,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach((function(t){var i=t.split(":"),e=i.shift().trim();if(e){var r=i.join(":").trim();n.append(e,r)}})),n}(i.getAllResponseHeaders()||""),r=this.PD;this.cst=new ru,this.BD=new Uv({RD:r,pE:r.pE,lp:this.cst.sx,UD:i.status,WR:i.statusText,wE:e,jE:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.$et)||t.$L(this.BD)},n.nst=function(){var t,n=this.tst;if(void 0!==n){var i=n.response;if(!vt(i)){var e=this.PD.pE;i=e===vh.RM?n.responseText:e===vh.ZD?new ArrayBuffer(0):{}}null==(t=this.cst)||t.$L(i)}},n.rst=function(){this.gn()},n.Get=function(t){void 0!==this.tst&&(null==this.PD.SE||this.PD.SE.call(this.PD,t.loaded,t.lengthComputable?t.total:void 0))},n.gq=function(){var t=new w("Network request failed");this.BD?this.Ss(new jv(this.BD,t)):this.Ss(new Xv(this.PD,t))},n.ost=function(){this.Ss(new Yv(this.PD))},n.ist=function(){this.Ss(new nn),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.cst)?i:this.$et)||n.tx(t)},n.gn=function(){this.tst=void 0,this.BD=void 0,this.$et=void 0,this.cst=void 0,this.mO.Hf()},Nt(t,[{key:"zD",get:function(){return this.$et.sx}}]),t}();var wd=function(){function t(){}var n=t.prototype;return n.RD=function(t){return function(t){if(!nd()||!function(t){try{return id.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Iu))return!1;if(!rd()&&t.SE)return!1;if(!t.NE){if(Yi.Gk&&Yi.Ck<=68)return!1;if(Yi.Uk)return!1}return!0}(t)?new fd(t).zD:new ld(t).zD},n.fG=function(t){var n=t.Yz?{"Content-type":t.Yz}:void 0;this.RD(new zv({mE:Lv.POST,Iu:t.Iu,vE:t.vE,wE:n,iw:Fv.fw})).then((function(t){!function(t){t.then(kt,kt)}(t.aP())}),kt)},n.gn=function(){},t}();var bd=function(t){return t[t.sD=1]="sD",t[t.nD=2]="nD",t[t.RM=3]="RM",t[t.rD=4]="rD",t[t.oD=9]="oD",t}({});var gd=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Dt(n,t),n}(Jt),md=function(){function t(){}return t.prototype.yD=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new gd(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new gd;return new Id(n)},t}(),pd=function(){function t(t){this.lst=t}var n=t.prototype;return n.eD=function(t){return this.lst.isEqualNode(t.lst)},n.uD=function(n){return new t(this.lst.cloneNode(n))},Nt(t,[{key:"hD",get:function(){return bd.nD}},{key:"pD",get:function(){var t;return null!=(t=this.lst.localName)?t:Od(this.lst.nodeName)}},{key:"l",get:function(){return this.lst.nodeName}},{key:"dst",get:function(){var t;return null!=(t=this.lst.namespaceURI)?t:void 0}},{key:"fst",get:function(){var t;return null!=(t=this.lst.prefix)?t:void 0}},{key:"cM",get:function(){return this.lst.nodeValue}}]),t}(),yd=function(){function t(t){this._st=void 0,this.gst=t}var n=t.prototype;return n.wD=function(t){return this.SD.filter((function(n){return kd(n)&&n.uP===t}))},n.vD=function(t,n){return this.SD.filter((function(i){return kd(i)&&i.pD===n&&i.dst===t}))},n.ND=function(t){this.gst.appendChild(t.XI),this._st&&this._st.push(t)},n.eD=function(t){return this.gst.isEqualNode(t.XI)},Nt(t,[{key:"SD",get:function(){return void 0===this._st&&(this._st=function(t){for(var n=[],i=0;i<t.length;i++){var e=Rd(t.item(i));e&&n.push(e)}return n}(this.gst.childNodes)),this._st}},{key:"m",get:function(){return this.SD.filter(kd)}},{key:"XI",get:function(){return this.gst}}]),t}(),_d=function(t){function n(n){return t.call(this,n)||this}Dt(n,t);var i=n.prototype;return i.bD=function(t){if(this.gst.hasAttribute(t))return this.gst.getAttribute(t)},i.TD=function(t,n){if(this.gst.hasAttributeNS(t,n))return this.gst.getAttributeNS(t,n)},i.fD=function(t){this.gst.removeAttribute(t)},i.vst=function(t,n){this.gst.removeAttributeNS(t,n)},i.wst=function(t,n){this.gst.setAttribute(t,n)},i.mst=function(t,n,i){this.gst.setAttributeNS(t,n,i)},i.uD=function(t){return new n(this.gst.cloneNode(t))},Nt(n,[{key:"hD",get:function(){return bd.sD}},{key:"pD",get:function(){var t;return null!=(t=this.gst.localName)?t:Od(this.gst.nodeName)}},{key:"dst",get:function(){var t;return null!=(t=this.gst.namespaceURI)?t:void 0}},{key:"fst",get:function(){var t;return null!=(t=this.gst.prefix)?t:void 0}},{key:"uP",get:function(){return this.gst.nodeName}},{key:"mD",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new pd(t.item(i)));return n}(this.gst.attributes)}},{key:"eP",get:function(){return this.gst.textContent}}]),n}(yd),Sd=function(){function t(t){this.gst=t}return t.prototype.eD=function(t){return this.lp===t.lp},Nt(t,[{key:"lp",get:function(){return this.gst.nodeValue}},{key:"XI",get:function(){return this.gst}}]),t}(),Td=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.uD=function(t){return new n(this.gst.cloneNode(t))},Nt(n,[{key:"hD",get:function(){return bd.RM}}]),n}(Sd),Ed=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.uD=function(t){return new n(this.gst.cloneNode(t))},Nt(n,[{key:"hD",get:function(){return bd.rD}}]),n}(Sd),Id=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.uD=function(t){return new n(this.gst.cloneNode(t))},Nt(n,[{key:"hD",get:function(){return bd.oD}},{key:"MD",get:function(){return new _d(this.gst.documentElement)}}]),n}(yd);function kd(t){return function(t){return 1===t.hD}(t)}function Rd(t){switch(t.nodeType){case bd.sD:return new _d(t);case bd.RM:return new Td(t);case bd.rD:return new Ed(t)}}function Od(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Nd=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).pst=void 0,n.yst=rd(),n.Mst=Yi.mL||Yi.bk,n.bst=(Yi.mL||Yi.Gk&&Yi.Ck<=68||Yi.bk)&&!(Yi.Uk&&Yi.Fk<3),n.Est=void 0,n.kst=new md,n}return Dt(n,t),n.prototype.yD=function(t){return this.kst.yD(t)},Nt(n,[{key:"Ret",get:function(){return this.pst||(this.pst=new Go(uh())),this.pst}},{key:"Ast",get:function(){return this.yst}},{key:"R0",get:function(){return this.Mst}},{key:"K0",get:function(){return this.bst}},{key:"Tst",get:function(){return!1}},{key:"FP",get:function(){return fh.bF()}},{key:"Sst",get:function(){return{Nst:ah}}},{key:"Ist",get:function(){return c.connection&&c.connection.effectiveType||"default"}},{key:"Dst",get:function(){return c.connection&&c.connection.type||"unknown"}},{key:"cR",get:function(){return this.Est||(this.Est=new qv(new wd)),this.Est}}]),n}(Ro);It(new Nd),It(new Nd);var Pd=self;Pd.addEventListener("install",(function(t){t.waitUntil(Pd.skipWaiting())})),Pd.addEventListener("activate",(function(t){t.waitUntil(Pd.clients.claim())})),xi.TR.ur(Pd)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);