Add Minified Version of Bundle

This commit is contained in:
Leo Herzog committed 2020-08-19 22:16:24 -04:00
1 parent 2e059e76b1
commit 286c43fe9d
4 files changed
+5696 -5634

No files matched your search

+5625 -5633
View File
File diff suppressed because it is too large. Load diff
+63
View File
@@ -0,0 +1,63 @@
!function e(t,n,i){function s(a,o){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!o&&c)return c(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[a]={exports:{}};t[a][0].call(p.exports,(function(e){return s(t[a][1][e]||e)}),p,p.exports,e,t,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)s(i[a]);return s}({1:[function(e,t,n){(function(e){void 0===e&&(e=void 0),function(){"use strict";void 0===e&&(e=Array),t.exports=e}()}).call(this,e("buffer").Buffer)},{buffer:51}],2:[function(e,t,n){const i=/^\[?([^\]]+)\]?:(\d+)$/;let s={},r=0;t.exports=function(e){if(1e5===r&&t.exports.reset(),!s[e]){const t=i.exec(e);if(!t)throw new Error("invalid addr: "+e);s[e]=[t[1],Number(t[2])],r+=1}return s[e]},t.exports.reset=function(){s={},r=0}},{}],3:[function(e,t,n){"use strict";n.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return 3*(n+i)/4-i},n.toByteArray=function(e){var t,n,i=l(e),a=i[0],o=i[1],c=new r(function(e,t,n){return 3*(t+n)/4-n}(0,a,o)),p=0,u=o>0?a-4:a;for(n=0;n<u;n+=4)t=s[e.charCodeAt(n)]<<18|s[e.charCodeAt(n+1)]<<12|s[e.charCodeAt(n+2)]<<6|s[e.charCodeAt(n+3)],c[p++]=t>>16&255,c[p++]=t>>8&255,c[p++]=255&t;2===o&&(t=s[e.charCodeAt(n)]<<2|s[e.charCodeAt(n+1)]>>4,c[p++]=255&t);1===o&&(t=s[e.charCodeAt(n)]<<10|s[e.charCodeAt(n+1)]<<4|s[e.charCodeAt(n+2)]>>2,c[p++]=t>>8&255,c[p++]=255&t);return c},n.fromByteArray=function(e){for(var t,n=e.length,s=n%3,r=[],a=16383,o=0,c=n-s;o<c;o+=a)r.push(p(e,o,o+a>c?c:o+a));1===s?(t=e[n-1],r.push(i[t>>2]+i[t<<4&63]+"==")):2===s&&(t=(e[n-2]<<8)+e[n-1],r.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return r.join("")};for(var i=[],s=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,c=a.length;o<c;++o)i[o]=a[o],s[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function p(e,t,n){for(var s,r,a=[],o=t;o<n;o+=3)s=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(i[(r=s)>>18&63]+i[r>>12&63]+i[r>>6&63]+i[63&r]);return a.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],4:[function(e,t,n){var i=e("safe-buffer").Buffer;function s(e,t,n){for(var i=0,s=1,r=t;r<n;r++){var a=e[r];if(a<58&&a>=48)i=10*i+(a-48);else if(r!==t||43!==a){if(r!==t||45!==a){if(46===a)break;throw new Error("not a number: buffer["+r+"] = "+a)}s=-1}}return i*s}function r(e,t,n,s){return null==e||0===e.length?null:("number"!=typeof t&&null==s&&(s=t,t=void 0),"number"!=typeof n&&null==s&&(s=n,n=void 0),r.position=0,r.encoding=s||null,r.data=i.isBuffer(e)?e.slice(t,n):i.from(e),r.bytes=r.data.length,r.next())}r.bytes=0,r.position=0,r.data=null,r.encoding=null,r.next=function(){switch(r.data[r.position]){case 100:return r.dictionary();case 108:return r.list();case 105:return r.integer();default:return r.buffer()}},r.find=function(e){for(var t=r.position,n=r.data.length,i=r.data;t<n;){if(i[t]===e)return t;t++}throw new Error('Invalid data: Missing delimiter "'+String.fromCharCode(e)+'" [0x'+e.toString(16)+"]")},r.dictionary=function(){r.position++;for(var e={};101!==r.data[r.position];)e[r.buffer()]=r.next();return r.position++,e},r.list=function(){r.position++;for(var e=[];101!==r.data[r.position];)e.push(r.next());return r.position++,e},r.integer=function(){var e=r.find(101),t=s(r.data,r.position+1,e);return r.position+=e+1-r.position,t},r.buffer=function(){var e=r.find(58),t=s(r.data,r.position,e),n=++e+t;return r.position=n,r.encoding?r.data.toString(r.encoding,e,n):r.data.slice(e,n)},t.exports=r},{"safe-buffer":211}],5:[function(e,t,n){var i=e("safe-buffer").Buffer;function s(e,t,n){var r=[],a=null;return s._encode(r,e),a=i.concat(r),s.bytes=a.length,i.isBuffer(t)?(a.copy(t,n),t):a}s.bytes=-1,s._floatConversionDetected=!1,s.getType=function(e){return i.isBuffer(e)?"buffer":Array.isArray(e)?"array":ArrayBuffer.isView(e)?"arraybufferview":e instanceof Number?"number":e instanceof Boolean?"boolean":e instanceof ArrayBuffer?"arraybuffer":typeof e},s._encode=function(e,t){if(null!=t)switch(s.getType(t)){case"buffer":s.buffer(e,t);break;case"object":s.dict(e,t);break;case"array":s.list(e,t);break;case"string":s.string(e,t);break;case"number":case"boolean":s.number(e,t);break;case"arraybufferview":s.buffer(e,i.from(t.buffer,t.byteOffset,t.byteLength));break;case"arraybuffer":s.buffer(e,i.from(t))}};var r=i.from("e"),a=i.from("d"),o=i.from("l");s.buffer=function(e,t){e.push(i.from(t.length+":"),t)},s.string=function(e,t){e.push(i.from(i.byteLength(t)+":"+t))},s.number=function(e,t){var n=2147483648,r=(t/n<<0)*n+(t%n<<0);e.push(i.from("i"+r+"e")),r===t||s._floatConversionDetected||(s._floatConversionDetected=!0,console.warn('WARNING: Possible data corruption detected with value "'+t+'":','Bencoding only defines support for integers, value was converted to "'+r+'"'),console.trace())},s.Line truncated
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var i=e("base64-js"),s=e("ieee754");n.Buffer=t,n.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},n.INSPECT_MAX_BYTES=50;var r=2147483647;function a(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=new Uint8Array(e);return n.__proto__=t.prototype,n}function t(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return o(e,t,n)}function o(e,n,i){if("string"==typeof e)return function(e,n){"string"==typeof n&&""!==n||(n="utf8");if(!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var i=0|d(e,n),s=a(i),r=s.write(e,n);r!==i&&(s=s.slice(0,r));return s}(e,n);if(ArrayBuffer.isView(e))return p(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return function(e,n,i){if(n<0||e.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<n+(i||0))throw new RangeError('"length" is outside of buffer bounds');var s;s=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i);return s.__proto__=t.prototype,s}(e,n,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var s=e.valueOf&&e.valueOf();if(null!=s&&s!==e)return t.from(s,n,i);var r=function(e){if(t.isBuffer(e)){var n=0|u(e.length),i=a(n);return 0===i.length||e.copy(i,0,0,n),i}if(void 0!==e.length)return"number"!=typeof e.length||D(e.length)?a(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),a(e<0?0:0|u(e))}function p(e){for(var t=e.length<0?0:0|u(e.length),n=a(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function u(e){if(e>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function d(e,n){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===i)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return q(e).length;default:if(r)return s?-1:P(e).length;n=(""+n).toLowerCase(),r=!0}}function h(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function f(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function m(e,n,i,s,r){if(0===e.length)return-1;if("string"==typeof i?(s=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),D(i=+i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof n&&(n=t.from(n,s)),t.isBuffer(n))return 0===n.length?-1:g(e,n,i,s,r);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,n,i):Uint8Array.prototype.lastIndexOf.call(e,n,i):g(e,[n],i,s,r);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,i,s){var r,a=1,o=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,o/=2,c/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(s){var p=-1;for(r=n;r<o;r++)if(l(e,r)===l(t,-1===p?0:r-p)){if(-1===p&&(p=r),r-p+1===c)return p*a}else-1!==p&&(r-=r-p),p=-1}else for(n+c>o&&(n=o-c),r=n;r>=0;r--){for(var u=!0,d=0;d<c;d++)if(l(e,r+d)!==l(t,d)){u=!1;break}if(u)return r}return-1}function b(e,t,n,i){n=Number(n)||0;var s=e.length-n;i?(i=Number(i))>s&&(i=s):i=s;var r=t.length;i>r/2&&(i=r/2);for(var a=0;a<i;++a){var o=parseInt(t.substr(2*a,2),16);if(D(o))return a;e[n+a]=o}return a}funcLine truncated
/*!
* bytes
* Copyright(c) 2012-2014 TJ Holowaychuk
* 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 i=/\B(?=(\d{3})+(?!\d))/g,s=/(?:\.0*|(\.[^0]+)0+)$/,r={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 n=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),p=t&&t.unit||"";p&&r[p.toLowerCase()]||(p=n>=r.pb?"PB":n>=r.tb?"TB":n>=r.gb?"GB":n>=r.mb?"MB":n>=r.kb?"KB":"B");var u=(e/r[p.toLowerCase()]).toFixed(c);return l||(u=u.replace(s,"$1")),a&&(u=u.replace(i,a)),u+o+p}function c(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,n=a.exec(e),i="b";return n?(t=parseFloat(n[1]),i=n[4].toLowerCase()):(t=parseInt(e,10),i="b"),Math.floor(r[i]*t)}},{}],54:[function(e,t,n){arguments[4][10][0].apply(n,arguments)},{dup:10}],55:[function(e,t,n){arguments[4][11][0].apply(n,arguments)},{"./_stream_readable":57,"./_stream_writable":59,_process:181,dup:11,inherits:111}],56:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./_stream_transform":58,dup:12,inherits:111}],57:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"../errors":54,"./_stream_duplex":55,"./internal/streams/async_iterator":60,"./internal/streams/buffer_list":61,"./internal/streams/destroy":62,"./internal/streams/from":64,"./internal/streams/state":66,"./internal/streams/stream":67,_process:181,buffer:51,dup:13,events:90,inherits:111,"string_decoder/":271,util:46}],58:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{"../errors":54,"./_stream_duplex":55,dup:14,inherits:111}],59:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{"../errors":54,"./_stream_duplex":55,"./internal/streams/destroy":62,"./internal/streams/state":66,"./internal/streams/stream":67,_process:181,buffer:51,dup:15,inherits:111,"util-deprecate":283}],60:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./end-of-stream":63,_process:181,dup:16}],61:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{buffer:51,dup:17,util:46}],62:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{_process:181,dup:18}],63:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../../../errors":54,dup:19}],64:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{dup:20}],65:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../../../errors":54,"./end-of-stream":63,dup:21}],66:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"../../../errors":54,dup:22}],67:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{dup:23,events:90}],68:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"./lib/_stream_duplex.js":55,"./lib/_stream_passthrough.js":56,"./lib/_stream_readable.js":57,"./lib/_stream_transform.js":58,"./lib/_stream_writable.js":59,"./lib/internal/streams/end-of-stream.js":63,"./lib/internal/streams/pipeline.js":65,dup:24}],69:[function(e,t,n){const i=e("block-stream2"),s=e("readable-stream");class r extends s.Writable{constructor(e,t,n={}){if(super(n),!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");this._blockstream=new i(t,{zeroPadding:!1}),this._outstandingPuts=0;let s=0;this._blockstream.on("data",t=>{this.destroyed||(this._outstandingPuts+=1,e.put(s,t,()=>{this._outstandingPuts-=1,0===this._outstandingPuts&&"function"==typeof this._finalCb&&(this._finalCb(null),this._finalCb=null)}),s+=1)}).on("error",e=>{this.destroy(e)})}_write(e,t,n){this._blockstream.write(e,t,n)}_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=r},{"block-stream2":30,"readable-stream":68}],70:[function(e,t,n){
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
var i,s;i=this,s=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(i,s,function(t){return e[t]}.bind(null,s));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),s=document.createRange();s.selectNodeContents(e),i.removeAllRanges(),i.addRange(s),t=i.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function s(){i.off(e,s),t.apply(n,arguments)}return s._=t,this.on(e,s,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,s=n.length;i<s;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],s=[];if(i&&t)for(var r=0,a=i.length;r<a;r++)i[r].fn!==t&&i[r].fn._!==t&&s.push(i[r]);return s.length?n[e]=s:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var i=n(3),s=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return s(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var i=n(5);function s(e,t,n,i,s){var a=r.apply(this,arguments);return e.addEventListener(n,a,s),{destroy:function(){e.removeEventListener(n,a,s)}}}function r(e,t,n,s){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&s.call(e,n)}}e.exports=function(e,t,n,i,r){return"function"==typeof e.addEventListener?s.apply(null,arguments):"function"==typeof n?s.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return s(e,t,n,i,r)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var i=n(0),s=n.n(i),r="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},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=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()}return a(e,[{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=Line truncated
/*! create-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const r=e("bencode"),a=e("block-stream2"),o=e("piece-length"),c=e("path"),l=e("filestream/read"),p=e("is-file"),u=e("junk"),d=e("multistream"),h=e("once"),f=e("run-parallel"),m=e("simple-sha1"),g=e("readable-stream"),b=e("./get-files");function v(e,t,i){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 a=null;e.forEach((t,n)=>{if("string"==typeof t)return;let i=t.fullPath||t.name;i||(i="Unknown File "+(n+1),t.unknownName=!0),t.path=i.split("/"),t.path[0]||t.path.shift(),t.path.length<2?a=null:0===n&&e.length>1?a=t.path[0]:t.path[0]!==a&&(a=null)}),e=e.filter(e=>{if("string"==typeof e)return!0;const t=e.path[e.path.length-1];return"."!==t[0]&&u.not(t)}),a&&e.forEach(e=>{const t=(s.isBuffer(e)||y(e))&&!e.path;"string"==typeof e||t||e.path.shift()}),!t.name&&a&&(t.name=a),t.name||e.some(e=>"string"==typeof e?(t.name=c.basename(e),!0):e.unknownName?void 0:(t.name=e.path[e.path.length-1],!0)),t.name||(t.name="Unnamed Torrent "+Date.now());const o=e.reduce((e,t)=>e+Number("string"==typeof t),0);let d=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");p(e[0],(e,t)=>{if(e)return i(e);d=t,h()})}else n.nextTick(()=>{h()});function h(){f(e.map(e=>t=>{const n={};if(_(e))n.getStream=function(e){return()=>new l(e)}(e),n.length=e.size;else if(s.isBuffer(e))n.getStream=(i=e,()=>{const e=new g.PassThrough;return e.end(i),e}),n.length=e.length;else{if(!y(e)){if("string"==typeof e){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");return void b(e,o>1||d,t)}throw new Error("invalid input type")}n.getStream=function(e,t){return()=>{const n=new g.Transform;return n._transform=function(e,n,i){t.length+=e.length,this.push(e),i()},e.pipe(n),n}}(e,n),n.length=0}var i;n.path=e.path,t(null,n)}),(e,t)=>{if(e)return i(e);t=function e(t){return t.reduce((t,n)=>Array.isArray(n)?t.concat(e(n)):t.concat(n),[])}(t),i(null,t,d)})}}function x(e,t){return e+t.length}function _(e){return"undefined"!=typeof Blob&&e instanceof Blob}function y(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}t.exports=function(e,n,c){"function"==typeof n&&([n,c]=[c,n]),v(e,n=n?Object.assign({},n):{},(e,l,p)=>{if(e)return c(e);n.singleFileTorrent=p,function(e,n,c){let l=n.announceList;l||("string"==typeof n.announce?l=[[n.announce]]:Array.isArray(n.announce)&&(l=n.announce.map(e=>[e])));l||(l=[]);i.WEBTORRENT_ANNOUNCE&&("string"==typeof i.WEBTORRENT_ANNOUNCE?l.push([[i.WEBTORRENT_ANNOUNCE]]):Array.isArray(i.WEBTORRENT_ANNOUNCE)&&(l=l.concat(i.WEBTORRENT_ANNOUNCE.map(e=>[e]))));void 0===n.announce&&void 0===n.announceList&&(l=l.concat(t.exports.announceList));"string"==typeof n.urlList&&(n.urlList=[n.urlList]);const p={info:{name:n.name},"creation date":Math.ceil((Number(n.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==l.length&&(p.announce=l[0][0],p["announce-list"]=l);void 0!==n.comment&&(p.comment=n.comment);void 0!==n.createdBy&&(p["created by"]=n.createdBy);void 0!==n.private&&(p.info.private=Number(n.private));void 0!==n.info&&Object.assign(p.info,n.info);void 0!==n.sslCert&&(p.info["ssl-cert"]=n.sslCert);void 0!==n.urlList&&(p["url-list"]=n.urlList);const u=n.pieceLength||o(e.reduce(x,0));p.info["piece length"]=u,function(e,t,n){n=h(n);const i=[];let r=0;const o=e.map(e=>e.getStream);let c=0,l=0,p=!1;const u=new d(o),f=new a(t,{zeroPadding:!1});function g(e){r+=e.length;const t=l;m(e,e=>{i[t]=e,c-=1,_()}),c+=1,l+=1}function b(){p=!0,_()}function v(e){x(),n(e)}function x(){u.removeListener("error",v),f.removeListener("data",g),f.removeListener("end",b),f.removeListener("error",v)}function _(){p&&0===c&&(x(),n(null,s.from(i.join(""),"hex"),r))}u.on("error",v),u.pipe(f).on("data",g).on("end",b).on("error",v)}(e,u,(t,i,s)=>{if(t)return c(t);p.info.pieces=i,e.forEach(e=>{delete e.getStream}),n.singleFileTorrent?p.info.length=s:p.info.files=e,c(null,r.encode(p))})}(l,n,c)})},t.exports.parseInput=function(e,t,n){"function"==typeof t&&([t,n]=[n,t]),v(e,t=t?Object.assign({},t):{},n)},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"]]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./get-files":46,_process:181,bencode:6,"block-stream2":30,buffer:51,"filestream/read":106,"is-file":113,junk:115,multistream:159,once:176,path:179,"piece-length":180,"readable-stream":86,"run-parallel":20Line truncated
/*! magnet-uri. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
t.exports=s,t.exports.decode=s,t.exports.encode=function(e){(e=Object.assign({},e)).infoHashBuffer&&(e.xt="urn:btih:"+e.infoHashBuffer.toString("hex"));e.infoHash&&(e.xt="urn:btih:"+e.infoHash);e.name&&(e.dn=e.name);e.keywords&&(e.kt=e.keywords);e.announce&&(e.tr=e.announce);e.urlList&&(e.ws=e.urlList,delete e.as);let t="magnet:?";return Object.keys(e).filter(e=>2===e.length).forEach((n,i)=>{(Array.isArray(e[n])?e[n]:[e[n]]).forEach((e,s)=>{!(i>0||s>0)||"kt"===n&&0!==s||(t+="&"),"dn"===n&&(e=encodeURIComponent(e).replace(/%20/g,"+")),"tr"!==n&&"xs"!==n&&"as"!==n&&"ws"!==n||(e=encodeURIComponent(e)),"kt"===n&&(e=encodeURIComponent(e)),t+="kt"===n&&s>0?"+"+e:`${n}=${e}`})}),t};const i=e("thirty-two");function s(e){const t={},s=e.split("magnet:?")[1];let r;if((s&&s.length>=0?s.split("&"):[]).forEach(e=>{const n=e.split("=");if(2!==n.length)return;const i=n[0];let s=n[1];"dn"===i&&(s=decodeURIComponent(s).replace(/\+/g," ")),"tr"!==i&&"xs"!==i&&"as"!==i&&"ws"!==i||(s=decodeURIComponent(s)),"kt"===i&&(s=decodeURIComponent(s).split("+")),"ix"===i&&(s=Number(s)),t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(s)):t[i]=s}),t.xt){(Array.isArray(t.xt)?t.xt:[t.xt]).forEach(e=>{if(r=e.match(/^urn:btih:(.{40})/))t.infoHash=r[1].toLowerCase();else if(r=e.match(/^urn:btih:(.{32})/)){const e=i.decode(r[1]);t.infoHash=n.from(e,"binary").toString("hex")}})}return t.infoHash&&(t.infoHashBuffer=n.from(t.infoHash,"hex")),t.dn&&(t.name=t.dn),t.kt&&(t.keywords=t.kt),"string"==typeof t.tr?t.announce=[t.tr]:Array.isArray(t.tr)?t.announce=t.tr:t.announce=[],t.urlList=[],("string"==typeof t.as||Array.isArray(t.as))&&(t.urlList=t.urlList.concat(t.as)),("string"==typeof t.ws||Array.isArray(t.ws))&&(t.urlList=t.urlList.concat(t.ws)),t.announce=Array.from(new Set(t.announce)),t.urlList=Array.from(new Set(t.urlList)),t}}).call(this,e("buffer").Buffer)},{buffer:51,"thirty-two":272}],117:[function(e,t,n){t.exports=o;var i=e("inherits"),s=e("readable-stream"),r=e("to-arraybuffer"),a="undefined"!=typeof window&&window.MediaSource;function o(e,t){var n=this;if(!(n instanceof o))return new o(e,t);if(!a)throw new Error("web browser lacks MediaSource support");t||(t={}),n._debug=t.debug,n._bufferDuration=t.bufferDuration||60,n._elem=e,n._mediaSource=new a,n._streams=[],n.detailedError=null,n._errorHandler=function(){n._elem.removeEventListener("error",n._errorHandler),n._streams.slice().forEach((function(e){e.destroy(n._elem.error)}))},n._elem.addEventListener("error",n._errorHandler),n._elem.src=window.URL.createObjectURL(n._mediaSource)}function c(e,t){var n=this;if(s.Writable.call(n),n._wrapper=e,n._elem=e._elem,n._mediaSource=e._mediaSource,n._allStreams=e._streams,n._allStreams.push(n),n._bufferDuration=e._bufferDuration,n._sourceBuffer=null,n._debugBuffers=[],n._openHandler=function(){n._onSourceOpen()},n._flowHandler=function(){n._flow()},n._errorHandler=function(e){n.destroyed||n.emit("error",e)},"string"==typeof t)n._type=t,"open"===n._mediaSource.readyState?n._createSourceBuffer():n._mediaSource.addEventListener("sourceopen",n._openHandler);else if(null===t._sourceBuffer)t.destroy(),n._type=t._type,n._mediaSource.addEventListener("sourceopen",n._openHandler);else{if(!t._sourceBuffer)throw new Error("The argument to MediaElementWrapper.createWriteStream must be a string or a previous stream returned from that function");t.destroy(),n._type=t._type,n._sourceBuffer=t._sourceBuffer,n._debugBuffers=t._debugBuffers,n._sourceBuffer.addEventListener("updateend",n._flowHandler),n._sourceBuffer.addEventListener("error",n._errorHandler)}n._elem.addEventListener("timeupdate",n._flowHandler),n.on("error",(function(e){n._wrapper.error(e)})),n.on("finish",(function(){if(!n.destroyed&&(n._finished=!0,n._allStreams.every((function(e){return e._finished})))){n._wrapper._dumpDebugData();try{n._mediaSource.endOfStream()}catch(e){}}}))}o.prototype.createWriteStream=function(e){return new c(this,e)},o.prototype.error=function(e){var t=this;t.detailedError||(t.detailedError=e),t._dumpDebugData();try{t._mediaSource.endOfStream("decode")}catch(e){}try{window.URL.revokeObjectURL(t._elem.src)}catch(e){}},o.prototype._dumpDebugData=function(){var e=this;e._debug&&(e._debug=!1,e._streams.forEach((function(e,t){var n,i,s;n=e._debugBuffers,i="mediasource-stream-"+t,(s=document.createElement("a")).href=window.URL.createObjectURL(new window.Blob(n)),s.download=i,s.click()})))},i(c,s.Writable),c.prototype._onSourceOpen=function(){var e=this;e.destroyed||(e._mediaSource.removeEventListener("sourceopen",e._openHandler),e._createSourceBuffer())},c.prototype.destroy=function(e){var t=this;t.destroyed||(t.destroyed=!0,t._allStreams.splice(t._allStreams.indexOf(t),1),t._mediaSource.removeEventListener("sourceopen",t._openHandler),t._elem.removeEventListener("timeupdate",t._flowHandler),t._sourceBuffer&&(t._sourceBuffer.removeEventListener("updateend",t._flowHandler),t._sourceBuffer.removeEventListener("error",t._errorHandler),"open"===t._mediaSource.readyState&&t._sourceBLine truncated
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/
t.exports=e("./db.json")},{"./db.json":134}],136:[function(e,t,n){
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";var i,s,r,a=e("mime-db"),o=e("path").extname,c=/^\s*([^;\s]*)(?:;|\s|$)/,l=/^text\//i;function p(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),n=t&&a[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!l.test(t[1]))&&"UTF-8"}n.charset=p,n.charsets={lookup:p},n.contentType=function(e){if(!e||"string"!=typeof e)return!1;var t=-1===e.indexOf("/")?n.lookup(e):e;if(!t)return!1;if(-1===t.indexOf("charset")){var i=n.charset(t);i&&(t+="; charset="+i.toLowerCase())}return t},n.extension=function(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),i=t&&n.extensions[t[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},n.extensions=Object.create(null),n.lookup=function(e){if(!e||"string"!=typeof e)return!1;var t=o("x."+e).toLowerCase().substr(1);if(!t)return!1;return n.types[t]||!1},n.types=Object.create(null),i=n.extensions,s=n.types,r=["nginx","apache",void 0,"iana"],Object.keys(a).forEach((function(e){var t=a[e],n=t.extensions;if(n&&n.length){i[e]=n;for(var o=0;o<n.length;o++){var c=n[o];if(s[c]){var l=r.indexOf(a[s[c]].source),p=r.indexOf(t.source);if("application/octet-stream"!==s[c]&&(l>p||l===p&&"application/"===s[c].substr(0,12)))continue}s[c]=e}}}))},{"mime-db":135,path:179}],137:[function(e,t,n){(function(t){var i=e("./index"),s=e("./descriptor"),r=e("uint64be"),a=20828448e5;n.fullBoxes={};function o(e,t,n){for(var i=t;i<n;i++)e[i]=0}function c(e,t,n){t.writeUInt32BE(Math.floor((e.getTime()+a)/1e3),n)}function l(e,t,n){t.writeUIntBE(Math.floor((e.getTime()+a)/1e3),n,6)}function p(e,t,n){t.writeUInt16BE(Math.floor(e)%65536,n),t.writeUInt16BE(Math.floor(256*e*256)%65536,n+2)}function u(e,t,n){e||(e=[0,0,0,0,0,0,0,0,0]);for(var i=0;i<e.length;i++)p(e[i],t,n+4*i)}function d(e){for(var t=new Array(e.length/4),n=0;n<t.length;n++)t[n]=m(e,4*n);return t}function h(e,t){return new Date(1e3*e.readUIntBE(t,6)-a)}function f(e,t){return new Date(1e3*e.readUInt32BE(t)-a)}function m(e,t){return e.readUInt16BE(t)+e.readUInt16BE(t+2)/65536}function g(e,t){return e[t]+e[t+1]/256}function b(e,t,n){var i;for(i=0;i<n&&0!==e[t+i];i++);return e.toString("utf8",t,t+i)}["mvhd","tkhd","mdhd","vmhd","smhd","stsd","esds","stsz","stco","co64","stss","stts","ctts","stsc","dref","elst","hdlr","mehd","trex","mfhd","tfhd","tfdt","trun"].forEach((function(e){n.fullBoxes[e]=!0})),n.ftyp={},n.ftyp.encode=function(e,i,s){i=i?i.slice(s):t.alloc(n.ftyp.encodingLength(e));var r=e.compatibleBrands||[];i.write(e.brand,0,4,"ascii"),i.writeUInt32BE(e.brandVersion,4);for(var a=0;a<r.length;a++)i.write(r[a],8+4*a,4,"ascii");return n.ftyp.encode.bytes=8+4*r.length,i},n.ftyp.decode=function(e,t){for(var n=(e=e.slice(t)).toString("ascii",0,4),i=e.readUInt32BE(4),s=[],r=8;r<e.length;r+=4)s.push(e.toString("ascii",r,r+4));return{brand:n,brandVersion:i,compatibleBrands:s}},n.ftyp.encodingLength=function(e){return 8+4*(e.compatibleBrands||[]).length},n.mvhd={},n.mvhd.encode=function(e,i,s){return i=i?i.slice(s):t.alloc(96),c(e.ctime||new Date,i,0),c(e.mtime||new Date,i,4),i.writeUInt32BE(e.timeScale||0,8),i.writeUInt32BE(e.duration||0,12),p(e.preferredRate||0,i,16),function(e,t,n){t[n]=Math.floor(e)%256,t[n+1]=Math.floor(256*e)%256}(e.preferredVolume||0,i,20),o(i,22,32),u(e.matrix,i,32),i.writeUInt32BE(e.previewTime||0,68),i.writeUInt32BE(e.previewDuration||0,72),i.writeUInt32BE(e.posterTime||0,76),i.writeUInt32BE(e.selectionTime||0,80),i.writeUInt32BE(e.selectionDuration||0,84),i.writeUInt32BE(e.currentTime||0,88),i.writeUInt32BE(e.nextTrackId||0,92),n.mvhd.encode.bytes=96,i},n.mvhd.decode=function(e,t){return{ctime:f(e=e.slice(t),0),mtime:f(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),preferredRate:m(e,16),preferredVolume:g(e,20),matrix:d(e.slice(32,68)),previewTime:e.readUInt32BE(68),previewDuration:e.readUInt32BE(72),posterTime:e.readUInt32BE(76),selectionTime:e.readUInt32BE(80),selectionDuration:e.readUInt32BE(84),currentTime:e.readUInt32BE(88),nextTrackId:e.readUInt32BE(92)}},n.mvhd.encodingLength=function(e){return 96},n.tkhd={},n.tkhd.encode=function(e,i,s){return i=i?i.slice(s):t.alloc(80),c(e.ctime||new Date,i,0),c(e.mtime||new Date,i,4),i.writeUInt32BE(e.trackId||0,8),o(i,12,16),i.writeUInt32BE(e.duration||0,16),o(i,20,28),i.writeUInt16BE(e.layer||0,28),i.writeUInt16BE(e.alternateGroup||0,30),i.writeUInt16BE(e.volume||0,32),u(e.matrix,i,36),i.writeUInt32BE(e.trackWidth||0,72),i.writeUInt32BE(e.trackHeight||0,76),n.tkhd.encode.bytes=80,i},n.tkhd.decode=function(e,t){return{ctime:f(e=e.slice(t),0),mtime:f(e,4),trackId:e.readUInt32BE(8),duration:e.readUInt32BE(16),layer:e.readUInt16BE(28),alternateGroup:e.readUInt16BE(30),volume:e.readUInt16BE(32),matrix:d(e.slice(36,72)),trackWidth:e.readUInt32BE(72),trackHeight:e.readUInt32BE(76)}},n.tkhd.encodingLength=function(e){return 80},n.mdhd={},n.mdhd.encode=function(e,i,s){return 1===e.version?(i=i?i.slice(s):t.alloc(32),l(e.ctime||new Date,i,0),l(e.mtime||new Date,i,8),i.writeUInt32BE(e.timeScale||0,16),i.writeUIntBE(e.duration||0,20,6),i.writeUInt16BE(e.lanLine truncated
/*! parse-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const s=e("bencode"),r=e("blob-to-buffer"),a=e("fs"),o=e("simple-get"),c=e("magnet-uri"),l=e("path"),p=e("simple-sha1");function u(e){if("string"==typeof e&&/^(stream-)?magnet:/.test(e)){const t=c(e);if(!t.infoHash)throw new Error("Invalid torrent identifier");return t}if("string"==typeof e&&(/^[a-f0-9]{40}$/i.test(e)||/^[a-z2-7]{32}$/i.test(e)))return c("magnet:?xt=urn:btih:"+e);if(i.isBuffer(e)&&20===e.length)return c("magnet:?xt=urn:btih:"+e.toString("hex"));if(i.isBuffer(e))return function(e){i.isBuffer(e)&&(e=s.decode(e));h(e.info,"info"),h(e.info["name.utf-8"]||e.info.name,"info.name"),h(e.info["piece length"],"info['piece length']"),h(e.info.pieces,"info.pieces"),e.info.files?e.info.files.forEach(e=>{h("number"==typeof e.length,"info.files[0].length"),h(e["path.utf-8"]||e.path,"info.files[0].path")}):h("number"==typeof e.info.length,"info.length");const t={info:e.info,infoBuffer:s.encode(e.info),name:(e.info["name.utf-8"]||e.info.name).toString(),announce:[]};t.infoHash=p.sync(t.infoBuffer),t.infoHashBuffer=i.from(t.infoHash,"hex"),void 0!==e.info.private&&(t.private=!!e.info.private);e["creation date"]&&(t.created=new Date(1e3*e["creation date"]));e["created by"]&&(t.createdBy=e["created by"].toString());i.isBuffer(e.comment)&&(t.comment=e.comment.toString());Array.isArray(e["announce-list"])&&e["announce-list"].length>0?e["announce-list"].forEach(e=>{e.forEach(e=>{t.announce.push(e.toString())})}):e.announce&&t.announce.push(e.announce.toString());i.isBuffer(e["url-list"])&&(e["url-list"]=e["url-list"].length>0?[e["url-list"]]:[]);t.urlList=(e["url-list"]||[]).map(e=>e.toString()),t.announce=Array.from(new Set(t.announce)),t.urlList=Array.from(new Set(t.urlList));const n=e.info.files||[e.info];t.files=n.map((e,i)=>{const s=[].concat(t.name,e["path.utf-8"]||e.path||[]).map(e=>e.toString());return{path:l.join.apply(null,[l.sep].concat(s)).slice(1),name:s[s.length-1],length:e.length,offset:n.slice(0,i).reduce(d,0)}}),t.length=n.reduce(d,0);const r=t.files[t.files.length-1];return t.pieceLength=e.info["piece length"],t.lastPieceLength=(r.offset+r.length)%t.pieceLength||t.pieceLength,t.pieces=function(e){const t=[];for(let n=0;n<e.length;n+=20)t.push(e.slice(n,n+20).toString("hex"));return t}(e.info.pieces),t}(e);if(e&&e.infoHash)return e.infoHash=e.infoHash.toLowerCase(),e.announce||(e.announce=[]),"string"==typeof e.announce&&(e.announce=[e.announce]),e.urlList||(e.urlList=[]),e;throw new Error("Invalid torrent identifier")}function d(e,t){return e+t.length}function h(e,t){if(!e)throw new Error("Torrent is missing required field: "+t)}t.exports=u,t.exports.remote=function(e,t){let i;if("function"!=typeof t)throw new Error("second argument must be a Function");try{i=u(e)}catch(e){}i&&i.infoHash?n.nextTick(()=>{t(null,i)}):(s=e,"undefined"!=typeof Blob&&s instanceof Blob?r(e,(e,n)=>{if(e)return t(new Error("Error converting Blob: "+e.message));c(n)}):"function"==typeof o&&/^https?:/.test(e)?o.concat({url:e,timeout:3e4,headers:{"user-agent":"WebTorrent (https://webtorrent.io)"}},(e,n,i)=>{if(e)return t(new Error("Error downloading torrent: "+e.message));c(i)}):"function"==typeof a.readFile&&"string"==typeof e?a.readFile(e,(e,n)=>{if(e)return t(new Error("Invalid torrent identifier"));c(n)}):n.nextTick(()=>{t(new Error("Invalid torrent identifier"))}));var s;function c(e){try{i=u(e)}catch(e){return t(e)}i&&i.infoHash?t(null,i):t(new Error("Invalid torrent identifier"))}},t.exports.toMagnetURI=c.encode,t.exports.toTorrentFile=function(e){const t={info:e.info};t["announce-list"]=(e.announce||[]).map(e=>(t.announce||(t.announce=e),[e=i.from(e,"utf8")])),t["url-list"]=e.urlList||[],void 0!==e.private&&(t.private=Number(e.private));e.created&&(t["creation date"]=e.created.getTime()/1e3|0);e.createdBy&&(t["created by"]=e.createdBy);e.comment&&(t.comment=e.comment);return s.encode(t)},i.alloc(0)}).call(this,e("_process"),e("buffer").Buffer)},{_process:181,bencode:6,"blob-to-buffer":29,buffer:51,fs:47,"magnet-uri":116,path:179,"simple-get":213,"simple-sha1":230}],179:[function(e,t,n){(function(e){function t(e,t){for(var n=0,i=e.length-1;i>=0;i--){var s=e[i];"."===s?e.splice(i,1):".."===s?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var n=[],i=0;i<e.length;i++)t(e[i],i,e)&&n.push(e[i]);return n}n.resolve=function(){for(var n="",s=!1,r=arguments.length-1;r>=-1&&!s;r--){var a=r>=0?arguments[r]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,s="/"===a.charAt(0))}return(s?"/":"")+(n=t(i(n.split("/"),(function(e){return!!e})),!s).join("/"))||"."},n.normalize=function(e){var r=n.isAbsolute(e),a="/"===s(e,-1);return(e=t(i(e.split("/"),(function(e){return!!e})),!r).join("/"))||r||(e="."),e&&a&&(e+="/"),(r?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(i(e,(function(e,t){if("strLine truncated
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
let i;t.exports="function"==typeof queueMicrotask?queueMicrotask:e=>(i||(i=Promise.resolve())).then(e).catch(e=>setTimeout(()=>{throw e},0))},{}],188:[function(e,t,n){t.exports=function(e){var t=0;return function(){if(t===e.length)return null;var n=e.length-t,i=Math.random()*n|0,s=e[t+i],r=e[t];return e[t]=s,e[t+i]=r,t++,s}}},{}],189:[function(e,t,n){(function(n,i){"use strict";var s=65536,r=4294967295;var a=e("safe-buffer").Buffer,o=i.crypto||i.msCrypto;o&&o.getRandomValues?t.exports=function(e,t){if(e>r)throw new RangeError("requested too many random bytes");var i=a.allocUnsafe(e);if(e>0)if(e>s)for(var c=0;c<e;c+=s)o.getRandomValues(i.slice(c,c+s));else o.getRandomValues(i);if("function"==typeof t)return n.nextTick((function(){t(null,i)}));return i}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:181,"safe-buffer":211}],190:[function(e,t,n){const{Writable:i,PassThrough:s}=e("readable-stream");t.exports=class extends i{constructor(e,t={}){super(t),this.destroyed=!1,this._queue=[],this._position=e||0,this._cb=null,this._buffer=null,this._out=null}_write(e,t,n){let i=!0;for(;;){if(this.destroyed)return;if(0===this._queue.length)return this._buffer=e,void(this._cb=n);this._buffer=null;var s=this._queue[0];const t=Math.max(s.start-this._position,0),r=s.end-this._position;if(t>=e.length)return this._position+=e.length,n(null);let a;if(r>e.length){this._position+=e.length,a=0===t?e:e.slice(t),i=s.stream.write(a)&&i;break}this._position+=r,a=0===t&&r===e.length?e:e.slice(t,r),i=s.stream.write(a)&&i,s.last&&s.stream.end(),e=e.slice(r),this._queue.shift()}i?n(null):s.stream.once("drain",n.bind(null,null))}slice(e){if(this.destroyed)return null;Array.isArray(e)||(e=[e]);const t=new s;return e.forEach((n,i)=>{this._queue.push({start:n.start,end:n.end,stream:t,last:i===e.length-1})}),this._buffer&&this._write(this._buffer,null,this._cb),t}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e))}}},{"readable-stream":205}],191:[function(e,t,n){arguments[4][10][0].apply(n,arguments)},{dup:10}],192:[function(e,t,n){arguments[4][11][0].apply(n,arguments)},{"./_stream_readable":194,"./_stream_writable":196,_process:181,dup:11,inherits:111}],193:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./_stream_transform":195,dup:12,inherits:111}],194:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"../errors":191,"./_stream_duplex":192,"./internal/streams/async_iterator":197,"./internal/streams/buffer_list":198,"./internal/streams/destroy":199,"./internal/streams/from":201,"./internal/streams/state":203,"./internal/streams/stream":204,_process:181,buffer:51,dup:13,events:90,inherits:111,"string_decoder/":271,util:46}],195:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{"../errors":191,"./_stream_duplex":192,dup:14,inherits:111}],196:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{"../errors":191,"./_stream_duplex":192,"./internal/streams/destroy":199,"./internal/streams/state":203,"./internal/streams/stream":204,_process:181,buffer:51,dup:15,inherits:111,"util-deprecate":283}],197:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./end-of-stream":200,_process:181,dup:16}],198:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{buffer:51,dup:17,util:46}],199:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{_process:181,dup:18}],200:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../../../errors":191,dup:19}],201:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{dup:20}],202:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../../../errors":191,"./end-of-stream":200,dup:21}],203:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"../../../errors":191,dup:22}],204:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{dup:23,events:90}],205:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"./lib/_stream_duplex.js":192,"./lib/_stream_passthrough.js":193,"./lib/_stream_readable.js":194,"./lib/_stream_transform.js":195,"./lib/_stream_writable.js":196,"./lib/internal/streams/end-of-stream.js":200,"./lib/internal/streams/pipeline.js":202,dup:24}],206:[function(e,t,n){
/*! render-media. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
n.render=function(e,t,n,i){"function"==typeof n&&(i=n,n={});n||(n={});i||(i=function(){});x(e),_(n),"string"==typeof t&&(t=document.querySelector(t));b(e,(function(i){if(t.nodeName!==i.toUpperCase()){var s=a.extname(e.name).toLowerCase();throw new Error('Cannot render "'+s+'" inside a "'+t.nodeName.toLowerCase()+'" element, expected "'+i+'"')}return"video"!==i&&"audio"!==i||y(t,n),t}),n,i)},n.append=function(e,t,n,i){"function"==typeof n&&(i=n,n={});n||(n={});i||(i=function(){});x(e),_(n),"string"==typeof t&&(t=document.querySelector(t));if(t&&("VIDEO"===t.nodeName||"AUDIO"===t.nodeName))throw new Error("Invalid video/audio node argument. Argument must be root element that video/audio tag will be appended to.");function s(e){var n=document.createElement(e);return t.appendChild(n),n}b(e,(function(e){return"video"===e||"audio"===e?function(e){var i=s(e);return y(i,n),t.appendChild(i),i}(e):s(e)}),n,(function(e,t){e&&t&&t.remove(),i(e,t)}))},n.mime=e("./lib/mime.json");var i=e("debug")("render-media"),s=e("is-ascii"),r=e("mediasource"),a=e("path"),o=e("stream-to-blob-url"),c=e("videostream"),l=[".m4a",".m4b",".m4p",".m4v",".mp4"],p=[".m4v",".mkv",".mp4",".webm"],u=[].concat(p,[".m4a",".m4b",".m4p",".mp3"]),d=[".mov",".ogv"],h=[".aac",".oga",".ogg",".wav",".flac"],f=[".bmp",".gif",".jpeg",".jpg",".png",".svg"],m=[".css",".html",".js",".md",".pdf",".srt",".txt"],g="undefined"!=typeof window&&window.MediaSource;function b(e,t,n,o){var b,x=a.extname(e.name).toLowerCase(),_=0;function y(){return!("number"==typeof e.length&&e.length>n.maxBlobLength)||(i("File length too large for Blob URL approach: %d (max: %d)",e.length,n.maxBlobLength),C(new Error("File length too large for Blob URL approach: "+e.length+" (max: "+n.maxBlobLength+")")),!1)}function w(n){y()&&(b=t(n),v(e,(function(e,t){if(e)return C(e);b.addEventListener("error",C),b.addEventListener("loadstart",k),b.addEventListener("canplay",E),b.src=t})))}function k(){b.removeEventListener("loadstart",k),n.autoplay&&b.play()}function E(){b.removeEventListener("canplay",E),o(null,b)}function S(){v(e,(function(e,n){if(e)return C(e);".pdf"!==x?((b=t("iframe")).sandbox="allow-forms allow-scripts",b.src=n):((b=t("object")).setAttribute("typemustmatch",!0),b.setAttribute("type","application/pdf"),b.setAttribute("data",n)),o(null,b)}))}function C(t){t.message='Error rendering file "'+e.name+'": '+t.message,i(t.message),o(t)}u.indexOf(x)>=0?function(){var n=p.indexOf(x)>=0?"video":"audio";g?l.indexOf(x)>=0?s():o():u();function s(){i("Use `videostream` package for "+e.name),f(),b.addEventListener("error",d),b.addEventListener("loadstart",k),b.addEventListener("canplay",E),new c(e,b)}function o(){i("Use MediaSource API for "+e.name),f(),b.addEventListener("error",h),b.addEventListener("loadstart",k),b.addEventListener("canplay",E);var t,n=new r(b).createWriteStream((t=e.name,{".m4a":'audio/mp4; codecs="mp4a.40.5"',".m4b":'audio/mp4; codecs="mp4a.40.5"',".m4p":'audio/mp4; codecs="mp4a.40.5"',".m4v":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".mkv":'video/webm; codecs="avc1.640029, mp4a.40.5"',".mp3":"audio/mpeg",".mp4":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".webm":'video/webm; codecs="vorbis, vp8"'}[a.extname(t).toLowerCase()]));e.createReadStream().pipe(n),_&&(b.currentTime=_)}function u(){i("Use Blob URL for "+e.name),f(),b.addEventListener("error",C),b.addEventListener("loadstart",k),b.addEventListener("canplay",E),v(e,(function(e,t){if(e)return C(e);b.src=t,_&&(b.currentTime=_)}))}function d(e){i("videostream error: fallback to MediaSource API: %o",e.message||e),b.removeEventListener("error",d),b.removeEventListener("canplay",E),o()}function h(e){i("MediaSource API error: fallback to Blob URL: %o",e.message||e),y()&&(b.removeEventListener("error",h),b.removeEventListener("canplay",E),u())}function f(){b||(b=t(n)).addEventListener("progress",(function(){_=b.currentTime}))}}():d.indexOf(x)>=0?w("video"):h.indexOf(x)>=0?w("audio"):f.indexOf(x)>=0?(b=t("img"),v(e,(function(t,n){if(t)return C(t);b.src=n,b.alt=e.name,o(null,b)}))):m.indexOf(x)>=0?S():function(){i('Unknown file extension "%s" - will attempt to render into iframe',x);var t="";function n(){s(t)?(i('File extension "%s" appears ascii, so will render.',x),S()):(i('File extension "%s" appears non-ascii, will not render.',x),o(new Error('Unsupported file type "'+x+'": Cannot append to DOM')))}e.createReadStream({start:0,end:1e3}).setEncoding("utf8").on("data",(function(e){t+=e})).on("end",n).on("error",o)}()}function v(e,t){var i=a.extname(e.name).toLowerCase();o(e.createReadStream(),n.mime[i]).then(e=>t(null,e),e=>t(e))}function x(e){if(null==e)throw new Error("file cannot be null or undefined");if("string"!=typeof e.name)throw new Error("missing or invalid file.name property");if("function"!=typeof e.createReadStream)throw new Error("missing or invalid file.createReadStream property")}function _(e){null==e.autoplay&&(e.autoplay=!1),null==e.muted&&(e.muted=!1),null==e.controls&&(e.controls=!0),null==e.maxBLine truncated
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var i=e("buffer"),s=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return s(e,t,n)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=i:(r(i,n),n.Buffer=a),a.prototype=Object.create(s.prototype),r(s,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=s(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},{buffer:51}],212:[function(e,t,n){(function(e){
/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.exports=function(t,n){var i=[];t.on("data",(function(e){i.push(e)})),t.once("end",(function(){n&&n(null,e.concat(i)),n=null})),t.once("error",(function(e){n&&n(e),n=null}))}}).call(this,e("buffer").Buffer)},{buffer:51}],213:[function(e,t,n){(function(n){t.exports=u;const i=e("simple-concat"),s=e("decompress-response"),r=e("http"),a=e("https"),o=e("once"),c=e("querystring"),l=e("url"),p=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function u(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=o(t),e.url){const{hostname:t,port:n,protocol:i,auth:s,path:r}=l.parse(e.url);delete e.url,t||n||i||s?Object.assign(e,{hostname:t,port:n,protocol:i,auth:s,path:r}):e.path=r}const i={"accept-encoding":"gzip, deflate"};let d;e.headers&&Object.keys(e.headers).forEach(t=>i[t.toLowerCase()]=e.headers[t]),e.headers=i,e.body?d=e.json&&!p(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"),p(d)||(e.headers["content-length"]=n.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 h=("https:"===e.protocol?a:r).request(e,n=>{if(!1!==e.followRedirects&&n.statusCode>=300&&n.statusCode<400&&n.headers.location)return e.url=n.headers.location,delete e.headers.host,n.resume(),"POST"===e.method&&[301,302].includes(n.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):u(e,t);const i="function"==typeof s&&"HEAD"!==e.method;t(null,i?s(n):n)});return h.on("timeout",()=>{h.abort(),t(new Error("Request timed out"))}),h.on("error",t),p(d)?d.on("error",t).pipe(h):h.end(d),h}u.concat=(e,t)=>u(e,(n,s)=>{if(n)return t(n);i(s,(n,i)=>{if(n)return t(n);if(e.json)try{i=JSON.parse(i.toString())}catch(n){return t(n,s,i)}t(null,s,i)})}),["get","post","put","patch","head","delete"].forEach(e=>{u[e]=(t,n)=>("string"==typeof t&&(t={url:t}),u(Object.assign({method:e.toUpperCase()},t),n))})}).call(this,e("buffer").Buffer)},{buffer:51,"decompress-response":46,http:249,https:108,once:176,querystring:186,"simple-concat":212,url:280}],214:[function(e,t,n){(function(n){
/*! simple-peer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var i=e("debug")("simple-peer"),s=e("get-browser-rtc"),r=e("randombytes"),a=e("readable-stream"),o=e("queue-microtask"),c=65536;function l(e){return e.replace(/a=ice-options:trickle\s\n/g,"")}function p(e,t){return"string"==typeof e&&(e=new Error(e)),e.error instanceof Error&&(e=e.error),e.code=t,e}class u extends a.Duplex{constructor(e){if(super(e=Object.assign({allowHalfOpen:!1},e)),this._id=r(4).toString("hex").slice(0,7),this._debug("new peer %o",e),this.channelName=e.initiator?e.channelName||r(20).toString("hex"):null,this.initiator=e.initiator||!1,this.channelConfig=e.channelConfig||u.channelConfig,this.negotiated=this.channelConfig.negotiated,this.config=Object.assign({},u.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._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:s(),!this._wrtc)throw"undefined"==typeof window?p("No WebRTC support: Specify `opts.wrtc` option in this environment","ERR_WEBRTC_SUPPORT"):p("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=!this.negotiated&&!this.initiator,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._firstStable=!0,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 o(()=>this.destroy(p(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)},this.initiator||this.negotiated?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.initiator&&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.destroyed)throw p("cannot signal after peer is destroyed","ERR_SIGNALING");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(p(e,"ERR_SET_REMOTE_DESCRIPTION"))}),e.sdp||e.candidate||e.renegotiate||e.transceiverRequest||this.destroy(p("signal() called with invalid signal data","ERR_SIGNALING"))}_addIceCandidate(e){var t=new this._wrtc.RTCIceCandidate(e);this._pc.addIceCandidate(t).catch(e=>{var n;!t.address||t.address.endsWith(".local")?(n="Ignoring unsupported ICE candidate.",console.warn(n)):this.destroy(p(e,"ERR_ADD_ICE_CANDIDATE"))})}send(e){this._channel.send(e)}addTransceiver(e,t){if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(e,t),this._needsNegotiation()}catch(e){this.destroy(p(e,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{transceiverRequest:{kind:e,init:t}})}addStream(e){this._debug("addStream()"),e.getTracks().forEach(t=>{this.addTrack(t,e)})}addTrack(e,t){this._debug("addTrack()");var n=this._senderMap.get(e)||new Map,i=n.get(t);if(i)throw i.removed?p("Track has been removed. You should enable/disable tracks that you want to re-add.","ERR_SENDER_REMOVED"):p("Track has already been added to that stream.","ERR_SENDER_ALREADY_ADDEDLine truncated
/*! stream-to-blob-url. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.exports=async function(e,t){const n=await i(e,t);return URL.createObjectURL(n)};const i=e("stream-to-blob")},{"stream-to-blob":269}],269:[function(e,t,n){
/*! 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((n,i)=>{const s=[];e.on("data",e=>s.push(e)).once("end",()=>{const e=null!=t?new Blob(s,{type:t}):new Blob(s);n(e)}).once("error",i)})}},{}],270:[function(e,t,n){(function(n){
/*! stream-with-known-length-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var i=e("once");t.exports=function(e,t,s){s=i(s);var r=n.alloc(t),a=0;e.on("data",(function(e){e.copy(r,a),a+=e.length})).on("end",(function(){s(null,r)})).on("error",s)}}).call(this,e("buffer").Buffer)},{buffer:51,once:176}],271:[function(e,t,n){"use strict";var i=e("safe-buffer").Buffer,s=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=p,this.end=u,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}n.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var s=a(t[i]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--i<n||-2===s)return 0;if((s=a(t[i]))>=0)return s>0&&(e.lastNeed=s-2),s;if(--i<n||-2===s)return 0;if((s=a(t[i]))>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":211}],272:[function(e,t,n){var i=e("./thirty-two");n.encode=i.encode,n.decode=i.decode},{"./thirty-two":273}],273:[function(e,t,n){(function(e){"use strict";var t=[255,255,26,27,28,29,30,31,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255];n.encode=function(t){e.isBuffer(t)||(t=new e(t));for(var n,i,s=0,r=0,a=0,o=0,c=new e(8*(n=t,i=Math.floor(n.length/5),n.length%5==0?i:i+1));s<t.length;){var l=t[s];a>3?(o=(o=l&255>>a)<<(a=(a+5)%8)|(s+1<t.length?t[s+1]:0)>>8-a,s++):(o=l>>8-(a+5)&31,0===(a=(a+5)%8)&&s++),c[r]="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".charCodeAt(o),r++}for(s=r;s<c.length;s++)c[s]=61;return c},n.decode=function(n){var i,s=0,r=0,a=0;e.isBuffer(n)||(n=new e(n));for(var o=new e(Math.ceil(5*n.length/8)),c=0;c<n.length&&61!==n[c];c++){var l=n[c]-48;if(!(l<t.length))throw new Error("Invalid input - it is not base32 encoded string");r=t[l],s<=3?0===(s=(s+5)%8)?(i|=r,o[a]=i,a++,i=0):i|=255&r<<8-s:(i|=255&r>>>(s=(s+5)%8),o[a]=i,a++,i=255&r<<8-s)}return o.sliceLine truncated
/*! torrent-discovery. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const i=e("debug")("torrent-discovery"),s=e("bittorrent-dht/client"),r=e("events").EventEmitter,a=e("run-parallel"),o=e("bittorrent-tracker/client");t.exports=class extends r{constructor(e){if(super(),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!n.browser&&!e.port)throw new Error("Option `port` is required");this.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),this.infoHash="string"==typeof e.infoHash?e.infoHash.toLowerCase():e.infoHash.toString("hex"),this._port=e.port,this._userAgent=e.userAgent,this.destroyed=!1,this._announce=e.announce||[],this._intervalMs=e.intervalMs||9e5,this._trackerOpts=null,this._dhtAnnouncing=!1,this._dhtTimeout=!1,this._internalDHT=!1,this._onWarning=e=>{this.emit("warning",e)},this._onError=e=>{this.emit("error",e)},this._onDHTPeer=(e,t)=>{t.toString("hex")===this.infoHash&&this.emit("peer",`${e.host}:${e.port}`,"dht")},this._onTrackerPeer=e=>{this.emit("peer",e,"tracker")},this._onTrackerAnnounce=()=>{this.emit("trackerAnnounce")};const t=(e,t)=>{const n=new s(t);return n.on("warning",this._onWarning),n.on("error",this._onError),n.listen(e),this._internalDHT=!0,n};!1===e.tracker?this.tracker=null:e.tracker&&"object"==typeof e.tracker?(this._trackerOpts=Object.assign({},e.tracker),this.tracker=this._createTracker()):this.tracker=this._createTracker(),!1===e.dht||"function"!=typeof s?this.dht=null:e.dht&&"function"==typeof e.dht.addNode?this.dht=e.dht:e.dht&&"object"==typeof e.dht?this.dht=t(e.dhtPort,e.dht):this.dht=t(e.dhtPort),this.dht&&(this.dht.on("peer",this._onDHTPeer),this._dhtAnnounce())}updatePort(e){e!==this._port&&(this._port=e,this.dht&&this._dhtAnnounce(),this.tracker&&(this.tracker.stop(),this.tracker.destroy(()=>{this.tracker=this._createTracker()})))}complete(e){this.tracker&&this.tracker.complete(e)}destroy(e){if(this.destroyed)return;this.destroyed=!0,clearTimeout(this._dhtTimeout);const t=[];this.tracker&&(this.tracker.stop(),this.tracker.removeListener("warning",this._onWarning),this.tracker.removeListener("error",this._onError),this.tracker.removeListener("peer",this._onTrackerPeer),this.tracker.removeListener("update",this._onTrackerAnnounce),t.push(e=>{this.tracker.destroy(e)})),this.dht&&this.dht.removeListener("peer",this._onDHTPeer),this._internalDHT&&(this.dht.removeListener("warning",this._onWarning),this.dht.removeListener("error",this._onError),t.push(e=>{this.dht.destroy(e)})),a(t,e),this.dht=null,this.tracker=null,this._announce=null}_createTracker(){const e=Object.assign({},this._trackerOpts,{infoHash:this.infoHash,announce:this._announce,peerId:this.peerId,port:this._port,userAgent:this._userAgent}),t=new o(e);return t.on("warning",this._onWarning),t.on("error",this._onError),t.on("peer",this._onTrackerPeer),t.on("update",this._onTrackerAnnounce),t.setInterval(this._intervalMs),t.start(),t}_dhtAnnounce(){this._dhtAnnouncing||(i("dht announce"),this._dhtAnnouncing=!0,clearTimeout(this._dhtTimeout),this.dht.announce(this.infoHash,this._port,e=>{this._dhtAnnouncing=!1,i("dht announce complete"),e&&this.emit("warning",e),this.emit("dhtAnnounce"),this.destroyed||(this._dhtTimeout=setTimeout(()=>{this._dhtAnnounce()},this._intervalMs+Math.floor(Math.random()*this._intervalMs/5)),this._dhtTimeout.unref&&this._dhtTimeout.unref())}))}}}).call(this,e("_process"))},{_process:181,"bittorrent-dht/client":46,"bittorrent-tracker/client":25,debug:87,events:90,"run-parallel":209}],276:[function(e,t,n){(function(e){const n=16384;class i{constructor(e){this.length=e,this.missing=e,this.sources=null,this._chunks=Math.ceil(e/n),this._remainder=e%n||n,this._buffered=0,this._buffer=null,this._cancellations=null,this._reservations=0,this._flushed=!1}chunkLength(e){return e===this._chunks-1?this._remainder:n}chunkLengthRemaining(e){return this.length-e*n}chunkOffset(e){return e*n}reserve(){return this.init()?this._cancellations.length?this._cancellations.pop():this._reservations<this._chunks?this._reservations++:-1:-1}reserveRemaining(){if(!this.init())return-1;if(this._reservations<this._chunks){const e=this._reservations;return this._reservations=this._chunks,e}return-1}cancel(e){this.init()&&this._cancellations.push(e)}cancelRemaining(e){this.init()&&(this._reservations=e)}get(e){return this.init()?this._buffer[e]:null}set(e,t,i){if(!this.init())return!1;const s=t.length,r=Math.ceil(s/n);for(let s=0;s<r;s++)if(!this._buffer[e+s]){const r=s*n,a=t.slice(r,r+n);this._buffered++,this._buffer[e+s]=a,this.missing-=a.length,this.sources.includes(i)||this.sources.push(i)}return this._buffered===this._chunks}flush(){if(!this._buffer||this._chunks!==this._buffered)return null;const t=e.concat(this._buffer,this.length);return this._buffer=null,this._cancellations=null,this.sources=null,this._flushed=!0,t}init(){return!this._flushed&&(this._buffer||(this._buffer=new Array(this._chunks),this._cancellations=[],this.sources=[]),!0)}}Object.defineProperty(i,"BLOCK_LENGTH",{value:n})Line truncated
/*! ut_metadata. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const{EventEmitter:i}=e("events"),s=e("bencode"),r=e("bitfield"),a=e("debug")("ut_metadata"),o=e("simple-sha1"),c=16384;t.exports=e=>{class t extends i{constructor(t){super(),this._wire=t,this._fetching=!1,this._metadataComplete=!1,this._metadataSize=null,this._remainingRejects=null,this._bitfield=new r(0,{grow:1e3}),n.isBuffer(e)&&this.setMetadata(e)}onHandshake(e,t,n){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,n;try{const i=e.toString(),r=i.indexOf("ee")+2;t=s.decode(i.substring(0,r)),n=e.slice(r)}catch(e){return}switch(t.msg_type){case 0:this._onRequest(t.piece);break;case 1:this._onData(t.piece,n,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=s.decode(e).info;t&&(e=s.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",s.encode({info:s.decode(this.metadata)})),!0)}_send(e,t){let i=s.encode(e);n.isBuffer(t)&&(i=n.concat([i,t])),this._wire.extended("ut_metadata",i)}_request(e){this._send({msg_type:0,piece:e})}_data(e,t,n){const i={msg_type:1,piece:e};"number"==typeof n&&(i.total_size=n),this._send(i,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 n=t+c;n>this._metadataSize&&(n=this._metadataSize);const i=this.metadata.slice(t,n);this._data(e,i,this._metadataSize)}_onData(e,t,n){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=n.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 r(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,e("buffer").Buffer)},{bencode:6,bitfield:8,buffer:51,debug:87,events:90,"simple-sha1":230}],283:[function(e,t,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],284:[function(e,t,n){(function(n){const i=e("binary-search"),s=e("events"),r=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 s{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=r.decode();const n=this._file.createReadStream({start:e});n.pipe(this._decoder);const i=s=>{"moov"===s.type?(this._decoder.removeListener("box",i),this._decoder.decode(e=>{n.destroy();try{this._processMoov(e)}catch(e){e.message="Cannot parse mp4 file: "+e.message,this.emit("error",e)}})):s.length<4096?(t+=s.length,this._decoder.ignore()):(this._decoder.removeListener("box",i),t+=s.length,n.destroy(),this._decoder.destroy(),this._findMoov(e+t))};this._decoder.on("box",i)}_processMoov(e){const t=e.traks;this._tracks=[],this._hasVideo=!1,this._hasAudio=!1;for(let n=0;n<t.length;n++){const s=t[n],r=s.mdia.minf.stbl,a=r.stsd.entries[0],o=s.mdia.hdlr.handlerType;let l,p;if("vide"===o&&"avc1"===a.type){if(this._hasVideo)continue;this._hasVideo=!0,l="avc1",a.avcC&&(l+="."+a.avcC.mimeCodec),p=Line truncated
/*! webtorrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const{EventEmitter:r}=e("events"),a=e("simple-concat"),o=e("create-torrent"),c=e("debug")("webtorrent"),l=e("bittorrent-dht/client"),p=e("load-ip-set"),u=e("run-parallel"),d=e("parse-torrent"),h=e("path"),f=e("simple-peer"),m=e("randombytes"),g=e("speedometer"),b=e("./lib/tcp-pool"),v=e("./lib/torrent"),x=e("./package.json").version,_=x.replace(/\d*./g,e=>("0"+e%100).slice(-2)).slice(0,4),y=`-WW${_}-`;class w extends r{constructor(e={}){super(),"string"==typeof e.peerId?this.peerId=e.peerId:s.isBuffer(e.peerId)?this.peerId=e.peerId.toString("hex"):this.peerId=s.from(y+m(9).toString("base64")).toString("hex"),this.peerIdBuffer=s.from(this.peerId,"hex"),"string"==typeof e.nodeId?this.nodeId=e.nodeId:s.isBuffer(e.nodeId)?this.nodeId=e.nodeId.toString("hex"):this.nodeId=m(20).toString("hex"),this.nodeIdBuffer=s.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=e.torrentPort||0,this.dhtPort=e.dhtPort||0,this.tracker=void 0!==e.tracker?e.tracker:{},this.torrents=[],this.maxConns=Number(e.maxConns)||55,this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),e.rtcConfig&&(console.warn("WebTorrent: opts.rtcConfig is deprecated. Use opts.tracker.rtcConfig instead"),this.tracker.rtcConfig=e.rtcConfig),e.wrtc&&(console.warn("WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead"),this.tracker.wrtc=e.wrtc),i.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=i.WRTC)),"function"==typeof b?this._tcpPool=new b(this):n.nextTick(()=>{this._onListening()}),this._downloadSpeed=g(),this._uploadSpeed=g(),!1!==e.dht&&"function"==typeof l?(this.dht=new l(Object.assign({},{nodeId:this.nodeId},e.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!==e.webSeeds;const t=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof p&&null!=e.blocklist?p(e.blocklist,{headers:{"user-agent":`WebTorrent/${x} (https://webtorrent.io)`}},(e,n)=>{if(e)return this.error("Failed to load blocklist: "+e.message);this.blocked=n,t()}):n.nextTick(t)}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 v){if(this.torrents.includes(e))return e}else{let t;try{t=d(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}download(e,t,n){return console.warn("WebTorrent: client.download() is deprecated. Use client.add() instead"),this.add(e,t,n)}add(e,t={},n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]);const i=()=>{if(!this.destroyed)for(const e of this.torrents)if(e.infoHash===r.infoHash&&e!==r)return void r._destroy(new Error("Cannot add duplicate torrent "+r.infoHash))},s=()=>{this.destroyed||("function"==typeof n&&n(r),this.emit("torrent",r))};this._debug("add"),t=t?Object.assign({},t):{};const r=new v(e,this,t);return this.torrents.push(r),r.once("_infoHash",i),r.once("ready",s),r.once("close",(function e(){r.removeListener("_infoHash",i),r.removeListener("ready",s),r.removeListener("close",e)})),r}seed(e,t,n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]),this._debug("seed"),(t=t?Object.assign({},t):{}).skipVerify=!0;const i="string"==typeof e;i&&(t.path=h.dirname(e)),t.createdBy||(t.createdBy="WebTorrent/"+_);const s=e=>{this._debug("on seed"),"function"==typeof n&&n(e),e.emit("seed"),this.emit("seed",e)},r=this.add(null,t,e=>{const t=[t=>{if(i)return t();e.load(c,t)}];this.dht&&t.push(t=>{e.once("dhtAnnounce",t)}),u(t,t=>{if(!this.destroyed)return t?e._destroy(t):void s(e)})});let c;var l;return l=e,"undefined"!=typeof FileList&&l instanceof FileList?e=Array.from(e):Array.isArray(e)||(e=[e]),u(e.map(e=>t=>{!function(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}(e)?t(null,e):a(e,t)}),(e,n)=>{if(!this.destroyed)return e?r._destroy(e):void o.parseInput(n,t,(e,i)=>{if(!this.destroyed){if(e)return r._destroy(e);c=i.map(e=>e.getStream),o(n,t,(e,t)=>{if(this.destroyed)return;if(e)return r._destroy(e);const n=this.get(t);n?r._destroy(new Error("Cannot add duplicate torrent "+n.infoHash)):r._onTorrentId(t)})}})}),r}remove(e,t){this._debug("remove");if(!this.get(e))throw new Error("No torrent with id "+e);this._remove(e,t)}_remove(e,t){const n=this.get(e);n&&(this.torrents.splice(this.torrents.indexOf(n),1),n.destroy(t))}address(){retLine truncated
+1 -1
View File
@@ -105,7 +105,7 @@
</div>
<script src="bundle.js"></script>
<script src="bundle.min.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-172544485-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
+7
View File
@@ -14,8 +14,15 @@
"webtorrent": "latest"
},
"devDependencies": {
"terser": "latest",
"watchify": "latest"
},
"scripts": {
"watch": "watchify parse.js -o bundle.js",
"compile": "browserify parse.js -o bundle.js",
"minify": "terser bundle.js -c -m -o bundle.min.js",
"build": "npm run compile && npm run minify"
},
"repository": {
"type": "git",
"url": "https://github.com/leoherzog/TorrentParts.git"