Update Dependencies

This commit is contained in:
Leo authored and GitHub committed 2022-02-26 01:07:19 +00:00
1 parent 28c2d03f55
commit 5244cd3710
2 files changed
+563 -316

No files matched your search

+554 -307
View File
File diff suppressed because it is too large. Load diff
+9 -9
View File
@@ -1,6 +1,6 @@
!function e(t,i,n){function r(a,o){if(!i[a]){if(!t[a]){var c="function"==typeof require&&require;if(!o&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[a]={exports:{}};t[a][0].call(u.exports,(function(e){return r(t[a][1][e]||e)}),u,u.exports,e,t,i,n)}return i[a].exports}for(var s="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){(function(e){(function(){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function s(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}Object.defineProperty(i,"__esModule",{value:!0});var a=Math.max,o=Math.min,c=Math.round;function l(e,t){void 0===t&&(t=!1);var i=e.getBoundingClientRect(),n=1,s=1;if(r(e)&&t){var a=e.offsetHeight,o=e.offsetWidth;o>0&&(n=c(i.width)/o||1),a>0&&(s=c(i.height)/a||1)}return{width:i.width/n,height:i.height/s,top:i.top/s,right:i.right/n,bottom:i.bottom/s,left:i.left/n,x:i.left/n,y:i.top/s}}function u(e){var i=t(e);return{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function p(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return l(d(e)).left+u(e).scrollLeft}function h(e){return t(e).getComputedStyle(e)}function m(e){var t=h(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function b(e,i,n){void 0===n&&(n=!1);var s,a,o=r(i),h=r(i)&&function(e){var t=e.getBoundingClientRect(),i=c(t.width)/e.offsetWidth||1,n=c(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(i),b=d(i),v=l(e,h),g={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(o||!o&&!n)&&(("body"!==p(i)||m(b))&&(g=(s=i)!==t(s)&&r(s)?{scrollLeft:(a=s).scrollLeft,scrollTop:a.scrollTop}:u(s)),r(i)?((y=l(i,!0)).x+=i.clientLeft,y.y+=i.clientTop):b&&(y.x=f(b))),{x:v.left+g.scrollLeft-y.x,y:v.top+g.scrollTop-y.y,width:v.width,height:v.height}}function v(e){var t=l(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function g(e){return"html"===p(e)?e:e.assignedSlot||e.parentNode||(s(e)?e.host:null)||d(e)}function y(e){return["html","body","#document"].indexOf(p(e))>=0?e.ownerDocument.body:r(e)&&m(e)?e:y(g(e))}function _(e,i){var n;void 0===i&&(i=[]);var r=y(e),s=r===(null==(n=e.ownerDocument)?void 0:n.body),a=t(r),o=s?[a].concat(a.visualViewport||[],m(r)?r:[]):r,c=i.concat(o);return s?c:c.concat(_(g(o)))}function x(e){return["table","td","th"].indexOf(p(e))>=0}function w(e){return r(e)&&"fixed"!==h(e).position?e.offsetParent:null}function k(e){for(var i=t(e),n=w(e);n&&x(n)&&"static"===h(n).position;)n=w(n);return n&&("html"===p(n)||"body"===p(n)&&"static"===h(n).position)?i:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&r(e)&&"fixed"===h(e).position)return null;for(var i=g(e);r(i)&&["html","body"].indexOf(p(i))<0;){var n=h(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||i}var E="top",S="bottom",M="right",A="left",j="auto",I=[E,S,M,A],T="start",C="end",B="viewport",R="popper",L=I.reduce((function(e,t){return e.concat([t+"-"+T,t+"-"+C])}),[]),O=[].concat(I,[j]).reduce((function(e,t){return e.concat([t,t+"-"+T,t+"-"+C])}),[]),P=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function U(e){var t=new Map,i=new Set,n=[];function r(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&r(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||r(e)})),n}function q(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return[].concat(i).reduce((function(e,t){return e.replace(/%s/,t)}),e)}var N='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',D=["name","enabled","phase","fn","effect","requires","options"];function z(e){return e.split("-")[0]}function H(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&s(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function F(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function W(e,i){return i===B?F(function(e){var i=t(e),n=d(e),r=i.visualViewport,s=n.clientWidth,a=n.clientHeight,o=0,c=0;return r&&(s=r.width,a=r.height,/^((?!chrome|android).)*Line truncated
!function e(t,i,n){function r(a,o){if(!i[a]){if(!t[a]){var c="function"==typeof require&&require;if(!o&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[a]={exports:{}};t[a][0].call(u.exports,(function(e){return r(t[a][1][e]||e)}),u,u.exports,e,t,i,n)}return i[a].exports}for(var s="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){(function(e){(function(){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function s(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}Object.defineProperty(i,"__esModule",{value:!0});var a=Math.max,o=Math.min,c=Math.round;function l(e,t){void 0===t&&(t=!1);var i=e.getBoundingClientRect(),n=1,s=1;if(r(e)&&t){var a=e.offsetHeight,o=e.offsetWidth;o>0&&(n=c(i.width)/o||1),a>0&&(s=c(i.height)/a||1)}return{width:i.width/n,height:i.height/s,top:i.top/s,right:i.right/n,bottom:i.bottom/s,left:i.left/n,x:i.left/n,y:i.top/s}}function u(e){var i=t(e);return{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function p(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return l(d(e)).left+u(e).scrollLeft}function h(e){return t(e).getComputedStyle(e)}function m(e){var t=h(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function b(e,i,n){void 0===n&&(n=!1);var s,a,o=r(i),h=r(i)&&function(e){var t=e.getBoundingClientRect(),i=c(t.width)/e.offsetWidth||1,n=c(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(i),b=d(i),v=l(e,h),g={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(o||!o&&!n)&&(("body"!==p(i)||m(b))&&(g=(s=i)!==t(s)&&r(s)?{scrollLeft:(a=s).scrollLeft,scrollTop:a.scrollTop}:u(s)),r(i)?((y=l(i,!0)).x+=i.clientLeft,y.y+=i.clientTop):b&&(y.x=f(b))),{x:v.left+g.scrollLeft-y.x,y:v.top+g.scrollTop-y.y,width:v.width,height:v.height}}function v(e){var t=l(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function g(e){return"html"===p(e)?e:e.assignedSlot||e.parentNode||(s(e)?e.host:null)||d(e)}function y(e){return["html","body","#document"].indexOf(p(e))>=0?e.ownerDocument.body:r(e)&&m(e)?e:y(g(e))}function _(e,i){var n;void 0===i&&(i=[]);var r=y(e),s=r===(null==(n=e.ownerDocument)?void 0:n.body),a=t(r),o=s?[a].concat(a.visualViewport||[],m(r)?r:[]):r,c=i.concat(o);return s?c:c.concat(_(g(o)))}function x(e){return["table","td","th"].indexOf(p(e))>=0}function w(e){return r(e)&&"fixed"!==h(e).position?e.offsetParent:null}function k(e){for(var i=t(e),n=w(e);n&&x(n)&&"static"===h(n).position;)n=w(n);return n&&("html"===p(n)||"body"===p(n)&&"static"===h(n).position)?i:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&r(e)&&"fixed"===h(e).position)return null;for(var i=g(e);r(i)&&["html","body"].indexOf(p(i))<0;){var n=h(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||i}var E="top",S="bottom",M="right",A="left",j="auto",I=[E,S,M,A],T="start",C="end",B="viewport",R="popper",L=I.reduce((function(e,t){return e.concat([t+"-"+T,t+"-"+C])}),[]),O=[].concat(I,[j]).reduce((function(e,t){return e.concat([t,t+"-"+T,t+"-"+C])}),[]),P=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function U(e){var t=new Map,i=new Set,n=[];function r(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&r(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||r(e)})),n}function q(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return[].concat(i).reduce((function(e,t){return e.replace(/%s/,t)}),e)}var N='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',D=["name","enabled","phase","fn","effect","requires","options"];function z(e){return e.split("-")[0]}function H(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&s(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function F(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function W(e,i){return i===B?F(function(e){var i=t(e),n=d(e),r=i.visualViewport,s=n.clientWidth,a=n.clientHeight,o=0,c=0;return r&&(s=r.width,a=r.height,/^((?!chrome|android).)*Line truncated
/*! bittorrent-protocol. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const n=e("unordered-array-remove"),r=e("bencode"),s=e("bitfield").default,a=e("crypto"),o=e("debug")("bittorrent-protocol"),c=e("randombytes"),l=e("simple-sha1"),u=e("speedometer"),p=e("readable-stream"),d=e("rc4"),f=i.from("BitTorrent protocol"),h=i.from([0,0,0,0]),m=i.from([0,0,0,1,0]),b=i.from([0,0,0,1,1]),v=i.from([0,0,0,1,2]),g=i.from([0,0,0,1,3]),y=[0,0,0,0,0,0,0,0],_=[0,0,0,3,9,0,0],x=i.from([0,0,0,0,0,0,0,0]),w=i.from([0,0,1,2]),k=i.from([0,0,0,2]);function E(e,t){for(let i=e.length;i--;)e[i]^=t[i];return e}class S{constructor(e,t,i,n){this.piece=e,this.offset=t,this.length=i,this.callback=n}}class M extends p.Duplex{constructor(e=null,t=0,i=!1){super(),this._debugId=c(4).toString("hex"),this._debug("new wire"),this.peerId=null,this.peerIdBuffer=null,this.type=e,this.amChoking=!0,this.amInterested=!1,this.peerChoking=!0,this.peerInterested=!1,this.peerPieces=new s(0,{grow:4e5}),this.peerExtensions={},this.requests=[],this.peerRequests=[],this.extendedMapping={},this.peerExtendedMapping={},this.extendedHandshake={},this.peerExtendedHandshake={},this._ext={},this._nextExt=1,this.uploaded=0,this.downloaded=0,this.uploadSpeed=u(),this.downloadSpeed=u(),this._keepAliveInterval=null,this._timeout=null,this._timeoutMs=0,this._timeoutExpiresAt=null,this.destroyed=!1,this._finished=!1,this._parserSize=0,this._parser=null,this._buffer=[],this._bufferSize=0,this._peEnabled=i,i?(this._dh=a.createDiffieHellman("ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a36210000000000090563","hex",2),this._myPubKey=this._dh.generateKeys("hex")):this._myPubKey=null,this._peerPubKey=null,this._sharedSecret=null,this._peerCryptoProvide=[],this._cryptoHandshakeDone=!1,this._cryptoSyncPattern=null,this._waitMaxBytes=null,this._encryptionMethod=null,this._encryptGenerator=null,this._decryptGenerator=null,this._setGenerators=!1,this.once("finish",(()=>this._onFinish())),this.on("finish",this._onFinish),this._debug("type:",this.type),"tcpIncoming"===this.type&&this._peEnabled?this._determineHandshakeType():"tcpOutgoing"===this.type&&this._peEnabled&&0===t?this._parsePe2():this._parseHandshake(null)}setKeepAlive(e){this._debug("setKeepAlive %s",e),clearInterval(this._keepAliveInterval),!1!==e&&(this._keepAliveInterval=setInterval((()=>{this.keepAlive()}),55e3))}setTimeout(e,t){this._debug("setTimeout ms=%d unref=%s",e,t),this._timeoutMs=e,this._timeoutUnref=!!t,this._resetTimeout(!0)}destroy(){this.destroyed||(this.destroyed=!0,this._debug("destroy"),this.emit("close"),this.end())}end(...e){this._debug("end"),this._onUninterested(),this._onChoke(),super.end(...e)}use(e){const t=e.prototype.name;if(!t)throw new Error('Extension class requires a "name" property on the prototype');this._debug("use extension.name=%s",t);const i=this._nextExt,n=new e(this);function r(){}"function"!=typeof n.onHandshake&&(n.onHandshake=r),"function"!=typeof n.onExtendedHandshake&&(n.onExtendedHandshake=r),"function"!=typeof n.onMessage&&(n.onMessage=r),this.extendedMapping[i]=t,this._ext[t]=n,this[t]=n,this._nextExt+=1}keepAlive(){this._debug("keep-alive"),this._push(h)}sendPe1(){if(this._peEnabled){const e=Math.floor(513*Math.random()),t=c(e);this._push(i.concat([i.from(this._myPubKey,"hex"),t]))}}sendPe2(){const e=Math.floor(513*Math.random()),t=c(e);this._push(i.concat([i.from(this._myPubKey,"hex"),t]))}sendPe3(e){this.setEncrypt(this._sharedSecret,e);const t=i.from(l.sync(i.from(this._utfToHex("req1")+this._sharedSecret,"hex")),"hex"),n=E(i.from(l.sync(i.from(this._utfToHex("req2")+e,"hex")),"hex"),i.from(l.sync(i.from(this._utfToHex("req3")+this._sharedSecret,"hex")),"hex")),r=c(2).readUInt16BE(0)%512,s=c(r);let a=i.alloc(14+r+2);x.copy(a),w.copy(a,8),a.writeInt16BE(r,12),s.copy(a,14),a.writeInt16BE(0,14+r),a=this._encryptHandshake(a),this._push(i.concat([t,n,a]))}sendPe4(e){this.setEncrypt(this._sharedSecret,e);const t=c(2).readUInt16BE(0)%512,n=c(t);let r=i.alloc(14+t);x.copy(r),k.copy(r,8),r.writeInt16BE(t,12),n.copy(r,14),r=this._encryptHandshake(r),this._push(r),this._cryptoHandshakeDone=!0,this._debug("completed crypto handshake")}handshake(e,t,n){let r,s;if("string"==typeof e?(e=e.toLowerCase(),r=i.from(e,"hex")):(r=e,e=r.toString("hex")),"string"==typeof t?s=i.from(t,"hex"):(s=t,t=s.toString("hex")),this._infoHash=r,20!==r.length||20!==s.length)throw new Error("infoHash and peerId MUST have length 20");this._debug("handshake i=%s p=%s exts=%o",e,t,n);const a=i.from(y);a[5]|=16,n&&n.dht&&(a[7]|=1),this._push(i.concat([f,a,r,s])),this._handshakeSent=!0,this.peerExtensions.extended&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_sendExtendedHandshake(){const e=Object.assign({},this.extendedHandshake);e.m={};for(const t in this.extendedMapping){const i=this.extendedMapping[t];e.m[i]=Number(t)}this.extended(0,r.encode(e)),this._extendedHandshakeSent=!0}choke(){if(!this.amChoking){for(this.amChoking=!0,this._dLine truncated
const n=e("unordered-array-remove"),r=e("bencode"),s=e("bitfield").default,a=e("crypto"),o=e("debug")("bittorrent-protocol"),c=e("randombytes"),l=e("simple-sha1"),u=e("speedometer"),p=e("readable-stream"),d=e("rc4"),f=i.from("BitTorrent protocol"),h=i.from([0,0,0,0]),m=i.from([0,0,0,1,0]),b=i.from([0,0,0,1,1]),v=i.from([0,0,0,1,2]),g=i.from([0,0,0,1,3]),y=[0,0,0,0,0,0,0,0],_=[0,0,0,3,9,0,0],x=i.from([0,0,0,1,14]),w=i.from([0,0,0,1,15]),k=i.from([0,0,0,0,0,0,0,0]),E=i.from([0,0,1,2]),S=i.from([0,0,0,2]);function M(e,t){for(let i=e.length;i--;)e[i]^=t[i];return e}class A{constructor(e,t,i,n){this.piece=e,this.offset=t,this.length=i,this.callback=n}}class j{constructor(){this.buffer=new Uint8Array}get(e){return!0}set(e){}}class I extends p.Duplex{constructor(e=null,t=0,i=!1){super(),this._debugId=c(4).toString("hex"),this._debug("new wire"),this.peerId=null,this.peerIdBuffer=null,this.type=e,this.amChoking=!0,this.amInterested=!1,this.peerChoking=!0,this.peerInterested=!1,this.peerPieces=new s(0,{grow:4e5}),this.extensions={},this.peerExtensions={},this.requests=[],this.peerRequests=[],this.extendedMapping={},this.peerExtendedMapping={},this.extendedHandshake={},this.peerExtendedHandshake={},this.hasFast=!1,this.allowedFastSet=[],this.peerAllowedFastSet=[],this._ext={},this._nextExt=1,this.uploaded=0,this.downloaded=0,this.uploadSpeed=u(),this.downloadSpeed=u(),this._keepAliveInterval=null,this._timeout=null,this._timeoutMs=0,this._timeoutExpiresAt=null,this.destroyed=!1,this._finished=!1,this._parserSize=0,this._parser=null,this._buffer=[],this._bufferSize=0,this._peEnabled=i,i?(this._dh=a.createDiffieHellman("ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a36210000000000090563","hex",2),this._myPubKey=this._dh.generateKeys("hex")):this._myPubKey=null,this._peerPubKey=null,this._sharedSecret=null,this._peerCryptoProvide=[],this._cryptoHandshakeDone=!1,this._cryptoSyncPattern=null,this._waitMaxBytes=null,this._encryptionMethod=null,this._encryptGenerator=null,this._decryptGenerator=null,this._setGenerators=!1,this.once("finish",(()=>this._onFinish())),this.on("finish",this._onFinish),this._debug("type:",this.type),"tcpIncoming"===this.type&&this._peEnabled?this._determineHandshakeType():"tcpOutgoing"===this.type&&this._peEnabled&&0===t?this._parsePe2():this._parseHandshake(null)}setKeepAlive(e){this._debug("setKeepAlive %s",e),clearInterval(this._keepAliveInterval),!1!==e&&(this._keepAliveInterval=setInterval((()=>{this.keepAlive()}),55e3))}setTimeout(e,t){this._debug("setTimeout ms=%d unref=%s",e,t),this._timeoutMs=e,this._timeoutUnref=!!t,this._resetTimeout(!0)}destroy(){if(!this.destroyed)return this.destroyed=!0,this._debug("destroy"),this.emit("close"),this.end(),this}end(...e){return this._debug("end"),this._onUninterested(),this._onChoke(),super.end(...e)}use(e){const t=e.prototype.name;if(!t)throw new Error('Extension class requires a "name" property on the prototype');this._debug("use extension.name=%s",t);const i=this._nextExt,n=new e(this);function r(){}"function"!=typeof n.onHandshake&&(n.onHandshake=r),"function"!=typeof n.onExtendedHandshake&&(n.onExtendedHandshake=r),"function"!=typeof n.onMessage&&(n.onMessage=r),this.extendedMapping[i]=t,this._ext[t]=n,this[t]=n,this._nextExt+=1}keepAlive(){this._debug("keep-alive"),this._push(h)}sendPe1(){if(this._peEnabled){const e=Math.floor(513*Math.random()),t=c(e);this._push(i.concat([i.from(this._myPubKey,"hex"),t]))}}sendPe2(){const e=Math.floor(513*Math.random()),t=c(e);this._push(i.concat([i.from(this._myPubKey,"hex"),t]))}sendPe3(e){this.setEncrypt(this._sharedSecret,e);const t=i.from(l.sync(i.from(this._utfToHex("req1")+this._sharedSecret,"hex")),"hex"),n=M(i.from(l.sync(i.from(this._utfToHex("req2")+e,"hex")),"hex"),i.from(l.sync(i.from(this._utfToHex("req3")+this._sharedSecret,"hex")),"hex")),r=c(2).readUInt16BE(0)%512,s=c(r);let a=i.alloc(14+r+2);k.copy(a),E.copy(a,8),a.writeInt16BE(r,12),s.copy(a,14),a.writeInt16BE(0,14+r),a=this._encryptHandshake(a),this._push(i.concat([t,n,a]))}sendPe4(e){this.setEncrypt(this._sharedSecret,e);const t=c(2).readUInt16BE(0)%512,n=c(t);let r=i.alloc(14+t);k.copy(r),S.copy(r,8),r.writeInt16BE(t,12),n.copy(r,14),r=this._encryptHandshake(r),this._push(r),this._cryptoHandshakeDone=!0,this._debug("completed crypto handshake")}handshake(e,t,n){let r,s;if("string"==typeof e?(e=e.toLowerCase(),r=i.from(e,"hex")):(r=e,e=r.toString("hex")),"string"==typeof t?s=i.from(t,"hex"):(s=t,t=s.toString("hex")),this._infoHash=r,20!==r.length||20!==s.length)throw new Error("infoHash and peerId MUST have length 20");this._debug("handshake i=%s p=%s exts=%o",e,t,n);const a=i.from(y);this.extensions={extended:!0,dht:!(!n||!n.dht),fast:!(!n||!n.fast)},a[5]|=16,this.extensions.dht&&(a[7]|=1),this.extensions.fast&&(a[7]|=4),this.extensions.fast&&this.peerExtensions.fast&&(this._debug("fast extension is enabled"),thiLine truncated
/*! blob-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.exports=function(t,i){if("undefined"==typeof Blob||!(t instanceof Blob))throw new Error("first argument must be a Blob");if("function"!=typeof i)throw new Error("second argument must be a function");const n=new FileReader;n.addEventListener("loadend",(function t(r){n.removeEventListener("loadend",t,!1),r.error?i(r.error):i(null,e.from(n.result))}),!1),n.readAsArrayBuffer(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:110}],49:[function(e,t,i){(function(i){(function(){const{Transform:n}=e("readable-stream");t.exports=class extends n{constructor(e,t={}){super(t),"object"==typeof e&&(e=(t=e).size),this.size=e||512;const{nopad:i,zeroPadding:n=!0}=t;this._zeroPadding=!i&&!!n,this._buffered=[],this._bufferedBytes=0}_transform(e,t,n){for(this._bufferedBytes+=e.length,this._buffered.push(e);this._bufferedBytes>=this.size;){this._bufferedBytes-=this.size;const e=[];let t=0;for(;t<this.size;){const i=this._buffered.shift();if(t+i.length<=this.size)e.push(i),t+=i.length;else{const n=this.size-t;e.push(i.slice(0,n)),t+=n,this._buffered.unshift(i.slice(n))}}this.push(i.concat(e,this.size))}n()}_flush(){if(this._bufferedBytes&&this._zeroPadding){const e=i.alloc(this.size-this._bufferedBytes);this._buffered.push(e),this.push(i.concat(this._buffered)),this._buffered=null}else this._bufferedBytes&&(this.push(i.concat(this._buffered)),this._buffered=null);this.push(null)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:110,"readable-stream":64}],50:[function(e,t,i){arguments[4][29][0].apply(i,arguments)},{dup:29}],51:[function(e,t,i){arguments[4][30][0].apply(i,arguments)},{"./_stream_readable":53,"./_stream_writable":55,_process:341,dup:30,inherits:246}],52:[function(e,t,i){arguments[4][31][0].apply(i,arguments)},{"./_stream_transform":54,dup:31,inherits:246}],53:[function(e,t,i){arguments[4][32][0].apply(i,arguments)},{"../errors":50,"./_stream_duplex":51,"./internal/streams/async_iterator":56,"./internal/streams/buffer_list":57,"./internal/streams/destroy":58,"./internal/streams/from":60,"./internal/streams/state":62,"./internal/streams/stream":63,_process:341,buffer:110,dup:32,events:193,inherits:246,"string_decoder/":472,util:67}],54:[function(e,t,i){arguments[4][33][0].apply(i,arguments)},{"../errors":50,"./_stream_duplex":51,dup:33,inherits:246}],55:[function(e,t,i){arguments[4][34][0].apply(i,arguments)},{"../errors":50,"./_stream_duplex":51,"./internal/streams/destroy":58,"./internal/streams/state":62,"./internal/streams/stream":63,_process:341,buffer:110,dup:34,inherits:246,"util-deprecate":485}],56:[function(e,t,i){arguments[4][35][0].apply(i,arguments)},{"./end-of-stream":59,_process:341,dup:35}],57:[function(e,t,i){arguments[4][36][0].apply(i,arguments)},{buffer:110,dup:36,util:67}],58:[function(e,t,i){arguments[4][37][0].apply(i,arguments)},{_process:341,dup:37}],59:[function(e,t,i){arguments[4][38][0].apply(i,arguments)},{"../../../errors":50,dup:38}],60:[function(e,t,i){arguments[4][39][0].apply(i,arguments)},{dup:39}],61:[function(e,t,i){arguments[4][40][0].apply(i,arguments)},{"../../../errors":50,"./end-of-stream":59,dup:40}],62:[function(e,t,i){arguments[4][41][0].apply(i,arguments)},{"../../../errors":50,dup:41}],63:[function(e,t,i){arguments[4][42][0].apply(i,arguments)},{dup:42,events:193}],64:[function(e,t,i){arguments[4][43][0].apply(i,arguments)},{"./lib/_stream_duplex.js":51,"./lib/_stream_passthrough.js":52,"./lib/_stream_readable.js":53,"./lib/_stream_transform.js":54,"./lib/_stream_writable.js":55,"./lib/internal/streams/end-of-stream.js":59,"./lib/internal/streams/pipeline.js":61,dup:43}],65:[function(e,t,i){!function(t,i){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function s(e,t,i){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var a;"object"==typeof t?t.exports=s:i.BN=s,s.BN=s,s.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e("buffer").Buffer}catch(e){}function o(e,t){var i=e.charCodeAt(t);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void n(!1,"Invalid character in "+e)}function c(e,t,i){var n=o(e,i);return i-1>=t&&(n|=o(e,i-1)<<4),n}function l(e,t,i,r){for(var s=0,a=0,o=Math.min(e.length,i),c=t;c<o;c++){var l=e.charCodeAt(c)-48;s*=r,a=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&a<r,"Invalid character"),s+=a}return s}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),n(t=Line truncated
/*!
@@ -16,18 +16,18 @@ t.exports=function(t,i){if("undefined"==typeof Blob||!(t instanceof Blob))throw
* Copyright(c) 2015 Jed Watson
* MIT Licensed
*/
"use strict";t.exports=function(e,t){if("string"==typeof e)return c(e);if("number"==typeof e)return o(e,t);return null},t.exports.format=o,t.exports.parse=c;var n=/\B(?=(\d{3})+(?!\d))/g,r=/(?:\.0*|(\.[^0]+)0+)$/,s={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},a=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function o(e,t){if(!Number.isFinite(e))return null;var i=Math.abs(e),a=t&&t.thousandsSeparator||"",o=t&&t.unitSeparator||"",c=t&&void 0!==t.decimalPlaces?t.decimalPlaces:2,l=Boolean(t&&t.fixedDecimals),u=t&&t.unit||"";u&&s[u.toLowerCase()]||(u=i>=s.pb?"PB":i>=s.tb?"TB":i>=s.gb?"GB":i>=s.mb?"MB":i>=s.kb?"KB":"B");var p=(e/s[u.toLowerCase()]).toFixed(c);return l||(p=p.replace(r,"$1")),a&&(p=p.split(".").map((function(e,t){return 0===t?e.replace(n,a):e})).join(".")),p+o+u}function c(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,i=a.exec(e),n="b";return i?(t=parseFloat(i[1]),n=i[4].toLowerCase()):(t=parseInt(e,10),n="b"),Math.floor(s[n]*t)}},{}],117:[function(e,t,i){
"use strict";t.exports=function(e,t){if("string"==typeof e)return c(e);if("number"==typeof e)return o(e,t);return null},t.exports.format=o,t.exports.parse=c;var n=/\B(?=(\d{3})+(?!\d))/g,r=/(?:\.0*|(\.[^0]+)0+)$/,s={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},a=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function o(e,t){if(!Number.isFinite(e))return null;var i=Math.abs(e),a=t&&t.thousandsSeparator||"",o=t&&t.unitSeparator||"",c=t&&void 0!==t.decimalPlaces?t.decimalPlaces:2,l=Boolean(t&&t.fixedDecimals),u=t&&t.unit||"";u&&s[u.toLowerCase()]||(u=i>=s.pb?"PB":i>=s.tb?"TB":i>=s.gb?"GB":i>=s.mb?"MB":i>=s.kb?"KB":"B");var p=(e/s[u.toLowerCase()]).toFixed(c);return l||(p=p.replace(r,"$1")),a&&(p=p.split(".").map((function(e,t){return 0===t?e.replace(n,a):e})).join(".")),p+o+u}function c(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,i=a.exec(e),n="b";return i?(t=parseFloat(i[1]),n=i[4].toLowerCase()):(t=parseInt(e,10),n="b"),isNaN(t)?null:Math.floor(s[n]*t)}},{}],117:[function(e,t,i){
/*! cache-chunk-store. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
const n=e("lru"),r=e("queue-microtask");t.exports=class{constructor(e,t){if(this.store=e,this.chunkLength=e.chunkLength,this.inProgressGets=new Map,!this.store||!this.store.get||!this.store.put)throw new Error("First argument must be abstract-chunk-store compliant");this.cache=new n(t)}put(e,t,i=(()=>{})){if(!this.cache)return r((()=>i(new Error("CacheStore closed"))));this.cache.remove(e),this.store.put(e,t,i)}get(e,t,i=(()=>{})){if("function"==typeof t)return this.get(e,null,t);if(!this.cache)return r((()=>i(new Error("CacheStore closed"))));t||(t={});let n=this.cache.get(e);if(n){const e=t.offset||0,s=t.length||n.length-e;return 0===e&&s===n.length||(n=n.slice(e,s+e)),r((()=>i(null,n)))}let s=this.inProgressGets.get(e);const a=!!s;s||(s=[],this.inProgressGets.set(e,s)),s.push({opts:t,cb:i}),a||this.store.get(e,((t,i)=>{t||null==this.cache||this.cache.set(e,i);const n=this.inProgressGets.get(e);this.inProgressGets.delete(e);for(const{opts:e,cb:r}of n)if(t)r(t);else{const t=e.offset||0,n=e.length||i.length-t;let s=i;0===t&&n===i.length||(s=i.slice(t,n+t)),r(null,s)}}))}close(e=(()=>{})){if(!this.cache)return r((()=>e(new Error("CacheStore closed"))));this.cache=null,this.store.close(e)}destroy(e=(()=>{})){if(!this.cache)return r((()=>e(new Error("CacheStore closed"))));this.cache=null,this.store.destroy(e)}}},{lru:255,"queue-microtask":354}],118:[function(e,t,i){arguments[4][29][0].apply(i,arguments)},{dup:29}],119:[function(e,t,i){arguments[4][30][0].apply(i,arguments)},{"./_stream_readable":121,"./_stream_writable":123,_process:341,dup:30,inherits:246}],120:[function(e,t,i){arguments[4][31][0].apply(i,arguments)},{"./_stream_transform":122,dup:31,inherits:246}],121:[function(e,t,i){arguments[4][32][0].apply(i,arguments)},{"../errors":118,"./_stream_duplex":119,"./internal/streams/async_iterator":124,"./internal/streams/buffer_list":125,"./internal/streams/destroy":126,"./internal/streams/from":128,"./internal/streams/state":130,"./internal/streams/stream":131,_process:341,buffer:110,dup:32,events:193,inherits:246,"string_decoder/":472,util:67}],122:[function(e,t,i){arguments[4][33][0].apply(i,arguments)},{"../errors":118,"./_stream_duplex":119,dup:33,inherits:246}],123:[function(e,t,i){arguments[4][34][0].apply(i,arguments)},{"../errors":118,"./_stream_duplex":119,"./internal/streams/destroy":126,"./internal/streams/state":130,"./internal/streams/stream":131,_process:341,buffer:110,dup:34,inherits:246,"util-deprecate":485}],124:[function(e,t,i){arguments[4][35][0].apply(i,arguments)},{"./end-of-stream":127,_process:341,dup:35}],125:[function(e,t,i){arguments[4][36][0].apply(i,arguments)},{buffer:110,dup:36,util:67}],126:[function(e,t,i){arguments[4][37][0].apply(i,arguments)},{_process:341,dup:37}],127:[function(e,t,i){arguments[4][38][0].apply(i,arguments)},{"../../../errors":118,dup:38}],128:[function(e,t,i){arguments[4][39][0].apply(i,arguments)},{dup:39}],129:[function(e,t,i){arguments[4][40][0].apply(i,arguments)},{"../../../errors":118,"./end-of-stream":127,dup:40}],130:[function(e,t,i){arguments[4][41][0].apply(i,arguments)},{"../../../errors":118,dup:41}],131:[function(e,t,i){arguments[4][42][0].apply(i,arguments)},{dup:42,events:193}],132:[function(e,t,i){arguments[4][43][0].apply(i,arguments)},{"./lib/_stream_duplex.js":119,"./lib/_stream_passthrough.js":120,"./lib/_stream_readable.js":121,"./lib/_stream_transform.js":122,"./lib/_stream_writable.js":123,"./lib/internal/streams/end-of-stream.js":127,"./lib/internal/streams/pipeline.js":129,dup:43}],133:[function(e,t,i){const n=e("block-stream2"),r=e("readable-stream");class s extends r.Writable{constructor(e,t,i={}){if(super(i),!e||!e.put||!e.get)throw new Error("First argument must be an abstract-chunk-store compliant store");if(!(t=Number(t)))throw new Error("Second argument must be a chunk length");const r=void 0!==i.zeroPadding&&i.zeroPadding;this._blockstream=new n(t,{...i,zeroPadding:r}),this._outstandingPuts=0,this._storeMaxOutstandingPuts=i.storeMaxOutstandingPuts||16;let s=0;this._blockstream.on("data",(t=>{this.destroyed||(this._outstandingPuts+=1,this._outstandingPuts>=this._storeMaxOutstandingPuts&&this._blockstream.pause(),e.put(s,t,(e=>{if(e)return this.destroy(e);this._outstandingPuts-=1,this._outstandingPuts<this._storeMaxOutstandingPuts&&this._blockstream.resume(),0===this._outstandingPuts&&"function"==typeof this._finalCb&&(this._finalCb(null),this._finalCb=null)})),s+=1)})).on("error",(e=>{this.destroy(e)}))}_write(e,t,i){this._blockstream.write(e,t,i)}_final(e){this._blockstream.end(),this._blockstream.once("end",(()=>{0===this._outstandingPuts?e(null):this._finalCb=e}))}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))}}t.exports=s},{"block-stream2":49,"readable-stream":132}],134:[function(e,t,i){var n=e("safe-buffer").Buffer,r=e("stream").Transform,s=e("string_decoder").StringDecoder;function a(e){r.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigestLine truncated
/*!
* clipboard.js v2.0.8
* clipboard.js v2.0.10
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
var n,r;n=this,r=function(){return function(){var e={134:function(e,t,i){"use strict";i.d(t,{default:function(){return x}});var n=i(279),r=i.n(n),s=i(370),a=i.n(s),o=i(817),c=i.n(o);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}var t,i,n;return t=e,i=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var e=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=c()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=c()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==l(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}],i&&u(t.prototype,i),n&&u(t,n),e}(),d=p;function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=g(e);if(t){var r=g(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return v(this,i)}}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function y(e,t){var i="data-clipboard-".conLine truncated
var n,r;n=this,r=function(){return function(){var e={686:function(e,t,i){"use strict";i.d(t,{default:function(){return k}});var n=i(279),r=i.n(n),s=i(370),a=i.n(s),o=i(817),c=i.n(o);function l(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=c()(e);return l("cut"),t};function p(e){var t="rtl"===document.documentElement.getAttribute("dir"),i=document.createElement("textarea");i.style.fontSize="12pt",i.style.border="0",i.style.padding="0",i.style.margin="0",i.style.position="absolute",i.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;return i.style.top="".concat(n,"px"),i.setAttribute("readonly",""),i.value=e,i}var d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},i="";if("string"==typeof e){var n=p(e);t.container.appendChild(n),i=c()(n),l("copy"),n.remove()}else i=c()(e),l("copy");return i};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}var h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,i=void 0===t?"copy":t,n=e.container,r=e.target,s=e.text;if("copy"!==i&&"cut"!==i)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==r){if(!r||"object"!==f(r)||1!==r.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===i&&r.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===i&&(r.hasAttribute("readonly")||r.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return s?d(s,{container:n}):r?"cut"===i?u(r):d(r,{container:n}):void 0};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=_(e);if(t){var r=_(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return y(this,i)}}function y(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function x(e,t){var i="data-clipboard-".concat(e);if(t.hasAttribute(i))return t.getAttribute(i)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(s,e);var t,i,n,r=g(s);function s(e,t){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(i=r.call(this)).resolveOptions(t),i.listenClick(e),i}return t=s,i=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===m(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,i=this.action(t)||"copy",n=h({action:i,container:this.container,target:this.target(t),text:this.text(t)});this.emit(n?"success":"error",{action:i,text:n,trigger:t,clearSelection:function(){t&&t.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return x("action",e)}},{key:"defaultTarget",value:function(e){var t=x("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return x("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],n=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return d(e,t)}},{key:"cut",value:function(e){returLine truncated
/*! create-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const n=e("bencode"),r=e("block-stream2"),s=e("piece-length"),a=e("path"),o=e("filestream/read"),c=e("is-file"),l=e("junk"),u=e("multistream"),p=e("once"),d=e("run-parallel"),f=e("queue-microtask"),h=e("simple-sha1"),m=e("readable-stream"),b=e("./get-files");function v(e,t,n){var r;if(r=e,"undefined"!=typeof FileList&&r instanceof FileList&&(e=Array.from(e)),Array.isArray(e)||(e=[e]),0===e.length)throw new Error("invalid input type");e.forEach((e=>{if(null==e)throw new Error(`invalid input type: ${e}`)})),1!==(e=e.map((e=>_(e)&&"string"==typeof e.path&&"function"==typeof b?e.path:e))).length||"string"==typeof e[0]||e[0].name||(e[0].name=t.name);let s=null;e.forEach(((t,i)=>{if("string"==typeof t)return;let n=t.fullPath||t.name;n||(n=`Unknown File ${i+1}`,t.unknownName=!0),t.path=n.split("/"),t.path[0]||t.path.shift(),t.path.length<2?s=null:0===i&&e.length>1?s=t.path[0]:t.path[0]!==s&&(s=null)}));(void 0===t.filterJunkFiles||t.filterJunkFiles)&&(e=e.filter((e=>"string"==typeof e||!g(e.path)))),s&&e.forEach((e=>{const t=(i.isBuffer(e)||x(e))&&!e.path;"string"==typeof e||t||e.path.shift()})),!t.name&&s&&(t.name=s),t.name||e.some((e=>"string"==typeof e?(t.name=a.basename(e),!0):!e.unknownName&&(t.name=e.path[e.path.length-1],!0))),t.name||(t.name=`Unnamed Torrent ${Date.now()}`);const l=e.reduce(((e,t)=>e+Number("string"==typeof t)),0);let u=1===e.length;if(1===e.length&&"string"==typeof e[0]){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");c(e[0],((e,t)=>{if(e)return n(e);u=t,p()}))}else f(p);function p(){d(e.map((e=>t=>{const n={};if(_(e))n.getStream=function(e){return()=>new o(e)}(e),n.length=e.size;else if(i.isBuffer(e))n.getStream=(r=e,()=>{const e=new m.PassThrough;return e.end(r),e}),n.length=e.length;else{if(!x(e)){if("string"==typeof e){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");return void b(e,l>1||u,t)}throw new Error("invalid input type")}n.getStream=function(e,t){return()=>{const i=new m.Transform;return i._transform=function(e,i,n){t.length+=e.length,this.push(e),n()},e.pipe(i),i}}(e,n),n.length=0}var r;n.path=e.path,t(null,n)})),((e,t)=>{if(e)return n(e);t=t.flat(),n(null,t,u)}))}}function g(e){const t=e[e.length-1];return"."===t[0]&&l.is(t)}function y(e,t){return e+t.length}function _(e){return"undefined"!=typeof Blob&&e instanceof Blob}function x(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}t.exports=function(e,a,o){"function"==typeof a&&([a,o]=[o,a]),v(e,a=a?Object.assign({},a):{},((e,c,l)=>{if(e)return o(e);a.singleFileTorrent=l,function(e,a,o){let c=a.announceList;c||("string"==typeof a.announce?c=[[a.announce]]:Array.isArray(a.announce)&&(c=a.announce.map((e=>[e]))));c||(c=[]);globalThis.WEBTORRENT_ANNOUNCE&&("string"==typeof globalThis.WEBTORRENT_ANNOUNCE?c.push([[globalThis.WEBTORRENT_ANNOUNCE]]):Array.isArray(globalThis.WEBTORRENT_ANNOUNCE)&&(c=c.concat(globalThis.WEBTORRENT_ANNOUNCE.map((e=>[e])))));void 0===a.announce&&void 0===a.announceList&&(c=c.concat(t.exports.announceList));"string"==typeof a.urlList&&(a.urlList=[a.urlList]);const l={info:{name:a.name},"creation date":Math.ceil((Number(a.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==c.length&&(l.announce=c[0][0],l["announce-list"]=c);void 0!==a.comment&&(l.comment=a.comment);void 0!==a.createdBy&&(l["created by"]=a.createdBy);void 0!==a.private&&(l.info.private=Number(a.private));void 0!==a.info&&Object.assign(l.info,a.info);void 0!==a.sslCert&&(l.info["ssl-cert"]=a.sslCert);void 0!==a.urlList&&(l["url-list"]=a.urlList);const d=e.reduce(y,0),f=a.pieceLength||s(d);l.info["piece length"]=f,function(e,t,n,s,a){a=p(a);const o=[];let c=0,l=0;const d=e.map((e=>e.getStream));let f=0,m=0,b=!1;const v=new u(d),g=new r(t,{zeroPadding:!1});function y(e){c+=e.length;const t=m;h(e,(i=>{o[t]=i,f-=1,f<5&&g.resume(),l+=e.length,s.onProgress&&s.onProgress(l,n),k()})),f+=1,f>=5&&g.pause(),m+=1}function _(){b=!0,k()}function x(e){w(),a(e)}function w(){v.removeListener("error",x),g.removeListener("data",y),g.removeListener("end",_),g.removeListener("error",x)}function k(){b&&0===f&&(w(),a(null,i.from(o.join(""),"hex"),c))}v.on("error",x),v.pipe(g).on("data",y).on("end",_).on("error",x)}(e,f,d,a,((t,i,r)=>{if(t)return o(t);l.info.pieces=i,e.forEach((e=>{delete e.getStream})),a.singleFileTorrent?l.info.length=r:l.info.files=e,o(null,n.encode(l))}))}(c,a,o)}))},t.exports.parseInput=function(e,t,i){"function"==typeof t&&([t,i]=[i,t]),v(e,t=t?Object.assign({},t):{},i)},t.exports.announceList=[["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://tracker.opentrackr.org:1337"],["udp://explodie.org:6969"],["udp://tracker.empire-js.us:1337"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"]],t.exports.isJunkPath=g}).call(this)}).call(this,e("buffer").Buffer)},{"./get-files":67,bencode:23,"block-stream2":49,buffer:110,"filestream/read":212,"is-file":67,junk:250,multistream:309,once:326,path:333,Line truncated
const n=e("bencode"),r=e("block-stream2"),s=e("piece-length"),a=e("path"),o=e("filestream/read"),c=e("is-file"),l=e("junk"),u=e("multistream"),p=e("once"),d=e("run-parallel"),f=e("queue-microtask"),h=e("simple-sha1"),m=e("readable-stream"),b=e("./get-files");function v(e,t,n){var r;if(r=e,"undefined"!=typeof FileList&&r instanceof FileList&&(e=Array.from(e)),Array.isArray(e)||(e=[e]),0===e.length)throw new Error("invalid input type");e.forEach((e=>{if(null==e)throw new Error(`invalid input type: ${e}`)})),1!==(e=e.map((e=>_(e)&&"string"==typeof e.path&&"function"==typeof b?e.path:e))).length||"string"==typeof e[0]||e[0].name||(e[0].name=t.name);let s=null;e.forEach(((t,i)=>{if("string"==typeof t)return;let n=t.fullPath||t.name;n||(n=`Unknown File ${i+1}`,t.unknownName=!0),t.path=n.split("/"),t.path[0]||t.path.shift(),t.path.length<2?s=null:0===i&&e.length>1?s=t.path[0]:t.path[0]!==s&&(s=null)}));(void 0===t.filterJunkFiles||t.filterJunkFiles)&&(e=e.filter((e=>"string"==typeof e||!g(e.path)))),s&&e.forEach((e=>{const t=(i.isBuffer(e)||x(e))&&!e.path;"string"==typeof e||t||e.path.shift()})),!t.name&&s&&(t.name=s),t.name||e.some((e=>"string"==typeof e?(t.name=a.basename(e),!0):!e.unknownName&&(t.name=e.path[e.path.length-1],!0))),t.name||(t.name=`Unnamed Torrent ${Date.now()}`);const l=e.reduce(((e,t)=>e+Number("string"==typeof t)),0);let u=1===e.length;if(1===e.length&&"string"==typeof e[0]){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");c(e[0],((e,t)=>{if(e)return n(e);u=t,p()}))}else f(p);function p(){d(e.map((e=>t=>{const n={};if(_(e))n.getStream=function(e){return()=>new o(e)}(e),n.length=e.size;else if(i.isBuffer(e))n.getStream=(r=e,()=>{const e=new m.PassThrough;return e.end(r),e}),n.length=e.length;else{if(!x(e)){if("string"==typeof e){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");return void b(e,l>1||u,t)}throw new Error("invalid input type")}n.getStream=function(e,t){return()=>{const i=new m.Transform;return i._transform=function(e,i,n){t.length+=e.length,this.push(e),n()},e.pipe(i),i}}(e,n),n.length=0}var r;n.path=e.path,t(null,n)})),((e,t)=>{if(e)return n(e);t=t.flat(),n(null,t,u)}))}}function g(e){const t=e[e.length-1];return"."===t[0]&&l.is(t)}function y(e,t){return e+t.length}function _(e){return"undefined"!=typeof Blob&&e instanceof Blob}function x(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}t.exports=function(e,a,o){"function"==typeof a&&([a,o]=[o,a]),v(e,a=a?Object.assign({},a):{},((e,c,l)=>{if(e)return o(e);a.singleFileTorrent=l,function(e,a,o){let c=a.announceList;c||("string"==typeof a.announce?c=[[a.announce]]:Array.isArray(a.announce)&&(c=a.announce.map((e=>[e]))));c||(c=[]);globalThis.WEBTORRENT_ANNOUNCE&&("string"==typeof globalThis.WEBTORRENT_ANNOUNCE?c.push([[globalThis.WEBTORRENT_ANNOUNCE]]):Array.isArray(globalThis.WEBTORRENT_ANNOUNCE)&&(c=c.concat(globalThis.WEBTORRENT_ANNOUNCE.map((e=>[e])))));void 0===a.announce&&void 0===a.announceList&&(c=c.concat(t.exports.announceList));"string"==typeof a.urlList&&(a.urlList=[a.urlList]);const l={info:{name:a.name},"creation date":Math.ceil((Number(a.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==c.length&&(l.announce=c[0][0],l["announce-list"]=c);void 0!==a.comment&&(l.comment=a.comment);void 0!==a.createdBy&&(l["created by"]=a.createdBy);void 0!==a.private&&(l.info.private=Number(a.private));void 0!==a.info&&Object.assign(l.info,a.info);void 0!==a.sslCert&&(l.info["ssl-cert"]=a.sslCert);void 0!==a.urlList&&(l["url-list"]=a.urlList);const d=e.reduce(y,0),f=a.pieceLength||s(d);l.info["piece length"]=f,function(e,t,n,s,a){a=p(a);const o=[];let c=0,l=0;const d=e.map((e=>e.getStream));let f=0,m=0,b=!1;const v=new u(d),g=new r(t,{zeroPadding:!1});function y(e){c+=e.length;const t=m;h(e,(i=>{o[t]=i,f-=1,f<5&&g.resume(),l+=e.length,s.onProgress&&s.onProgress(l,n),k()})),f+=1,f>=5&&g.pause(),m+=1}function _(){b=!0,k()}function x(e){w(),a(e)}function w(){v.removeListener("error",x),g.removeListener("data",y),g.removeListener("end",_),g.removeListener("error",x)}function k(){b&&0===f&&(w(),a(null,i.from(o.join(""),"hex"),c))}v.on("error",x),v.pipe(g).on("data",y).on("end",_).on("error",x)}(e,f,d,a,((t,i,r)=>{if(t)return o(t);l.info.pieces=i,e.forEach((e=>{delete e.getStream})),a.singleFileTorrent?l.info.length=r:l.info.files=e,o(null,n.encode(l))}))}(c,a,o)}))},t.exports.parseInput=function(e,t,i){"function"==typeof t&&([t,i]=[i,t]),v(e,t=t?Object.assign({},t):{},i)},t.exports.announceList=[["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://tracker.opentrackr.org:1337"],["udp://explodie.org:6969"],["udp://tracker.empire-js.us:1337"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"]],t.exports.isJunkPath=g}).call(this)}).call(this,e("buffer").Buffer)},{"./get-files":67,bencode:23,"block-stream2":49,buffer:110,"filestream/read":212,"is-file":67,junk:250,multistream:309,once:326,path:333,Line truncated
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
i.read=function(e,t,i,n,r){var s,a,o=8*r-n-1,c=(1<<o)-1,l=c>>1,u=-7,p=i?r-1:0,d=i?-1:1,f=e[t+p];for(p+=d,s=f&(1<<-u)-1,f>>=-u,u+=o;u>0;s=256*s+e[t+p],p+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=n;u>0;a=256*a+e[t+p],p+=d,u-=8);if(0===s)s=1-l;else{if(s===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=l}return(f?-1:1)*a*Math.pow(2,s-n)},i.write=function(e,t,i,n,r,s){var a,o,c,l=8*s-r-1,u=(1<<l)-1,p=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(a++,c/=2),a+p>=u?(o=0,a=u):a+p>=1?(o=(t*c-1)*Math.pow(2,r),a+=p):(o=t*Math.pow(2,p-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&o,f+=h,o/=256,r-=8);for(a=a<<r|o,l+=r;l>0;e[i+f]=255&a,f+=h,a/=256,l-=8);e[i+f-h]|=128*m}},{}],245:[function(e,t,i){
/*! immediate-chunk-store. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -82,7 +82,7 @@ var n=e("buffer"),r=n.Buffer;function s(e,t){for(var i in e)t[i]=e[i]}function a
/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.exports=function(t,i){var n=[];t.on("data",(function(e){n.push(e)})),t.once("end",(function(){i&&i(null,e.concat(n)),i=null})),t.once("error",(function(e){i&&i(e),i=null}))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:110}],394:[function(e,t,i){(function(i){(function(){
/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.exports=p;const n=e("simple-concat"),r=e("decompress-response"),s=e("http"),a=e("https"),o=e("once"),c=e("querystring"),l=e("url"),u=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function p(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=o(t),e.url){const{hostname:t,port:i,protocol:n,auth:r,path:s}=l.parse(e.url);delete e.url,t||i||n||r?Object.assign(e,{hostname:t,port:i,protocol:n,auth:r,path:s}):e.path=s}const n={"accept-encoding":"gzip, deflate"};let d;e.headers&&Object.keys(e.headers).forEach((t=>n[t.toLowerCase()]=e.headers[t])),e.headers=n,e.body?d=e.json&&!u(e.body)?JSON.stringify(e.body):e.body:e.form&&(d="string"==typeof e.form?e.form:c.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),d&&(e.method||(e.method="POST"),u(d)||(e.headers["content-length"]=i.byteLength(d)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const f=("https:"===e.protocol?a:s).request(e,(i=>{if(!1!==e.followRedirects&&i.statusCode>=300&&i.statusCode<400&&i.headers.location)return e.url=i.headers.location,delete e.headers.host,i.resume(),"POST"===e.method&&[301,302].includes(i.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):p(e,t);const n="function"==typeof r&&"HEAD"!==e.method;t(null,n?r(i):i)}));return f.on("timeout",(()=>{f.abort(),t(new Error("Request timed out"))})),f.on("error",t),u(d)?d.on("error",t).pipe(f):f.end(d),f}p.concat=(e,t)=>p(e,((i,r)=>{if(i)return t(i);n(r,((i,n)=>{if(i)return t(i);if(e.json)try{n=JSON.parse(n.toString())}catch(i){return t(i,r,n)}t(null,r,n)}))})),["get","post","put","patch","head","delete"].forEach((e=>{p[e]=(t,i)=>("string"==typeof t&&(t={url:t}),p(Object.assign({method:e.toUpperCase()},t),i))}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:110,"decompress-response":67,http:449,https:243,once:326,querystring:353,"simple-concat":393,url:482}],395:[function(e,t,i){
t.exports=p;const n=e("simple-concat"),r=e("decompress-response"),s=e("http"),a=e("https"),o=e("once"),c=e("querystring"),l=e("url"),u=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function p(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=o(t),e.url){const{hostname:t,port:i,protocol:n,auth:r,path:s}=l.parse(e.url);delete e.url,t||i||n||r?Object.assign(e,{hostname:t,port:i,protocol:n,auth:r,path:s}):e.path=s}const n={"accept-encoding":"gzip, deflate"};let d;e.headers&&Object.keys(e.headers).forEach((t=>n[t.toLowerCase()]=e.headers[t])),e.headers=n,e.body?d=e.json&&!u(e.body)?JSON.stringify(e.body):e.body:e.form&&(d="string"==typeof e.form?e.form:c.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),d&&(e.method||(e.method="POST"),u(d)||(e.headers["content-length"]=i.byteLength(d)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const f=e.hostname,h=("https:"===e.protocol?a:s).request(e,(i=>{if(!1!==e.followRedirects&&i.statusCode>=300&&i.statusCode<400&&i.headers.location){e.url=i.headers.location,delete e.headers.host,i.resume();const n=l.parse(e.url).hostname;return null!==n&&n!==f&&(delete e.headers.cookie,delete e.headers.authorization),"POST"===e.method&&[301,302].includes(i.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):p(e,t)}const n="function"==typeof r&&"HEAD"!==e.method;t(null,n?r(i):i)}));return h.on("timeout",(()=>{h.abort(),t(new Error("Request timed out"))})),h.on("error",t),u(d)?d.on("error",t).pipe(h):h.end(d),h}p.concat=(e,t)=>p(e,((i,r)=>{if(i)return t(i);n(r,((i,n)=>{if(i)return t(i);if(e.json)try{n=JSON.parse(n.toString())}catch(i){return t(i,r,n)}t(null,r,n)}))})),["get","post","put","patch","head","delete"].forEach((e=>{p[e]=(t,i)=>("string"==typeof t&&(t={url:t}),p(Object.assign({method:e.toUpperCase()},t),i))}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:110,"decompress-response":67,http:449,https:243,once:326,querystring:353,"simple-concat":393,url:482}],395:[function(e,t,i){
/*! simple-peer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
const n=e("debug")("simple-peer"),r=e("get-browser-rtc"),s=e("randombytes"),a=e("readable-stream"),o=e("queue-microtask"),c=e("err-code"),{Buffer:l}=e("buffer"),u=65536;function p(e){return e.replace(/a=ice-options:trickle\s\n/g,"")}class d extends a.Duplex{constructor(e){if(super(e=Object.assign({allowHalfOpen:!1},e)),this._id=s(4).toString("hex").slice(0,7),this._debug("new peer %o",e),this.channelName=e.initiator?e.channelName||s(20).toString("hex"):null,this.initiator=e.initiator||!1,this.channelConfig=e.channelConfig||d.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},d.config,e.config),this.offerOptions=e.offerOptions||{},this.answerOptions=e.answerOptions||{},this.sdpTransform=e.sdpTransform||(e=>e),this.streams=e.streams||(e.stream?[e.stream]:[]),this.trickle=void 0===e.trickle||e.trickle,this.allowHalfTrickle=void 0!==e.allowHalfTrickle&&e.allowHalfTrickle,this.iceCompleteTimeout=e.iceCompleteTimeout||5e3,this.destroyed=!1,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,this._wrtc=e.wrtc&&"object"==typeof e.wrtc?e.wrtc:r(),!this._wrtc)throw"undefined"==typeof window?c(new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"),"ERR_WEBRTC_SUPPORT"):c(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._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(e){return void this.destroy(c(e,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc="number"==typeof this._pc._peerConnectionId,this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=e=>{this._onIceCandidate(e)},"object"==typeof this._pc.peerIdentity&&this._pc.peerIdentity.catch((e=>{this.destroy(c(e,"ERR_PC_PEER_IDENTITY"))})),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=e=>{this._setupData(e)},this.streams&&this.streams.forEach((e=>{this.addStream(e)})),this._pc.ontrack=e=>{this._onTrack(e)},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&&"open"===this._channel.readyState}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(e){if(!this.destroying){if(this.destroyed)throw c(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if("string"==typeof e)try{e=JSON.parse(e)}catch(t){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 this._wrtc.RTCSessionDescription(e)).then((()=>{this.destroyed||(this._pendingCandidates.forEach((e=>{this._addIceCandidate(e)})),this._pendingCandidates=[],"offer"===this._pc.remoteDescription.type&&this._createAnswer())})).catch((e=>{this.destroy(c(e,"ERR_SET_REMOTE_DESCRIPTION"))})),e.sdp||e.candidate||e.renegotiate||e.transceiverRequest||this.destroy(c(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(e){const t=new this._wrtc.RTCIceCandidate(e);this._pc.addIceCandidate(t).catch((e=>{var i;!t.address||t.address.endsWith(".local")?(i="Ignoring unsupported ICE candidate.",console.warn(i)):this.destroy(c(e,"ERR_ADD_ICE_CANDIDATE"))}))}send(e){if(!this.destroying){if(this.destroyed)throw c(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(e)}}addTransceiver(e,t){if(!this.destroying){if(this.destroyed)throw c(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(e,t),this._needsNegotiation()}catch(e){this.destroy(c(e,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transLine truncated
/*! simple-websocket. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -92,7 +92,7 @@ t.exports=async function(e,t){const i=await n(e,t);return URL.createObjectURL(i)
/*! stream-to-blob. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.exports=function(e,t){if(null!=t&&"string"!=typeof t)throw new Error("Invalid mimetype, expected string.");return new Promise(((i,n)=>{const r=[];e.on("data",(e=>r.push(e))).once("end",(()=>{const e=null!=t?new Blob(r,{type:t}):new Blob(r);i(e)})).once("error",n)}))}},{}],470:[function(e,t,i){(function(i){(function(){
/*! stream-with-known-length-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var n=e("once");t.exports=function(e,t,r){r=n(r);var s=i.alloc(t),a=0;e.on("data",(function(e){e.copy(s,a),a+=e.length})).on("end",(function(){r(null,s)})).on("error",r)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:110,once:326}],471:[function(e,t,i){const{EventEmitter:n}=e("events"),r=new Error("Stream was destroyed"),s=new Error("Premature close"),a=e("queue-tick"),o=e("fast-fifo"),c=33554431,l=1^c,u=64,p=128,d=256,f=512,h=1024,m=2048,b=4096,v=8192,g=16392,y=384^c,_=65536,x=2<<16,w=4<<16,k=8<<16,E=16<<16,S=32<<16,M=64<<16,A=8454144,j=256<<16,I=33488895,T=33423359,C=65544,B=33488887,R=2105344,L=6|R,O=8470536,P=8404999,U=589831,q=Symbol.asyncIterator||Symbol("asyncIterator");class N{constructor(e,{highWaterMark:t=16384,map:i=null,mapWritable:n,byteLength:r,byteLengthWritable:s}={}){this.stream=e,this.queue=new o,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.byteLength=s||r||ae,this.map=n||i,this.afterWrite=K.bind(this),this.afterUpdateNextTick=X.bind(this)}get ended(){return 0!=(this.stream._duplexState&S)}push(e){return null!==this.map&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=k,!0):(this.stream._duplexState|=1572864,!1)}shift(){const e=this.queue.shift(),t=this.stream;return this.buffered-=this.byteLength(e),0===this.buffered&&(t._duplexState&=33030143),e}end(e){"function"==typeof e?this.stream.once("finish",e):null!=e&&this.push(e),this.stream._duplexState=(this.stream._duplexState|j)&T}autoBatch(e,t){const i=[],n=this.stream;for(i.push(e);589824==(n._duplexState&U);)i.push(n._writableState.shift());if(0!=(7&n._duplexState))return t(null);n._writev(i,t)}update(){const e=this.stream;for(;(e._duplexState&U)===k;){const t=this.shift();e._duplexState|=327680,e._write(t,this.afterWrite),e._duplexState&=33292287}0==(196608&e._duplexState)&&this.updateNonPrimary()}updateNonPrimary(){const e=this.stream;if((17301511&e._duplexState)===j)return e._duplexState=16777215&(e._duplexState|_),void e._final(W.bind(this));2!=(6&e._duplexState)?1==(e._duplexState&P)&&(e._duplexState=(e._duplexState|C)&l,e._open(Y.bind(this))):0==(e._duplexState&O)&&(e._duplexState|=C,e._destroy(V.bind(this)))}updateNextTick(){0==(this.stream._duplexState&A)&&(this.stream._duplexState|=A,a(this.afterUpdateNextTick))}}class D{constructor(e,{highWaterMark:t=16384,map:i=null,mapReadable:n,byteLength:r,byteLengthReadable:s}={}){this.stream=e,this.queue=new o,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.byteLength=s||r||ae,this.map=n||i,this.pipeTo=null,this.afterRead=$.bind(this),this.afterUpdateNextTick=G.bind(this)}get ended(){return 0!=(this.stream._duplexState&v)}pipe(e,t){if(null!==this.pipeTo)throw new Error("Can only pipe to one destination");if(this.stream._duplexState|=d,this.pipeTo=e,this.pipeline=new H(this.stream,e,t||null),t&&this.stream.on("error",oe),se(e))e._writableState.pipeline=this.pipeline,t&&e.on("error",oe),e.on("finish",this.pipeline.finished.bind(this.pipeline));else{const t=this.pipeline.done.bind(this.pipeline,e),i=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",t),e.on("close",i),e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",F.bind(this)),this.stream.emit("piping",e),e.emit("pipe",this.stream)}push(e){const t=this.stream;return null===e?(this.highWaterMark=0,t._duplexState=33521647&(t._duplexState|f),!1):(null!==this.map&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),t._duplexState=33521663&(t._duplexState|u),this.buffered<this.highWaterMark)}shift(){const e=this.queue.shift();return this.buffered-=this.byteLength(e),0===this.buffered&&(this.stream._duplexState&=33550271),e}unshift(e){let t;const i=[];for(;void 0!==(t=this.queue.shift());)i.push(t);this.push(e);for(let e=0;e<i.length;e++)this.queue.push(i[e])}read(){const e=this.stream;if((8263&e._duplexState)===u){const t=this.shift();return null!==this.pipeTo&&!1===this.pipeTo.write(t)&&(e._duplexState&=y),0!=(e._duplexState&h)&&e.emit("data",t),t}return null}drain(){const e=this.stream;for(;(8263&e._duplexState)===u&&0!=(384&e._duplexState);){const t=this.shift();null!==this.pipeTo&&!1===this.pipeTo.write(t)&&(e._duplexState&=y),0!=(e._duplexState&h)&&e.emit("data",t)}}update(){const e=this.stream;for(this.drain();this.buffered<this.highWaterMark&&0==(41487&e._duplexState);)e._duplexState|=32808,e._read(this.afterRead),e._duplexState&=33554399,0==(8&e._duplexState)&&this.drain();2112==(6215&e._duplexState)&&(e._duplexState|=b,e.emit("readable")),0==(24&e._duplexState)&&this.updateNonPrimary()}updateNonPrimary(){const e=this.stream;(583&e._duplexState)===f&&(e._duplexState=33553919&(e._duplexState|v),e.emit("end"),(e._duplexState&L)===R&&(e._duplexState|=2),null!==this.pipeTo&&this.pipeTo.end()),2!=(6&e._duplexState)?1==(e._duplexState&P)&&(e._duplexState=(e._duplexState|C)&l,e._open(Y.bind(this))):0==(e._duplexState&O)&&(e._duplexState|=C,e._destrLine truncated
var n=e("once");t.exports=function(e,t,r){r=n(r);var s=i.alloc(t),a=0;e.on("data",(function(e){e.copy(s,a),a+=e.length})).on("end",(function(){r(null,s)})).on("error",r)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:110,once:326}],471:[function(e,t,i){const{EventEmitter:n}=e("events"),r=new Error("Stream was destroyed"),s=new Error("Premature close"),a=e("queue-tick"),o=e("fast-fifo"),c=33554431,l=1^c,u=64,p=128,d=256,f=512,h=1024,m=2048,b=4096,v=8192,g=16392,y=384^c,_=65536,x=2<<16,w=4<<16,k=8<<16,E=16<<16,S=32<<16,M=64<<16,A=8454144,j=256<<16,I=33488895,T=33423359,C=65544,B=33488887,R=2105344,L=6|R,O=8470536,P=8404999,U=589824,q=589831,N=Symbol.asyncIterator||Symbol("asyncIterator");class D{constructor(e,{highWaterMark:t=16384,map:i=null,mapWritable:n,byteLength:r,byteLengthWritable:s}={}){this.stream=e,this.queue=new o,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.byteLength=s||r||oe,this.map=n||i,this.afterWrite=$.bind(this),this.afterUpdateNextTick=Y.bind(this)}get ended(){return 0!=(this.stream._duplexState&S)}push(e){return null!==this.map&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=k,!0):(this.stream._duplexState|=1572864,!1)}shift(){const e=this.queue.shift(),t=this.stream;return this.buffered-=this.byteLength(e),0===this.buffered&&(t._duplexState&=33030143),e}end(e){"function"==typeof e?this.stream.once("finish",e):null!=e&&this.push(e),this.stream._duplexState=(this.stream._duplexState|j)&T}autoBatch(e,t){const i=[],n=this.stream;for(i.push(e);(n._duplexState&q)===U;)i.push(n._writableState.shift());if(0!=(7&n._duplexState))return t(null);n._writev(i,t)}update(){const e=this.stream;for(;(e._duplexState&q)===k;){const t=this.shift();e._duplexState|=327680,e._write(t,this.afterWrite),e._duplexState&=33292287}0==(196608&e._duplexState)&&this.updateNonPrimary()}updateNonPrimary(){const e=this.stream;if((19464199&e._duplexState)===j)return e._duplexState=16777215&(e._duplexState|_),void e._final(V.bind(this));2!=(6&e._duplexState)?1==(e._duplexState&P)&&(e._duplexState=(e._duplexState|C)&l,e._open(Z.bind(this))):0==(e._duplexState&O)&&(e._duplexState|=C,e._destroy(K.bind(this)))}updateNextTick(){0==(this.stream._duplexState&A)&&(this.stream._duplexState|=A,a(this.afterUpdateNextTick))}}class z{constructor(e,{highWaterMark:t=16384,map:i=null,mapReadable:n,byteLength:r,byteLengthReadable:s}={}){this.stream=e,this.queue=new o,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.byteLength=s||r||oe,this.map=n||i,this.pipeTo=null,this.afterRead=G.bind(this),this.afterUpdateNextTick=X.bind(this)}get ended(){return 0!=(this.stream._duplexState&v)}pipe(e,t){if(null!==this.pipeTo)throw new Error("Can only pipe to one destination");if(this.stream._duplexState|=d,this.pipeTo=e,this.pipeline=new F(this.stream,e,t||null),t&&this.stream.on("error",ce),ae(e))e._writableState.pipeline=this.pipeline,t&&e.on("error",ce),e.on("finish",this.pipeline.finished.bind(this.pipeline));else{const t=this.pipeline.done.bind(this.pipeline,e),i=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",t),e.on("close",i),e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",W.bind(this)),this.stream.emit("piping",e),e.emit("pipe",this.stream)}push(e){const t=this.stream;return null===e?(this.highWaterMark=0,t._duplexState=33521647&(t._duplexState|f),!1):(null!==this.map&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),t._duplexState=33521663&(t._duplexState|u),this.buffered<this.highWaterMark)}shift(){const e=this.queue.shift();return this.buffered-=this.byteLength(e),0===this.buffered&&(this.stream._duplexState&=33550271),e}unshift(e){let t;const i=[];for(;void 0!==(t=this.queue.shift());)i.push(t);this.push(e);for(let e=0;e<i.length;e++)this.queue.push(i[e])}read(){const e=this.stream;if((8263&e._duplexState)===u){const t=this.shift();return null!==this.pipeTo&&!1===this.pipeTo.write(t)&&(e._duplexState&=y),0!=(e._duplexState&h)&&e.emit("data",t),t}return null}drain(){const e=this.stream;for(;(8263&e._duplexState)===u&&0!=(384&e._duplexState);){const t=this.shift();null!==this.pipeTo&&!1===this.pipeTo.write(t)&&(e._duplexState&=y),0!=(e._duplexState&h)&&e.emit("data",t)}}update(){const e=this.stream;for(this.drain();this.buffered<this.highWaterMark&&0==(41487&e._duplexState);)e._duplexState|=32808,e._read(this.afterRead),e._duplexState&=33554399,0==(8&e._duplexState)&&this.drain();2112==(6215&e._duplexState)&&(e._duplexState|=b,e.emit("readable")),0==(24&e._duplexState)&&this.updateNonPrimary()}updateNonPrimary(){const e=this.stream;(583&e._duplexState)===f&&(e._duplexState=33553919&(e._duplexState|v),e.emit("end"),(e._duplexState&L)===R&&(e._duplexState|=2),null!==this.pipeTo&&this.pipeTo.end()),2!=(6&e._duplexState)?1==(e._duplexState&P)&&(e._duplexState=(e._duplexState|C)&l,e._open(Z.bind(this))):0==(e._duplexState&O)&&(e._duplexState|=C,e._Line truncated
/**!
* tippy.js v6.3.7
* (c) 2017-2021 atomiks
@@ -106,4 +106,4 @@ const i=16384;class n{constructor(e){this.length=e,this.missing=e,this.sources=n
/*! ut_metadata. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const{EventEmitter:n}=e("events"),r=e("bencode"),s=e("bitfield").default,a=e("debug")("ut_metadata"),o=e("simple-sha1"),c=16384;t.exports=e=>{class t extends n{constructor(t){super(),this._wire=t,this._fetching=!1,this._metadataComplete=!1,this._metadataSize=null,this._remainingRejects=null,this._bitfield=new s(0,{grow:1e3}),i.isBuffer(e)&&this.setMetadata(e)}onHandshake(e,t,i){this._infoHash=e}onExtendedHandshake(e){return e.m&&e.m.ut_metadata?e.metadata_size?"number"!=typeof e.metadata_size||1e7<e.metadata_size||e.metadata_size<=0?this.emit("warning",new Error("Peer gave invalid metadata size")):(this._metadataSize=e.metadata_size,this._numPieces=Math.ceil(this._metadataSize/c),this._remainingRejects=2*this._numPieces,void this._requestPieces()):this.emit("warning",new Error("Peer does not have metadata")):this.emit("warning",new Error("Peer does not support ut_metadata"))}onMessage(e){let t,i;try{const n=e.toString(),s=n.indexOf("ee")+2;t=r.decode(n.substring(0,s)),i=e.slice(s)}catch(e){return}switch(t.msg_type){case 0:this._onRequest(t.piece);break;case 1:this._onData(t.piece,i,t.total_size);break;case 2:this._onReject(t.piece)}}fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&&this._requestPieces())}cancel(){this._fetching=!1}setMetadata(e){if(this._metadataComplete)return!0;a("set metadata");try{const t=r.decode(e).info;t&&(e=r.encode(t))}catch(e){}return(!this._infoHash||this._infoHash===o.sync(e))&&(this.cancel(),this.metadata=e,this._metadataComplete=!0,this._metadataSize=this.metadata.length,this._wire.extendedHandshake.metadata_size=this._metadataSize,this.emit("metadata",r.encode({info:r.decode(this.metadata)})),!0)}_send(e,t){let n=r.encode(e);i.isBuffer(t)&&(n=i.concat([n,t])),this._wire.extended("ut_metadata",n)}_request(e){this._send({msg_type:0,piece:e})}_data(e,t,i){const n={msg_type:1,piece:e};"number"==typeof i&&(n.total_size=i),this._send(n,t)}_reject(e){this._send({msg_type:2,piece:e})}_onRequest(e){if(!this._metadataComplete)return void this._reject(e);const t=e*c;let i=t+c;i>this._metadataSize&&(i=this._metadataSize);const n=this.metadata.slice(t,i);this._data(e,n,this._metadataSize)}_onData(e,t,i){t.length>c||!this._fetching||(t.copy(this.metadata,e*c),this._bitfield.set(e),this._checkDone())}_onReject(e){this._remainingRejects>0&&this._fetching?(this._request(e),this._remainingRejects-=1):this.emit("warning",new Error('Peer sent "reject" too much'))}_requestPieces(){if(this._fetching){this.metadata=i.alloc(this._metadataSize);for(let e=0;e<this._numPieces;e++)this._request(e)}}_checkDone(){let e=!0;for(let t=0;t<this._numPieces;t++)if(!this._bitfield.get(t)){e=!1;break}if(!e)return;this.setMetadata(this.metadata)||this._failedMetadata()}_failedMetadata(){this._bitfield=new s(0,{grow:1e3}),this._remainingRejects-=this._numPieces,this._remainingRejects>0?this._requestPieces():this.emit("warning",new Error("Peer sent invalid metadata"))}}return t.prototype.name="ut_metadata",t}}).call(this)}).call(this,e("buffer").Buffer)},{bencode:23,bitfield:27,buffer:110,debug:161,events:193,"simple-sha1":411}],485:[function(e,t,i){(function(e){(function(){function i(t){try{if(!e.localStorage)return!1}catch(e){return!1}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function(e,t){if(i("noDeprecation"))return e;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],486:[function(e,t,i){(function(i){(function(){const n=e("binary-search"),r=e("events"),s=e("mp4-stream"),a=e("mp4-box-encoding"),o=e("range-slice-stream");class c{constructor(e,t){this._entries=e,this._countName=t||"count",this._index=0,this._offset=0,this.value=this._entries[0]}inc(){this._offset++,this._offset>=this._entries[this._index][this._countName]&&(this._index++,this._offset=0),this.value=this._entries[this._index]}}const l=1;t.exports=class extends r{constructor(e){super(),this._tracks=[],this._file=e,this._decoder=null,this._findMoov(0)}_findMoov(e){this._decoder&&this._decoder.destroy();let t=0;this._decoder=s.decode();const i=this._file.createReadStream({start:e});i.pipe(this._decoder);const n=r=>{"moov"===r.type?(this._decoder.removeListener("box",n),this._decoder.decode((e=>{i.destroy();try{this._processMoov(e)}catch(e){e.message=`Cannot parse mp4 file: ${e.message}`,this.emit("error",e)}}))):r.length<4096?(t+=r.length,this._decoder.ignore()):(this._decoder.removeListener("box",n),t+=r.length,i.destroy(),this._decoder.destroy(),this._findMoov(e+t))};this._decoder.on("box",n)}_processMoov(e){const t=e.traks;this._tracks=[],this._hasVideo=!1,this._hasAudio=!1;for(let i=0;i<t.length;i++){const r=t[i],s=r.mdia.minf.stbl,a=s.stsd.entries[0],o=r.mdia.hdlr.handlerType;let l,u;if("vide"===o&&"avc1"===a.type){if(this._hasVideo)contiLine truncated
/*! webtorrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const n=e("events"),r=e("path"),s=e("simple-concat"),a=e("create-torrent"),o=e("debug"),c=e("bittorrent-dht/client"),l=e("load-ip-set"),u=e("run-parallel"),p=e("parse-torrent"),d=e("simple-peer"),f=e("queue-microtask"),h=e("randombytes"),m=e("simple-sha1"),b=e("speedometer"),{ThrottleGroup:v}=e("speed-limiter"),g=e("./lib/conn-pool.js"),y=e("./lib/torrent.js"),{version:_}=e("./package.json"),x=o("webtorrent"),w=_.replace(/\d*./g,(e=>("0"+e%100).slice(-2))).slice(0,4),k=`-WW${w}-`;class E extends n{constructor(t={}){super(),"string"==typeof t.peerId?this.peerId=t.peerId:i.isBuffer(t.peerId)?this.peerId=t.peerId.toString("hex"):this.peerId=i.from(k+h(9).toString("base64")).toString("hex"),this.peerIdBuffer=i.from(this.peerId,"hex"),"string"==typeof t.nodeId?this.nodeId=t.nodeId:i.isBuffer(t.nodeId)?this.nodeId=t.nodeId.toString("hex"):this.nodeId=h(20).toString("hex"),this.nodeIdBuffer=i.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=t.torrentPort||0,this.dhtPort=t.dhtPort||0,this.tracker=void 0!==t.tracker?t.tracker:{},this.lsd=!1!==t.lsd,this.torrents=[],this.maxConns=Number(t.maxConns)||55,this.utp=E.UTP_SUPPORT&&!1!==t.utp,this._downloadLimit=Math.max("number"==typeof t.downloadLimit?t.downloadLimit:-1,-1),this._uploadLimit=Math.max("number"==typeof t.uploadLimit?t.uploadLimit:-1,-1),this.serviceWorker=null,this.workerKeepAliveInterval=null,this.workerPortCount=0,!0===t.secure&&e("./lib/peer").enableSecure(),this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.throttleGroups={down:new v({rate:Math.max(this._downloadLimit,0),enabled:this._downloadLimit>=0}),up:new v({rate:Math.max(this._uploadLimit,0),enabled:this._uploadLimit>=0})},this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),globalThis.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=globalThis.WRTC)),"function"==typeof g?this._connPool=new g(this):f((()=>{this._onListening()})),this._downloadSpeed=b(),this._uploadSpeed=b(),!1!==t.dht&&"function"==typeof c?(this.dht=new c(Object.assign({},{nodeId:this.nodeId},t.dht)),this.dht.once("error",(e=>{this._destroy(e)})),this.dht.once("listening",(()=>{const e=this.dht.address();e&&(this.dhtPort=e.port)})),this.dht.setMaxListeners(0),this.dht.listen(this.dhtPort)):this.dht=!1,this.enableWebSeeds=!1!==t.webSeeds;const n=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof l&&null!=t.blocklist?l(t.blocklist,{headers:{"user-agent":`WebTorrent/${_} (https://webtorrent.io)`}},((e,t)=>{if(e)return console.error(`Failed to load blocklist: ${e.message}`);this.blocked=t,n()})):f(n)}loadWorker(e,t=(()=>{})){if(!(e instanceof ServiceWorker))throw new Error("Invalid worker registration");if("activated"!==e.state)throw new Error("Worker isn't activated");this.serviceWorker=e,navigator.serviceWorker.addEventListener("message",(e=>{const{data:t}=e;if(!t.type||"webtorrent"===!t.type||!t.url)return null;let[i,...n]=t.url.slice(t.url.indexOf(t.scope+"webtorrent/")+11+t.scope.length).split("/");if(n=decodeURI(n.join("/")),!i||!n)return null;const[r]=e.ports,s=this.get(i)&&this.get(i).files.find((e=>e.path===n));if(!s)return null;const[a,o,c]=s._serve(t),l=o&&o[Symbol.asyncIterator](),u=()=>{r.onmessage=null,o&&o.destroy(),c&&c.destroy(),this.workerPortCount--,this.workerPortCount||(clearInterval(this.workerKeepAliveInterval),this.workerKeepAliveInterval=null)};r.onmessage=async e=>{if(e.data){let e;try{e=(await l.next()).value}catch(e){}r.postMessage(e),e||u(),this.workerKeepAliveInterval||(this.workerKeepAliveInterval=setInterval((()=>fetch(`${this.serviceWorker.scriptURL.substr(0,this.serviceWorker.scriptURL.lastIndexOf("/")+1).slice(window.location.origin.length)}webtorrent/keepalive/`)),2e4))}else u()},this.workerPortCount++,r.postMessage(a)})),t(this.serviceWorker)}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){const e=this.torrents.filter((e=>1!==e.progress));return e.reduce(((e,t)=>e+t.downloaded),0)/(e.reduce(((e,t)=>e+(t.length||0)),0)||1)}get ratio(){return this.torrents.reduce(((e,t)=>e+t.uploaded),0)/(this.torrents.reduce(((e,t)=>e+t.received),0)||1)}get(e){if(e instanceof y){if(this.torrents.includes(e))return e}else{let t;try{t=p(e)}catch(e){}if(!t)return null;if(!t.infoHash)throw new Error("Invalid torrent identifier");for(const e of this.torrents)if(e.infoHash===t.infoHash)return e}return null}add(e,t={},i=(()=>{})){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,i]=[{},t]);const n=()=>{if(!this.destroyed)for(const e of this.torrents)if(e.infoHash===s.infoHash&&e!==s)return void s._destroy(new Error(`Cannot add duplicate torrent ${s.infoHash}`))},r=()=>{this.destroyed||(i(s),this.emit("torrent",s))};this._debug("add"),t=t?Object.assign({},t):{};const s=new y(e,this,t);return this.torrents.push(s),s.once("_infoHash",n),s.once("ready",r),s.onceLine truncated
const n=e("events"),r=e("path"),s=e("simple-concat"),a=e("create-torrent"),o=e("debug"),c=e("bittorrent-dht/client"),l=e("load-ip-set"),u=e("run-parallel"),p=e("parse-torrent"),d=e("simple-peer"),f=e("queue-microtask"),h=e("randombytes"),m=e("simple-sha1"),b=e("speedometer"),{ThrottleGroup:v}=e("speed-limiter"),g=e("./lib/conn-pool.js"),y=e("./lib/torrent.js"),{version:_}=e("./package.json"),x=o("webtorrent"),w=_.replace(/\d*./g,(e=>("0"+e%100).slice(-2))).slice(0,4),k=`-WW${w}-`;class E extends n{constructor(t={}){super(),"string"==typeof t.peerId?this.peerId=t.peerId:i.isBuffer(t.peerId)?this.peerId=t.peerId.toString("hex"):this.peerId=i.from(k+h(9).toString("base64")).toString("hex"),this.peerIdBuffer=i.from(this.peerId,"hex"),"string"==typeof t.nodeId?this.nodeId=t.nodeId:i.isBuffer(t.nodeId)?this.nodeId=t.nodeId.toString("hex"):this.nodeId=h(20).toString("hex"),this.nodeIdBuffer=i.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=t.torrentPort||0,this.dhtPort=t.dhtPort||0,this.tracker=void 0!==t.tracker?t.tracker:{},this.lsd=!1!==t.lsd,this.torrents=[],this.maxConns=Number(t.maxConns)||55,this.utp=E.UTP_SUPPORT&&!1!==t.utp,this._downloadLimit=Math.max("number"==typeof t.downloadLimit?t.downloadLimit:-1,-1),this._uploadLimit=Math.max("number"==typeof t.uploadLimit?t.uploadLimit:-1,-1),this.serviceWorker=null,this.workerKeepAliveInterval=null,this.workerPortCount=0,!0===t.secure&&e("./lib/peer").enableSecure(),this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.throttleGroups={down:new v({rate:Math.max(this._downloadLimit,0),enabled:this._downloadLimit>=0}),up:new v({rate:Math.max(this._uploadLimit,0),enabled:this._uploadLimit>=0})},this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),globalThis.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=globalThis.WRTC)),"function"==typeof g?this._connPool=new g(this):f((()=>{this._onListening()})),this._downloadSpeed=b(),this._uploadSpeed=b(),!1!==t.dht&&"function"==typeof c?(this.dht=new c(Object.assign({},{nodeId:this.nodeId},t.dht)),this.dht.once("error",(e=>{this._destroy(e)})),this.dht.once("listening",(()=>{const e=this.dht.address();e&&(this.dhtPort=e.port)})),this.dht.setMaxListeners(0),this.dht.listen(this.dhtPort)):this.dht=!1,this.enableWebSeeds=!1!==t.webSeeds;const n=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof l&&null!=t.blocklist?l(t.blocklist,{headers:{"user-agent":`WebTorrent/${_} (https://webtorrent.io)`}},((e,t)=>{if(e)return console.error(`Failed to load blocklist: ${e.message}`);this.blocked=t,n()})):f(n)}loadWorker(e,t=(()=>{})){if(!(e instanceof ServiceWorker))throw new Error("Invalid worker registration");if("activated"!==e.state)throw new Error("Worker isn't activated");this.serviceWorker=e,navigator.serviceWorker.addEventListener("message",(e=>{const{data:t}=e;if(!t.type||"webtorrent"===!t.type||!t.url)return null;let[i,...n]=t.url.slice(t.url.indexOf(t.scope+"webtorrent/")+11+t.scope.length).split("/");if(n=decodeURI(n.join("/")),!i||!n)return null;const[r]=e.ports,s=this.get(i)&&this.get(i).files.find((e=>e.path===n));if(!s)return null;const[a,o,c]=s._serve(t),l=o&&o[Symbol.asyncIterator](),u=()=>{r.onmessage=null,o&&o.destroy(),c&&c.destroy(),this.workerPortCount--,this.workerPortCount||(clearInterval(this.workerKeepAliveInterval),this.workerKeepAliveInterval=null)};r.onmessage=async e=>{if(e.data){let e;try{e=(await l.next()).value}catch(e){}r.postMessage(e),e||u(),this.workerKeepAliveInterval||(this.workerKeepAliveInterval=setInterval((()=>fetch(`${this.serviceWorker.scriptURL.substr(0,this.serviceWorker.scriptURL.lastIndexOf("/")+1).slice(window.location.origin.length)}webtorrent/keepalive/`)),2e4))}else u()},this.workerPortCount++,r.postMessage(a)})),t(this.serviceWorker)}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){const e=this.torrents.filter((e=>1!==e.progress));return e.reduce(((e,t)=>e+t.downloaded),0)/(e.reduce(((e,t)=>e+(t.length||0)),0)||1)}get ratio(){return this.torrents.reduce(((e,t)=>e+t.uploaded),0)/(this.torrents.reduce(((e,t)=>e+t.received),0)||1)}get(e){if(e instanceof y){if(this.torrents.includes(e))return e}else{let t;try{t=p(e)}catch(e){}if(!t)return null;if(!t.infoHash)throw new Error("Invalid torrent identifier");for(const e of this.torrents)if(e.infoHash===t.infoHash)return e}return null}add(e,t={},i=(()=>{})){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,i]=[{},t]);const n=()=>{if(!this.destroyed)for(const e of this.torrents)if(e.infoHash===s.infoHash&&e!==s)return void s._destroy(new Error(`Cannot add duplicate torrent ${s.infoHash}`))},r=()=>{this.destroyed||(i(s),this.emit("torrent",s))};this._debug("add"),t=t?Object.assign({},t):{};const s=new y(e,this,t);return this.torrents.push(s),s.once("_infoHash",n),s.once("ready",r),s.onceLine truncated