swarm-video-viewer
Version:
Swarm video viewer for any player
4 lines • 172 kB
JavaScript
var swarmViewer=function(D){"use strict";var Th=Object.defineProperty;var na=D=>{throw TypeError(D)};var xh=(D,q,W)=>q in D?Th(D,q,{enumerable:!0,configurable:!0,writable:!0,value:W}):D[q]=W;var m=(D,q,W)=>xh(D,typeof q!="symbol"?q+"":q,W),Ps=(D,q,W)=>q.has(D)||na("Cannot "+W);var M=(D,q,W)=>(Ps(D,q,"read from private field"),W?W.call(D):q.get(D)),dt=(D,q,W)=>q.has(D)?na("Cannot add the same private member more than once"):q instanceof WeakSet?q.add(D):q.set(D,W),lt=(D,q,W,Rt)=>(Ps(D,q,"write to private field"),Rt?Rt.call(D,W):q.set(D,W),W),Ze=(D,q,W)=>(Ps(D,q,"access private method"),W);var Wr,jr,zr,Gr,Jr,Qr,Vr,Zr,Xr,Kr,Yr,$r,ti,ei,ni,si,ri,ii,oi,ai,hi,ci,ui,di,li,pi,fi,mi,gi,_i,yi,bi,Si,wi,Ii,vi,Ci,ki,Ti,xi,Ei,Ai,Ri,Pi,Li,Oi,Bi,Mi,Ni,Di,qi,Fi,Ui,Hi,Wi,ji,zi,Gi,Ji,Qi,Vi,Zi,Xi,Ki,Yi,$i,to,eo,no,so,ro,io,oo,ao,ho,co,uo,lo,po,fo,mo,go,_o,yo,bo,So,wo,Io,vo,Co,ko,To,Nt,re,ct,Et,_t,yt,Dt,sa,Os,xo,bt,Eo,Ao,Ro,Po,Lo,Oo,Bo,Mo,No,Do,qo,Fo;function q(r,t){var e=W();return(q=function(n,s){return e[n-=126]})(r,t)}function W(){var r=["9003784zOxWxP","end","1491bQEJVW","1850718uRAZtr","578742itThoV","9UCzJrJ","8107176FTXVmk","1172gaXtPJ","462417pCSfDB","3076380BSFIKU"];return(W=function(){return r})()}(function(r){for(var t=q,e=r();;)try{if(parseInt(t(133))/1+parseInt(t(128))/2+-parseInt(t(127))/3*(parseInt(t(132))/4)+-parseInt(t(134))/5+parseInt(t(129))/6+parseInt(t(131))/7+-parseInt(t(135))/8*(parseInt(t(130))/9)===756031)break;e.push(e.shift())}catch{e.push(e.shift())}})(W);const Rt=Object.freeze(Object.defineProperty({__proto__:null,getByteRange:function(r,t){if(r!==void 0&&t!==void 0&&r<=t)return{start:r,end:t}},getSegmentRuntimeId:function(r,t){var e=q;return t?r+"|"+t.start+"-"+t[e(126)]:r}},Symbol.toStringTag,{value:"Module"}));var ra=ue;function ue(r,t){var e=Xe();return(ue=function(n,s){return e[n-=364]})(r,t)}function Xe(){var r=["6364536WJiBJb","11fZbOGp","8nJssvm","type","5666815wBYIyA","6qckLSg","5765967ZnclHk","4606080vqpkaO","3pXClhP","11262830UxNhqR","1612522NpZpzX","timestamp","now","183956VldhCo"];return(Xe=function(){return r})()}(function(r){for(var t=ue,e=r();;)try{if(parseInt(t(372))/1+-parseInt(t(369))/2*(parseInt(t(367))/3)+parseInt(t(373))/4+parseInt(t(366))/5+-parseInt(t(364))/6*(-parseInt(t(377))/7)+parseInt(t(375))/8*(-parseInt(t(365))/9)+parseInt(t(368))/10*(-parseInt(t(374))/11)===932644)break;e.push(e.shift())}catch{e.push(e.shift())}})(Xe);class Y extends(jr=Error,Wr=ra(370),jr){constructor(e,n){var s=ue;super(n);m(this,Wr);this[s(376)]=e,this[s(370)]=performance[s(371)]()}}class Jt extends Error{constructor(t){super(),this.type=t}}const it=de;(function(r){const t=de,e=r();for(;;)try{if(-parseInt(t(323))/1+parseInt(t(314))/2*(-parseInt(t(330))/3)+parseInt(t(302))/4*(-parseInt(t(295))/5)+-parseInt(t(317))/6*(parseInt(t(290))/7)+-parseInt(t(289))/8*(-parseInt(t(313))/9)+parseInt(t(315))/10*(parseInt(t(296))/11)+-parseInt(t(294))/12*(-parseInt(t(332))/13)===830315)break;e.push(e.shift())}catch{e.push(e.shift())}})(Ke);class ia{constructor(t,e,n){m(this,Qr);m(this,Jr,new AbortController);m(this,Gr);m(this,zr);m(this,"onChunkDownloaded");const s=de;this[s(288)]=t,this[s(303)]=e,this.onChunkDownloaded=n[s(309)]("onChunkDownloaded");const{byteRange:i}=this[s(288)].segment;i&&(this[s(287)]={...i}),t[s(320)]!==0&&(this[s(287)]=this[s(287)]??{start:0},this[s(287)][s(307)]=this.requestByteRange.start+t[s(320)]),this.request[s(306)]&&(this[s(316)]=this[s(288)][s(306)]-this.request[s(320)]),this[s(327)]=this[s(288)].start({downloadSource:s(336)},{abort:()=>this[s(337)].abort(s(308)),notReceivingBytesTimeoutMs:this[s(303)].httpNotReceivingBytesTimeoutMs}),this[s(325)]()}async[(Qr=it(327),Jr=it(337),Gr=it(316),zr=it(287),it(325))](){var n,s,i,o;const t=it,{segment:e}=this[t(288)];try{let h=await((s=(n=this[t(303)])[t(326)])==null?void 0:s.call(n,e.url,e[t(334)],this[t(337)][t(285)],this[t(287)]));if(!h){const l=new Headers(this.requestByteRange?{Range:"bytes="+this.requestByteRange[t(307)]+"-"+(this[t(287)][t(304)]??"")}:void 0);h=new Request(e[t(319)],{headers:l,signal:this[t(337)].signal})}if(this[t(337)][t(285)][t(301)])throw new DOMException(t(291),t(329));const a=await window[t(325)](h);if(this[t(340)](a),!a[t(333)])return;const{requestControls:d}=this;d.firstBytesReceived();const u=a[t(333)][t(298)]();for await(const l of async function*(p){const v=it;for(;;){const{done:I,value:_}=await p[v(292)]();if(I)break;yield _}}(u))this[t(327)].addLoadedChunk(l),this.onChunkDownloaded(l[t(312)],t(336));if(!(await((o=(i=this.httpConfig)[t(310)])==null?void 0:o.call(i,e[t(319)],e[t(334)],this[t(288)].data))??!0))throw this[t(288)][t(311)](),new Y("http-segment-validation-failed");d.completeOnSuccess()}catch(h){this[t(300)](h)}}[it(340)](t){const e=it;if(!t.ok)throw t[e(331)]===406?(this[e(288)][e(311)](),new Y(e(322),t[e(293)])):new Y(e(328),t[e(293)]);const{requestByteRange:n}=this;if(n)if(t[e(331)]===200){if(this.request[e(286)].byteRange)throw new Y(e(338));this[e(288)].clearLoadedBytes()}else{if(t.status!==206)throw new Y("http-unexpected-status-code",t[e(293)]);const s=t[e(297)].get(e(321));if(s&&this[e(316)]!==void 0&&this.expectedBytesLength!==+s)throw this[e(288)][e(311)](),new Y(e(322),t[e(293)]);const i=t[e(297)][e(299)](e(335)),o=i?function(h){const a=it,d=oa[a(318)](h[a(339)]());if(!d)return;const[,u,l,p]=d;return{from:u?parseInt(u):void 0,to:l?parseInt(l):void 0,total:p?parseInt(p):void 0}}(i):void 0;if(o){const{from:h,to:a}=o,d=a!==void 0&&h!==void 0?a-h+1:void 0;if(d!==void 0&&this[e(316)]!==d||h!==void 0&&n[e(307)]!==h||a!==void 0&&n.end!==void 0&&n.end!==a)throw this.request[e(311)](),new Y(e(322),t[e(293)])}}if(t[e(331)]===200&&this[e(288)].totalBytes===void 0){const s=t[e(297)][e(299)]("Content-Length");s&&this[e(288)].setTotalBytes(+s)}}handleError(t){const e=it;if(t instanceof Error){if(t[e(305)]!==e(308))return;const n=t instanceof Y?t:new Y(e(328),t.message);this[e(327)][e(324)](n)}}}function de(r,t){const e=Ke();return(de=function(n,s){return e[n-=285]})(r,t)}function Ke(){const r=["fetch","httpRequestSetup","requestControls","http-error","AbortError","3xhrxze","status","2265055uUAZOs","body","byteRange","Content-Range","http","abortController","http-unexpected-status-code","trim","handleResponseHeaders","signal","segment","requestByteRange","request","1991512rxLMas","579614kNPQNh","Request aborted before request fetch","read","statusText","132CqrvFG","1215rQIbnV","1771LVHZlV","headers","getReader","get","handleError","aborted","15520IHEThl","httpConfig","end","name","totalBytes","start","abort","getEventDispatcher","validateHTTPSegment","clearLoadedBytes","byteLength","27ivAQBq","1247254icecwV","63750xvzpTq","expectedBytesLength","84rrFIQw","exec","url","loadedBytes","Content-Length","http-bytes-mismatch","133767cDBoWv","abortOnError"];return(Ke=function(){return r})()}const oa=/^bytes (?:(?:(\d+)|)-(?:(\d+)|)|\*)\/(?:(\d+)|\*)$/;var le=Ye;function Ye(r,t){var e=$e();return(Ye=function(n,s){return e[n-=452]})(r,t)}(function(r){for(var t=Ye,e=r();;)try{if(parseInt(t(459))/1*(parseInt(t(471))/2)+-parseInt(t(473))/3*(parseInt(t(467))/4)+parseInt(t(453))/5*(parseInt(t(463))/6)+parseInt(t(452))/7*(-parseInt(t(465))/8)+parseInt(t(454))/9+parseInt(t(470))/10+parseInt(t(456))/11*(-parseInt(t(466))/12)===749623)break;e.push(e.shift())}catch{e.push(e.shift())}})($e);var aa=typeof globalThis<"u"?globalThis:typeof window!==le(472)?window:typeof global!==le(472)?global:typeof self!==le(472)?self:{};function Pt(r){var t=le;return r&&r[t(460)]&&Object.prototype[t(474)][t(462)](r,t(458))?r.default:r}function $e(){var r=["222434KxBTGT","undefined","6708NdAEAy","hasOwnProperty","function","2947xUYEvK","5ifMZWS","6021414CpwkEd","prototype","11ZPauVK","keys","default","11BkROuc","__esModule","defineProperty","call","4844172zqctux","length","5728rdGUBc","28663548BAzgKs","652xHopGh","constructor","apply","11043610xmcrSA"];return($e=function(){return r})()}var Bs,Ms,Ns,Ds,qs,tn={exports:{}};function ha(){if(Ms)return Bs;Ms=1;var r=1e3,t=60*r,e=60*t,n=24*e,s=7*n,i=365.25*n;function o(h,a,d,u){var l=a>=1.5*d;return Math.round(h/d)+" "+u+(l?"s":"")}return Bs=function(h,a){a=a||{};var d=typeof h;if(d==="string"&&h.length>0)return function(u){if(!((u=String(u)).length>100)){var l=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(l){var p=parseFloat(l[1]);switch((l[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*s;case"days":case"day":case"d":return p*n;case"hours":case"hour":case"hrs":case"hr":case"h":return p*e;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}(h);if(d==="number"&&isFinite(h))return a.long?function(u){var l=Math.abs(u);return l>=n?o(u,l,n,"day"):l>=e?o(u,l,e,"hour"):l>=t?o(u,l,t,"minute"):l>=r?o(u,l,r,"second"):u+" ms"}(h):function(u){var l=Math.abs(u);return l>=n?Math.round(u/n)+"d":l>=e?Math.round(u/e)+"h":l>=t?Math.round(u/t)+"m":l>=r?Math.round(u/r)+"s":u+"ms"}(h);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(h))}}var en=(qs||(qs=1,function(r,t){t.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;n.splice(1,0,s,"color: inherit");let i=0,o=0;n[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(i++,h==="%c"&&(o=i))}),n.splice(o,0,s)},t.save=function(n){try{n?t.storage.setItem("debug",n):t.storage.removeItem("debug")}catch{}},t.load=function(){let n;try{n=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n},t.useColors=function(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch{}}(),t.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),r.exports=(Ds||(Ds=1,Ns=function(n){function s(h){let a,d,u,l=null;function p(...v){if(!p.enabled)return;const I=p,_=Number(new Date),g=_-(a||_);I.diff=g,I.prev=a,I.curr=_,a=_,v[0]=s.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let f=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(y,b)=>{if(y==="%%")return"%";f++;const w=s.formatters[b];if(typeof w=="function"){const z=v[f];y=w.call(I,z),v.splice(f,1),f--}return y}),s.formatArgs.call(I,v),(I.log||s.log).apply(I,v)}return p.namespace=h,p.useColors=s.useColors(),p.color=s.selectColor(h),p.extend=i,p.destroy=s.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>l!==null?l:(d!==s.namespaces&&(d=s.namespaces,u=s.enabled(h)),u),set:v=>{l=v}}),typeof s.init=="function"&&s.init(p),p}function i(h,a){const d=s(this.namespace+(a===void 0?":":a)+h);return d.log=this.log,d}function o(h,a){let d=0,u=0,l=-1,p=0;for(;d<h.length;)if(u<a.length&&(a[u]===h[d]||a[u]==="*"))a[u]==="*"?(l=u,p=d,u++):(d++,u++);else{if(l===-1)return!1;u=l+1,p++,d=p}for(;u<a.length&&a[u]==="*";)u++;return u===a.length}return s.debug=s,s.default=s,s.coerce=function(h){return h instanceof Error?h.stack||h.message:h},s.disable=function(){const h=[...s.names,...s.skips.map(a=>"-"+a)].join(",");return s.enable(""),h},s.enable=function(h){s.save(h),s.namespaces=h,s.names=[],s.skips=[];const a=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const d of a)d[0]==="-"?s.skips.push(d.slice(1)):s.names.push(d)},s.enabled=function(h){for(const a of s.skips)if(o(h,a))return!1;for(const a of s.names)if(o(h,a))return!0;return!1},s.humanize=ha(),s.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(n).forEach(h=>{s[h]=n[h]}),s.names=[],s.skips=[],s.formatters={},s.selectColor=function(h){let a=0;for(let d=0;d<h.length;d++)a=(a<<5)-a+h.charCodeAt(d),a|=0;return s.colors[Math.abs(a)%s.colors.length]},s.enable(s.load()),s}),Ns)(t);const{formatters:e}=r.exports;e.j=function(n){try{return JSON.stringify(n)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}}(tn,tn.exports)),tn.exports);const ht=Pt(en);var Fs,Us={exports:{}};function Hs(){return Fs||(Fs=1,function(r){var t=Object.prototype.hasOwnProperty,e="~";function n(){}function s(a,d,u){this.fn=a,this.context=d,this.once=u||!1}function i(a,d,u,l,p){if(typeof u!="function")throw new TypeError("The listener must be a function");var v=new s(u,l||a,p),I=e?e+d:d;return a._events[I]?a._events[I].fn?a._events[I]=[a._events[I],v]:a._events[I].push(v):(a._events[I]=v,a._eventsCount++),a}function o(a,d){--a._eventsCount===0?a._events=new n:delete a._events[d]}function h(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1)),h.prototype.eventNames=function(){var a,d,u=[];if(this._eventsCount===0)return u;for(d in a=this._events)t.call(a,d)&&u.push(e?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(a)):u},h.prototype.listeners=function(a){var d=e?e+a:a,u=this._events[d];if(!u)return[];if(u.fn)return[u.fn];for(var l=0,p=u.length,v=new Array(p);l<p;l++)v[l]=u[l].fn;return v},h.prototype.listenerCount=function(a){var d=e?e+a:a,u=this._events[d];return u?u.fn?1:u.length:0},h.prototype.emit=function(a,d,u,l,p,v){var I=e?e+a:a;if(!this._events[I])return!1;var _,g,f=this._events[I],y=arguments.length;if(f.fn){switch(f.once&&this.removeListener(a,f.fn,void 0,!0),y){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,d),!0;case 3:return f.fn.call(f.context,d,u),!0;case 4:return f.fn.call(f.context,d,u,l),!0;case 5:return f.fn.call(f.context,d,u,l,p),!0;case 6:return f.fn.call(f.context,d,u,l,p,v),!0}for(g=1,_=new Array(y-1);g<y;g++)_[g-1]=arguments[g];f.fn.apply(f.context,_)}else{var b,w=f.length;for(g=0;g<w;g++)switch(f[g].once&&this.removeListener(a,f[g].fn,void 0,!0),y){case 1:f[g].fn.call(f[g].context);break;case 2:f[g].fn.call(f[g].context,d);break;case 3:f[g].fn.call(f[g].context,d,u);break;case 4:f[g].fn.call(f[g].context,d,u,l);break;default:if(!_)for(b=1,_=new Array(y-1);b<y;b++)_[b-1]=arguments[b];f[g].fn.apply(f[g].context,_)}}return!0},h.prototype.on=function(a,d,u){return i(this,a,d,u,!1)},h.prototype.once=function(a,d,u){return i(this,a,d,u,!0)},h.prototype.removeListener=function(a,d,u,l){var p=e?e+a:a;if(!this._events[p])return this;if(!d)return o(this,p),this;var v=this._events[p];if(v.fn)v.fn!==d||l&&!v.once||u&&v.context!==u||o(this,p);else{for(var I=0,_=[],g=v.length;I<g;I++)(v[I].fn!==d||l&&!v[I].once||u&&v[I].context!==u)&&_.push(v[I]);_.length?this._events[p]=_.length===1?_[0]:_:o(this,p)}return this},h.prototype.removeAllListeners=function(a){var d;return a?(d=e?e+a:a,this._events[d]&&o(this,d)):(this._events=new n,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=e,h.EventEmitter=h,r.exports=h}(Us)),Us.exports}const Ws=Pt(Hs());var js,zs,Gs,pe={exports:{}},ca=function(){if(Gs)return pe.exports;Gs=1;var r=(zs||(zs=1,js=function n(s,i){if(s&&i)return n(s)(i);if(typeof s!="function")throw new TypeError("need wrapper function");return Object.keys(s).forEach(function(h){o[h]=s[h]}),o;function o(){for(var h=new Array(arguments.length),a=0;a<h.length;a++)h[a]=arguments[a];var d=s.apply(this,h),u=h[h.length-1];return typeof d=="function"&&d!==u&&Object.keys(u).forEach(function(l){d[l]=u[l]}),d}}),js);function t(n){var s=function(){return s.called?s.value:(s.called=!0,s.value=n.apply(this,arguments))};return s.called=!1,s}function e(n){var s=function(){if(s.called)throw new Error(s.onceError);return s.called=!0,s.value=n.apply(this,arguments)},i=n.name||"Function wrapped with `once`";return s.onceError=i+" shouldn't be called more than once",s.called=!1,s}return pe.exports=r(t),pe.exports.strict=r(e),t.proto=t(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return t(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return e(this)},configurable:!0})}),pe.exports}();const ua=Pt(ca);var Js,Qs,nn,Vs;function Zs(){if(Qs)return Js;let r;return Qs=1,Js=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:aa):t=>(r||(r=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}var da=function(){if(Vs)return nn;Vs=1,nn=function(t,e){let n,s,i,o=!0;Array.isArray(t)?(n=[],s=t.length):(i=Object.keys(t),n={},s=i.length);function h(d){function u(){e&&e(d,n),e=null}o?r(u):u()}function a(d,u,l){n[d]=l,(--s===0||u)&&h(u)}s?i?i.forEach(function(d){t[d](function(u,l){a(d,u,l)})}):t.forEach(function(d,u){d(function(l,p){a(u,l,p)})}):h(null),o=!1};const r=Zs();return nn}();const la=Pt(da),pt=typeof window<"u"?window:self,sn=pt.RTCPeerConnection||pt.mozRTCPeerConnection||pt.webkitRTCPeerConnection,pa=pt.RTCSessionDescription||pt.mozRTCSessionDescription||pt.webkitRTCSessionDescription,fa=pt.RTCIceCandidate||pt.mozRTCIceCandidate||pt.webkitRTCIceCandidate;var Xs,Ks,Ys,$s,tr,er,nr,sr,rr,ir;function ma(){if($s)return Ys;$s=1;const r=Ks?Xs:(Ks=1,Xs=class{constructor(t){if(!(t>0)||t-1&t)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(t){return this.buffer[this.top]===void 0&&(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){const t=this.buffer[this.btm];if(t!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,t}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}});return Ys=class{constructor(t){this.hwm=t||16,this.head=new r(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(t){if(this.length++,!this.head.push(t)){const e=this.head;this.head=e.next=new r(2*this.head.buffer.length),this.head.push(t)}}shift(){this.length!==0&&this.length--;const t=this.tail.shift();if(t===void 0&&this.tail.next){const e=this.tail.next;return this.tail.next=null,this.tail=e,this.tail.shift()}return t}peek(){const t=this.tail.peek();return t===void 0&&this.tail.next?this.tail.next.peek():t}isEmpty(){return this.length===0}}}function or(){return er?tr:(er=1,tr=class{constructor(r){this.decoder=new TextDecoder(r==="utf16le"?"utf16-le":r)}get remaining(){return-1}decode(r){return this.decoder.decode(r,{stream:!0})}flush(){return this.decoder.decode(new Uint8Array(0))}})}function ga(){if(sr)return nr;sr=1;const r=or(),t=or();return nr=class{constructor(e="utf8"){switch(this.encoding=function(n){switch(n=n.toLowerCase()){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return n;default:throw new Error("Unknown encoding: "+n)}}(e),this.encoding){case"utf8":this.decoder=new t;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new r(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e=="string"?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let n="";return e&&(n=this.push(e)),n+=this.decoder.flush(),n}}}var ar,hr,cr=function(){if(ir)return rr;ir=1;const{EventEmitter:r}=Hs(),t=new Error("Stream was destroyed"),e=new Error("Premature close"),n=ma(),s=ga(),i=536870911,o=1^i,h=2^i,a=32,d=64,u=128,l=256,p=1024,v=2048,I=4096,_=8192,g=16384,f=32768,y=131072,b=131328,w=16^i,z=536805375,ze=768^i,Ge=536838143,Je=536739839,Cs=1<<18,St=2<<18,wt=4<<18,ut=8<<18,Gt=16<<18,At=32<<18,It=64<<18,ie=128<<18,ah=256<<18,Uo=512<<18,Ho=1024<<18,hh=535822335,Wo=503316479,jo=268435455,Qe=262160,ch=536608751,zo=8404992,oe=14,uh=15,Go=8405006,ks=33587200,Jo=33587215,dh=2359296,Qo=270794767,Ve=Symbol.asyncIterator||Symbol("asyncIterator");class Vo{constructor(c,{highWaterMark:S=16384,map:x=null,mapWritable:R,byteLength:N,byteLengthWritable:F}={}){this.stream=c,this.queue=new n,this.highWaterMark=S,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=F||N||ta,this.map=R||x,this.afterWrite=_h.bind(this),this.afterUpdateNextTick=Sh.bind(this)}get ended(){return(this.stream._duplexState&At)!==0}push(c){return!(142606350&this.stream._duplexState)&&(this.map!==null&&(c=this.map(c)),this.buffered+=this.byteLength(c),this.queue.push(c),this.buffered<this.highWaterMark?(this.stream._duplexState|=ut,!0):(this.stream._duplexState|=6291456,!1))}shift(){const c=this.queue.shift();return this.buffered-=this.byteLength(c),this.buffered===0&&(this.stream._duplexState&=534773759),c}end(c){typeof c=="function"?this.stream.once("finish",c):c!=null&&this.push(c),this.stream._duplexState=(this.stream._duplexState|Uo)&hh}autoBatch(c,S){const x=[],R=this.stream;for(x.push(c);(R._duplexState&Qo)===dh;)x.push(R._writableState.shift());if((R._duplexState&uh)!==0)return S(null);R._writev(x,S)}update(){const c=this.stream;c._duplexState|=St;do{for(;(c._duplexState&Qo)===ut;){const S=this.shift();c._duplexState|=67371008,c._write(S,this.afterWrite)}1310720&c._duplexState||this.updateNonPrimary()}while(this.continueUpdate()===!0);c._duplexState&=536346623}updateNonPrimary(){const c=this.stream;if((144965647&c._duplexState)===Uo)return c._duplexState=c._duplexState|Cs,void c._final(gh.bind(this));(c._duplexState&oe)!==4?(c._duplexState&Jo)===1&&(c._duplexState=(c._duplexState|Qe)&o,c._open(Xo.bind(this))):(c._duplexState&ks)===0&&(c._duplexState|=Qe,c._destroy(Zo.bind(this)))}continueUpdate(){return(this.stream._duplexState&ie)!==0&&(this.stream._duplexState&=Wo,!0)}updateCallback(){(35127311&this.stream._duplexState)===wt?this.update():this.updateNextTick()}updateNextTick(){(this.stream._duplexState&ie)===0&&(this.stream._duplexState|=ie,(this.stream._duplexState&St)===0&&queueMicrotask(this.afterUpdateNextTick))}}class lh{constructor(c,{highWaterMark:S=16384,map:x=null,mapReadable:R,byteLength:N,byteLengthReadable:F}={}){this.stream=c,this.queue=new n,this.highWaterMark=S===0?1:S,this.buffered=0,this.readAhead=S>0,this.error=null,this.pipeline=null,this.byteLength=F||N||ta,this.map=R||x,this.pipeTo=null,this.afterRead=yh.bind(this),this.afterUpdateNextTick=bh.bind(this)}get ended(){return(this.stream._duplexState&g)!==0}pipe(c,S){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof S!="function"&&(S=null),this.stream._duplexState|=512,this.pipeTo=c,this.pipeline=new fh(this.stream,c,S),S&&this.stream.on("error",ea),he(c))c._writableState.pipeline=this.pipeline,S&&c.on("error",ea),c.on("finish",this.pipeline.finished.bind(this.pipeline));else{const x=this.pipeline.done.bind(this.pipeline,c),R=this.pipeline.done.bind(this.pipeline,c,null);c.on("error",x),c.on("close",R),c.on("finish",this.pipeline.finished.bind(this.pipeline))}c.on("drain",mh.bind(this)),this.stream.emit("piping",c),c.emit("pipe",this.stream)}push(c){const S=this.stream;return c===null?(this.highWaterMark=0,S._duplexState=536805311&S._duplexState|1024,!1):this.map!==null&&(c=this.map(c))===null?(S._duplexState&=z,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(c),this.queue.push(c),S._duplexState=(S._duplexState|u)&z,this.buffered<this.highWaterMark)}shift(){const c=this.queue.shift();return this.buffered-=this.byteLength(c),this.buffered===0&&(this.stream._duplexState&=536862591),c}unshift(c){const S=[this.map!==null?this.map(c):c];for(;this.buffered>0;)S.push(this.shift());for(let x=0;x<S.length-1;x++){const R=S[x];this.buffered+=this.byteLength(R),this.queue.push(R)}this.push(S[S.length-1])}read(){const c=this.stream;if((16527&c._duplexState)===u){const S=this.shift();return this.pipeTo!==null&&this.pipeTo.write(S)===!1&&(c._duplexState&=ze),(c._duplexState&v)!==0&&c.emit("data",S),S}return this.readAhead===!1&&(c._duplexState|=y,this.updateNextTick()),null}drain(){const c=this.stream;for(;(16527&c._duplexState)===u&&768&c._duplexState;){const S=this.shift();this.pipeTo!==null&&this.pipeTo.write(S)===!1&&(c._duplexState&=ze),(c._duplexState&v)!==0&&c.emit("data",S)}}update(){const c=this.stream;c._duplexState|=a;do{for(this.drain();this.buffered<this.highWaterMark&&(214047&c._duplexState)===y;)c._duplexState|=65552,c._read(this.afterRead),this.drain();(12431&c._duplexState)==4224&&(c._duplexState|=_,c.emit("readable")),80&c._duplexState||this.updateNonPrimary()}while(this.continueUpdate()===!0);c._duplexState&=536870879}updateNonPrimary(){const c=this.stream;(1167&c._duplexState)===p&&(c._duplexState=536869887&c._duplexState|16384,c.emit("end"),(c._duplexState&Go)===zo&&(c._duplexState|=4),this.pipeTo!==null&&this.pipeTo.end()),(c._duplexState&oe)!==4?(c._duplexState&Jo)===1&&(c._duplexState=(c._duplexState|Qe)&o,c._open(Xo.bind(this))):(c._duplexState&ks)===0&&(c._duplexState|=Qe,c._destroy(Zo.bind(this)))}continueUpdate(){return(this.stream._duplexState&f)!==0&&(this.stream._duplexState&=Ge,!0)}updateCallback(){(32879&this.stream._duplexState)===d?this.update():this.updateNextTick()}updateNextTickIfOpen(){32769&this.stream._duplexState||(this.stream._duplexState|=f,(this.stream._duplexState&a)===0&&queueMicrotask(this.afterUpdateNextTick))}updateNextTick(){(this.stream._duplexState&f)===0&&(this.stream._duplexState|=f,(this.stream._duplexState&a)===0&&queueMicrotask(this.afterUpdateNextTick))}}class ph{constructor(c){this.data=null,this.afterTransform=wh.bind(c),this.afterFinal=null}}class fh{constructor(c,S,x){this.from=c,this.to=S,this.afterPipe=x,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(c,S){S&&(this.error=S),c!==this.to||(this.to=null,this.from===null)?c!==this.from||(this.from=null,this.to===null)?(this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null):(c._duplexState&g)===0&&this.to.destroy(this.error||new Error("Readable stream closed before ending")):(this.from._duplexState&g)!==0&&this.pipeToFinished||this.from.destroy(this.error||new Error("Writable stream closed prematurely"))}}function mh(){this.stream._duplexState|=512,this.updateCallback()}function gh(k){const c=this.stream;k&&c.destroy(k),(c._duplexState&oe)===0&&(c._duplexState|=At,c.emit("finish")),(c._duplexState&Go)===zo&&(c._duplexState|=4),c._duplexState&=402391039,(c._duplexState&St)===0?this.update():this.updateNextTick()}function Zo(k){const c=this.stream;k||this.error===t||(k=this.error),k&&c.emit("error",k),c._duplexState|=8,c.emit("close");const S=c._readableState,x=c._writableState;if(S!==null&&S.pipeline!==null&&S.pipeline.done(c,k),x!==null){for(;x.drains!==null&&x.drains.length>0;)x.drains.shift().resolve(!1);x.pipeline!==null&&x.pipeline.done(c,k)}}function _h(k){const c=this.stream;k&&c.destroy(k),c._duplexState&=469499903,this.drains!==null&&function(S){for(let x=0;x<S.length;x++)--S[x].writes===0&&(S.shift().resolve(!0),x--)}(this.drains),(6553615&c._duplexState)===Gt&&(c._duplexState&=532676607,(c._duplexState&It)===It&&c.emit("drain")),this.updateCallback()}function yh(k){k&&this.stream.destroy(k),this.stream._duplexState&=w,this.readAhead===!1&&(this.stream._duplexState&l)===0&&(this.stream._duplexState&=Je),this.updateCallback()}function bh(){(this.stream._duplexState&a)===0&&(this.stream._duplexState&=Ge,this.update())}function Sh(){(this.stream._duplexState&St)===0&&(this.stream._duplexState&=Wo,this.update())}function Xo(k){const c=this.stream;k&&c.destroy(k),4&c._duplexState||(17423&c._duplexState||(c._duplexState|=d),142606351&c._duplexState||(c._duplexState|=wt),c.emit("open")),c._duplexState&=ch,c._writableState!==null&&c._writableState.updateCallback(),c._readableState!==null&&c._readableState.updateCallback()}function wh(k,c){c!=null&&this.push(c),this._writableState.afterWrite(k)}function Ih(k){this._readableState!==null&&(k==="data"&&(this._duplexState|=133376,this._readableState.updateNextTick()),k==="readable"&&(this._duplexState|=I,this._readableState.updateNextTick())),this._writableState!==null&&k==="drain"&&(this._duplexState|=It,this._writableState.updateNextTick())}class Ts extends r{constructor(c){super(),this._duplexState=0,this._readableState=null,this._writableState=null,c&&(c.open&&(this._open=c.open),c.destroy&&(this._destroy=c.destroy),c.predestroy&&(this._predestroy=c.predestroy),c.signal&&c.signal.addEventListener("abort",kh.bind(this))),this.on("newListener",Ih)}_open(c){c(null)}_destroy(c){c(null)}_predestroy(){}get readable(){return this._readableState!==null||void 0}get writable(){return this._writableState!==null||void 0}get destroyed(){return!!(8&this._duplexState)}get destroying(){return(this._duplexState&oe)!==0}destroy(c){(this._duplexState&oe)===0&&(c||(c=t),this._duplexState=535822271&this._duplexState|4,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=c),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=c),this._duplexState|=2,this._predestroy(),this._duplexState&=h,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}}class ae extends Ts{constructor(c){super(c),this._duplexState|=8519681,this._readableState=new lh(this,c),c&&(this._readableState.readAhead===!1&&(this._duplexState&=Je),c.read&&(this._read=c.read),c.eagerOpen&&this._readableState.updateNextTick(),c.encoding&&this.setEncoding(c.encoding))}setEncoding(c){const S=new s(c),x=this._readableState.map||Ch;return this._readableState.map=function(R){const N=S.push(R);return N===""&&(R.byteLength!==0||S.remaining>0)?null:x(N)},this}_read(c){c(null)}pipe(c,S){return this._readableState.updateNextTick(),this._readableState.pipe(c,S),c}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(c){return this._readableState.updateNextTickIfOpen(),this._readableState.push(c)}unshift(c){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(c)}resume(){return this._duplexState|=b,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?536739583:536870655,this}static _fromAsyncIterator(c,S){let x;const R=new ae({...S,read(F){c.next().then(N).then(F.bind(null,null)).catch(F)},predestroy(){x=c.return()},destroy(F){if(!x)return F(null);x.then(F.bind(null,null)).catch(F)}});return R;function N(F){F.done?R.push(null):R.push(F.value)}}static from(c,S){if(he(x=c)&&x.readable)return c;var x;if(c[Ve])return this._fromAsyncIterator(c[Ve](),S);Array.isArray(c)||(c=c===void 0?[]:[c]);let R=0;return new ae({...S,read(N){this.push(R===c.length?null:c[R++]),N(null)}})}static isBackpressured(c){return!!(17422&c._duplexState)||c._readableState.buffered>=c._readableState.highWaterMark}static isPaused(c){return(c._duplexState&l)===0}[Ve](){const c=this;let S=null,x=null,R=null;return this.on("error",X=>{S=X}),this.on("readable",function(){x!==null&&N(c.read())}),this.on("close",function(){x!==null&&N(null)}),{[Ve](){return this},next:()=>new Promise(function(X,qt){x=X,R=qt;const U=c.read();U!==null?N(U):8&c._duplexState&&N(null)}),return:()=>F(null),throw:X=>F(X)};function N(X){R!==null&&(S?R(S):X===null&&(c._duplexState&g)===0?R(t):x({value:X,done:X===null}),R=x=null)}function F(X){return c.destroy(X),new Promise((qt,U)=>{if(8&c._duplexState)return qt({value:void 0,done:!0});c.once("close",function(){X?U(X):qt({value:void 0,done:!0})})})}}}class xs extends Ts{constructor(c){super(c),this._duplexState|=16385,this._writableState=new Vo(this,c),c&&(c.writev&&(this._writev=c.writev),c.write&&(this._write=c.write),c.final&&(this._final=c.final),c.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=Ho}uncork(){this._duplexState&=jo,this._writableState.updateNextTick()}_writev(c,S){S(null)}_write(c,S){this._writableState.autoBatch(c,S)}_final(c){c(null)}static isBackpressured(c){return!!(146800654&c._duplexState)}static drained(c){if(c.destroyed)return Promise.resolve(!1);const S=c._writableState;var x;const R=((x=c)._writev!==xs.prototype._writev&&x._writev!==Es.prototype._writev?Math.min(1,S.queue.length):S.queue.length)+(c._duplexState&ah?1:0);return R===0?Promise.resolve(!0):(S.drains===null&&(S.drains=[]),new Promise(N=>{S.drains.push({writes:R,resolve:N})}))}write(c){return this._writableState.updateNextTick(),this._writableState.push(c)}end(c){return this._writableState.updateNextTick(),this._writableState.end(c),this}}class Es extends ae{constructor(c){super(c),this._duplexState=1|this._duplexState&y,this._writableState=new Vo(this,c),c&&(c.writev&&(this._writev=c.writev),c.write&&(this._write=c.write),c.final&&(this._final=c.final))}cork(){this._duplexState|=Ho}uncork(){this._duplexState&=jo,this._writableState.updateNextTick()}_writev(c,S){S(null)}_write(c,S){this._writableState.autoBatch(c,S)}_final(c){c(null)}write(c){return this._writableState.updateNextTick(),this._writableState.push(c)}end(c){return this._writableState.updateNextTick(),this._writableState.end(c),this}}class Ko extends Es{constructor(c){super(c),this._transformState=new ph(this),c&&(c.transform&&(this._transform=c.transform),c.flush&&(this._flush=c.flush))}_write(c,S){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=c:this._transform(c,this._transformState.afterTransform)}_read(c){if(this._transformState.data!==null){const S=this._transformState.data;this._transformState.data=null,c(null),this._transform(S,this._transformState.afterTransform)}else c(null)}destroy(c){super.destroy(c),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(c,S){S(null,c)}_flush(c){c(null)}_final(c){this._transformState.afterFinal=c,this._flush(vh.bind(this))}}function vh(k,c){const S=this._transformState.afterFinal;if(k)return S(k);c!=null&&this.push(c),this.push(null),S(null)}function Yo(k,...c){const S=Array.isArray(k)?[...k,...c]:[k,...c],x=S.length&&typeof S[S.length-1]=="function"?S.pop():null;if(S.length<2)throw new Error("Pipeline requires at least 2 streams");let R=S[0],N=null,F=null;for(let U=1;U<S.length;U++)N=S[U],he(R)?R.pipe(N,qt):(X(R,!0,U>1,qt),R.pipe(N)),R=N;if(x){let U=!1;const ce=he(N)||!(!N._writableState||!N._writableState.autoDestroy);N.on("error",As=>{F===null&&(F=As)}),N.on("finish",()=>{U=!0,ce||x(F)}),ce&&N.on("close",()=>x(F||(U?null:e)))}return N;function X(U,ce,As,Rs){U.on("error",Rs),U.on("close",function(){if(U._readableState&&!U._readableState.ended||As&&U._writableState&&!U._writableState.ended)return Rs(e)})}function qt(U){if(U&&!F){F=U;for(const ce of S)ce.destroy(U)}}}function Ch(k){return k}function $o(k){return!!k._readableState||!!k._writableState}function he(k){return typeof k._duplexState=="number"&&$o(k)}function ta(k){return function(c){return typeof c=="object"&&c!==null&&typeof c.byteLength=="number"}(k)?k.byteLength:1024}function ea(){}function kh(){this.destroy(new Error("Stream aborted."))}return rr={pipeline:Yo,pipelinePromise:function(...k){return new Promise((c,S)=>Yo(...k,x=>{if(x)return S(x);c()}))},isStream:$o,isStreamx:he,isEnded:function(k){return!!k._readableState&&k._readableState.ended},isFinished:function(k){return!!k._writableState&&k._writableState.ended},isDisturbed:function(k){return!!(1&~k._duplexState)||(k._duplexState&ks)!==0},getStreamError:function(k,c={}){const S=k._readableState&&k._readableState.error||k._writableState&&k._writableState.error;return c.all||S!==t?S:null},Stream:Ts,Writable:xs,Readable:ae,Duplex:Es,Transform:Ko,PassThrough:class extends Ko{}}}();const H=Pt(function(){if(hr)return ar;function r(t,e){for(const n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!0,configurable:!0});return t}return hr=1,ar=function(t,e,n){if(!t||typeof t=="string")throw new TypeError("Please pass an Error to err-code");n||(n={}),typeof e=="object"&&(n=e,e=""),e&&(n.code=e);try{return r(t,n)}catch{n.message=t.message,n.stack=t.stack;const i=function(){};return i.prototype=Object.create(Object.getPrototypeOf(t)),r(new i,n)}}}()),fe="0123456789abcdef",ur=[],me=[];for(let r=0;r<256;r++)ur[r]=fe[r>>4&15]+fe[15&r],r<16&&(r<10?me[48+r]=r:me[87+r]=r);const Ft=r=>{const t=r.length;let e="",n=0;for(;n<t;)e+=ur[r[n++]];return e},rn=r=>{const t=r.length>>1,e=t<<1,n=new Uint8Array(t);let s=0,i=0;for(;i<e;)n[s++]=me[r.charCodeAt(i++)]<<4|me[r.charCodeAt(i++)];return n};for(var _a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ya=typeof Uint8Array>"u"?[]:new Uint8Array(256),ge=0;ge<64;ge++)ya[_a.charCodeAt(ge)]=ge;const ba=new TextDecoder,dr=(r,t)=>ba.decode(r),Sa=new TextEncoder,on=r=>Sa.encode(r),Ut=r=>{let t,e="",n=0;const s=r.length;for(;n<s;)t=r.charCodeAt(n++),e+=fe[t>>4]+fe[15&t];return e},Qt=r=>{const t=rn(r);if(t.length<=65536)return String.fromCharCode(...t);let e="",n=0;for(;n<t.length;)e+=String.fromCharCode(...t.subarray(n,n+=65536));return e},lr=typeof window<"u"?window:self,an=lr.crypto||lr.msCrypto||{};an.subtle||an.webkitSubtle;const _e=r=>{const t=new Uint8Array(r);return an.getRandomValues(t)},wa=ht("simple-peer"),hn=65536;function pr(r){return r.replace(/a=ice-options:trickle\s\n/g,"")}let Vt=class Ls extends cr.Duplex{constructor(e){super(e=Object.assign({allowHalfOpen:!1},e));m(this,"_pc");if(this.__objectMode=!!e.objectMode,this._id=Ft(_e(4)).slice(0,7),this._debug("new peer %o",e),this.channelName=e.initiator?e.channelName||Ft(_e(20)):null,this.initiator=e.initiator||!1,this.channelConfig=e.channelConfig||Ls.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},Ls.config,e.config),this.offerOptions=e.offerOptions||{},this.answerOptions=e.answerOptions||{},this.sdpTransform=e.sdpTransform||(n=>n),this.trickle=e.trickle===void 0||e.trickle,this.allowHalfTrickle=e.allowHalfTrickle!==void 0&&e.allowHalfTrickle,this.iceCompleteTimeout=e.iceCompleteTimeout||5e3,this._destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,!sn)throw H(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new sn(this.config)}catch(n){return void this.__destroy(H(n,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=n=>{this._onIceCandidate(n)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(n=>{this.__destroy(H(n,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=n=>{this._setupData(n)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(e){if(!this._destroying){if(this.destroyed)throw H(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof e=="string")try{e=JSON.parse(e)}catch{e={}}this._debug("signal()"),e.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),e.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(e.transceiverRequest.kind,e.transceiverRequest.init)),e.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(e.candidate):this._pendingCandidates.push(e.candidate)),e.sdp&&this._pc.setRemoteDescription(new pa(e)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(n=>{this._addIceCandidate(n)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(n=>{this.__destroy(H(n,"ERR_SET_REMOTE_DESCRIPTION"))}),e.sdp||e.candidate||e.renegotiate||e.transceiverRequest||this.__destroy(H(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(e){const n=new fa(e);this._pc.addIceCandidate(n).catch(s=>{var i;!n.address||n.address.endsWith(".local")?(i="Ignoring unsupported ICE candidate.",console.warn(i)):this.__destroy(H(s,"ERR_ADD_ICE_CANDIDATE"))})}send(e){if(!this._destroying){if(this.destroyed)throw H(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(e)}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,queueMicrotask(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this._destroying){if(this.destroyed)throw H(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}_final(e){this._readableState.ended||this.push(null),e(null)}__destroy(e){this.end(),this._destroy(()=>{},e)}_destroy(e,n){this.destroyed||this._destroying||(this._destroying=!0,this._debug("destroying (error: %s)",n&&(n.message||n)),setTimeout(()=>{if(this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,n&&this.emit("error",n),e()},0))}_setupData(e){if(!e.channel)return this.__destroy(H(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=e.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=hn),this.channelName=this._channel.label,this._channel.onmessage=s=>{this._onChannelMessage(s)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=s=>{const i=s.error instanceof Error?s.error:new Error(`Datachannel error: ${s.message} ${s.filename}:${s.lineno}:${s.colno}`);this.__destroy(H(i,"ERR_DATA_CHANNEL"))};let n=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(n&&this._onChannelClose(),n=!0):n=!1},5e3)}_write(e,n){if(this.destroyed)return n(H(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(e)}catch(s){return this.__destroy(H(s,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>hn?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=n):n(null)}else this._debug("write before connect"),this._chunk=e,this._cb=n}_onFinish(){if(this.destroyed)return;const e=()=>{setTimeout(()=>this.__destroy(),1e3)};this._connected?e():this.once("connect",e)}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(e=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(e.sdp=pr(e.sdp)),e.sdp=this.sdpTransform(e.sdp);const n=()=>{if(this.destroyed)return;const s=this._pc.localDescription||e;this._debug("signal"),this.emit("signal",{type:s.type,sdp:s.sdp})};this._pc.setLocalDescription(e).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?n():this.once("_iceComplete",n))}).catch(s=>{this.__destroy(H(s,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(e=>{this.__destroy(H(e,"ERR_CREATE_OFFER"))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(e=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(e.sdp=pr(e.sdp)),e.sdp=this.sdpTransform(e.sdp);const n=()=>{var i;if(this.destroyed)return;const s=this._pc.localDescription||e;this._debug("signal"),this.emit("signal",{type:s.type,sdp:s.sdp}),this.initiator||((i=this._requestMissingTransceivers)==null||i.call(this))};this._pc.setLocalDescription(e).then(()=>{this.destroyed||(this.trickle||this._iceComplete?n():this.once("_iceComplete",n))}).catch(s=>{this.__destroy(H(s,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(e=>{this.__destroy(H(e,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._destroying||this._pc.connectionState==="failed"&&this.__destroy(H(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const e=this._pc.iceConnectionState,n=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",e,n),this.emit("iceStateChange",e,n),e!=="connected"&&e!=="completed"||(this._pcReady=!0,this._maybeReady()),e==="failed"&&this.__destroy(H(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),e==="closed"&&this.__destroy(H(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(e){const n=s=>(Object.prototype.toString.call(s.values)==="[object Array]"&&s.values.forEach(i=>{Object.assign(s,i)}),s);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(s=>{const i=[];s.forEach(o=>{i.push(n(o))}),e(null,i)},s=>e(s)):this._pc.getStats.length>0?this._pc.getStats(s=>{if(this.destroyed)return;const i=[];s.result().forEach(o=>{const h={};o.names().forEach(a=>{h[a]=o.stat(a)}),h.id=o.id,h.type=o.type,h.timestamp=o.timestamp,i.push(n(h))}),e(null,i)},s=>e(s)):e(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const e=()=>{this.destroyed||this._destroying||this.getStats((n,s)=>{if(this.destroyed||this._destroying)return;n&&(s=[]);const i={},o={},h={};let a=!1;s.forEach(u=>{u.type!=="remotecandidate"&&u.type!=="remote-candidate"||(i[u.id]=u),u.type!=="localcandidate"&&u.type!=="local-candidate"||(o[u.id]=u),u.type!=="candidatepair"&&u.type!=="candidate-pair"||(h[u.id]=u)});const d=u=>{a=!0;let l=o[u.localCandidateId];l&&(l.ip||l.address)?(this.localAddress=l.ip||l.address,this.localPort=Number(l.port)):l&&l.ipAddress?(this.localAddress=l.ipAddress,this.localPort=Number(l.portNumber)):typeof u.googLocalAddress=="string"&&(l=u.googLocalAddress.split(":"),this.localAddress=l[0],this.localPort=Number(l[1])),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let p=i[u.remoteCandidateId];p&&(p.ip||p.address)?(this.remoteAddress=p.ip||p.address,this.remotePort=Number(p.port)):p&&p.ipAddress?(this.remoteAddress=p.ipAddress,this.remotePort=Number(p.portNumber)):typeof u.googRemoteAddress=="string"&&(p=u.googRemoteAddress.split(":"),this.remoteAddress=p[0],this.remotePort=Number(p[1])),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(s.forEach(u=>{u.type==="transport"&&u.selectedCandidatePairId&&d(h[u.selectedCandidatePairId]),(u.type==="googCandidatePair"&&u.googActiveConnection==="true"||(u.type==="candidatepair"||u.type==="candidate-pair")&&u.selected)&&d(u)}),a||Object.keys(h).length&&!Object.keys(o).length){if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(l){return this.__destroy(H(l,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const u=this._cb;this._cb=null,u(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")}else setTimeout(e,100)})};e()}_onInterval(){!this._cb||!this._channel||this._channel.bufferedAmount>hn||this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(e=>{this._pc.removeTrack(e),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(e){this.destroyed||(e.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:e.candidate.candidate,sdpMLineIndex:e.candidate.sdpMLineIndex,sdpMid:e.candidate.sdpMid}}):e.candidate||this._iceComplete||(this._iceComplete=!0,this.emit("_iceComplete")),e.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(e){if(this.destroyed)return;let n=e.data;n instanceof ArrayBuffer?n=new Uint8Array(n):this.__objectMode===!1&&(n=on(n)),this.push(n)}_onChannelBufferedAmountLow(){if(this.destroyed||!this._cb)return;this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const e=this._cb;this._cb=null,e(null)}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.__destroy())}_debug(){const e=[].slice.call(arguments);e[0]="["+this._id+"] "+e[0],wa.apply(null,e)}};Vt.WEBRTC_SUPPORT=!!sn,Vt.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},Vt.channelConfig={};const cn=Pt(Zs()),Ia={},va=Object.freeze(Object.defineProperty({__proto__:null,default:Ia},Symbol.toStringTag,{value:"Module"}));function un(r,t){const e=dn();return(un=function(n,s){return e[n-=327]})(r,t)}(function(r){const t=un,e=r();for(;;)try{if(parseInt(t(330))/1+-parseInt(t(328))/2+-parseInt(t(329))/3+parseInt(t(331))/4*(parseInt(t(337))/5)+parseInt(t(327))/6+-parseInt(t(335))/7+parseInt(t(342))/8===441990)break;e.push(e.shift())}catch{e.push(e.shift())}})(dn);function dn(){const r=["2088069oiEmob","554638jEiOeu","12CXHNsJ","defineProperties","origin","href","5774657TsGUbH","http:","764965nteKZa","protocol","match","replace","udp","11514248Tmiela","1548870HqjXvT","1496158FKIDTy"];return(dn=function(){return r})()}const ln={DEFAULT_ANNOUNCE_PEERS:50,MAX_ANNOUNCE_PEERS:82,parseUrl:r=>{const t=un,e=new URL(r[t(340)](/^udp:/,t(336)));return r[t(339)](/^udp:/)&&Object[t(332)](e,{href:{value:e[t(334)].replace(/^http/,"udp")},protocol:{value:e[t(338)][t(340)](/^http/,t(341))},origin:{value:e[t(333)].replace(/^http/,t(341))}}),e},...va},Ca=ht("simple-websocket"),ye=WebSocket;class fr extends cr.Duplex{constructor(t={}){if(typeof t=="string"&&(t={url:t}),super(t=Object.assign({allowHalfOpen:!1},t)),this.__objectMode=!!t.objectMode,t.objectMode!=null&&delete t.objectMode,t.url==null&&t.socket==null)throw new Error("Missing required `url` or `socket` option");if(t.url!=null&&t.socket!=null)throw new Error("Must specify either `url` or `socket` option, not both");if(this._id=Ft(_e(4)).slice(0,7),this._debug("new websocket: %o",t),this.connected=!1,this._chunk=null,this._cb=null,this._interval=null,t.socket)this.url=t.socket.url,this._ws=t.socket,this.connected=t.socket.readyState===ye.OPEN;else{this.url=t.url;try{this._ws=new ye(t.url)}catch(e){return void cn(()=>this.destroy(e))}}this._ws.binaryType="arraybuffer",t.socket&&this.connected?cn(()=>this._handleOpen()):this._ws.onopen=()=>this._handleOpen(),this._ws.onmessage=e=>this._handleMessage(e),this._ws.onclose=()=>this._handleClose(),this._ws.onerror=e=>this._handleError(e),this._handleFinishBound=()=>this._handleFinish(),this.once("finish",this._handleFinishBound)}send(t){this._ws.send(t)}_final(t){this._readableState.ended||this.push(null),t(null)}_destroy(t){if(!this.destroyed){if(this._writableState.ended||this.end(),this.connected=!1,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._handleFinishBound&&this.removeListener("finish",this._handleFinishBound),this._handleFinishBound=null,this._ws){const e=this._ws,n=()=>{e.onclose=null};if(e.readyState===ye.CLOSED)n();else try{e.onclose=n,e.close()}catch{n()}e.onopen=null,e.onmessage=null,e.onerror=()=>{}}this._ws=null,t()}}_write(t,e){if(this.destroyed)return e(new Error("cannot write after socket is destroyed"));if(this.connected){try{this.send(t)}catch(n){return this.destroy(n)}this._ws.bufferedAmount>65536?(this._debug("start backpressure: bufferedAmount %d",this._ws.bufferedAmount),this._cb=e):e(null)}else this._debug("write before connect"),this._chunk=t,this._cb=e}_handleOpen(){if(!this.connected&&!this.destroyed){if(this.connected=!0,this._chunk){try{this.send(this._chunk)}catch(e){return this.destroy(e)}this._chunk=null,this._debug('sent chunk from "write before connect"');const t=this._cb;this._cb=null,t(null)}this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref(),this._debug("connect"),this.emit("connect")}}_handleMessage(t){if(this.destroyed)return;let e=t.data;e instanceof ArrayBuffer&&(e=new Uint8Array(e)),this.__objectMode===!1&&(e=on(e)),this.push(e)}_handleClose(){this.destroyed||(this._debug("on close"),this.destroy())}_handleError(t){this.destroy(new Error(`Error connecting to ${this.url}`))}_handleFinish(){if(this.destroyed)return;const t=()=>{setTimeout(()=>this.destroy(),1e3)};this.connected?t():this.once("connect",t)}_onInterval(){if(!this._cb||!this._ws||this._ws.bufferedAmount>65536)return;this._debug("ending backpressure: bufferedAmount %d",this._ws.bufferedAmount);const t=this._cb;this._cb=null,t(null)}_debug(){const t=[].slice.call(arguments);t[0]="["+this._id+"] "+t[0],Ca.apply(null,t)}}fr.WEBSOCKET_SUPPORT=!!ye;var be=Se;function pn(){var r=["setInterval","unref","1WFCTkH","interval","7329740nUrJjZ","8CnSMAT","5TpxYdE","DEFAULT_ANNOUNCE_INTERVAL","destroyed","6134172MKtWCs","239400HWOxRJ","2112276iNagaR","9722898QoLqKx","2698206qIsjQB","895060xIABMk","log","announceUrl","_defaultAnnounceOpts","client","stats","18klQqEg","189DCiQlg"];return(pn=function(){return r})()}function Se(r,t){var e=pn();return(Se=function(n,s){return e[n-=146]})(r,t)}(function(r){for(var t=Se,e=r();;)try{if(parseInt(t(166))/1*(-parseInt(t(155))/2)+parseInt(t(153))/3*(parseInt(t(147))/4)+-parseInt(t(148))/5*(-parseInt(t(154))/6)+parseInt(t(163))/7*(-parseInt(t(152))/8)+parseInt(t(162))/9*(parseInt(t(156))/10)+-parseInt(t(146))/11+parseInt(t(151))/12===895442)break;e.push(e.shift())}catch{e.push(e.shift())}})(pn);class ka extends Ws{constructor(t,e){var n=Se;super(),this.client=t,this[n(158)]=e,this[n(167)]=null,this[n(150)]=!1}[be(164)](t){var e=be;t==null&&(t=this[e(149)]),clearInterval(this[e(167)]),t&&(this[e(167)]=setInterval(()=>{var n=e;this.announce(this[n(160)][n(159)]())},t),this[e(167)][e(165)]&&this[e(167)].unref())}async[be(161)](t){console[be(157)]("tracker.js:",t)}}var mr=function(r,t,e){if(e||arguments.length===2)for(var n,s=0,i=t.length;s<i;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return r.concat(n||Array.prototype.slice.call(t))},Ta=function(r,t,e){this.name=r,this.version=t,this.os=e,this.type="browser"},xa=function(r){this.version=r,this.type="node",this.name="node",this.os=process.platform},Ea=function(r,t,e,n){this.name=r,this.version=t,this.os=e,this.bot=n,this.type="bot-device"},Aa=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},Ra=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},Pa=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,La=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],gr=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Oa(r){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Ra:typeof navigator<"u"?function(t){var e=function(d){return d!==""&&La.reduce(function(u,l){var p=l[0],v=l[1];if(u)return u;var I=v.exec(d);return!!I&&[p,I]},!1)}(t);if(!e)return null;var n=e[0],s=e[1];if(n==="searchbot")return new Aa;var i=s[1]&&s[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=mr(mr([],i,!0),function(d){for(var u=[],l=0;l<d;l++)u.push("0");return u}(3-i.length),!0)):i=[];var o=i.join("."),h=function(d){for(var u=0,l=gr.length;u<l;u++){var p=gr[u],v=p[0];if(p[1].exec(d))return v}return null}(t),a=Pa.exec(t);return a&&a[1]?new Ea(n,o,h,a[1]):new Ta(n,o,h)}(navigator.userAgent):typeof process<"u"&&process.version?new xa(process.version.slice(1)):null}const O=mn;function fn(){const r=["stopped","peer","_wrtc","consumers","new websocket tracker %s","event","_onScrapeResponse","assign","announce","14348vfswMq","pow","expectingResponse","Connection error: ","717752QEhtBS","96098plqsrC","266QAzkwB","keys","got unexpected answer: ","14238mhmxeJ","close","_onSocketCloseBound","_infoHashBinary","492118CUUszJ","peer_id","once","peers","stored","push","length","_socketPool","setInterval","forEach","bittorrent-tracker:websocket-tracker","_onSocketError","_onSocketDataBound","emit","isArray","reconnectTimer","send %s","_trackerId","9MjmWzZ","creating peer (from _generateOffers)","removeListener","signal","failure reason","announceUrl","invalid scrape response","socket","retries","stream","offer","reconnecting","_onSocketConnectBound","swarm","offer_id","633480RFnYui","href","_onSocketData","floor","_createPeer","generating %s offers","httpsAgent","unref","version","infoHash","parse","message","interval","answer","protocol","reconnecting socket in %s ms","error","action","client","data","userAgent","connect","9505340SBHEDB","undefined","destroyed","browserCodeName","DEFAULT_ANNOUNCE_INTERVAL","statsCollector","_onSocketConnect","browserName","offers","340BuCHLj","files","_proxyOpts","_send","_openSocket","warning message","name","received %s from %s for %s","trackerTimeout","11LsigeW","browser_version","_peerIdBinary","_onSocketClose","tracker timeout: destroying peer","tracker id","_rtcConfig","ios","_defaultAnnounceOpts","destroy","_onSocketErrorBound","socksProxy","min interval","_generateOffers","DESTROY_TIMEOUT","complete","numwant","completed","update","stats","platform","_onAnnounceResponse","stringify","scrape","trackerid","map","min","prototype","warning","info_hash","connected","appCodeName","httpAgent","_startReconnectTimer"];return(fn=function(){return r})()}function mn(r,t){const e=fn();return(mn=function(n,s){return e[n-=499]})(r,t)}(function(r){const t=mn,e=r();for(;;)try{if(-parseInt(t(616))/1+-parseInt(t(624))/2+-parseInt(t(528))/3+-parseInt(t(611))/4*(parseInt(t(559))/5)+-parseInt(t(620))/6*(parseInt(t(617))/7)+-parseInt(t(615))/8*(-parseInt(t(513))/9)+parseInt(t(550))/10*(parseInt(t(568))/11)===152846)break;e.push(e.shift())}catch{e.push(e.shift())}})(fn);const ot=ht(O(505)),ft={};class gn extends ka{constructor(t,e){const n=O;super(t,e),ot(n(606),e),this[n(627)]={},this[n(520)]=null,this.stats={},this[n(524)]=!1,this[n(521)]=0,this.reconnectTimer=null,this[n(613)]=!1,this[n(563)]()}[O(610)](t){const e=O;if(this[e(552)]||this[e(524)])return;if(!this[e(520)][e(598)])return void this[e(520)].once(e(549),()=>{this.announce(t)});const n=Object.assign({},t,{action:"announce",info_hash:this[e(546)][e(623)],peer_id:this[e(546)][e(570)]});if(this[e(512)]&&(n[e(592)]=this[e(512)]),t[e(607)]===e(602)||t[e(607)]===e(585))this[e(562)](n);else{const s=Math[e(594)](t.numwant,13),i=Oa();this[e(581)](s,o=>{const h=e;n[h(584)]=s,n[h(558)]=o,n.browser=i[h(565)],n.os=i.os,n[h(569)]=i[h(536)],n[h(587)]=t[h(587)];const a=typeof navigator!==h(551)?navigator:{};n.source=typeof document!==h(551)&&document.referrer||"",n[h(529)]=typeof window<"u"&&window.location[h(529)]||"",t.swarm&&(n[h(526)]=t.swarm),t[h(522)]&&(n[h(522)]=t[h(522)]),t[h(499)]!=null&&(n[h(499)]=t.stored),n[h(575)]=/iPad|iPhone|iPod/.test(a[h(548)]||""),n[h(588)]=a[h(588)]||"",n.userAgent=a[h(548)]||"",n[h(553)]=a[h(599)]||"",n[h(557)]=a.appName||"",this[h(562)](n)})}}async statsCollector(t){const e=O;if(this[e(552)]||this[e(524)])return;if(!this.socket.connected)return void this[e(520)][e(626)](e(549),()=>{this[e(555)](t)});const n={action:"stats",info_hash:this[e(546)][e(623)],peer_id:this[e(546)]._peerIdBinary,data:t};this[e(512)]&&(n[e(592)]=this[e(512)]),this[e(562)](n)}scrape(t){const e=O;if(this[e(552)]||this[e(524)])return;if(!this[e(520)][e(598)])return void this[e(520)][e(626)](e(549),()=>{this[e(591)](t)});const n=Array[e(509)](t[e(537)])&&t[e(537)][e(501)]>0?t[e(537)][e(593)](i=>Qt(i)):t[e(537)]&&Qt(t[e(537)])||this[e(546)][e(623)],s={action:e(591),info_hash:n};this[e(562)](s)}[O(577)](t=_r){const e=O;if(this[e(552)])return t(null);this[e(552)]=!0,clearInterval(this[e(540)]),clearTimeout(this[e(510)]);for(const o in this[e(627)]){const h=this[e(627)][o];clearTimeout(h[e(567)]),h[e(577)]()}if(this.peers=null,this[e(520)]&&(this.socket.removeListener("connect",this[e(525)]),this[e(520)][e(515)](e(547),this[e(507)]),this.socket.removeListener("close",this._onSocketCloseBound),this[e(520)][e(515)](e(544),this._onSocketErrorBound),this[e(520)]=null),this._onSocketConnectBound=null,this[e(578)]=null,this[e(507)]=null,this[e(622)]=null,ft[this.announceUrl]&&(ft[this[e(518)]][e(605)]-=1),ft[this.announceUrl].consumers>0)return t();let n,s=ft[this[e(518)]];if(delete ft[this[e(518)]],s.on("error",_r),s[e(626)](e(621),t),!this[e(613)])return i();function i(){const o=e;n&&(clearTimeout(n),n=null),s[o(515)]("data",i),s[o(577)](),s=null}n=setTimeout(i,ln[e(582)]),s[e(626)](e(547),i)}[O(563)](){const t=O;if(this.destroyed=!1,this[t(627)]||(this[t(627)]={}),this[t(525)]=()=>{this[t(556)]()},this[t(578)]=e=>{this[t(506)](e)},this[t(507)]=e=>{this[t(530)](e)},this[t(622)]=()=>{this[t(571)]()},this.socket=ft[this[t(518)]],this[t(520)])ft[this[t(518)]][t(605)]+=1,this[t(520)].connected&&this._onSocketConnectBound();else{const e=new URL(this[t(518)]);let n;this[t(546)][t(561)]&&(n=e[t(542)]==="wss:"?this[t(546)][t(561)][t(534)]:this[t(546)]._proxyOpts[t(600)],!n&&this[t(546)]._proxyOpts.socksProxy&&(n=this[t(546)]._proxyOpts[t(579)])),this[t(520)]=ft[this[t(518)]]=new fr({url:this[t(518)],agent:n}),this[t(520)].consumers=1,this.socket[t(626)]("connect",this._onSocketConnectBound)}this.socket.on(t(547),this[t(507)]),this[t(520)][t(626)](t(621),this[t(622)]),this[t(520)][t(626)](t(544),this[t(578)])}[O(556)](){const t=O;this[t(552)]||this[t(524)]&&(this[t(524)]=!1,this[t(521)]=0,this[t(610)](this[t(546)][t(576)]()))}[O(530)](t){const e=O;if(!this[e(552)]){this[e(613)]=!1;try{t=JSON[e(538)](dr(t))}catch{return void this.client[e(508)](e(596),new Error("Invalid tracker response"))}t[e(545)]==="announce"?this[e(589)](t):t.action===e(591)?this._onScrapeResponse(t):t[e(545)]===e(587)?this[e(546)].emit(e(587),t):this[e(506)](new Error("invalid action in WS response: "+t[e(545)]))}}[O(589)](t){const e=O;if(t[e(597)]!==this.client[e(623)])return void ot("ignoring websocket data from %s for %s (looking for %s: reused socket)",this[e(518)],Ut(t[e(597)]),this[e(546)][e(537)]);if(t[e(625)]&&t[e(625)]===this[e(546)]._peerIdBinary)return;ot(e(566),JSON[e(590)](t),this[e(518)],this[e(546)][e(537)]);const n=t[e(517)];if(n)return this[e(546)][e(508)](e(596),new Error(n));const s=t[e(564)];s&&this.client[e(508)](e(596),new Error(s));const i=t[e(540)]||t[e(580)];i&&this[e(503)](1e3*i);const o=t[e(573)];if(o&&(this._trackerId=o),t[e(583)]!=null){const a=Object[e(609)]({},t,{announce:this[e(518)],infoHash:Ut(t[e(597)])});this.client.emit(e(586),a)}let h;if(t[e(523)]&&t.peer_id&&(ot("creating peer (from remote offer)"),h=this[e(532)](),h.id=Ut(t[e(625)]),h.once(e(516),a=>{const d=e,u={action:d(610),info_hash:this[d(546)][d(623)],peer_id:this[d(546)]._peerIdBinary,to_peer_id:t[d(625)],answer:a,offer_id:t.offer_id};this._trackerId&&(u.trackerid=this._trackerId),this._send(u)}),this.client[e(508)](e(603),h),h.signal(t[e(523)])),t[e(541)]&&t[e(625)]){const a=Ut(t[e(527)]);h=this[e(627)][a],h?(h.id=Ut(t[e(625)]),this[e(546)][e(508)](e(603),h),h[e(516)](t[e(541)]),clearTimeout(h[e(567)]),h.trackerTimeout=null,delete this[e(627)][a]):ot(e(619)+JSON[e(590)](t.answer))}}[O(608)](t){const e=O;t=t[e(560)]||{};const n=Object[e(618)](t);n[e(501)]!==0?n[e(504)](s=>{const i=e,o=Object[i(609)](t[s],{announce:this[i(518)],infoHash:Ut(s)});this[i(546)][i(508)](i(591),o)}):this[e(546)][e(508)](e(596),new Error(e(519)))}_onSocketClose(){const t=O;this[t(552)]||(this[t(577)](),this[t(601)]())}_onSocketError(t){const e=O;this[e(552)]||(this[e(577)](),this[e(546)][e(508)](e(596),t),this[e(601)]())}[O(601)](){const t=O,e=Math[t(531)](3e5*Math.random())+Math.min(1e4*Math[t(612)](2,this.retries),36e5);this[t(524)]=!0,clearTimeout(this[t(510)]),this[t(510)]=setTimeout(()=>{const n=t;this[n(521)]++,this[n(563)]()},e),this.reconnectTimer.unref&&this.reconnectTimer[t(535)](),ot(t(543),e)}[O(562)](t){const e=O;if(this[e(552)])return;this[e(613)]=!0;const n=JSON.stringify(t);ot(e(511),n),this[e(520)].send(n)}[O(581)](t,e){const n=O,s=this,i=[];ot(n(533),t);for(let a=0;a<t;++a)o();function o(){const a=n,d=Ft(_e(20));ot(a(514));const u=s.peers[d]=s._createPeer({initiator:!0});u.once(a(516),l=>{i[a(500)]({offer:l,offer_id:Qt(d)}),h()}),u[a(567)]=setTimeout(()=>{const l=a;ot(l(572)),u.trackerTimeout=null,delete s.peers[d],u[l(577)]()},5e4),u[a(567)][a(535)]&&u[a(567)][a(535)]()}function h(){i[n(501)]===t&&(ot("generated %s offers",t),e(i))}h()}_createPeer(t){const e=O,n=this;t=Object[e(609)]({trickle:!1,config:n.client[e(574)],wrtc:n[e(546)][e(604)]},t);const s=new Vt(t);return s[e(626)](e(544),i),s[e(626)](e(549),function o(){s[e(515)]("error",i),s.removeListener("connect",o)}),s;function i(o){const h=e;n.client[h(508)](h(596),new Error(h(614)+o[h(539)])),s[h(577)]()}}}function _r(){}gn[O(595)][O(554)]=3e4,gn[O(502)]=ft;const G=we;function _n(){const r=["scrape","emit","location","_getAnnounceOpts","12eFBTUH","Invalid tracker URL: ","string","parseUrl","function","_peerIdBuffer","920059mzieIS","infoHash","8599ZBGzie","_defaultAnnounceOpts","https:","_peerIdBinary","getAnnounceOpts","complete","Option `peerId` is required","downloaded","send `start` %o","Option `port` is required","start","protocol","Unsupported tracker protocol: ","peerId","wss:","30XLAWio","send `scrape`","event","_wrtc","DEFAULT_ANNOUNCE_PEERS","WEBRTC_SUPPORT","filter","port","forEach","_infoHashBuffer","20EwtVJq","map","toLowerCase","10AOCKvN","_trackers","send `complete` %o","from","Option `infoHash` is required","stop","_announce","uploaded","Option `announce` is required","announce","send `update` %o","assign","completed","once","statsCollector","length","numwant","send `stop` %o","update","12100814XQSBNg","4787728XMfqMi","substring","_port","967756nGVfLA","destroy","wrtc","ws:","proxyOpts","isArray","setInterval","userAgent","warning","isView","destroyed","212940tlGZGl","stopped","6208821vfrtMD","rtcConfig","_rtcConfig","bittorrent-tracker:client","keys"];return(_n=function(){return r})()}(function(r){const t=we,e=r();for(;;)try{if(-parseInt(t(302))/1*(-parseInt(t(317))/2)+parseInt(t(283))/3+parseInt(t(272))/4*(-parseInt(t(327))/5)+parseInt(t(294))/6*(parseInt(t(300))/7)+parseInt(t(269))/8+parseInt(t(285))/9*(-parseInt(t(330))/10)+parseInt(t(268))/11===503754)break;e.push(e.shift())}catch{e.push(e.shift())}})(_n);const vt=ht(G(288));class yn extends Ws{constructor(t={}){const e=G;if(super(),!t[e(315)])throw new Error(e(308));if(!t[e(301)])throw new Error(e(334));if(!t[e(339)])throw new Error(e(338));this.peerId=typeof t.peerId===e(296)?t[e(315)]:Ft(t[e(315)]),this[e(299)]=rn(this[e(315)]),this[e(305)]=Qt(this.peerId),this[e(301)]=typeof t[e(301)]===e(296)?t[e(301)][e(329)]():Ft(t[e(301)]),this[e(326)]=rn(this.infoHash),this._infoHashBinary=Qt(this[e(301)]),vt("new client %s",this[e(301)]),this[e(282)]=!1,this[e(271)]=t[e(324)],this[e(293)]=t[e(306)],this[e(287)]=t[e(286)],this._userAgent=t[e(279)],this._proxyOpts=t[e(276)],this[e(320)]=typeof t[e(274)]===e(298)?t[e(274)]():t[e(274)];let n=typeof t[e(339)]===e(296)?[t[e(339)]]:t[e(339)]==null?[]:t[e(339)];n=n[e(328)](o=>{const h=e;return ArrayBuffer[h(281)](o)&&(o=dr(o)),o[o[h(345)]-1]==="/"&&(o=o[h(270)](0,o[h(345)]-1)),o}),n=Array[e(333)](new Set(n));const s=this._wrtc!==!1&&(!!this[e(320)]||Vt[e(322)]),i=o=>{cn(()=>{this[we(291)]("warning",o)})};this[e(331)]=n[e(328)](o=>{const h=e;let a;try{a=ln[h(297)](o)}catch{return i(new Error(h(295)+o)),null}const d=a[h(324)];if(d<0||d>65535)return i(new Error("Invalid tracker port: "+o)),null;const u=a[h(313)];return u!==h(275)&&u!==h(316)||!s||u==="ws:"&&typeof window<"u"&&window[h(292)].protocol===h(304)?(i(new Error(h(314)+o)),null):new gn(this,o)})[e(323)](Boolean)}[G(312)](t){const e=G;(t=this[e(303)](t))[e(319)]="started",vt(e(310),t),this[e(336)](t),this[e(331)].forEach(n=>{n[e(278)]()})}[G(335)](t){const e=G;(t=this[e(303)](t))[e(319)]=e(284),vt(e(266),t),this._announce(t)}[G(307)](t){const e=G;t||(t={}),(t=this[e(303)](t)).event=e(342),vt(e(332),t),this[e(336)](t)}[G(267)](t){const e=G;(t=this[e(303)](t))[e(319)]&&delete t.event,vt(e(340),t),this[e(336)](t)}async[G(344)](t){const e=G,n=this[e(331)][0];n&&typeof n[e(344)]===e(298)&&n.statsCollector(t)}[G(336)](t){const e=G;this[e(331)].forEach(n=>{n[e(339)](t)})}scrape(t){vt(G(318)),t||(t={}),this._trackers.forEach(e=>{e.scrape(t)})}setInterval(t){const e=G;vt("setInterval %d",t),this[e(331)][e(325)](n=>{n[e(278)](t)})}[G(273)](t){const e=G;if(this.destroyed)return;this[e(282)]=!0,vt("destroy");const n=this._trackers[e(328)](s=>i=>{s.destroy(i)});la(n,t),this[e(331)]=[],this._getAnnounceOpts=null}_defaultAnnounceOpts(t={}){const e=G;return t[e(346)]==null&&(t[e(346)]=ln[e(321)]),t[e(337)]==null&&(t.uploaded=0),t[e(309)]==null&&(t[e(309)]=0),this[e(293)]&&(t=Object.assign({},t,this[e(293)]())),t}}function we(r,t){const e=_n();return(we=function(n,s){return e[n-=266]})(r,t)}function yr(r,t){var e=bn();return(yr=function(n,s){return e[n-=104]})(r,t)}function bn(){var r=["6884717nvoUXr","48XhPWQf","437FgGVJe","594085lOxgvP","2107323gJChRe","3901476llqRIH","6nVZdIm","12YPeWVu","4RaUHgL","34939465RPactB","11629480tJkAXM","1214qpPGTq"];return(bn=function(){return r})()}yn.scrape=(r,t)=>{const e=G;if(t=ua(t),!r[e(301)])throw new Error(e(334));if(!r[e(339)])throw new Error(e(338));const n=Object[e(341)]({},r,{infoHash:Array[e(277)](r[e(301)])?r[e(301)][0]:r.infoHash,peerId:on("01234567890123456789"),port:6881}),s=new yn(n);s[e(343)]("error",t),s[e(343)](e(280),t);let i=Array[e(277)](r[e(301)])?r.infoHash[e(345)]:1;const o={};return s.on(e(290),h=>{const a=e;if(i-=1,o[h[a(301)]]=h,i===0){s[a(273)]();const d=Object[a(289)](o);d.length===1?t(null,o[d[0]]):t(null,o)}}),s[e(290)]({infoHash:r[e(301)]}),s},function(r){for(var t=yr,e=r();;)try{if(-parseInt(t(113))/1*(-parseInt(t(110))/2)+-parseInt(t(104))/3+-parseInt(t(107))/4*(parseInt(t(114))/5)+parseInt(t(105))/6*(-parseInt(t(111))/7)+parseInt(t(112))/8*(-parseInt(t(115))/9)+parseInt(t(109))/10+parseInt(t(108))/11*(parseInt(t(106))/12)===796800)break;e.push(e.shift())}catch{e.push(e.shift())}}(bn);var br,Sn={exports:{}},Ba=function(){if(br)return Sn.exports;function r(I,_,g,f,y,b,w){var z=I+(_&g|~_&f)+(y>>>0)+w;return(z<<b|z>>>32-b)+_}function t(I,_,g,f,y,b,w){var z=I+(_&f|g&~f)+(y>>>0)+w;return(z<<b|z>>>32-b)+_}function e(I,_,g,f,y,b,w){var z=I+(_^g^f)+(y>>>0)+w;return(z<<b|z>>>32-b)+_}function n(I,_,g,f,y,b,w){var z=I+(g^(_|~f))+(y>>>0)+w;return(z<<b|z>>>32-b)+_}function s(I){return String.fromCharCode(255&I)}function i(I){return s(I)+s(I>>>8)+s(I>>>16)+s(I>>>24)}br=1;var o=function(I){return unescape(encodeURIComponent(I))},h=Sn.exports=function(I){return d(I).toHex()},a=h.fromBytes=function(I){for(var _=function(wt){for(var ut=wt.length,Gt=ut<<3,At=new Uint32Array(ut+72>>>6<<4),It=0,ie=wt.length;It<ie;++It)At[It>>>2]|=wt.charCodeAt(It)<<((3&It)<<3);return At[ut>>2]|=128<<(31&Gt),At[At.length-2]=Gt,At}(I),g=1732584193,f=4023233417,y=2562383102,b=271733878,w=0,z=_.length;w<z;w+=16){var ze=g,Ge=f,Je=y,Cs=b;g=r(g,f,y,b,_[w+0],7,3614090360),b=r(b,g,f,y,_[w+1],12,3905402710),y=r(y,b,g,f,_[w+2],17,606105819),f=r(f,y,b,g,_[w+3],22,3250441966),g=r(g,f,y,b,_[w+4],7,4118548399),b=r(b,g,f,y,_[w+5],12,1200080426),y=r(y,b,g,f,_[w+6],17,2821735955),f=r(f,y,b,g,_[w+7],22,4249261313),g=r(g,f,y,b,_[w+8],7,1770035416),b=r(b,g,f,y,_[w+9],12,2336552879),y=r(y,b,g,f,_[w+10],17,4294925233),f=r(f,y,b,g,_[w+11],22,2304563134),g=r(g,f,y,b,_[w+12],7,1804603682),b=r(b,g,f,y,_[w+13],12,4254626195),y=r(y,b,g,f,_[w+14],17,2792965006),g=t(g,f=r(f,y,b,g,_[w+15],22,1236535329),y,b,_[w+1],5,4129170786),b=t(b,g,f,y,_[w+6],9,3225465664),y=t(y,b,g,f,_[w+11],14,643717713),f=t(f,y,b,g,_[w+0],20,3921069994),g=t(g,f,y,b,_[w+5],5,3593408605),b=t(b,g,f,y,_[w+10],9,38016083),y=t(y,b,g,f,_[w+15],14,3634488961),f=t(f,y,b,g,_[w+4],20,3889429448),g=t(g,f,y,b,_[w+9],5,568446438),b=t(b,g,f,y,_[w+14],9,3275163606),y=t(y,b,g,f,_[w+3],14,4107603335),f=t(f,y,b,g,_[w+8],20,1163531501),g=t(g,f,y,b,_[w+13],5,2850285829),b=t(b,g,f,y,_[w+2],9,4243563512),y=t(y,b,g,f,_[w+7],14,1735328473),g=e(g,f=t(f,y,b,g,_[w+12],20,2368359562),y,b,_[w+5],4,4294588738),b=e(b,g,f,y,_[w+8],11,2272392833),y=e(y,b,g,f,_[w+11],16,1839030562),f=e(f,y,b,g,_[w+14],23,4259657740),g=e(g,f,y,b,_[w+1],4,2763975236),b=e(b,g,f,y,_[w+4],11,1272893353),y=e(y,b,g,f,_[w+7],16,4139469664),f=e(f,y,b,g,_[w+10],23,3200236656),g=e(g,f,y,b,_[w+13],4,681279174),b=e(b,g,f,y,_[w+0],11,3936430074),y=e(y,b,g,f,_[w+3],16,3572445317),f=e(f,y,b,g,_[w+6],23,76029189),g=e(g,f,y,b,_[w+9],4,3654602809),b=e(b,g,f,y,_[w+12],11,3873151461),y=e(y,b,g,f,_[w+15],16,530742520),g=n(g,f=e(f,y,b,g,_[w+2],23,3299628645),y,b,_[w+0],6,4096336452),b=n(b,g,f,y,_[w+7],10,1126891415),y=n(y,b,g,f,_[w+14],15,2878612391),f=n(f,y,b,g,_[w+5],21,4237533241),g=n(g,f,y,b,_[w+12],6,1700485571),b=n(b,g,f,y,_[w+3],10,2399980690),y=n(y,b,g,f,_[w+10],15,4293915773),f=n(f,y,b,g,_[w+1],21,2240044497),g=n(g,f,y,b,_[w+8],6,1873313359),b=n(b,g,f,y,_[w+15],10,4264355552),y=n(y,b,g,f,_[w+6],15,2734768916),f=n(f,y,b,g,_[w+13],21,1309151649),g=n(g,f,y,b,_[w+4],6,4149444226),b=n(b,g,f,y,_[w+11],10,3174756917),y=n(y,b,g,f,_[w+2],15,718787259),f=n(f,y,b,g,_[w+9],21,3951481745),g=g+ze>>>0,f=f+Ge>>>0,y=y+Je>>>0,b=b+Cs>>>0}var St=new String(i(g)+i(f)+i(y)+i(b));return St.toHex=function(){for(var wt="",ut=0,Gt=St.length;ut<Gt;++ut)wt+=(256+(255&St.charCodeAt(ut))).toString(16).substr(-2);return wt},St},d=h.fromUtf8=function(I){return a(o(I))},u="./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function l(I,_){for(var g="";--_>=0;I>>>=6)g+=u.charAt(63&I);return g}var p=[0,6,12,1,7,13,2,8,14,3,9,15,4,10,5,11],v=h.salt=function(I){var _="";I||(I=8);do _+=u.charAt(64*Math.random()>>>0);while(--I);return _};return h.crypt=function(I,_){if(I.length>64)throw Error("too long key");_||(_="$1$"+v()),I=o(I);for(var g=o(_.replace(/^\$1\$([^$]+)(?:\$.*)?$/,"$1")),f=a(I+g+I),y=I+"$1$"+g,b=I.length;b>16;b-=16)y+=f;for(y+=f.slice(0,b),b=I.length;b;b>>=1)y+=1&b?"\0":I.charAt(0);f=a(y);for(var w=0;w<1e3;++w)f=a((1&w?I:f)+(w%3?g:"")+(w%7?I:"")+(1&w?f:I));var z="$1$"+g+"$";for(w=0;w<15;w+=3)z+=l(f.charCodeAt(p[w+0])<<16|f.charCodeAt(p[w+1])<<8|f.charCodeAt(p[w+2]),4);return z+l(f.charCodeAt(p[15]),2)},Sn.exports}();const Ma=Pt(Ba);function wn(){const r=["5303112YUKOpb","290OfGWnM","1018326xVlkBr","5108710nBuwAs","2.1.0","6gdVcoQ","4622FGfMUd","10798065MCkRWf","4922372XqsIsU","1626256fdnSPd"];return(wn=function(){return r})()}const Na=In;function In(r,t){const e=wn();return(In=function(n,s){return e[n-=454]})(r,t)}(function(r){const t=In,e=r();for(;;)try{if(-parseInt(t(456))/1*(parseInt(t(461))/2)+parseInt(t(455))/3*(-parseInt(t(459))/4)+parseInt(t(463))/5+-parseInt(t(462))/6+-parseInt(t(458))/7+parseInt(t(460))/8+parseInt(t(457))/9===528181)break;e.push(e.shift())}catch{e.push(e.shift())}})(wn);const Da=Na(454),Zt=vn;function vn(r,t){const e=Cn();return(vn=function(n,s){return e[n-=413]})(r,t)}(function(r){const t=vn,e=r();for(;;)try{if(-parseInt(t(430))/1*(-parseInt(t(423))/2)+-parseInt(t(424))/3*(-parseInt(t(417))/4)+parseInt(t(421))/5+-parseInt(t(431))/6+parseInt(t(416))/7*(-parseInt(t(422))/8)+-parseInt(t(414))/9+parseInt(t(419))/10===705231)break;e.push(e.shift())}catch{e.push(e.shift())}})(Cn);const Sr=Zt(427)+function(r){const t=Zt,e=r[t(432)](".");return""+e[0][t(420)](2,"0")+e[1][t(420)](2,"0")}(Da)+"-",wr=Zt(425);function Ir(r){const t=Zt,e=Ma[t(429)](r)[t(426)](1);return btoa(e)}function Cn(){const r=["2922PJQFnz","467151gxXlvm","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789","slice","-PM","floor","fromUtf8","125npwmbv","2689062EqzNIe","split","push","6595461RTALvk","random","9527nxyPmk","4SHdBcR","length","7467930dmJXgv","padStart","4488665NVswJe","568IClUHk"];return(Cn=function(){return r})()}const qa=Object.freeze(Object.defineProperty({__proto__:null,TRACKER_CLIENT_VERSION_PREFIX:Sr,generatePeerId:function(r){const t=Zt,e=[r],n=20-r[t(418)];for(let s=0;s<n;s++)e[t(413)](wr[Math[t(428)](Math[t(415)]()*wr[t(418)])]);return e.join("")},getStreamHash:Ir},Symbol.toStringTag,{value:"Module"}));function kn(){const r=["79UfGPqM","http-p2p-window","4306870rVCgYq","type","http-window","16620076KduvIu","3vkXhNr","1847735pQyxqa","10650072wmBcMN","5350468iUeTWp","74070qgJliX","3380cpfXKL","high-demand","stream","12aciJRF","9XZMFQK","336HUIycE"," | "];return(kn=function(){return r})()}function Tn(r){return r[Xt(411)]+"-"+r.index}function Xt(r,t){const e=kn();return(Xt=function(n,s){return e[n-=405]})(r,t)}function vr(r){const t=Xt,{externalId:e}=r;return"("+Tn(r[t(421)])+t(407)+e+")"}(function(r){const t=Xt,e=r();for(;;)try{if(parseInt(t(408))/1*(parseInt(t(419))/2)+-parseInt(t(414))/3*(-parseInt(t(417))/4)+-parseInt(t(415))/5+-parseInt(t(418))/6*(parseInt(t(406))/7)+parseInt(t(416))/8+parseInt(t(405))/9*(parseInt(t(410))/10)+-parseInt(t(413))/11*(parseInt(t(422))/12)===760050)break;e.push(e.shift())}catch{e.push(e.shift())}})(kn);const Lt=Object.freeze(Object.defineProperty({__proto__:null,getSegmentPlaybackStatusesString:function(r){const t=Xt,{isHighDemand:e,isHttpDownloadable:n,isP2PDownloadable:s}=r;return e?t(420):n&&s?t(409):n?t(412):s?"p2p-window":"-"},getSegmentString:vr,getStreamString:Tn},Symbol.toStringTag,{value:"Module"}));function Cr(){let r,t;return{promise:new Promise((e,n)=>{r=e,t=n}),resolve:r,reject:t}}function xn(r,t){const e=K;t===void 0&&(t=r[e(309)]((i,o)=>i+o[e(305)],0));const n=new Uint8Array(t);let s=0;for(const i of r)n[e(319)](i,s),s+=i[e(305)];return n}function En(r){const t=K,e=new TextEncoder,n=new Uint8Array(r[t(318)]);return e.encodeInto(r,n),n}function kr(r){const t=K;return!!r&&typeof r===t(302)&&!Array[t(324)](r)}function An(){const r=["4455156EOjTXm","Attempt to modify restricted property '","object","454cPZfrt","prototype","byteLength","3199iJcwWk","buffer","1928dzqGEe","reduce","slice","2652880OanewR","42bMyimq","forEach","46017rhgIXL","random","floor","35320690hywzql","length","set","111575HhefAo","keys","map","927395nnEump","isArray"];return(An=function(){return r})()}function Tr(r){return function t(e){const n=K;if(kr(e)){const s={};return Object[n(321)](e)[n(313)](i=>{if(e[i]!==void 0){const o=t(e[i]);o!==void 0&&(s[i]=o)}}),s}return e}(r)}function mt(r){const t=K;if(e=r,Array.isArray(e))return r[t(322)](n=>mt(n));if(kr(r)){const n={};for(const s of Object.keys(r))n[s]=mt(r[s]);return n}return r;var e}function xr(r){const t=K;for(let e=r[t(318)]-1;e>0;e--){const n=Math[t(316)](Math[t(315)]()*(e+1));[r[e],r[n]]=[r[n],r[e]]}return r}function K(r,t){const e=An();return(K=function(n,s){return e[n-=300]})(r,t)}function Ht(r,t,e={}){const n=K;return typeof r!==n(302)||r===null||typeof t!==n(302)||t===null||Object[n(321)](t)[n(313)](s=>{const i=n;if(s==="__proto__"||s==="constructor"||s===i(304))throw new Error(i(301)+String(s)+"'");const o=t[s],h=e[s];s in r&&(r[s]=o===void 0?h===void 0?void 0:h:o)}),r}function Ie(r){const t=K,{defaultConfig:e,baseConfig:n={},specificStreamConfig:s={}}=r,i=mt({...e,...n,...s}),o=Object[t(321)](e),h={};return o.forEach(a=>{a in i&&(h[a]=i[a])}),h}(function(r){const t=K,e=r();for(;;)try{if(-parseInt(t(306))/1*(parseInt(t(303))/2)+-parseInt(t(300))/3+parseInt(t(311))/4+-parseInt(t(320))/5*(-parseInt(t(312))/6)+-parseInt(t(323))/7+parseInt(t(308))/8*(-parseInt(t(314))/9)+parseInt(t(317))/10===775551)break;e.push(e.shift())}catch{e.push(e.shift())}})(An);const Kt=Object.freeze(Object.defineProperty({__proto__:null,arrayBackwards:function*(r){for(let t=r.length-1;t>=0;t--)yield r[t]},deepCopy:mt,filterUndefinedProps:Tr,getControlledPromise:Cr,getPercent:function(r,t){return r/t*100},getRandomItem:function(r){const t=K;return r[Math[t(316)](Math[t(315)]()*r[t(318)])]},hexToUtf8:function(r){const t=K,e=new Uint8Array(r[t(318)]/2);for(let n=0;n<r[t(318)];n+=2)e[n/2]=parseInt(r[t(310)](n,n+2),16);return new TextDecoder().decode(e)},joinChunks:xn,joinChunksArrayBuffer:function(r,t){const e=K;return xn(r,t)[e(307)]},joinChunksUint8Array:function(r,t){const e=K;t===void 0&&(t=r.reduce((i,o)=>i+o[e(305)],0));const n=new Uint8Array(t);let s=0;for(const i of r)n[e(319)](i,s),s+=i[e(305)];return n},mergeAndFilterConfig:Ie,overrideConfig:Ht,shuffleArray:xr,utf8ToUintArray:En},Symbol.toStringTag,{value:"Module"}));function Rn(r,t){var e=Pn();return(Rn=function(n,s){return e[n-=473]})(r,t)}function Pn(){var r=["36jvKdxa","1933295OfxRhT","SegmentDataSendingCompleted","561680fYlVZb","95943qwCrnU","8ZctGCB","3335325PZnnxe","SegmentAbsent","CancelSegmentRequest","8573499SXxTQf","SegmentData","1169062OgEGNa","SegmentsAnnouncement","2785356NVtCOu"];return(Pn=function(){return r})()}(function(r){for(var t=Rn,e=r();;)try{if(parseInt(t(473))/1+-parseInt(t(481))/2+parseInt(t(474))/3*(parseInt(t(484))/4)+-parseInt(t(476))/5+-parseInt(t(483))/6+parseInt(t(485))/7+-parseInt(t(475))/8*(-parseInt(t(479))/9)===362483)break;e.push(e.shift())}catch{e.push(e.shift())}})(Pn);var $,Ct,kt=(($=kt||{})[$[(Ct=Rn)(482)]=0]=Ct(482),$[$.SegmentRequest=1]="SegmentRequest",$[$.SegmentData=2]=Ct(480),$[$[Ct(486)]=3]="SegmentDataSendingCompleted",$[$[Ct(477)]=4]=Ct(477),$[$[Ct(478)]=5]=Ct(478),$);const tt=et;(function(r){const t=et,e=r();for(;;)try{if(-parseInt(t(522))/1*(-parseInt(t(505))/2)+parseInt(t(517))/3*(parseInt(t(513))/4)+parseInt(t(520))/5+parseInt(t(521))/6+-parseInt(t(526))/7+parseInt(t(510))/8+-parseInt(t(515))/9===660616)break;e.push(e.shift())}catch{e.push(e.shift())}})(Bn);var Yt=(r=>{const t=et;return r[r[t(497)]=-1]="Min",r[r[t(511)]=0]=t(511),r[r[t(509)]=1]=t(509),r[r[t(504)]=2]=t(504),r[r[t(500)]=3]=t(500),r})(Yt||{});function et(r,t){const e=Bn();return(et=function(n,s){return e[n-=495]})(r,t)}function Fa(r){const t=r<0,e=function(o){const h=et,a=o[h(527)](2),d=o<0?a[h(525)]:a[h(525)]+1;return Math[h(499)](d/8)}(r),n=new Uint8Array(e),s=BigInt(e);var i;r=(i=r)<0?-i:i;for(let o=0;o<e;o++){const h=r>>0x8n*(s-0x1n-BigInt(o))&0xffn;n[o]=Number(h)}return t&&(n[0]=128|n[0]),n}function Ua(r){const t=BigInt(r[et(525)]),e=(s,i)=>{const o=0x8n*(t-0x1n-BigInt(i));return BigInt(s)<<o};let n=e(127&r[0],0);for(let s=1;s<t;s++)n=e(r[s],s)|n;return(128&r[0])>>7&&(n=-n),n}function Ln(r){const t=et,e=Fa(r),n=0|e[t(525)];return new Uint8Array([n,...e])}function On(r){const t=et,e=r[0];if(e>>4!==0)throw new Error("Trying to deserialize integer with invalid serialized item code");const n=15&e,s=1+n;return{number:Ua(r[t(506)](1,s)),byteLength:n+1}}function Er(r){const t=et,e=new Map;for(const s of r){const i=-256n&s,o=0xffn&s,h=e[t(524)](i)??new $t;h[t(525)]||e[t(501)](i,h),h.push(Number(o))}const n=new $t;n[t(496)]([16,e[t(516)]]);for(const[s,i]of e){const{length:o}=i[t(508)](),h=s|0xffn&BigInt(o);i[t(512)](Ln(h)),n[t(496)](i[t(518)]())}return n[t(518)]()}function Bn(){const r=["addBytes","getBytesChunks","SimilarIntArray","8713608vTOFwf","Int","unshift","2575352SaVztI","start","24162048jGnaaa","size","3NTgWJc","getBuffer","end","5356595FZZjBF","1493970rxikiI","1OtZbdY","_length","get","length","2624013gbJTrx","toString","decode","isArray","push","Min","bytes","ceil","Max","set","Trying to deserialize bytes (sting) with invalid serialized item code.","encode","String","1333588hQpPiT","slice"];return(Bn=function(){return r})()}class $t{constructor(){m(this,Zr,[]);m(this,Vr,0)}[(Zr=tt(498),Vr=tt(523),tt(496))](t){const e=tt;this.addBytes(t,e(519))}[tt(512)](t){const e=tt;this.addBytes(t,e(514))}[tt(507)](t,e){const n=tt;let s;s=t instanceof Uint8Array?t:Array[n(495)](t)?new Uint8Array(t):new Uint8Array([t]),this[n(523)]+=s.length,this[n(498)][n(e==="start"?512:496)](s)}[tt(508)](){return this.bytes}[tt(518)](){const t=tt;return xn(this.bytes,this[t(523)])}get[tt(525)](){return this._length}}const Wt=Object.freeze(Object.defineProperty({__proto__:null,ResizableUint8Array:$t,SerializedItem:Yt,deserializeInt:On,deserializeSimilarIntArray:function(r){const t=et,[e,n]=r;if(e>>4!==1)throw new Error("Trying to deserialize similar int array with invalid serialized item code");let s=2;const i=[];for(let o=0;o<n;o++){const{number:h,byteLength:a}=On(r[t(506)](s));s+=a;const d=0xffn&h,u=-256n&h;for(let l=0;l<d;l++){const p=BigInt(r[s]);i[t(496)](u|p),s++}}return{numbers:i,byteLength:s}},deserializeString:function(r){const t=et,[e,n]=r;if(e>>4!==2)throw new Error(t(502));const s=(15&e)<<8|n,i=r[t(506)](2,s+2);return{string:new TextDecoder("utf8")[t(528)](i),byteLength:s+2}},serializeInt:Ln,serializeSimilarIntArray:Er,serializeString:function(r){const t=et,{length:e}=r,n=new $t;return n[t(496)]([32|e>>8&15,255&e]),n[t(496)](new TextEncoder()[t(503)](r)),n[t(518)]()}},Symbol.toStringTag,{value:"Module"})),B=qn;(function(r){const t=qn,e=r();for(;;)try{if(parseInt(t(434))/1+-parseInt(t(423))/2+parseInt(t(424))/3*(parseInt(t(431))/4)+parseInt(t(469))/5*(parseInt(t(466))/6)+-parseInt(t(432))/7+parseInt(t(463))/8+-parseInt(t(427))/9===959117)break;e.push(e.shift())}catch{e.push(e.shift())}})(Dn);const jt=ke(B(428),4),te=ke(B(430),4),Mn=ke(B(441),4),Nn=ke(B(454),4),Ha=[jt,Mn],Wa=[te,Nn],Ar=jt.length+te[B(461)];function Rr(r){const t=B,{length:e}=jt,n=r[t(443)](-e);return Ha[t(468)](s=>xe(r,s,4))&&Wa[t(468)](s=>xe(n,s,4))}function Dn(){const r=["getResultBuffers","unframeCommandChunk","complete","charCodeAt","Int","length","set","8330920DNMtBn","ResizableUint8Array","Min","54270tVWAvD","getBuffer","some","65mAAOOd","type","push","Max","3328520JhCyrI","3EXajMF","Command is not complete.","incomplete-joining","4581819OnDKpX","cstr","Not existing type","cend","6813948fGRzBR","2023175RKVFAn","Buffer is empty","559056TCGOfv","maxChunkLength","SimilarIntArray","creating","Wrong string length","completed","chunks","dstr","ceil","slice","resultBuffers","map","SerializedItem","status","onComplete","deserializeString","addCommandChunk","serializeString","deserializeSimilarIntArray","bytes","dend","addString"];return(Dn=function(){return r})()}function qn(r,t){const e=Dn();return(qn=function(n,s){return e[n-=422]})(r,t)}class ve extends Error{constructor(t){const e=B;super(),this[e(470)]=t}}class Pr{constructor(t){m(this,Xr,new Wt[B(464)]);m(this,"status","joining");this[B(448)]=t}[(Xr=B(440),B(450))](t){const e=B;if(this[e(447)]===e(439))return;const n=xe(t,jt,4);if(!this.chunks[e(461)]&&!n)throw new ve("no-first-chunk");if(this[e(440)][e(461)]&&n)throw new ve(e(426));this[e(440)][e(471)](this[e(457)](t)),xe(t.slice(-4),te,4)&&(this.status=e(439),this[e(448)](this.chunks[e(467)]()))}[B(457)](t){const e=B;return t[e(443)](4,t[e(461)]-4)}}class Ce{constructor(t,e){m(this,"bytes",new $t);m(this,"resultBuffers",[]);m(this,Kr,B(437));const n=B;this.maxChunkLength=e,this[n(453)][n(471)](t)}addInteger(t,e){const n=B;this[n(453)][n(471)](t[n(459)](0));const s=Ln(BigInt(e));this[n(453)][n(471)](s)}addSimilarIntArr(t,e){const n=B;this[n(453)][n(471)](t[n(459)](0));const s=Er(e[n(445)](i=>BigInt(i)));this[n(453)].push(s)}[(Kr=B(447),B(455))](t,e){const n=B;this.bytes[n(471)](t[n(459)](0));const s=Wt[n(451)](e);this[n(453)].push(s)}[B(458)](){const t=B;if(!this[t(453)][t(461)])throw new Error(t(433));if(this[t(447)]==="completed")return;this.status="completed";const e=this[t(453)].getBuffer();if(e[t(461)]+Ar<=this[t(435)])return void this[t(444)].push(Te(e,jt,te));let n=Math[t(442)](e[t(461)]/this[t(435)]);Math.ceil(e[t(461)]/n)+Ar>this.maxChunkLength&&n++;for(const[s,i]of function*(o,h){const a=B,d=Math[a(442)](o[a(461)]/h);for(let u=0;u<h;u++)yield[u,o[a(443)](u*d,(u+1)*d)]}(e,n))s===0?this.resultBuffers[t(471)](Te(i,jt,Nn)):s===n-1?this[t(444)][t(471)](Te(i,Mn,te)):this[t(444)].push(Te(i,Mn,Nn))}[B(456)](){const t=B;if(this[t(447)]===t(437)||!this[t(444)][t(461)])throw new Error(t(425));return this[t(444)]}}function ja(r){const t=B,e=r>>4;if(e<=Yt[t(465)]||e>=Wt[t(446)][t(422)])throw new Error(t(429));return e}function ke(r,t){const e=B;if(r[e(461)]!==t)throw new Error(e(438));const n=new Uint8Array(t);for(let s=0;s<r[e(461)];s++)n[s]=r[e(459)](s);return n}function Te(r,t,e){const n=B,s=new Uint8Array(r[n(461)]+t.length+e[n(461)]);return s[n(462)](t),s[n(462)](r,t[n(461)]),s[n(462)](e,t[n(461)]+r[n(461)]),s}function xe(r,t,e){for(let n=0;n<e;n++)if(r[n]!==t[n])return!1;return!0}function Ot(r,t){const e=Fn();return(Ot=function(n,s){return e[n-=280]})(r,t)}function Fn(){const r=["140SqJwcV","1545488bcsCdX","151183PLsFmo","371485UkJTNa","SegmentDataSendingCompleted","SegmentsAnnouncement","386388zhHUvT","83103EhMLhS","length","CancelSegmentRequest","12DEZsOv","complete","addInteger","SegmentAbsent","2367768IzatOT","4KqbWuX","getResultBuffers","573786nfwQzq","SegmentRequest"];return(Fn=function(){return r})()}function Lr(r,t){const e=Ot;switch(r.c){case kt[e(285)]:case kt[e(289)]:case kt[e(280)]:return function(n,s){const i=Ot,o=new Ce(n.c,s);return o[i(288)]("i",n.i),o.addInteger("r",n.r),o[i(287)](),o[i(292)]()}(r,t);case kt[e(294)]:return function(n,s){const i=Ot,o=new Ce(n.c,s);return o[i(288)]("i",n.i),o.addInteger("r",n.r),n.b&&o[i(288)]("b",n.b),o.complete(),o[i(292)]()}(r,t);case kt[e(281)]:return function(n,s){const i=Ot,{c:o,p:h,l:a}=n,d=new Ce(o,s);return a!=null&&a[i(284)]&&d.addSimilarIntArr("l",a),h!=null&&h[i(284)]&&d.addSimilarIntArr("p",h),d[i(287)](),d[i(292)]()}(r,t);case kt.SegmentData:return function(n,s){const i=Ot,o=new Ce(n.c,s);return o.addInteger("i",n.i),o[i(288)]("s",n.s),o[i(288)]("r",n.r),o[i(287)](),o[i(292)]()}(r,t)}}function Or(r,t){var e=Un();return(Or=function(n,s){return e[n-=488]})(r,t)}function Un(){var r=["8JSNlxl","47360VlIOMN","108noHdSt","1713KtPUXX","138ZslMxF","4glOrQe","446560riHTBT","84790wZTJLU","2266858HUPbTc","453901nemjYi","480582DHGnPv"];return(Un=function(){return r})()}(function(r){const t=Ot,e=r();for(;;)try{if(parseInt(t(297))/1+parseInt(t(291))/2*(parseInt(t(283))/3)+-parseInt(t(286))/4*(parseInt(t(298))/5)+parseInt(t(293))/6+-parseInt(t(296))/7+-parseInt(t(290))/8+-parseInt(t(282))/9*(-parseInt(t(295))/10)===163618)break;e.push(e.shift())}catch{e.push(e.shift())}})(Fn),function(r){for(var t=Or,e=r();;)try{if(parseInt(t(493))/1+parseInt(t(496))/2+parseInt(t(489))/3*(-parseInt(t(495))/4)+-parseInt(t(491))/5*(-parseInt(t(494))/6)+parseInt(t(488))/7*(-parseInt(t(490))/8)+-parseInt(t(492))/9*(-parseInt(t(497))/10)+-parseInt(t(498))/11===113482)break;e.push(e.shift())}catch{e.push(e.shift())}}(Un);const Br=Object.freeze(Object.defineProperty({__proto__:null,BinaryCommandChunksJoiner:Pr,BinaryCommandJoiningError:ve,PeerCommandType:kt,deserializeCommand:function(r){const t=B,[e]=r,n={c:e};let s=1;for(;s<r[t(461)];){const i=String.fromCharCode(r[s]);switch(s++,ja(r[s])){case Yt[t(460)]:{const{number:o,byteLength:h}=On(r[t(443)](s));n[i]=Number(o),s+=h}break;case Yt[t(436)]:{const{numbers:o,byteLength:h}=Wt[t(452)](r[t(443)](s));n[i]=o[t(445)](a=>Number(a)),s+=h}break;case Wt[t(446)].String:{const{string:o,byteLength:h}=Wt[t(449)](r[t(443)](s));n[i]=o,s+=h}}}return n},isCommandChunk:Rr,serializePeerCommand:Lr},Symbol.toStringTag,{value:"Module"})),at=Ee;function Hn(){const r=["870826ekiZYE","Expected ArrayBuffer, got SharedArrayBuffer","byteOffset","Some segment data is already uploading.","1434921mesRXM","959986xnJDpT","slice","addCommandChunk","connection","p2p","value","onCommandReceived","write","1270310TwaHHZ","webRtcMaxMessageSize","90BAikaN","commandChunks","onSegmentChunkReceived","deserializeCommand","60xiJqtn","889yIKQYE","buffer","drain","uploadingContext","5178864SIVCUh","40904lLRVwT","peerConfig","getUploadingRequestId","getEventDispatcher","byteLength","9qqTkpV","next","1338qyyzZV","onChunkUploaded","24715yCGRMh","stopUploadingSegmentData","sendCommand","onChunkDownloaded"];return(Hn=function(){return r})()}function Ee(r,t){const e=Hn();return(Ee=function(n,s){return e[n-=281]})(r,t)}(function(r){const t=Ee,e=r();for(;;)try{if(parseInt(t(298))/1+parseInt(t(299))/2*(-parseInt(t(286))/3)+parseInt(t(318))/4+parseInt(t(290))/5*(parseInt(t(288))/6)+parseInt(t(314))/7*(-parseInt(t(281))/8)+-parseInt(t(309))/9*(parseInt(t(307))/10)+-parseInt(t(294))/11*(-parseInt(t(313))/12)===868116)break;e.push(e.shift())}catch{e.push(e.shift())}})(Hn);class za{constructor(t,e,n,s){m(this,Yr);m(this,"uploadingContext");m(this,"onChunkDownloaded");m(this,"onChunkUploaded");m(this,"onDataReceived",t=>{const e=at;Rr(t)?this.receivingCommandBytes(t):(this.eventHandlers[e(311)](t),this[e(293)](t[e(285)],e(303),this[e(302)].idUtf8))});const i=Ee;this[i(302)]=t,this[i(282)]=e,this.eventHandlers=n,this[i(293)]=s[i(284)](i(293)),this[i(289)]=s.getEventDispatcher(i(289)),t.on("data",this.onDataReceived)}[(Yr=at(310),at(292))](t){const e=at,n=Lr(t,this[e(282)][e(308)]);for(const s of n)this[e(302)][e(306)](s)}[at(291)](){var e;(e=this[at(317)])==null||e.stopUploading(),this.uploadingContext=void 0}[at(283)](){var e;return(e=this[at(317)])==null?void 0:e.requestId}async splitSegmentDataToChunksAndUploadAsync(t,e){const n=at;if(this[n(317)])throw new Error(n(297));const s=t[n(315)][n(300)](t[n(296)],t[n(296)]+t[n(285)]);if(!(s instanceof ArrayBuffer))throw new Error(n(295));const i=function*(p,v){const I=at;let _=p.byteLength;for(;_>0;){const g=_>=v?v:_,f=p[I(285)]-_,y=p[I(300)](f,f+g);_-=g,yield y}}(s,this[n(282)].webRtcMaxMessageSize),{promise:o,resolve:h,reject:a}=Cr();let d=!1;const u={stopUploading:()=>{d=!1},requestId:e};this.uploadingContext=u;const l=()=>{const p=n;if(d)for(;;){const v=i[p(287)]()[p(304)];if(!v){h();break}const I=this.connection[p(306)](v);if(this[p(289)](v[p(285)],this[p(302)].idUtf8),!I)break}else a()};try{this.connection.on(n(316),l),d=!0,l(),await o}finally{this.connection.off(n(316),l),this[n(317)]===u&&(this[n(317)]=void 0)}}receivingCommandBytes(t){const e=at;!this[e(310)]&&(this.commandChunks=new Pr(n=>{const s=e;this.commandChunks=void 0;const i=Br[s(312)](n);this.eventHandlers[s(305)](i)}));try{this.commandChunks[e(301)](t)}catch(n){if(!(n instanceof ve))return;this[e(310)]=void 0}}}const L=Ae;function Ae(r,t){const e=Wn();return(Ae=function(n,s){return e[n-=216]})(r,t)}function Wn(){const r=["getEventDispatcher","setTotalBytes","SegmentsAnnouncement","p2pml-core:peer","splitSegmentDataToChunksAndUploadAsync","peer-response-bytes-length-mismatch","sendSegmentDataSendingCompletedCommand","byteLength","addLoadedChunk","http-loading","loadedBytes","firstBytesReceived","25464tOqsBZ","hexToUtf8","254kYhHAC","eventTarget","peer closed ","delete","validateP2PSegment","filter","destroy","peer connection error ","request","httpLoadingSegments","type","start","2097ROZJlP","peerConfig","CancelSegmentRequest","completeOnSuccess","error","getSegmentStatus","downloadingErrors","onPeerClosed","1538QAdKpa","eventHandlers","getPeerIdFromConnection","p2pErrorRetries","byteRange","abortOnError","bytes-receiving-timeout","segment","SegmentData","cancel segment request ","sendCommand","SegmentRequest","onPeerConnectionClosed","loadedSegments","send segment ","p2pNotReceivingBytesTimeoutMs","data","20mkTGGh","onConnectionError","cancelSegmentDownloading","SegmentAbsent","11436460ZiPcaJ","sendSegmentsAnnouncementCommand","length","has","url","uploadSegmentData","streamType","close","totalBytes","stopUploadingSegmentData","externalId","isSegmentDataCommandReceived","downloadSegment","connection","ERR_CONNECTION_FAILURE","push","finish","onPeerConnect","onSegmentRequested","Some segment already is downloading","p2p","onCommandReceived","1455642rbpCGW","p2p-segment-validation-failed"," to ","logger","onPeerClose","getUploadingRequestId","floor","sendCancelSegmentRequestCommand","onPeerError","cancel segment uploading ","clearLoadedBytes","requestId","peer-protocol-violation","peer-closed","3168718kGPshf","192369vpbPeH","4009860AWPdIw","downloadingContext","peerProtocol","end"];return(Wn=function(){return r})()}(function(r){const t=Ae,e=r();for(;;)try{if(-parseInt(t(230))/1*(parseInt(t(307))/2)+parseInt(t(288))/3*(parseInt(t(247))/4)+-parseInt(t(289))/5+parseInt(t(273))/6+parseInt(t(287))/7+parseInt(t(305))/8*(-parseInt(t(222))/9)+parseInt(t(251))/10===420605)break;e.push(e.shift())}catch{e.push(e.shift())}})(Wn);const{PeerCommandType:nt}=Br;class Re{constructor(t,e,n,s,i){m(this,"id");m(this,hi);m(this,ai);m(this,oi,new Set);m(this,"httpLoadingSegments",new Set);m(this,ii,[]);m(this,ri,ht(L(296)));m(this,si);m(this,ni,async t=>{var n,s,i;const e=L;switch(t.c){case nt[e(295)]:this[e(243)]=new Set(t.l),this[e(219)]=new Set(t.p),this.eventHandlers.onSegmentsAnnouncement();break;case nt[e(241)]:this[e(291)][e(260)](),this.eventHandlers[e(269)](this,t.i,t.r,t.b);break;case nt[e(238)]:{if(!this[e(290)]||this[e(290)][e(262)])break;const{request:o,controls:h,requestId:a}=this.downloadingContext;if(o[e(237)].externalId!==t.i||a!==t.r)break;this[e(290)][e(262)]=!0,h[e(304)](),o[e(259)]===void 0?o[e(294)](t.s):o[e(259)]-o[e(303)]!==t.s&&(o[e(283)](),this[e(280)](o[e(237)],a),this[e(249)](e(298)),this.destroy())}break;case nt.SegmentDataSendingCompleted:{const{downloadingContext:o}=this;if(!(o!=null&&o[e(262)]))return;const{request:h,controls:a}=o;if(o[e(218)][e(237)][e(261)]!==t.i||o[e(284)]!==t.r)return h[e(283)](),this[e(249)](e(285)),void this[e(216)]();if(h[e(303)]!==h[e(259)])return h[e(283)](),this.cancelSegmentDownloading(e(298)),void this[e(216)]();const d=await((s=(n=this[e(223)])[e(311)])==null?void 0:s.call(n,h[e(237)][e(255)],h[e(237)][e(234)],h[e(246)]))??!0;if(this[e(290)]!==o)return;if(!d)return h[e(283)](),this.cancelSegmentDownloading(e(274)),void this[e(216)]();this[e(228)]=[],a[e(225)](),this.downloadingContext=void 0;break}case nt[e(250)]:((i=this[e(290)])==null?void 0:i[e(218)][e(237)][e(261)])===t.i&&this[e(290)].requestId===t.r&&(this[e(249)]("peer-segment-absent"),this[e(243)][e(310)](t.i));break;case nt[e(224)]:if(this[e(291)][e(278)]()!==t.r)break;this.peerProtocol[e(260)]();break}});m(this,"onSegmentChunkReceived",t=>{var i;const e=L;if(!((i=this[e(290)])!=null&&i[e(262)]))return;const{request:n,controls:s}=this[e(290)];if(n[e(259)]!==void 0&&n.loadedBytes+t[e(300)]>n[e(259)])return n.clearLoadedBytes(),this[e(249)](e(298)),void this[e(216)]();s[e(301)](t)});m(this,ti,()=>{this[L(216)]()});m(this,$r,t=>{const e=L;this[e(276)](e(217)+this.id+" %O",t),this[e(308)][e(293)](e(281))({peerId:this.id,streamType:this[e(257)],error:t});const{code:n}=t;n==="ERR_DATA_CHANNEL"?this[e(216)]():n===e(265)&&this.destroy()});m(this,"destroy",()=>{const t=L;this[t(249)](t(286)),this[t(264)][t(216)](),this[t(231)][t(229)](this),this.onPeerClosed({peerId:this.id,streamType:this.streamType}),this[t(276)](t(309)+this.id)});const o=Ae;this.connection=t,this[o(231)]=e,this[o(223)]=n,this[o(257)]=s,this[o(308)]=i,this.onPeerClosed=i.getEventDispatcher(o(277)),this.id=Re[o(232)](t),this[o(291)]=new za(t,n,{onSegmentChunkReceived:this.onSegmentChunkReceived,onCommandReceived:this[o(272)]},i),i.getEventDispatcher(o(268))({peerId:this.id,streamType:s}),t.on(o(226),this[o(248)]),t.on(o(258),this[o(242)]),t.on(o(292),this[o(242)]),t.on(o(267),this[o(242)])}get downloadingSegment(){var e;const t=L;return(e=this.downloadingContext)==null?void 0:e[t(218)][t(237)]}[(hi=L(291),ai=L(290),oi=L(243),ii=L(228),ri=L(276),si=L(229),L(227))](t){const e=L,{externalId:n}=t;return this[e(243)][e(254)](n)?"loaded":this.httpLoadingSegments[e(254)](n)?e(302):void 0}[(ni=L(272),L(263))](t){const e=L;if(this[e(290)])throw new Error(e(270));this.downloadingContext={request:t,requestId:Math[e(279)](1e3*Math.random()),isSegmentDataCommandReceived:!1,controls:t[e(221)]({downloadSource:e(271),peerId:this.id},{notReceivingBytesTimeoutMs:this.peerConfig[e(245)],abort:s=>{const i=e;if(!this[i(290)])return;const{request:o,requestId:h}=this[i(290)];this.sendCancelSegmentRequestCommand(o[i(237)],h),this.downloadingErrors[i(266)](s),this.downloadingContext=void 0,this[i(228)][i(312)](a=>a[i(220)]===i(236))[i(253)]>=this[i(223)][i(233)]&&this.destroy()}})};const n={c:nt[e(241)],r:this[e(290)][e(284)],i:t[e(237)][e(261)]};t[e(303)]&&(n.b=t[e(303)]),this.peerProtocol[e(240)](n)}async[L(256)](t,e,n){const s=L,{externalId:i}=t;this[s(276)](s(244)+t[s(261)]+s(275)+this.id);const o={c:nt[s(238)],i,r:e,s:n[s(300)]};this.peerProtocol[s(240)](o);try{await this[s(291)][s(297)](new Uint8Array(n),e),this[s(299)](t,e),this.logger("segment "+i+" has been sent to "+this.id)}catch{this[s(276)](s(282)+i)}}[L(249)](t){const e=L;if(!this[e(290)])return;const{request:n,controls:s}=this[e(290)],{segment:i}=n;this[e(276)](e(239)+i[e(261)]+" ("+t+")");const o=new Y(t);s[e(235)](o),this.downloadingContext=void 0,this.downloadingErrors[e(266)](o)}[L(252)](t,e){const n=L,s={c:nt[n(295)],p:e,l:t};this.peerProtocol[n(240)](s)}sendSegmentAbsentCommand(t,e){const n=L;this.peerProtocol[n(240)]({c:nt[n(250)],i:t,r:e})}[L(280)](t,e){const n=L;this[n(291)].sendCommand({c:nt[n(224)],i:t.externalId,r:e})}[(ei=L(299),ti=L(242),$r=L(248),ei)](t,e){const n=L;this[n(291)][n(240)]({c:nt.SegmentDataSendingCompleted,r:e,i:t[n(261)]})}static getPeerIdFromConnection(t){return Kt[L(306)](t.id)}}const j=ee;function ee(r,t){const e=jn();return(ee=function(n,s){return e[n-=475]})(r,t)}function jn(){const r=["destroy","; hash: ","onReceivePeerConnection","105309jIuvsd","24925370IIdBmS","tracker error (","clear","peers","6xsIBHP","p2pml-core:p2p-tracker-client","error","stats","start",`create new client;
stream: `,"idUtf8","getStreamString","384532HHJOiP","tracker warning (","streamShortId","onTrackerWarning","1077223whgXrI","warning","trackerClientVersionPrefix","onTrackerClientWarning","onPeerConnected","onSegmentRequested","peer","1CLJYuM","get","onSegmentsAnnouncement","generatePeerId","test","614942usQuZt","set","potentialConnections","userAgent","PEER_ID_BY_INFO_HASH","eventHandlers","logger","rtcConfig","add","connected with peer: ","getEventDispatcher","client","config","values","eventTarget","onPeerClosed","onTrackerError","_peers","type","14625414CHciow","destroy client; stream: ","stream","delete","6186655OsHPba","48qROeHx","announceTrackers",`
peerId: `];return(jn=function(){return r})()}function Ga(){const r=ee,t=/^((?!chrome|android).)*safari/i[r(496)](navigator[r(500)]),e=/\b(iPad|iPhone|Macintosh).*AppleWebKit(?!.*Safari)/i[r(496)](navigator.userAgent);return t||e}(function(r){const t=ee,e=r();for(;;)try{if(-parseInt(t(492))/1*(-parseInt(t(497))/2)+-parseInt(t(527))/3+parseInt(t(481))/4+parseInt(t(520))/5*(-parseInt(t(532))/6)+parseInt(t(485))/7*(parseInt(t(521))/8)+-parseInt(t(516))/9+parseInt(t(528))/10===921995)break;e.push(e.shift())}catch{e.push(e.shift())}})(jn);const zt=class zt{constructor(t,e,n,s,i){m(this,gi);m(this,mi);m(this,fi,new Map);m(this,pi,ht(j(533)));m(this,li,t=>{const e=j,n=Re.getPeerIdFromConnection(t);let s=this[e(514)][e(493)](n);s!=null&&s[e(491)]?t.destroy():(!s&&(s={potentialConnections:new Set},t[e(479)]=n,this._peers[e(498)](n,s)),s[e(499)][e(505)](t),t.on("connect",()=>{const i=e;if(!s[i(491)]){for(const o of s[i(499)])o!==t&&o[i(524)]();s.potentialConnections[i(530)](),s[i(491)]=new Re(t,{onPeerClosed:this[i(512)],onSegmentRequested:this[i(502)][i(490)],onSegmentsAnnouncement:this.eventHandlers[i(494)]},this[i(509)],this[i(518)][i(515)],this[i(511)]),this[i(503)](i(506)+s[i(491)].id+" "+this.streamShortId),this[i(502)][i(489)](s.peer)}}))});m(this,di,t=>{const e=j;this[e(503)](e(482)+this[e(483)]+": "+t+")"),this.eventTarget.getEventDispatcher(e(484))({streamType:this[e(518)][e(515)],warning:t})});m(this,"onTrackerClientError",t=>{const e=j;this[e(503)](e(529)+this.streamShortId+": "+t+")"),this[e(511)][e(507)](e(513))({streamType:this.stream.type,error:t})});m(this,ci,t=>{const e=j;this[e(503)]("peer closed: "+t.id),this._peers[e(519)](t.id)});const o=ee;this.stream=e,this[o(502)]=n,this[o(509)]=s,this[o(511)]=i;const h=Ir(t);this.streamShortId=Lt[o(480)](e);let a=zt[o(501)][o(493)](h);!a&&(a=qa[o(495)](s[o(487)]),zt[o(501)][o(498)](h,a)),this[o(508)]=new yn({infoHash:En(h),peerId:En(a),announce:Ga()?s[o(522)].slice(0,1):s.announceTrackers,rtcConfig:this[o(509)][o(504)]}),this[o(508)].on("peer",this.onReceivePeerConnection),this[o(508)].on(o(486),this[o(488)]),this[o(508)].on(o(475),this.onTrackerClientError),this[o(503)](o(478)+this.streamShortId+o(525)+h+o(523)+a)}start(){const t=j;this[t(508)][t(477)]()}[(_i=j(501),gi=j(483),mi=j(508),fi=j(514),pi=j(503),j(476))](t){this[j(508)].statsCollector(t)}[j(524)](){const t=j;this.client[t(524)]();for(const{peer:e,potentialConnections:n}of this[t(514)][t(510)]()){e==null||e[t(524)]();for(const s of n)s[t(524)]()}this[t(514)][t(530)](),this.logger(t(517)+this[t(483)])}*[(li=j(526),di=j(488),ui=j(531),ci=j(512),ui)](){const t=j;for(const e of this[t(514)].values())e[t(491)]&&(yield e[t(491)])}static clearPeerIdCache(){const t=j;zt.PEER_ID_BY_INFO_HASH[t(530)]()}};m(zt,_i,new Map);let Pe=zt;(function(r){const t=Tt,e=r();for(;;)try{if(-parseInt(t(362))/1+-parseInt(t(356))/2*(-parseInt(t(355))/3)+parseInt(t(349))/4+-parseInt(t(350))/5*(parseInt(t(364))/6)+-parseInt(t(348))/7+parseInt(t(361))/8*(parseInt(t(354))/9)+parseInt(t(363))/10===916048)break;e.push(e.shift())}catch{e.push(e.shift())}})(Gn);function Mr(r,t){return"v2-"+r+"-"+Dr(t)}function Tt(r,t){const e=Gn();return(Tt=function(n,s){return e[n-=348]})(r,t)}function zn(r,t){const e=Tt;for(const n of r[e(358)]()){const s=n[e(359)][e(353)](t);if(s)return s}}function Nr(r,t){const e=Tt;for(const n of r[e(359)][e(358)]())if(n[e(365)]===t)return n}function Dr(r){return r[Tt(366)]+"-"+r.index}function Gn(){const r=["5484888frPcCy","111636KaiNpU","6811700GGhwKr","5736OPcWbv","externalId","type","8723421jvJMoa","3178028bJOlZv","4165OuagiC","endTime","p2pDownloadTimeWindow","get","18pCDLAA","6McDqCN","223336ydlQmb","httpDownloadTimeWindow","values","segments","isSegmentLoadingOrLoadedBySomeone"];return(Gn=function(){return r})()}function Le(r,t,e,n,s){const i=Tt,{highDemandTimeWindow:o,httpDownloadTimeWindow:h,p2pDownloadTimeWindow:a}=function(d,u){const l=Tt,{highDemandTimeWindow:p,httpDownloadTimeWindow:v,p2pDownloadTimeWindow:I}=d,_={highDemandTimeWindow:p,httpDownloadTimeWindow:v,p2pDownloadTimeWindow:I};return u<=5?(_.httpDownloadTimeWindow=0,_[l(352)]=0):u<=10&&(_[l(352)]=_[l(357)]),_}(e,s);return{isHighDemand:Jn(r,t,o),isHttpDownloadable:Jn(r,t,h),isP2PDownloadable:Jn(r,t,a)&&n[i(360)](r)}}function Jn(r,t,e){const{startTime:n,endTime:s}=r,{position:i,rate:o}=t;return!(i+e*o<n||i>s)}const gt=Object.freeze(Object.defineProperty({__proto__:null,getSegmentAvgDuration:function(r){const t=Tt,{segments:e}=r;let n=0;const{size:s}=e;for(const i of e[t(358)]())n+=i[t(351)]-i.startTime;return n/s},getSegmentFromStreamByExternalId:Nr,getSegmentFromStreamsMap:zn,getSegmentPlaybackStatuses:Le,getStreamId:Dr,getStreamSwarmId:Mr},Symbol.toStringTag,{value:"Module"})),J=Oe;function Oe(r,t){const e=Qn();return(Oe=function(n,s){return e[n-=309]})(r,t)}function Qn(){const r=["start","sendSegmentsAnnouncement","slice","connectedPeerCount","1070352jWCktL","1917lrvLGX","httpRequests","downloadSegment","onSegmentRequested","uploadSegmentData","getSegmentStatus","4458846eZqvMp","peers","addEventListener","trackerClient","onPeerConnected","643114fnkbwt","eventTarget","onSegmentLoaded","removeEventListener","segments","getRandomItem","requests","loaded","isSegmentLoadingOrLoadedBySomeone","768998rPhvVp","swarmId","getSegmentsAnnouncement","statsSegmentsThreshold","onSegmentAnnouncement","statsSegmentsBuffer","getStreamSwarmId","segmentStorage","get","9DJMkZi","onStorageUpdated-","isP2PUploadDisabled","sendSegmentAbsentCommand","config","79584KAuXtZ","externalId","http","getOrCreateRequest","p2p","destroy","broadcastAnnouncement","getSegmentData","715244GtLjGp","streamManifestUrl","1624535TpfTsu","push","stats","runtimeId","sendSegmentsAnnouncementCommand","downloadingSegment","percentaje","isAnnounceMicrotaskCreated","length","total","STATS_SEGMENTS_THRESHOLD","stream","client"];return(Qn=function(){return r})()}(function(r){const t=Oe,e=r();for(;;)try{if(-parseInt(t(348))/1+-parseInt(t(339))/2+-parseInt(t(357))/3*(-parseInt(t(370))/4)+-parseInt(t(310))/5+-parseInt(t(327))/6+-parseInt(t(334))/7+parseInt(t(362))/8*(parseInt(t(328))/9)===424525)break;e.push(e.shift())}catch{e.push(e.shift())}})(Qn);class Ja{constructor(t,e,n,s,i,o,h){m(this,"trackerClient");m(this,Ci,!1);m(this,"stats",{p2p:0,http:0,total:0,percentaje:0});m(this,vi,0);m(this,Ii);m(this,Si,t=>{const e=J;if(this[e(361)].isP2PUploadDisabled)return;const{httpLoading:n,loaded:s}=this[e(350)]();t[e(314)](s,n)});m(this,"broadcastAnnouncement",(t=!1)=>{const e=J;if(t)return void this[e(324)]([],[]);if(this[e(317)]||this[e(361)][e(359)])return;const{loaded:n,httpLoading:s}=this[e(350)]();this.sendSegmentsAnnouncement(n,s)});m(this,bi,(t,e)=>{const n=J;this[n(317)]=!0,queueMicrotask(()=>{const s=n;for(const i of this[s(337)][s(335)]())i[s(314)](t,e);this[s(317)]=!1})});m(this,yi,async(t,e,n,s)=>{const i=J,o=Nr(this[i(321)],e);if(!o)return;if(this.config[i(359)])return void t[i(360)](e,n);const h=this.config[i(349)]??this[i(309)],a=Mr(h,this.stream),d=await this[i(355)][i(369)](h,a,o.externalId);d?await t[i(332)](o,n,s!==void 0?d[i(325)](s):d):t.sendSegmentAbsentCommand(e,n)});const a=Oe;this[a(309)]=t,this[a(321)]=e,this[a(345)]=n,this[a(355)]=s,this[a(361)]=i,this.eventTarget=o,this[a(352)]=h,this.STATS_SEGMENTS_THRESHOLD=this[a(361)][a(351)]??10;const d=this[a(361)].swarmId??this[a(309)],u=gt[a(354)](d,this.stream);this[a(337)]=new Pe(u,this[a(321)],{onPeerConnected:this[a(338)],onSegmentRequested:this.onSegmentRequested,onSegmentsAnnouncement:this[a(352)]},this[a(361)],this.eventTarget),this[a(340)][a(336)](a(358)+u,this[a(368)]),this[a(355)].setSegmentChangeCallback(l=>{const p=a;this[p(340)].dispatchEvent(p(358)+l)}),this.trackerClient[a(323)](),this.eventTarget.addEventListener(a(341),l=>{const p=a,{bytesLength:v,downloadSource:I}=l;I===p(366)&&(this[p(312)][p(366)]+=v),I===p(364)&&(this.stats.http+=v),this[p(312)][p(319)]=this[p(312)][p(366)]+this[p(312)][p(364)],this[p(312)][p(316)]=this[p(312)][p(319)]?this.stats[p(366)]/this[p(312)].total*100:0,this[p(353)]+=1,this[p(353)]>=this[p(320)]&&(this.trackerClient[p(322)].statsCollector({...this.stats}),this[p(312)]={p2p:0,http:0,total:0,percentaje:0},this.statsSegmentsBuffer=0)})}downloadSegment(t){const e=J,n=[];for(const o of this[e(337)].peers())!o[e(315)]&&o[e(333)](t)===e(346)&&n[e(311)](o);if(n[e(318)]===0)return;const s=Kt[e(344)](n),i=this[e(345)][e(365)](t);s[e(330)](i)}[(Ci=J(317),vi=J(353),Ii=J(320),J(347))](t){const e=J;for(const n of this.trackerClient[e(335)]())if(n[e(333)](t))return!0;return!1}isSegmentLoadedBySomeone(t){const e=J;for(const n of this[e(337)].peers())if(n[e(333)](t)===e(346))return!0;return!1}get[J(326)](){const t=J;let e=0;for(const n of this[t(337)][t(335)]())e++;return e}[(wi=J(350),Si=J(338),bi=J(324),yi=J(331),wi)](){const t=J,e=this[t(361)].swarmId??this[t(309)],n=gt[t(354)](e,this[t(321)]),s=this[t(355)].getStoredSegmentIds(e,n),i=[];for(const o of this[t(345)][t(329)]()){const h=this.stream[t(343)][t(356)](o.segment[t(313)]);h&&i.push(h[t(363)])}return{loaded:s,httpLoading:i}}destroy(){const t=J,e=this[t(361)][t(349)]??this[t(309)],n=gt[t(354)](e,this[t(321)]);this[t(340)][t(342)]("onStorageUpdated-"+n,this[t(368)]),this[t(337)][t(367)]()}}const V=Be;function Vn(){const r=["8898003XjRhrV","loader","set","created new loader: ","setTimeout","1820CBBfTm","createLoader","delete","runtimeId","1703560expXqM","p2pInactiveLoaderDestroyTimeoutMs","streamManifestUrl","has","1621413hZMxTE","loggerInfo","logger","Loader for this stream already exists","onSegmentAnnouncement","stream","destroyAndRemoveLoader","33411ukjDbU","getStreamSwarmId","segmentStorage","findOrCreateLoaderForStream","requests","1136960ISncDV","destroy p2p loader: ","currentLoader","set current p2p loader: ","swarmId","getStreamString","_currentLoaderItem","destroy","destroyTimeoutId","6965RLFpzk","values","loaders","length","474266FHZJki","eventTarget","setLoaderDestroyTimeout","p2pml-core:p2p-loaders-container","114LYgnOX","config"];return(Vn=function(){return r})()}function Be(r,t){const e=Vn();return(Be=function(n,s){return e[n-=335]})(r,t)}(function(r){const t=Be,e=r();for(;;)try{if(parseInt(t(347))/1+parseInt(t(378))/2+-parseInt(t(366))/3+parseInt(t(358))/4*(parseInt(t(343))/5)+parseInt(t(351))/6*(parseInt(t(373))/7)+parseInt(t(362))/8+-parseInt(t(353))/9===451055)break;e.push(e.shift())}catch{e.push(e.shift())}})(Vn);class Qa{constructor(t,e,n,s,i,o,h){m(this,Ti,new Map);m(this,ki);m(this,"logger",ht(V(350)));const a=Be;this[a(364)]=t,this[a(377)]=n,this[a(375)]=s,this[a(352)]=i,this[a(348)]=o,this[a(370)]=h,this[a(340)]=this[a(376)](e),this[a(368)](a(337)+Lt[a(339)](e))}[(Ti=V(345),ki=V(340),V(359))](t){const e=V;if(this[e(345)][e(365)](t[e(361)]))throw new Error(e(369));const n=new Ja(this[e(364)],t,this[e(377)],this.segmentStorage,this[e(352)],this[e(348)],()=>{const i=e;this[i(340)][i(354)]===n&&this.onSegmentAnnouncement()}),s=Lt[e(339)](t);return this[e(368)](e(356)+s),{loader:n,stream:t,loggerInfo:Tn(t)}}[V(376)](t){const e=V,n=this[e(345)].get(t[e(361)]);if(n)return clearTimeout(n[e(342)]),n[e(342)]=void 0,n;{const s=this[e(359)](t);return this.loaders[e(355)](t.runtimeId,s),s}}changeCurrentLoader(t){const e=V,n=this[e(352)][e(338)]??this[e(364)],s=gt[e(374)](n,this[e(340)][e(371)]);this[e(375)].getStoredSegmentIds(n,s)[e(346)]?this.setLoaderDestroyTimeout(this._currentLoaderItem):this[e(372)](this[e(340)]),this[e(340)]=this[e(376)](t),this[e(368)]("change current p2p loader: "+Lt[e(339)](t))}[V(349)](t){const e=V;t[e(342)]=window[e(357)](()=>this.destroyAndRemoveLoader(t),this[e(352)][e(363)])}[V(372)](t){const e=V;t.loader[e(341)](),this[e(345)][e(360)](t.stream.runtimeId),this[e(368)](e(335),t[e(367)])}get[V(336)](){const t=V;return this._currentLoaderItem[t(354)]}[V(341)](){const t=V;for(const{loader:e,destroyTimeoutId:n}of this.loaders[t(344)]())e[t(341)](),clearTimeout(n);this[t(345)].clear()}}const C=ne;function Zn(){const r=["start","_failedAttempts","notReceivingBytesTimeout","byteRange","setTotalBytes","bytes-receiving-timeout","logger","type","stream","4092636CoqLGF","bandwidthCalculators","segment","firstBytesReceived","onSegmentStart","lastLoadedChunkTimestamp","bytes","1075740hwobQJ"," has been already succeed.","manageBandwidthCalculatorsState","onSegmentAbort","action","not-started","setTimeout"," has been already started.","failed"," failed ","342255GfBzRP","add","2onwpNf","stop","endTime","Timeout is already started.","httpAttemptsCount","http","finalData","joinChunksArrayBuffer","markHandledByProcessQueue","28umlylu","_abortRequestCallback","_status","runtimeId"," aborted","p2p","peerId","_logger","externalId","loadedBytes","abortOnError","onSegmentLoaded","clear","timeoutId","throwErrorIfNotLoadingStatus","addBytes","now","completeOnSuccess","color","getEventDispatcher","Request total bytes value is already set","aborted","byteLength","red","startLoading","611436hTAJjm","currentAttempt","84yhKLcC","green","succeed","playback"," succeed","restart","progress","_loadedBytes","isHandledByProcessQueue","p2pml-core:request-","url","_totalBytes","setStatus","length","504248IGewuB","data","Request has been already ","clearLoadedBytes","onSegmentError","abortOnTimeout","stopLoading","addLoadedChunk","downloadSource","abort","requestProcessQueueCallback","Request ","loading","push","totalBytes","reduce","1519503PWqnxJ","33OvoEDp","10zThEFg","attempts","_isHandledByProcessQueue","4882797UHsOrA","status"];return(Zn=function(){return r})()}function ne(r,t){const e=Zn();return(ne=function(n,s){return e[n-=109]})(r,t)}function Me(r){const t=ne;return{runtimeId:r[t(131)],externalId:r[t(136)],url:r[t(165)],byteRange:r[t(195)],startTime:r.startTime,endTime:r[t(121)]}}(function(r){const t=ne,e=r();for(;;)try{if(-parseInt(t(153))/1+parseInt(t(119))/2*(parseInt(t(185))/3)+-parseInt(t(128))/4*(parseInt(t(117))/5)+parseInt(t(208))/6+parseInt(t(155))/7*(-parseInt(t(169))/8)+parseInt(t(190))/9*(parseInt(t(187))/10)+parseInt(t(186))/11*(parseInt(t(201))/12)===404518)break;e.push(e.shift())}catch{e.push(e.shift())}})(Zn);let Va=class{constructor(r,t,e,n,s,i){m(this,ji);m(this,Wi,new Za);m(this,"finalData");m(this,Hi,[]);m(this,Ui,0);m(this,Fi);m(this,qi,C(112));m(this,Di);m(this,Ni);m(this,Mi);m(this,Bi);m(this,Oi,!1);m(this,"onSegmentError");m(this,"onSegmentAbort");m(this,Li);m(this,Pi);m(this,Ri,()=>{var e;const r=C;if(this.throwErrorIfNotLoadingStatus(),!this.currentAttempt)return;this.setStatus(r(115));const t=new Y(r(197));(e=this[r(129)])==null||e.call(this,t),this.logger(this[r(177)]+" "+this[r(203)][r(136)]+r(116)+t.type),this[r(193)][r(118)]({...this[r(154)],error:t}),this[r(173)]({segment:Me(this[r(203)]),error:t,downloadSource:this[r(154)][r(177)],peerId:this[r(154)][r(177)]==="p2p"?this[r(154)][r(134)]:void 0,streamType:this.segment[r(200)][r(199)]}),this.notReceivingBytesTimeout[r(140)](),this[r(109)](r(120)),this[r(179)]()});m(this,Ai,r=>{const t=C;this.throwErrorIfNotLoadingStatus(),this[t(154)]&&(this[t(167)](t(115)),this.logger(this.downloadSource+" "+this.segment.externalId+t(116)+r[t(199)]),this[t(193)][t(118)]({...this[t(154)],error:r}),this.onSegmentError({segment:Me(this[t(203)]),error:r,downloadSource:this.currentAttempt.downloadSource,peerId:this[t(154)][t(177)]===t(133)?this[t(154)][t(134)]:void 0,streamType:this.segment[t(200)][t(199)]}),this.notReceivingBytesTimeout.clear(),this[t(109)](t(120)),this[t(179)]())});m(this,"completeOnSuccess",()=>{const r=C;this.throwErrorIfNotLoadingStatus(),this.currentAttempt&&(this.manageBandwidthCalculatorsState("stop"),this[r(194)][r(140)](),this[r(167)](r(157)),this[r(166)]=this._loadedBytes,this[r(139)]({segmentUrl:this[r(203)][r(165)],bytesLength:this[r(170)][r(150)],downloadSource:this[r(154)][r(177)],peerId:this[r(154)][r(177)]===r(133)?this.currentAttempt[r(134)]:void 0,streamType:this[r(203)].stream.type}),this.logger(this[r(154)][r(177)]+" "+this[r(203)].externalId+r(159)),this[r(179)]())});m(this,Ei,r=>{const t=C;if(this.throwErrorIfNotLoadingStatus(),!this[t(154)]||!this[t(161)])return;this.notReceivingBytesTimeout[t(160)]();const{byteLength:e}=r,{all:n,http:s}=this[t(202)];n[t(143)](e),this.currentAttempt.downloadSource===t(124)&&s[t(143)](e),this.bytes[t(182)](r),this.progress[t(206)]=performance[t(144)](),this[t(161)].loadedBytes+=e,this[t(162)]+=e});m(this,xi,()=>{this[C(142)](),this.notReceivingBytesTimeout.restart()});const o=ne;this.segment=r,this.requestProcessQueueCallback=t,this[o(202)]=e,this[o(158)]=n,this.playbackConfig=s,this.onSegmentError=i.getEventDispatcher(o(173)),this[o(110)]=i.getEventDispatcher("onSegmentAbort"),this[o(205)]=i[o(147)](o(205)),this.onSegmentLoaded=i.getEventDispatcher(o(139));const{byteRange:h}=this.segment;if(h){const{end:d,start:u}=h;this[o(166)]=d-u+1}this[o(194)]=new Xa(this.abortOnTimeout);const{type:a}=this[o(203)][o(200)];this[o(135)]=ht(o(164)+a)}[(ji=C(154),Wi=C(193),Hi=C(207),Ui=C(162),Fi=C(166),qi=C(130),Di=C(161),Ni=C(194),Mi=C(129),Bi=C(135),Oi=C(189),Li=C(205),Pi=C(139),C(172))](){const r=C;this[r(162)]=0,this[r(207)]=[],this._totalBytes=void 0,this[r(125)]=void 0}get[C(191)](){return this[C(130)]}[C(167)](r){const t=C;this[t(130)]=r,this[t(189)]=!1}get[C(177)](){var t;const r=C;return(t=this[r(154)])==null?void 0:t[r(177)]}get[C(137)](){return this[C(162)]}get[C(183)](){return this[C(166)]}get[C(170)](){const r=C;return this[r(125)]||(this[r(125)]=Kt[r(126)](this[r(207)])),this.finalData}get failedAttempts(){return this[C(193)]}get[C(163)](){return this[C(189)]}[C(127)](){this[C(189)]=!0}[C(196)](r){const t=C;if(this[t(166)]!==void 0)throw new Error(t(148));this._totalBytes=r}[C(192)](r,t){const e=C;if(this[e(130)]===e(157))throw new Error(e(180)+this[e(203)][e(136)]+e(209));if(this[e(130)]===e(181))throw new Error(e(180)+this[e(203)][e(136)]+e(114));this[e(167)](e(181)),this[e(154)]={...r},this[e(161)]={startFromByte:this[e(162)],loadedBytes:0,startTimestamp:performance[e(144)]()},this[e(109)](e(192));const{notReceivingBytesTimeoutMs:n,abort:s}=t;return this._abortRequestCallback=s,n!==void 0&&this[e(194)].start(n),this[e(198)](r[e(177)]+" "+this[e(203)].externalId+" started"),this[e(205)]({segment:Me(this[e(203)]),downloadSource:r[e(177)],peerId:r[e(177)]==="p2p"?r.peerId:void 0}),{firstBytesReceived:this[e(204)],addLoadedChunk:this[e(176)],completeOnSuccess:this[e(145)],abortOnError:this[e(138)]}}abortFromProcessQueue(){var t,e,n,s;const r=C;this[r(142)](),this[r(167)](r(149)),this.logger(((t=this[r(154)])==null?void 0:t[r(177)])+" "+this[r(203)][r(136)]+r(132)),(e=this[r(129)])==null||e.call(this,new Y(r(178))),this[r(110)]({segment:Me(this[r(203)]),downloadSource:(n=this.currentAttempt)==null?void 0:n[r(177)],peerId:((s=this[r(154)])==null?void 0:s[r(177)])===r(133)?this[r(154)][r(134)]:void 0,streamType:this[r(203)][r(200)][r(199)]}),this[r(129)]=void 0,this[r(109)](r(120)),this[r(194)][r(140)]()}[(Ri=C(174),Ai=C(138),Ei=C(176),xi=C(204),C(142))](){const r=C;if(this._status!==r(181))throw new Error(r(171)+this[r(191)]+".")}[C(198)](r){var e;const t=C;this[t(135)][t(146)]=((e=this.currentAttempt)==null?void 0:e[t(177)])===t(124)?t(156):t(151),this[t(135)](r),this[t(135)][t(146)]=""}[C(109)](r){var i;const t=C,{all:e,http:n}=this.bandwidthCalculators,s=r===t(192)?t(152):t(175);((i=this[t(154)])==null?void 0:i[t(177)])==="http"&&n[s](),e[s]()}};class Za{constructor(){m(this,zi,[])}add(t){const e=C;this.attempts[e(182)](t)}get[(zi=C(188),C(123))](){const t=C;return this[t(188)][t(184)]((e,n)=>n[t(177)]===t(124)?e+1:e,0)}get lastAttempt(){const t=C;return this.attempts[this[t(188)][t(168)]-1]}[C(140)](){this.attempts=[]}}class Xa{constructor(t){m(this,Gi);m(this,"ms");this[C(111)]=t}[(Gi=C(141),C(192))](t){const e=C;if(this.timeoutId)throw new Error(e(122));this.ms=t,this.timeoutId=window[e(113)](this[e(111)],this.ms)}[C(160)](t){const e=C;this[e(141)]&&clearTimeout(this[e(141)]),t&&(this.ms=t),this.ms&&(this[e(141)]=window[e(113)](this[e(111)],this.ms))}[C(140)](){const t=C;clearTimeout(this.timeoutId),this[t(141)]=void 0}}function Ne(r,t){const e=Xn();return(Ne=function(n,s){return e[n-=384]})(r,t)}const Q=Ne;function Xn(){const r=["80eAhkeG","httpRequests","abortFromProcessQueue","config","170937xlUzjx","getOrCreateRequest","961692zmqwnm","loading","p2pRequests","bandwidthCalculators","requests","eventTarget","delete","595208bnmcVK","get","7340580OMXJaJ","2232993LFbZzD","destroy","p2p","executingHttpCount","requestProcessQueueCallback","22EluTph","remove","executingP2PCount","downloadSource","541792ufIQNa","7782TGOqks","status","segment","playback","http","values"];return(Xn=function(){return r})()}(function(r){const t=Ne,e=r();for(;;)try{if(parseInt(t(394))/1+parseInt(t(390))/2*(parseInt(t(405))/3)+parseInt(t(407))/4+-parseInt(t(401))/5*(parseInt(t(395))/6)+-parseInt(t(385))/7+parseInt(t(414))/8+-parseInt(t(384))/9===328014)break;e.push(e.shift())}catch{e.push(e.shift())}})(Xn);class Ka{constructor(t,e,n,s,i){m(this,Ji,new Map);const o=Ne;this[o(389)]=t,this[o(410)]=e,this[o(398)]=n,this[o(404)]=s,this[o(412)]=i}get[(Ji=Q(411),Q(388))](){const t=Q;let e=0;for(const n of this.httpRequests())n[t(396)]===t(408)&&e++;return e}get[Q(392)](){const t=Q;let e=0;for(const n of this[t(409)]())n.status==="loading"&&e++;return e}[Q(415)](t){const e=Q;return this[e(411)][e(415)](t)}[Q(406)](t){const e=Q;let n=this[e(411)][e(415)](t);return!n&&(n=new Va(t,this[e(389)],this[e(410)],this[e(398)],this[e(404)],this[e(412)]),this[e(411)].set(t,n)),n}[Q(391)](t){const e=Q;this[e(411)][e(413)](t[e(397)])}items(){return this[Q(411)].values()}*[Q(402)](){const t=Q;for(const e of this[t(411)][t(400)]())e[t(393)]===t(399)&&(yield e)}*[Q(409)](){const t=Q;for(const e of this[t(411)][t(400)]())e[t(393)]===t(387)&&(yield e)}[Q(386)](){const t=Q;for(const e of this.requests[t(400)]())e[t(396)]===t(408)&&e[t(403)]();this[t(411)].clear()}}var st=De;function De(r,t){var e=Kn();return(De=function(n,s){return e[n-=424]})(r,t)}(function(r){for(var t=De,e=r();;)try{if(-parseInt(t(433))/1*(-parseInt(t(429))/2)+parseInt(t(430))/3*(parseInt(t(448))/4)+parseInt(t(440))/5+-parseInt(t(427))/6+parseInt(t(444))/7*(-parseInt(t(446))/8)+parseInt(t(447))/9*(parseInt(t(428))/10)+-parseInt(t(445))/11*(-parseInt(t(450))/12)===208080)break;e.push(e.shift())}catch{e.push(e.shift())}})(Kn);class Ya{constructor(t,e){m(this,"_status",st(438));m(this,"_shouldBeStartedImmediately",!1);var n=De;this[n(439)]=t,this[n(426)]=e}get[st(425)](){return this[st(435)]}get[st(432)](){return this._shouldBeStartedImmediately}[st(434)](t,e){var n=st;this[n(435)]===n(438)&&(this._status="succeed",this.engineCallbacks[n(424)]({data:t,bandwidth:e}))}[st(443)](){var t=st;this[t(435)]==="pending"&&(this[t(435)]="failed",this[t(426)][t(442)](new Jt(t(437))))}[st(431)](){var t=st;this[t(435)]===t(438)&&(this[t(435)]=t(436),this[t(426)][t(442)](new Jt(t(436))))}[st(449)](){this[st(441)]=!0}}function Kn(){var r=["_shouldBeStartedImmediately","onError","reject","14189utipfY","2284161sicRLS","784WmWGZu","998181cvPUUN","62108hAXQcW","markAsShouldBeStartedImmediately","12OrXWQt","onSuccess","status","engineCallbacks","1714746OBaNhp","10avmwZH","1618iHXUgo","12FGPviC","abort","shouldBeStartedImmediately","382EYRapT","resolve","_status","aborted","failed","pending","segment","14055bjcVee"];return(Kn=function(){return r})()}function Yn(r,t){const e=$n();return(Yn=function(n,s){return e[n-=287]})(r,t)}function $n(){const r=["6246840OShtfy","4KQontu","4643376oULAVH","done","1385191sMUhnl","4huZiCc","29086630AnkWGc","value","18WECOSK","segments","next","4589185jvBzuf","9916977hchigh","get","1692057EfUQKc"];return($n=function(){return r})()}function*qr(r,t,e,n,s){const i=Yn,{runtimeId:o,stream:h}=r,a=h[i(301)][i(290)](o);if(!a)return;const d=h[i(301)].values();let u;do{const p=d[i(287)]();if(p.done)return;u=p[i(299)]}while(u!==a);const l=Le(u,t,e,n,s);if(ts(l)){const p=d.next();if(p[i(295)])return;const v=p[i(299)],I=Le(v,t,e,n,s);if(ts(I))return;l.isHighDemand=!0,yield{segment:u,statuses:l},yield{segment:v,statuses:I}}else yield{segment:u,statuses:l};for(const p of d){const v=Le(p,t,e,n,s);if(ts(v))break;yield{segment:p,statuses:v}}}function ts(r){const{isHighDemand:t=!1,isHttpDownloadable:e=!1,isP2PDownloadable:n=!1}=r;return!t&&!e&&!n}(function(r){const t=Yn,e=r();for(;;)try{if(parseInt(t(296))/1+-parseInt(t(293))/2*(-parseInt(t(291))/3)+-parseInt(t(297))/4*(parseInt(t(288))/5)+-parseInt(t(294))/6+parseInt(t(289))/7+parseInt(t(292))/8*(parseInt(t(300))/9)+-parseInt(t(298))/10===891254)break;e.push(e.shift())}catch{e.push(e.shift())}})($n);const $a=Object.freeze(Object.defineProperty({__proto__:null,generateQueue:qr},Symbol.toStringTag,{value:"Module"})),E=qe;function es(){const r=["segmentAvgDuration","httpErrorRetries","endTime","arrayBackwards","httpAttemptsCount","notifyLevelChanged","onSegmentRequested","sendBroadcastAnnouncement","get","isHighDemand","http","rate","storageCleanUpIntervalId","clear","reject","abort: ","129980UmObXN","isP2PDownloadable","downloadSegment","8135748jBUdpO","not-started","segmentStorage","playback","aborted","requests: ","downloadSource","getStreamString","changeCurrentLoader","12UTTraX","executingP2PCount","getUsage","shouldBeStartedImmediately","getAvailableStorageCapacityPercent","48377740HFnMdT","processQueue","56aWMBsU","getSegmentString","abortFromProcessQueue","eventTarget","p2p","loading","timestamp","generateQueue","from","requests","processRequests","bandwidthCalculators","getBandwidthLoadingOnly","pending","random","loadRandomThroughHttp","getSegmentAvgDuration","loadThroughP2P","levelChangedTimestamp","isProcessQueueMicrotaskCreated","push","externalId","onPlaybackUpdated","p2pml-core:hybrid-loader-","loadThroughHttp","executingHttpCount","broadcastAnnouncement","position","currentLoader","succeed","color","setTimeout","abortLastP2PLoadingInQueueAfterItem","type","randomHttpDownloadInterval","engineRequest","remove","segment","segments","lastRequestedSegment","getBandwidth","3673332BDQNPV","1142498uvdWOZ","connectedPeerCount","failedAttempts","data","373474JGwNFg","status","loadSegment","max","abortSegmentRequest","failed","add","updatePlayback","now","hasSegment","stream","409395TpUvid","24ObDrdW","runtimeId","logger","lastQueueProcessingTimeStamp","getSegmentData","resolve","swarmId","coral","streamManifestUrl","requestProcessQueueMicrotask","isLive","getStreamSwarmId","length","min","p2pLoaders","setIntervalLoading","isSegmentLoadedBySomeone","startTime","abs","streamDetails","config","isHttpDownloadable","destroy","error"];return(es=function(){return r})()}function qe(r,t){const e=es();return(qe=function(n,s){return e[n-=128]})(r,t)}(function(r){const t=qe,e=r();for(;;)try{if(-parseInt(t(129))/1+-parseInt(t(194))/2*(parseInt(t(141))/3)+parseInt(t(206))/4*(-parseInt(t(205))/5)+-parseInt(t(189))/6+-parseInt(t(190))/7*(parseInt(t(148))/8)+-parseInt(t(132))/9+parseInt(t(146))/10===810880)break;e.push(e.shift())}catch{e.push(e.shift())}})(es);class th{constructor(t,e,n,s,i,o,h){m(this,eo);m(this,to);m(this,$i);m(this,Yi);m(this,Ki);m(this,Xi);m(this,Zi);m(this,"levelChangedTimestamp");m(this,"lastQueueProcessingTimeStamp");m(this,"randomHttpDownloadInterval");m(this,Vi,!1);m(this,Qi,(t=!0)=>{const e=E,n=performance.now();!t&&this.lastQueueProcessingTimeStamp!==void 0&&n-this[e(209)]<=1e3||this.isProcessQueueMicrotaskCreated||(this.isProcessQueueMicrotaskCreated=!0,queueMicrotask(()=>{const s=e;try{this[s(147)](),this[s(209)]=n}finally{this[s(167)]=!1}}))});const a=qe;this.streamManifestUrl=t,this.lastRequestedSegment=e,this.streamDetails=n,this[a(226)]=s,this[a(159)]=i,this.segmentStorage=o,this[a(151)]=h;const d=this[a(187)].stream;this[a(135)]={position:this[a(187)][a(223)],rate:1},this[a(230)]=gt[a(164)](d),this.requests=new Ka(this[a(215)],this[a(159)],this.playback,this[a(226)],this[a(151)]),this[a(220)]=new Qa(this[a(214)],this[a(187)][a(204)],this[a(157)],this[a(134)],this[a(226)],this[a(151)],this[a(215)]),this[a(208)]=ht(a(171)+d[a(181)]),this[a(208)][a(178)]=a(213),this[a(221)]()}[(eo=E(157),to=E(183),$i=E(220),Yi=E(135),Ki=E(230),Xi=E(208),Zi=E(242),Vi=E(167),E(221))](){const t=E,e=this.p2pLoaders[t(176)][t(191)],n=1e3*Math[t(162)]()*e+1e3;this[t(182)]=window[t(179)](()=>{const s=t;this[s(163)](),this[s(221)]()},n)}async[E(196)](t,e){var a;const n=E;this[n(208)](n(137)+Lt[n(149)](t));const{stream:s}=t;s!==this[n(187)][n(204)]&&(this[n(208)]("stream changed to "+Lt[n(139)](s)),this[n(220)][n(140)](s)),this[n(187)]=t;const i=this[n(226)].swarmId??this[n(214)],o=gt[n(217)](i,s);this[n(134)][n(236)](i,o,t[n(169)],t[n(223)],t[n(232)],s[n(181)],this[n(225)][n(216)]);const h=new Ya(t,e);try{if(this[n(134)].hasSegment(i,o,t.externalId)){const d=await this.segmentStorage[n(210)](i,o,t[n(169)]);if(d){const{queueDownloadRatio:u}=this[n(155)]();return void h.resolve(d,this[n(188)](u))}}(a=this[n(183)])==null||a.abort(),this[n(183)]=h}catch{h.reject()}finally{this[n(215)]()}}[(Qi=E(215),E(158))](t,e){var h;const n=E,{stream:s}=this[n(187)],{httpErrorRetries:i}=this.config,o=performance.now();for(const a of this.requests.items()){const{downloadSource:d,status:u,segment:l,isHandledByProcessQueue:p}=a,v=((h=this[n(183)])==null?void 0:h.segment)===l?this[n(183)]:void 0;switch(u){case n(153):!t.has(l[n(207)])&&!v&&(a[n(150)](),this[n(157)][n(184)](a));break;case"succeed":{if(!d)break;d===n(240)&&this[n(220)][n(176)][n(174)](),v&&(v[n(211)](a[n(193)],this[n(188)](e)),this[n(183)]=void 0),this[n(157)][n(184)](a);const _=this[n(226)][n(212)]??this.streamManifestUrl,g=gt[n(217)](_,s);this[n(134)].storeSegment(_,g,l.externalId,a[n(193)],l.startTime,l[n(232)],l[n(204)][n(181)],this.streamDetails[n(216)]);break}case"failed":d===n(240)&&!p&&this[n(220)][n(176)].broadcastAnnouncement(),!v&&!s[n(186)].has(a[n(185)][n(207)])&&this[n(157)][n(184)](a),a.failedAttempts[n(234)]>=i&&v&&(this[n(183)]=void 0,v[n(244)]());break;case n(133):this[n(157)].remove(a);break;case n(136):this[n(157)][n(184)](a)}a.markHandledByProcessQueue();const{lastAttempt:I}=a.failedAttempts;I&&o-I[n(229)][n(154)]>6e4&&a[n(192)][n(243)]()}}[E(147)](){var a;const t=E,{queue:e,queueSegmentIds:n,queueDownloadRatio:s}=this[t(155)]();this[t(158)](n,s);const{simultaneousHttpDownloads:i,simultaneousP2PDownloads:o,httpErrorRetries:h}=this[t(226)];if((a=this[t(183)])!=null&&a[t(144)]&&this[t(183)][t(195)]===t(161)&&this[t(157)].executingHttpCount<i){const{segment:d}=this[t(183)],u=this[t(157)].get(d);(!u||u[t(195)]===t(133)||u[t(195)]===t(199)&&u[t(192)].httpAttemptsCount<this[t(226)][t(231)])&&this[t(172)](d)}for(const d of e){const{statuses:u,segment:l}=d,p=this.requests.get(l);if(u[t(239)]){if((p==null?void 0:p[t(138)])===t(240)&&p.status==="loading"||(p==null?void 0:p[t(138)])===t(240)&&p.status===t(199)&&p.failedAttempts[t(234)]>=h)continue;const v=(p==null?void 0:p[t(195)])==="loading"&&p[t(138)]===t(152);if(this[t(157)][t(173)]<i){v&&p[t(150)](),this[t(172)](l);continue}if(this.abortLastHttpLoadingInQueueAfterItem(e,l)&&this[t(157)][t(173)]<i){v&&p[t(150)](),this[t(172)](l);continue}if(v)continue;if(this[t(157)][t(142)]<o){this.loadThroughP2P(l);continue}if(this[t(180)](e,l)&&this[t(157)].executingP2PCount<o){this[t(165)](l);continue}}else if(u[t(130)]){if((p==null?void 0:p.status)===t(153))continue;(this[t(157)][t(142)]<o||this[t(220)].currentLoader[t(222)](l)&&this[t(180)](e,l)&&this[t(157)][t(142)]<o)&&this[t(165)](l)}}}[E(198)](t){var n;const e=E;((n=this[e(183)])==null?void 0:n[e(185)].runtimeId)===t&&(this.engineRequest.abort(),this[e(208)](e(128),vr(this[e(183)].segment)),this[e(183)]=void 0,this[e(215)]())}[E(172)](t){const e=E,n=this[e(157)].getOrCreateRequest(t);new ia(n,this[e(226)],this[e(151)]),this[e(220)].currentLoader.broadcastAnnouncement()}loadThroughP2P(t){const e=E;this[e(220)][e(176)][e(131)](t)}[E(163)](){const t=E,e=this[t(145)]();if(e<=10)return;const{simultaneousHttpDownloads:n,httpErrorRetries:s}=this[t(226)],i=this.p2pLoaders[t(176)];if(this[t(157)][t(173)]>=n||!i[t(191)])return;const o=[];for(const{segment:l,statuses:p}of $a[t(155)](this.lastRequestedSegment,this[t(135)],this[t(226)],this.p2pLoaders[t(176)],e)){const v=this.config[t(212)]??this[t(214)],I=gt[t(217)](v,l[t(204)]);if(!p[t(227)]||p.isP2PDownloadable||this[t(134)][t(203)](v,I,l.externalId))continue;const _=this.requests.get(l);_&&(_[t(195)]==="loading"||_[t(195)]===t(177)||_[t(192)][t(234)]>=s)||o[t(168)](l)}if(!o[t(218)]||n-this[t(157)][t(173)]===0)return;const h=i.connectedPeerCount+1,a=Math[t(219)](o[t(218)],n*h),d=xr(Array[t(156)]({length:a},(l,p)=>p));let u=a/h;for(const l of d){if(this[t(157)].executingHttpCount>=n)break;if(u>=1||Math.random()<=u){const p=o[l];this[t(172)](p)}if(u--,u<=0)break}}abortLastHttpLoadingInQueueAfterItem(t,e){const n=E;for(const{segment:s}of Kt[n(233)](t)){if(s===e)break;const i=this.requests[n(238)](s);if((i==null?void 0:i.downloadSource)===n(240)&&i[n(195)]===n(153))return i[n(150)](),!0}return!1}abortLastP2PLoadingInQueueAfterItem(t,e){const n=E;for(const{segment:s}of Kt[n(233)](t)){if(s===e)break;const i=this[n(157)][n(238)](s);if((i==null?void 0:i[n(138)])===n(152)&&i[n(195)]===n(153))return i.abortFromProcessQueue(),!0}return!1}getAvailableStorageCapacityPercent(){const t=E,{totalCapacity:e,usedCapacity:n}=this[t(134)][t(143)]();return 100-n/e*100}[E(155)](){var h;const t=E,e=[],n=new Set;let s=0,i=0;const o=this[t(145)]();for(const a of qr(this[t(187)],this[t(135)],this[t(226)],this[t(220)].currentLoader,o)){s++;const{segment:d}=a,u=this[t(226)][t(212)]??this[t(214)],l=gt[t(217)](u,d[t(204)]);this.segmentStorage[t(203)](u,l,d[t(169)])||((h=this[t(157)][t(238)](d))==null?void 0:h.status)==="succeed"?i++:(e.push(a),n[t(200)](d.runtimeId))}return{queue:e,queueSegmentIds:n,maxPossibleLength:s,alreadyLoadedCount:i,queueDownloadRatio:s!==0?i/s:0}}[E(188)](t){const e=E,{http:n,all:s}=this[e(159)],{activeLevelBitrate:i}=this[e(225)];if(this[e(225)].activeLevelBitrate===0)return s[e(160)](3);const o=Math[e(197)](s[e(188)](30,this.levelChangedTimestamp),s[e(188)](60,this[e(166)]),s.getBandwidth(90,this.levelChangedTimestamp));if(t>=.8||o>=.9*i)return Math.max(s.getBandwidthLoadingOnly(1),s.getBandwidthLoadingOnly(3),s[e(160)](5));const h=Math[e(197)](n[e(160)](1),n[e(160)](3),n[e(160)](5));return Math.max(o,h)}[E(235)](){const t=E;this[t(166)]=performance[t(202)]()}[E(237)](t=!1){const e=E;this[e(220)][e(176)][e(174)](t)}[E(201)](t,e){var h;const n=E,s=this.playback.rate!==e,i=this.playback[n(175)]!==t;if(!s&&!i)return;const o=Math[n(224)](t-this.playback[n(175)])/this[n(230)]>.5;i&&(this[n(135)][n(175)]=t),s&&e!==0&&(this[n(135)][n(241)]=e),o&&(this[n(208)]("position significantly changed"),(h=this[n(183)])==null||h.markAsShouldBeStartedImmediately()),this.segmentStorage[n(170)](t,e),this[n(215)](o)}updateStream(t){const e=E;t===this[e(187)][e(204)]&&(this.logger("update stream: "+Lt[e(139)](t)),this[e(215)]())}[E(228)](){var e;const t=E;clearInterval(this[t(242)]),clearInterval(this[t(182)]),this[t(242)]=void 0,(e=this[t(183)])==null||e.abort(),this.requests[t(228)](),this[t(220)][t(228)]()}}function ns(){const r=["NEGATIVE_INFINITY","splice","5892246KrIOvZ","loadingsCount","noLoadingsTime","76MaqcEC","getBandwidthLoadingOnly","clearThresholdMs","165310ZdFPaq","1310262ptqAbr","push","5aPtkcV","loadingOnlyTimestamps","now","bytes","loadingsStoppedAt","timestamps","76563clFEns","6744584hGMKkA","17072440NlLJfs","11317208iPFGID","9iiUhKl","length","stopLoading","startLoading"];return(ns=function(){return r})()}const Z=Fe;function Fe(r,t){const e=ns();return(Fe=function(n,s){return e[n-=222]})(r,t)}(function(r){const t=Fe,e=r();for(;;)try{if(parseInt(t(239))/1+-parseInt(t(238))/2+parseInt(t(222))/3*(-parseInt(t(235))/4)+parseInt(t(241))/5*(parseInt(t(232))/6)+-parseInt(t(225))/7+parseInt(t(223))/8*(-parseInt(t(226))/9)+parseInt(t(224))/10===972176)break;e.push(e.shift())}catch{e.push(e.shift())}})(ns);class Fr{constructor(t=2e4){m(this,"loadingsCount",0);m(this,ro,[]);m(this,"loadingOnlyTimestamps",[]);m(this,"timestamps",[]);m(this,so,0);m(this,no,0);this[Fe(237)]=t}addBytes(t,e=performance.now()){const n=Z;this[n(244)][n(240)](t),this[n(242)][n(240)](e-this.noLoadingsTime),this[n(246)][n(240)](e)}[(ro=Z(244),so=Z(234),no=Z(245),Z(229))](t=performance.now()){const e=Z;this.clearStale(),this[e(233)]===0&&this[e(245)]!==0&&(this[e(234)]+=t-this.loadingsStoppedAt),this[e(233)]++}[Z(228)](t=performance[Z(243)]()){const e=Z;this[e(233)]>0&&(this.loadingsCount--,this[e(233)]===0&&(this[e(245)]=t))}[Z(236)](t,e=Number[Z(230)]){const n=Z;if(!this[n(242)][n(227)])return 0;const s=1e3*t,i=this.loadingOnlyTimestamps[this.loadingOnlyTimestamps[n(227)]-1];let o=i;const h=i-s;let a=0;for(let d=this[n(244)].length-1;d>=0;d--){const u=this[n(242)][d];if(u<h||this[n(246)][d]<e)break;o=u,a+=this[n(244)][d]}return 8e3*a/(i-o)}getBandwidth(t,e=Number[Z(230)],n=performance[Z(243)]()){const s=Z;if(!this[s(246)][s(227)])return 0;const i=n-1e3*t;let o=n,h=0;for(let a=this[s(244)].length-1;a>=0;a--){const d=this[s(246)][a];if(d<i||d<e)break;o=d,h+=this[s(244)][a]}return 8e3*h/(n-o)}clearStale(){const t=Z;if(!this[t(242)][t(227)])return;const e=this.loadingOnlyTimestamps[this[t(242)][t(227)]-1]-this[t(237)];let n=0;for(const s of this.loadingOnlyTimestamps){if(s>e)break;n++}this[t(244)][t(231)](0,n),this[t(242)][t(231)](0,n),this[t(246)][t(231)](0,n)}}const ss=rs;function rs(r,t){const e=is();return(rs=function(n,s){return e[n-=349]})(r,t)}(function(r){const t=rs,e=r();for(;;)try{if(-parseInt(t(352))/1+parseInt(t(359))/2*(-parseInt(t(353))/3)+parseInt(t(358))/4*(parseInt(t(357))/5)+-parseInt(t(355))/6*(-parseInt(t(351))/7)+parseInt(t(360))/8+parseInt(t(356))/9*(-parseInt(t(361))/10)+-parseInt(t(349))/11*(-parseInt(t(354))/12)===518665)break;e.push(e.shift())}catch{e.push(e.shift())}})(is);const Ue=(r,t)=>r+"|"+t;function is(){const r=["8IYUryO","982KAyrTd","556952AWtOlJ","170TjrKkW","275ngDhoe","test","7rVfFRh","861768YmUDjy","2103wlvnxI","366936ahzrNy","6157776VVRctZ","151839uwcUqs","377665TvGveL"];return(is=function(){return r})()}function os(){const r=["sort","mainStreamConfig","lastRequestedSegment","currentPlayback","5680496alkyvC","data","640628LLzsJL","shouldRemoveSegment","get","cache","increaseStorageUsage"," to ","getStreamTimeWindow","currentStorageUsage","getSegmentData","add","setSegmentChangeCallback","position","from","onSegmentRequested","sendUpdatesToAffectedStreams","storeSegment","forEach","highDemandTimeWindow","logger","size","segmentMemoryStorageLimit","2369465xJUkpg","coreConfig","set","RebeccaPurple","isMemoryLimitReached","6eoxDTu","destroy","values","clear","startTime","17672200ZliMik","segmentChangeCallback","p2pml-core:segment-memory-storage","105562qwNykB","3698736NZdKtF","secondaryStreamConfig","dispatchStorageUpdatedEvent is not set","6677678aEimCm","delete"," from stream ","Removed segment ","userAgent","byteLength","color","add segment: ","initialize","decreaseStorageUsage"];return(os=function(){return r})()}const P=as;function as(r,t){const e=os();return(as=function(n,s){return e[n-=403]})(r,t)}(function(r){const t=as,e=r();for(;;)try{if(-parseInt(t(417))/1+-parseInt(t(451))/2+parseInt(t(452))/3+-parseInt(t(415))/4+parseInt(t(438))/5*(parseInt(t(443))/6)+-parseInt(t(455))/7+parseInt(t(448))/8===848343)break;e.push(e.shift())}catch{e.push(e.shift())}})(os);const He=1048576;class eh{constructor(){m(this,"userAgent",navigator.userAgent);m(this,"segmentMemoryStorageLimit",4096);m(this,uo,0);m(this,co,new Map);m(this,ho);m(this,"coreConfig");m(this,ao);m(this,oo);m(this,"currentPlayback");m(this,io);m(this,"segmentChangeCallback");const t=P;this.logger=ht(t(450)),this[t(435)][t(407)]=t(441)}async[(uo=P(424),co=P(420),ho=P(435),ao=P(412),oo=P(453),io=P(413),P(409))](t,e,n){this[P(439)]=t,this.mainStreamConfig=e,this.secondaryStreamConfig=n,this.setMemoryStorageLimit(),this.logger("initialized")}onPlaybackUpdated(t,e){this[P(414)]={position:t,rate:e}}[P(430)](t,e,n,s,i,o,h){this[P(413)]={streamId:e,segmentId:n,startTime:s,endTime:i,swarmId:t,streamType:o,isLiveStream:h}}async[P(432)](t,e,n,s,i,o,h,a){const d=P;this[d(446)](a,s[d(406)]);const u=Ue(e,n);if(this[d(420)][d(440)](u,{data:s,segmentId:n,streamId:e,startTime:i,endTime:o,streamType:h}),this[d(421)](s[d(406)]),this[d(435)](d(408)+n+d(422)+e),!this.segmentChangeCallback)throw new Error("dispatchStorageUpdatedEvent is not set");this[d(449)](e)}async[P(425)](t,e,n){const s=P,i=Ue(e,n),o=this[s(420)][s(419)](i);if(o!==void 0)return o[s(416)]}getUsage(){const t=P;if(!this.lastRequestedSegment||!this[t(414)])return{totalCapacity:this[t(437)],usedCapacity:this[t(424)]};const e=this[t(414)].position;let n=0;for(const{endTime:s,data:i}of this.cache.values())e>s||(n+=i[t(406)]);return{totalCapacity:this[t(437)],usedCapacity:n/He}}hasSegment(t,e,n){const s=P,i=Ue(e,n);return this.cache[s(419)](i)!==void 0}getStoredSegmentIds(t,e){const n=P,s=[];for(const{segmentId:i,streamId:o}of this.cache[n(445)]())o===e&&s.push(i);return s}[P(446)](t,e){const n=P;if(!(this[n(414)]&&this[n(412)]&&this[n(453)]&&this.coreConfig)||!this[n(442)](e)&&!t)return;const s=new Set,i=Array[n(429)](this[n(420)].values())[n(411)]((o,h)=>o[n(447)]-h[n(447)]);for(const o of i){const{streamId:h,segmentId:a,data:d}=o,u=Ue(h,a);if(this.shouldRemoveSegment(o,t,this[n(414)][n(428)])&&(this[n(420)][n(456)](u),s[n(426)](h),this[n(410)](d[n(406)]),this.logger(n(404)+a+n(403)+h),!this.isMemoryLimitReached(e)&&!t))break}this[n(431)](s)}[P(442)](t){const e=P;return this[e(424)]+t/He>this[e(437)]}[P(427)](t){this.segmentChangeCallback=t}[P(431)](t){const e=P;t[e(436)]!==0&&t[e(433)](n=>{const s=e;if(!this.segmentChangeCallback)throw new Error(s(454));this[s(449)](n)})}[P(418)](t,e,n){const s=P,{endTime:i,streamType:o}=t,h=this[s(423)](o,s(434));return!(n<=i)&&(!e||n>h+i)}increaseStorageUsage(t){this[P(424)]+=t/He}[P(410)](t){this[P(424)]-=t/He}setMemoryStorageLimit(){var i;const t=P;var e,n,s;(i=this[t(439)])!=null&&i.segmentMemoryStorageLimit?this.segmentMemoryStorageLimit=this[t(439)].segmentMemoryStorageLimit:(s=this[t(405)],/Android/i[ss(350)](s)&&!/Chrome|Firefox/i[ss(350)](s)||(n=this[t(405)],/iPad|iPhone/i.test(n))?this[t(437)]=1024:(e=this[t(405)],/Android/i[ss(350)](e)&&(this[t(437)]=2048)))}[P(423)](t,e){const n=P,s=t==="main"?this[n(412)]:this[n(453)];return(s==null?void 0:s[e])??0}[P(444)](){const t=P;this.cache[t(446)]()}}function hs(){const r=["1902648koGqVJ","96150NUwTxP","6310791bfognO","12EFCSsb","1328600skBmmJ","events","indexOf","removeEventListener","1005SoTnwL","dispatchEvent","push","273253ikzWpR","get","10lAzBoQ","1232604bjCure","set","6522qRezol"];return(hs=function(){return r})()}const Bt=cs;function cs(r,t){const e=hs();return(cs=function(n,s){return e[n-=413]})(r,t)}(function(r){const t=cs,e=r();for(;;)try{if(parseInt(t(416))/1+-parseInt(t(425))/2*(-parseInt(t(423))/3)+-parseInt(t(419))/4+parseInt(t(413))/5*(-parseInt(t(421))/6)+-parseInt(t(426))/7+-parseInt(t(422))/8+-parseInt(t(424))/9*(-parseInt(t(418))/10)===212483)break;e.push(e.shift())}catch{e.push(e.shift())}})(hs);class nh{constructor(){m(this,lo,new Map)}[(lo=Bt(427),Bt(414))](t,...e){const n=this[Bt(427)].get(t);if(n)for(const s of n)s(...e)}getEventDispatcher(t){const e=Bt;let n=this.events[e(417)](t);!n&&(n=[],this[e(427)][e(420)](t,n));const s=n;return(...i)=>{for(const o of s)o(...i)}}addEventListener(t,e){const n=Bt,s=this[n(427)][n(417)](t);s?s[n(415)](e):this[n(427)][n(420)](t,[e])}[Bt(429)](t,e){const n=Bt,s=this[n(427)][n(417)](t);if(s){const i=s[n(428)](e);i!==-1&&s.splice(i,1)}}}const T=ds;function us(){const r=["set","secondaryStreamConfig","initializeSegmentStorage","secondaryStream","getUpdatedStreamProperty","segments","597723AIDijb","updateStream","eventTarget","getStream","split","isP2PDisabled","setManifestResponseUrl","Not found segment with id: ","type","main","has","mainStreamConfig","hasSegment","Storage configuration is invalid","clearPeerIdCache","8GGbYYK","8730981SOpcHC","commonCoreConfig","customSegmentStorageFactory","secondary","9680097BxKDix","destroy","bandwidthCalculators","overrideAllConfigs","Manifest response url is undefined","DEFAULT_STREAM_CONFIG","clear","stun:stun.l.google.com:19302","abortSegmentLoading","abortSegmentRequest","updatePlayback","processSpecificDynamicConfigParams","notifyLevelChanged","delete","mainStream","1710647CtEmBM","setActiveLevelBitrate","applyDynamicConfig","15737579AQMiDE","segmentStorage","addStreamIfNoneExists","wss://v2.swarm.video","2792510jUSIwT","5Gdcvsj","getStreamHybridLoader","setIsLive","DEFAULT_COMMON_CORE_CONFIG","8jdwybs","loadSegment","identifySegment","secondaryStreamLoader","Segment storage is not initialized","isSegmentLoadable","Manifest response url is not defined","mainStreamLoader","runtimeId","createNewHybridLoader","function","get","6oWctEt","removeEventListener","manifestResponseUrl","isP2PUploadDisabled","getConfig","streams","streamDetails","destroyStreamLoader","1317308FXGZjU","stream","activeLevelBitrate"];return(us=function(){return r})()}function ds(r,t){const e=us();return(ds=function(n,s){return e[n-=225]})(r,t)}(function(r){const t=ds,e=r();for(;;)try{if(parseInt(t(257))/1+parseInt(t(237))/2*(parseInt(t(298))/3)+parseInt(t(289))/4*(-parseInt(t(265))/5)+-parseInt(t(281))/6*(-parseInt(t(242))/7)+parseInt(t(269))/8*(-parseInt(t(238))/9)+-parseInt(t(264))/10+-parseInt(t(260))/11===881106)break;e.push(e.shift())}catch{e.push(e.shift())}})(us);const Mt=class Mt{constructor(t){m(this,wo,new nh);m(this,So);m(this,bo,new Map);m(this,yo);m(this,"secondaryStreamConfig");m(this,_o);m(this,go,{all:new Fr,http:new Fr});m(this,"segmentStorage");m(this,mo);m(this,fo);m(this,po,{isLive:!1,activeLevelBitrate:0});const e=T,n=Tr(t??{});this[e(239)]=Ie({defaultConfig:Mt.DEFAULT_COMMON_CORE_CONFIG,baseConfig:n}),this.mainStreamConfig=Ie({defaultConfig:Mt[e(247)],baseConfig:n,specificStreamConfig:n.mainStream}),this.secondaryStreamConfig=Ie({defaultConfig:Mt[e(247)],baseConfig:n,specificStreamConfig:n[e(295)]})}[(vo=T(268),Io=T(247),wo=T(300),So=T(283),bo=T(286),yo=T(233),_o=T(239),go=T(244),mo=T(276),fo=T(272),po=T(287),T(285))](){const t=T;return{...mt(this[t(239)]),mainStream:mt(this[t(233)]),secondaryStream:mt(this[t(293)])}}[T(259)](t){const e=T,{mainStream:n,secondaryStream:s}=t,i=mt(this[e(233)]),o=mt(this[e(293)]);this.overrideAllConfigs(t,n,s),this[e(253)](i,t,e(231)),this[e(253)](o,t,e(241))}[T(253)](t,e,n){const s=T,i=this[s(296)]("isP2PDisabled",e,n);i&&t[s(227)]!==i&&this.destroyStreamLoader(n);const o=this[s(296)](s(284),e,n);if(o!==void 0&&t.isP2PUploadDisabled!==o){const h=n===s(231)?this[s(276)]:this[s(272)];h==null||h.sendBroadcastAnnouncement(o)}}[T(296)](t,e,n){const s=T,i=n===s(231)?e[s(256)]:e[s(295)];return(i==null?void 0:i[t])??e[t]}addEventListener(t,e){this[T(300)].addEventListener(t,e)}[T(282)](t,e){this.eventTarget.removeEventListener(t,e)}[T(228)](t){const e=T;this[e(283)]=t[e(226)]("?")[0]}[T(234)](t){return!!zn(this[T(286)],t)}[T(225)](t){const e=T;return this[e(286)][e(280)](t)}[T(262)](t){const e=T;this[e(286)].has(t.runtimeId)||this.streams.set(t[e(277)],{...t,segments:new Map})}updateStream(t,e,n){var o,h;const s=T,i=this[s(286)][s(280)](t);if(i){if(e)for(const a of e)i[s(297)][s(232)](a[s(277)])||i[s(297)][s(292)](a.runtimeId,{...a,stream:i});if(n)for(const a of n)i[s(297)][s(255)](a);(o=this[s(276)])==null||o[s(299)](i),(h=this[s(272)])==null||h[s(299)](i)}}async[T(270)](t,e){const n=T;if(!this[n(283)])throw new Error(n(275));await this.initializeSegmentStorage();const s=this.identifySegment(t);this[n(266)](s)[n(270)](s,e)}[T(250)](t){var n,s;const e=T;(n=this[e(276)])==null||n[e(251)](t),(s=this.secondaryStreamLoader)==null||s.abortSegmentRequest(t)}[T(252)](t,e){var s,i;const n=T;(s=this[n(276)])==null||s[n(252)](t,e),(i=this[n(272)])==null||i[n(252)](t,e)}[T(258)](t){var n,s;const e=T;t!==this.streamDetails[e(291)]&&(this[e(287)][e(291)]=t,(n=this[e(276)])==null||n[e(254)](),(s=this[e(272)])==null||s.notifyLevelChanged())}[T(267)](t){this[T(287)].isLive=t}[T(274)](t){const e=T;try{const n=this[e(271)](t);return(n[e(290)][e(230)]!=="main"||!this.mainStreamConfig[e(227)])&&(n[e(290)][e(230)]!=="secondary"||!this.secondaryStreamConfig[e(227)])}catch{return!1}}[T(243)](){var e,n,s;const t=T;this.streams[t(248)](),(e=this[t(276)])==null||e[t(243)](),(n=this[t(272)])==null||n[t(243)](),(s=this[t(261)])==null||s.destroy(),this[t(276)]=void 0,this[t(272)]=void 0,this.segmentStorage=void 0,this.manifestResponseUrl=void 0,this[t(287)]={isLive:!1,activeLevelBitrate:0},Pe[t(236)]()}async[T(294)](){const t=T;if(this[t(261)])return;const{isLive:e}=this[t(287)],n=this[t(239)][t(240)];if(n&&typeof n!==t(279))throw new Error(t(235));const s=n?n(e):new eh;await s.initialize(this[t(239)],this.mainStreamConfig,this[t(293)]),this[t(261)]=s}[T(271)](t){const e=T;if(!this.manifestResponseUrl)throw new Error(e(246));const n=zn(this[e(286)],t);if(!n)throw new Error(e(229)+t);return n}[T(245)](t,e,n){const s=T;Ht(this[s(239)],t),Ht(this[s(233)],t),Ht(this.secondaryStreamConfig,t),e&&Ht(this[s(233)],e),n&&Ht(this.secondaryStreamConfig,n)}[T(288)](t){var n,s;const e=T;t===e(231)?((n=this.mainStreamLoader)==null||n[e(243)](),this.mainStreamLoader=void 0):((s=this[e(272)])==null||s.destroy(),this.secondaryStreamLoader=void 0)}[T(266)](t){var n;const e=T;return t.stream[e(230)]===e(231)?(this.mainStreamLoader??(this.mainStreamLoader=this.createNewHybridLoader(t)),this[e(276)]):(this[n=e(272)]??(this[n]=this[e(278)](t)),this[e(272)])}[T(278)](t){const e=T;if(!this.manifestResponseUrl)throw new Error(e(275));if(!this[e(261)])throw new Error(e(273));const n=t.stream[e(230)]===e(231)?this.mainStreamConfig:this[e(293)];return new th(this.manifestResponseUrl,t,this[e(287)],n,this[e(244)],this.segmentStorage,this[e(300)])}};m(Mt,vo,{segmentMemoryStorageLimit:void 0,customSegmentStorageFactory:void 0}),m(Mt,Io,{isP2PUploadDisabled:!1,isP2PDisabled:!1,simultaneousHttpDownloads:1,simultaneousP2PDownloads:5,highDemandTimeWindow:15,httpDownloadTimeWindow:3e3,p2pDownloadTimeWindow:6e3,webRtcMaxMessageSize:65535,p2pNotReceivingBytesTimeoutMs:2900,p2pInactiveLoaderDestroyTimeoutMs:3e4,httpNotReceivingBytesTimeoutMs:3e3,httpErrorRetries:100,p2pErrorRetries:1,trackerClientVersionPrefix:Sr,announceTrackers:[T(263)],rtcConfig:{iceServers:[{urls:T(249)},{urls:"stun:global.stun.twilio.com:3478"}]},validateP2PSegment:void 0,validateHTTPSegment:void 0,httpRequestSetup:void 0,statsSegmentsThreshold:10,swarmId:void 0});let We=Mt;function Ur(r,t){var e=ls();return(Ur=function(n,s){return e[n-=367]})(r,t)}function ls(){var r=["1323160lKeYcb","2024193bkmYZT","26578200EKZnPO","942208SiMMUW","419700BhBXWT","5796lTmlEE","3948gaUleR","764336BvWPHk"];return(ls=function(){return r})()}(function(r){for(var t=Ur,e=r();;)try{if(-parseInt(t(372))/1+-parseInt(t(368))/2+-parseInt(t(374))/3+-parseInt(t(369))/4+-parseInt(t(373))/5+parseInt(t(370))/6*(-parseInt(t(371))/7)+parseInt(t(367))/8===497723)break;e.push(e.shift())}catch{e.push(e.shift())}})(ls);const sh=Object.freeze(Object.defineProperty({__proto__:null,Core:We,CoreRequestError:Jt,RequestError:Y,debug:en.debug},Symbol.toStringTag,{value:"Module"})),rt=ps;function ps(r,t){const e=fs();return(ps=function(n,s){return e[n-=429]})(r,t)}(function(r){const t=ps,e=r();for(;;)try{if(parseInt(t(439))/1*(parseInt(t(457))/2)+parseInt(t(434))/3*(-parseInt(t(464))/4)+parseInt(t(448))/5*(parseInt(t(443))/6)+parseInt(t(453))/7*(-parseInt(t(446))/8)+parseInt(t(442))/9*(-parseInt(t(433))/10)+parseInt(t(444))/11+-parseInt(t(441))/12*(-parseInt(t(454))/13)===237760)break;e.push(e.shift())}catch{e.push(e.shift())}})(fs);function fs(){const r=["555636UxArtR","2547lPQmvO","1204734mhdBrO","3532760eklVDd","message","328qIwSNE","loader","10iQTfNh","onAbort","config","hasSegment","now","43764vdaqvJ","26KfMHHI","isSegmentLoadable","text","281518pLnmNt","destroy","stats","onSuccess","url","type","load","654916BIreml","getSegmentRuntimeId","abort","loading","onProgress","data","context","loaded","aborted","10540VgeAif","3sTOpkV","byteLength","total","loadSegment","abortSegmentLoading","1CkUUVH","getByteRange"];return(fs=function(){return r})()}class rh{constructor(t,e){dt(this,Dt);m(this,To);m(this,ko);m(this,Co);dt(this,Nt);dt(this,re);dt(this,ct);dt(this,Et);dt(this,_t);dt(this,yt);const n=rt;lt(this,Et,e),lt(this,re,()=>new t[n(447)](t)),this.stats={aborted:!1,chunkCount:0,loading:{start:0,first:0,end:0},buffering:{start:0,first:0,end:0},parsing:{start:0,end:0},total:1,loaded:1,bwEstimate:0,retry:0}}[(To=rt(430),ko=rt(450),Co=rt(459),rt(463))](t,e,n){const s=rt;this[s(430)]=t,this[s(450)]=e,lt(this,Nt,n);const{stats:i}=this,{rangeStart:o,rangeEnd:h}=t,a=Rt[s(440)](o,h!==void 0?h-1:void 0);lt(this,yt,Rt[s(465)](t[s(461)],a));const d=M(this,Et)[s(455)](M(this,yt));if(!M(this,Et)[s(451)](M(this,yt))||!d)return lt(this,ct,M(this,re).call(this)),M(this,ct)[s(459)]=this[s(459)],void M(this,ct).load(t,e,n);M(this,Et)[s(437)](M(this,yt),{onSuccess:u=>{const l=s;lt(this,_t,u);const p=M(this,_t)[l(429)][l(435)];i[l(467)]=function(v,I,_){const g=_-8e3*I/v;return{start:g-10,first:g,end:_}}(M(this,_t).bandwidth,p,performance[l(452)]()),i[l(436)]=p,i[l(431)]=p,n[l(468)]&&n[l(468)](this[l(459)],t,M(this,_t)[l(429)],void 0),n[l(460)]({data:M(this,_t)[l(429)],url:t[l(461)]},this.stats,t,void 0)},onError:u=>{const l=s;u instanceof Jt&&u.type==="aborted"&&this[l(459)][l(432)]||Ze(this,Dt,sa).call(this,u)}})}[rt(466)](){var e,n;const t=rt;M(this,ct)?M(this,ct)[t(466)]():(Ze(this,Dt,Os).call(this),(n=(e=M(this,Nt))==null?void 0:e[t(449)])==null||n.call(e,this[t(459)],this[t(430)],{}))}[rt(458)](){const t=rt;M(this,ct)?M(this,ct).destroy():(this[t(459)][t(432)]||Ze(this,Dt,Os).call(this),lt(this,Nt,null),this.config=null)}}Nt=new WeakMap,re=new WeakMap,ct=new WeakMap,Et=new WeakMap,_t=new WeakMap,yt=new WeakMap,Dt=new WeakSet,sa=function(t){var s;const e=rt,n={code:0,text:""};t instanceof Jt&&t[e(462)]==="failed"?n.text=t[e(445)]:t instanceof Error&&(n[e(456)]=t.message),(s=M(this,Nt))==null||s.onError(n,this[e(430)],null,this[e(459)])},Os=function(){const t=rt;!M(this,_t)&&M(this,yt)&&(this.stats[t(432)]=!0,M(this,Et)[t(438)](M(this,yt)))};var xt=ms;(function(r){for(var t=ms,e=r();;)try{if(-parseInt(t(295))/1*(-parseInt(t(300))/2)+-parseInt(t(302))/3+-parseInt(t(294))/4*(-parseInt(t(293))/5)+-parseInt(t(305))/6+-parseInt(t(296))/7+parseInt(t(298))/8+-parseInt(t(301))/9===925837)break;e.push(e.shift())}catch{e.push(e.shift())}})(gs);class ih{constructor(t){dt(this,bt);m(this,"context");m(this,xo);var e=xt;lt(this,bt,new t[e(299)](t)),this[e(303)]=M(this,bt)[e(303)],this[e(306)]=M(this,bt)[e(306)]}[(xo=xt(303),xt(304))](t,e,n){var s=xt;M(this,bt)[s(304)](t,e,n)}[xt(297)](){var t=xt;M(this,bt)[t(297)]()}[xt(307)](){var t=xt;M(this,bt)[t(307)]()}}bt=new WeakMap;function ms(r,t){var e=gs();return(ms=function(n,s){return e[n-=293]})(r,t)}function gs(){var r=["294532fPZzed","abort","10114864FsabZx","loader","2yevDUO","5630112ScaLoG","2388954ftqyRD","stats","load","4355706AqmIuU","context","destroy","6312035fYIZGG","4dJTXFb","588985FFpqjf"];return(gs=function(){return r})()}const se=ys;function _s(){const r=["forEach","updatePlaylist","2136520nSINvO","562598MNUlid","getStream","270YhjiCE","getSegmentRuntimeId","getByteRange","values","core","segments","push","444871eHgvGG","keys","625592ohhPDC","toString","10700010GXBgZd","size","main","2966631tZHubv","initSegment","length","104TaXebP","isArray","entries","76278Spgwrt","addStreamIfNoneExists"];return(_s=function(){return r})()}function ys(r,t){const e=_s();return(ys=function(n,s){return e[n-=200]})(r,t)}(function(r){const t=ys,e=r();for(;;)try{if(-parseInt(t(211))/1+parseInt(t(200))/2+-parseInt(t(216))/3+parseInt(t(226))/4+-parseInt(t(202))/5*(parseInt(t(222))/6)+parseInt(t(209))/7*(parseInt(t(219))/8)+parseInt(t(213))/9===529537)break;e.push(e.shift())}catch{e.push(e.shift())}})(_s);class oh{constructor(t){m(this,Eo);this[se(206)]=t}processMainManifest(t){const e=se,{levels:n,audioTracks:s}=t;for(const[i,o]of n[e(221)]()){const{url:h}=o;this[e(206)][e(223)]({runtimeId:Array[e(220)](h)?h[0]:h,type:e(215),index:i})}for(const[i,o]of s[e(221)]()){const{url:h}=o;this[e(206)][e(223)]({runtimeId:Array[e(220)](h)?h[0]:h,type:"secondary",index:i})}}[(Eo=se(206),se(225))](t){const e=se,{details:{url:n,fragments:s,live:i}}=t,o=this.core[e(201)](n);if(!o)return;const h=new Set(o[e(207)][e(210)]()),a=[];s[e(224)]((d,u)=>{const l=e,{url:p,byteRange:v,sn:I,start:_,end:g}=d;if(I[l(212)]()===l(217))return;const[f,y]=v,b=Rt[l(204)](f,y!==void 0?y-1:void 0),w=Rt[l(203)](p,b);h.delete(w),o[l(207)].has(w)||a[l(208)]({runtimeId:w,url:p,externalId:i?I:u,byteRange:b,startTime:_,endTime:g})}),(a[e(218)]||h[e(214)])&&this.core.updateStream(n,a,h[e(205)]())}}function bs(){const r=["bindHls","1399425rgefRI","511RdzKtA","9534pcbpFU","3694736IdonED","25370CsmvFP","518485qbquQl","14967EkBTlJ","36wVNgAf","p2pEngine","5674456bdfCWh","806449GGzkxg","getConfigForHlsJs"];return(bs=function(){return r})()}function Ss(r,t){const e=bs();return(Ss=function(n,s){return e[n-=157]})(r,t)}(function(r){const t=Ss,e=r();for(;;)try{if(parseInt(t(160))/1+-parseInt(t(166))/2+-parseInt(t(163))/3+-parseInt(t(157))/4*(parseInt(t(168))/5)+-parseInt(t(165))/6*(parseInt(t(164))/7)+-parseInt(t(159))/8+-parseInt(t(169))/9*(-parseInt(t(167))/10)===953060)break;e.push(e.shift())}catch{e.push(e.shift())}})(bs);const A=je;function ws(){const r=["updateHlsEventsHandlers","hlsMediaAttaching","segmentManager","type","currentTime","addEventListener","destroyCore","removeEventListener","initHlsEvents","setManifestResponseUrl","processMainManifest","config","500730YbbMcy","590etvHYw","createFragmentLoaderClass","getConfig","fragments","handleMediaAttached","details","playbackRate","targetduration","unregister","hlsLevelUpdated","hlsManifestLoaded","12IEMEVc","36708IXhcKB","Setting liveSyncDurationCount to ","function","hlsMediaAttached","createPlaylistLoaderClass","handleLevelSwitching","updatePlaylist","setIsLive","target","length","hlsMediaDetached","currentHlsInstance","bitrate","2403128uOfXKS","updateMediaElementEventHandlers","applyDynamicConfig","getConfigForHlsJs","319773BtfUeN","51ppjUiJ","live","core","off","hlsLevelSwitching","handleMediaDetached","updateLiveSyncDurationCount","handlePlaybackUpdate","url","hlsInstanceGetter","ratechange","userConfig","seeking","min","floor","2Xflyho","register","handleLevelUpdated","setActiveLevelBitrate","media","destroy","3187701JIjnFA","6369IwcDFt","timeupdate","liveSyncDurationCount","responseURL","1602517depFpm","handleManifestLoaded"];return(ws=function(){return r})()}function je(r,t){const e=ws();return(je=function(n,s){return e[n-=145]})(r,t)}(function(r){const t=je,e=r();for(;;)try{if(parseInt(t(191))/1*(-parseInt(t(207))/2)+parseInt(t(192))/3*(-parseInt(t(174))/4)+-parseInt(t(161))/5*(-parseInt(t(173))/6)+-parseInt(t(147))/7+parseInt(t(187))/8+parseInt(t(213))/9+-parseInt(t(162))/10*(-parseInt(t(214))/11)===184320)break;e.push(e.shift())}catch{e.push(e.shift())}})(ws);class Is{constructor(t){m(this,"core");m(this,Fo);m(this,qo);m(this,Do);m(this,"debug",en.debug("swarm-viewer:engine"));m(this,No,t=>{var i;const e=A,n=(i=this.currentHlsInstance)==null?void 0:i[e(211)];if(!n)return;const s=t===e(208)?e(154):"removeEventListener";n[s](e(215),this[e(199)]),n[s](e(204),this[e(199)]),n[s](e(202),this.handlePlaybackUpdate)});m(this,Mo,(t,e)=>{const n=A,s=e.networkDetails;s instanceof XMLHttpRequest?this[n(194)][n(158)](s[n(146)]):s instanceof Response&&this[n(194)][n(158)](s[n(200)]),this[n(151)][n(159)](e)});m(this,Bo,(t,e)=>{const n=A;e[n(186)]&&this[n(194)][n(210)](e[n(186)])});m(this,Oo,(t,e)=>{const n=A;this[n(185)]&&e[n(167)][n(193)]&&e[n(167)][n(165)][0][n(152)]==="main"&&!this[n(185)][n(203)].liveSyncDuration&&!this[n(185)][n(203)][n(145)]&&e[n(167)][n(165)][n(183)]>4&&this[n(198)](e),this.core[n(181)](e[n(167)][n(193)]),this[n(151)][n(180)](e)});m(this,Lo,()=>{this[A(188)]("register")});m(this,Po,()=>{const t=A;this[t(188)](t(170))});m(this,Ro,t=>{const e=A,n=t[e(182)];this.core.updatePlayback(n[e(153)],n[e(168)])});m(this,"destroyCore",()=>this[A(194)][A(212)]());m(this,Ao,()=>{const t=A;this[t(155)](),this[t(149)](t(170)),this.updateMediaElementEventHandlers(t(170)),this[t(185)]=void 0});const e=A;this[e(194)]=new We(t==null?void 0:t[e(194)]),this[e(151)]=new oh(this.core)}static injectMixin(t){return function(e){var s,i;const n=Ss;return i=class extends e{constructor(...h){var v;const a=n,d=h[0],{p2p:u,...l}=d??{},p=new Is(u);super({...l,...p[a(161)]()});dt(this,s);p[a(162)](this),lt(this,s,p),(v=u==null?void 0:u.onHlsJsCreated)==null||v.call(u,this)}get[n(158)](){return M(this,s)}},s=new WeakMap,i}(t)}[(Fo=A(151),qo=A(201),Do=A(185),A(154))](t,e){this[A(194)].addEventListener(t,e)}[A(156)](t,e){this[A(194)].removeEventListener(t,e)}[A(190)](){const t=A;return{fLoader:this[t(163)](),pLoader:this[t(178)]()}}[A(164)](){return{core:this.core.getConfig()}}[A(189)](t){const e=A;t[e(194)]&&this[e(194)][e(189)](t.core)}bindHls(t){const e=A;this[e(201)]=typeof t===e(176)?t:()=>t}[A(157)](){var n;const t=A,e=(n=this[t(201)])==null?void 0:n.call(this);this[t(185)]!==e&&(this.currentHlsInstance&&this[t(212)](),this[t(185)]=e,this.updateHlsEventsHandlers(t(208)),this.updateMediaElementEventHandlers(t(208)))}[A(149)](t){const e=A,n=this[e(185)];if(!n)return;const s=t===e(208)?"on":e(195);n[s](e(172),this[e(148)]),n[s](e(196),this[e(179)]),n[s](e(171),this[e(209)]),n[s]("hlsAudioTrackLoaded",this.handleLevelUpdated),n[s]("hlsDestroying",this.destroy),n[s](e(150),this[e(155)]),n[s]("hlsManifestLoading",this[e(155)]),n[s](e(184),this[e(197)]),n[s](e(177),this.handleMediaAttached)}[(No=A(188),Mo=A(148),Bo=A(179),Oo=A(209),A(198))](t){const e=A,n=t[e(167)][e(169)],s=Math[e(206)](120/n),i=Math[e(205)](t[e(167)].fragments[e(183)]-1,s);this[e(185)]&&this[e(185)][e(160)][e(145)]!==i&&(this.debug(e(175)+i),this[e(185)][e(160)].liveSyncDurationCount=i)}[(Lo=A(166),Po=A(197),Ro=A(199),Ao=A(212),A(163))](){const{core:t}=this,e=this;return class extends rh{constructor(n){super(n,t)}static getEngine(){return e}}}[A(178)](){const t=this;return class extends ih{constructor(e){const n=je;super(e),t[n(157)]()}}}}function Hr(r,t){var e=vs();return(Hr=function(n,s){return e[n-=495]})(r,t)}function vs(){var r=["2099657cEyePl","99649QcPiFT","12DkcmPh","4307248bjBExM","4086ArBYTj","1041022aTLZWh","28240381RKoKCF","28VlVyRH","9eOZbnQ","1490nGDvTY","496221VwjTXE","85znSZqp","2VAisdw"];return(vs=function(){return r})()}return function(r){for(var t=Hr,e=r();;)try{if(-parseInt(t(496))/1*(parseInt(t(503))/2)+parseInt(t(501))/3*(parseInt(t(498))/4)+parseInt(t(502))/5*(-parseInt(t(495))/6)+parseInt(t(504))/7+parseInt(t(507))/8*(-parseInt(t(499))/9)+-parseInt(t(500))/10*(parseInt(t(505))/11)+-parseInt(t(506))/12*(-parseInt(t(497))/13)===689341)break;e.push(e.shift())}catch{e.push(e.shift())}}(vs),D.HlsJsP2PEngine=Is,D.core=sh,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),D}({});