mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 18:29:39 +02:00
add p2p support for HLS https://github.com/Novage/p2p-media-loader
This commit is contained in:
parent
64c36d9f4e
commit
0d0338876d
1197 changed files with 121461 additions and 179724 deletions
209
node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js
generated
vendored
209
node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js
generated
vendored
|
@ -1,20 +1,19 @@
|
|||
import _typeof from "./typeof.js";
|
||||
export default function _regeneratorRuntime() {
|
||||
"use strict";
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
|
||||
"use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
_regeneratorRuntime = function _regeneratorRuntime() {
|
||||
return exports;
|
||||
};
|
||||
|
||||
var exports = {},
|
||||
Op = Object.prototype,
|
||||
hasOwn = Op.hasOwnProperty,
|
||||
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
||||
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
||||
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
||||
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
||||
|
||||
Op = Object.prototype,
|
||||
hasOwn = Op.hasOwnProperty,
|
||||
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
||||
obj[key] = desc.value;
|
||||
},
|
||||
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
||||
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
||||
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
||||
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
||||
function define(obj, key, value) {
|
||||
return Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
|
@ -23,7 +22,6 @@ export default function _regeneratorRuntime() {
|
|||
writable: !0
|
||||
}), obj[key];
|
||||
}
|
||||
|
||||
try {
|
||||
define({}, "");
|
||||
} catch (err) {
|
||||
|
@ -31,54 +29,14 @@ export default function _regeneratorRuntime() {
|
|||
return obj[key] = value;
|
||||
};
|
||||
}
|
||||
|
||||
function wrap(innerFn, outerFn, self, tryLocsList) {
|
||||
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
||||
generator = Object.create(protoGenerator.prototype),
|
||||
context = new Context(tryLocsList || []);
|
||||
return generator._invoke = function (innerFn, self, context) {
|
||||
var state = "suspendedStart";
|
||||
return function (method, arg) {
|
||||
if ("executing" === state) throw new Error("Generator is already running");
|
||||
|
||||
if ("completed" === state) {
|
||||
if ("throw" === method) throw arg;
|
||||
return doneResult();
|
||||
}
|
||||
|
||||
for (context.method = method, context.arg = arg;;) {
|
||||
var delegate = context.delegate;
|
||||
|
||||
if (delegate) {
|
||||
var delegateResult = maybeInvokeDelegate(delegate, context);
|
||||
|
||||
if (delegateResult) {
|
||||
if (delegateResult === ContinueSentinel) continue;
|
||||
return delegateResult;
|
||||
}
|
||||
}
|
||||
|
||||
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
||||
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
||||
context.dispatchException(context.arg);
|
||||
} else "return" === context.method && context.abrupt("return", context.arg);
|
||||
state = "executing";
|
||||
var record = tryCatch(innerFn, self, context);
|
||||
|
||||
if ("normal" === record.type) {
|
||||
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
||||
return {
|
||||
value: record.arg,
|
||||
done: context.done
|
||||
};
|
||||
}
|
||||
|
||||
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
||||
}
|
||||
};
|
||||
}(innerFn, self, context), generator;
|
||||
generator = Object.create(protoGenerator.prototype),
|
||||
context = new Context(tryLocsList || []);
|
||||
return defineProperty(generator, "_invoke", {
|
||||
value: makeInvokeMethod(innerFn, self, context)
|
||||
}), generator;
|
||||
}
|
||||
|
||||
function tryCatch(fn, obj, arg) {
|
||||
try {
|
||||
return {
|
||||
|
@ -92,25 +50,19 @@ export default function _regeneratorRuntime() {
|
|||
};
|
||||
}
|
||||
}
|
||||
|
||||
exports.wrap = wrap;
|
||||
var ContinueSentinel = {};
|
||||
|
||||
function Generator() {}
|
||||
|
||||
function GeneratorFunction() {}
|
||||
|
||||
function GeneratorFunctionPrototype() {}
|
||||
|
||||
var IteratorPrototype = {};
|
||||
define(IteratorPrototype, iteratorSymbol, function () {
|
||||
return this;
|
||||
});
|
||||
var getProto = Object.getPrototypeOf,
|
||||
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
||||
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
||||
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
||||
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
||||
|
||||
function defineIteratorMethods(prototype) {
|
||||
["next", "throw", "return"].forEach(function (method) {
|
||||
define(prototype, method, function (arg) {
|
||||
|
@ -118,14 +70,12 @@ export default function _regeneratorRuntime() {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
function AsyncIterator(generator, PromiseImpl) {
|
||||
function invoke(method, arg, resolve, reject) {
|
||||
var record = tryCatch(generator[method], generator, arg);
|
||||
|
||||
if ("throw" !== record.type) {
|
||||
var result = record.arg,
|
||||
value = result.value;
|
||||
value = result.value;
|
||||
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
||||
invoke("next", value, resolve, reject);
|
||||
}, function (err) {
|
||||
|
@ -136,92 +86,109 @@ export default function _regeneratorRuntime() {
|
|||
return invoke("throw", error, resolve, reject);
|
||||
});
|
||||
}
|
||||
|
||||
reject(record.arg);
|
||||
}
|
||||
|
||||
var previousPromise;
|
||||
|
||||
this._invoke = function (method, arg) {
|
||||
function callInvokeWithMethodAndArg() {
|
||||
return new PromiseImpl(function (resolve, reject) {
|
||||
invoke(method, arg, resolve, reject);
|
||||
});
|
||||
defineProperty(this, "_invoke", {
|
||||
value: function value(method, arg) {
|
||||
function callInvokeWithMethodAndArg() {
|
||||
return new PromiseImpl(function (resolve, reject) {
|
||||
invoke(method, arg, resolve, reject);
|
||||
});
|
||||
}
|
||||
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
||||
}
|
||||
});
|
||||
}
|
||||
function makeInvokeMethod(innerFn, self, context) {
|
||||
var state = "suspendedStart";
|
||||
return function (method, arg) {
|
||||
if ("executing" === state) throw new Error("Generator is already running");
|
||||
if ("completed" === state) {
|
||||
if ("throw" === method) throw arg;
|
||||
return doneResult();
|
||||
}
|
||||
for (context.method = method, context.arg = arg;;) {
|
||||
var delegate = context.delegate;
|
||||
if (delegate) {
|
||||
var delegateResult = maybeInvokeDelegate(delegate, context);
|
||||
if (delegateResult) {
|
||||
if (delegateResult === ContinueSentinel) continue;
|
||||
return delegateResult;
|
||||
}
|
||||
}
|
||||
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
||||
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
||||
context.dispatchException(context.arg);
|
||||
} else "return" === context.method && context.abrupt("return", context.arg);
|
||||
state = "executing";
|
||||
var record = tryCatch(innerFn, self, context);
|
||||
if ("normal" === record.type) {
|
||||
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
||||
return {
|
||||
value: record.arg,
|
||||
done: context.done
|
||||
};
|
||||
}
|
||||
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
||||
}
|
||||
|
||||
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
||||
};
|
||||
}
|
||||
|
||||
function maybeInvokeDelegate(delegate, context) {
|
||||
var method = delegate.iterator[context.method];
|
||||
|
||||
if (undefined === method) {
|
||||
if (context.delegate = null, "throw" === context.method) {
|
||||
if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
||||
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
||||
}
|
||||
|
||||
return ContinueSentinel;
|
||||
}
|
||||
|
||||
var methodName = context.method,
|
||||
method = delegate.iterator[methodName];
|
||||
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
||||
var record = tryCatch(method, delegate.iterator, context.arg);
|
||||
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
||||
var info = record.arg;
|
||||
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
||||
}
|
||||
|
||||
function pushTryEntry(locs) {
|
||||
var entry = {
|
||||
tryLoc: locs[0]
|
||||
};
|
||||
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
||||
}
|
||||
|
||||
function resetTryEntry(entry) {
|
||||
var record = entry.completion || {};
|
||||
record.type = "normal", delete record.arg, entry.completion = record;
|
||||
}
|
||||
|
||||
function Context(tryLocsList) {
|
||||
this.tryEntries = [{
|
||||
tryLoc: "root"
|
||||
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
||||
}
|
||||
|
||||
function values(iterable) {
|
||||
if (iterable) {
|
||||
var iteratorMethod = iterable[iteratorSymbol];
|
||||
if (iteratorMethod) return iteratorMethod.call(iterable);
|
||||
if ("function" == typeof iterable.next) return iterable;
|
||||
|
||||
if (!isNaN(iterable.length)) {
|
||||
var i = -1,
|
||||
next = function next() {
|
||||
for (; ++i < iterable.length;) {
|
||||
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
||||
}
|
||||
|
||||
return next.value = undefined, next.done = !0, next;
|
||||
};
|
||||
|
||||
next = function next() {
|
||||
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
||||
return next.value = undefined, next.done = !0, next;
|
||||
};
|
||||
return next.next = next;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
next: doneResult
|
||||
};
|
||||
}
|
||||
|
||||
function doneResult() {
|
||||
return {
|
||||
value: undefined,
|
||||
done: !0
|
||||
};
|
||||
}
|
||||
|
||||
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
||||
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
||||
value: GeneratorFunctionPrototype,
|
||||
configurable: !0
|
||||
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
||||
value: GeneratorFunction,
|
||||
configurable: !0
|
||||
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
||||
var ctor = "function" == typeof genFun && genFun.constructor;
|
||||
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
||||
}, exports.mark = function (genFun) {
|
||||
|
@ -242,27 +209,21 @@ export default function _regeneratorRuntime() {
|
|||
return this;
|
||||
}), define(Gp, "toString", function () {
|
||||
return "[object Generator]";
|
||||
}), exports.keys = function (object) {
|
||||
var keys = [];
|
||||
|
||||
for (var key in object) {
|
||||
keys.push(key);
|
||||
}
|
||||
|
||||
}), exports.keys = function (val) {
|
||||
var object = Object(val),
|
||||
keys = [];
|
||||
for (var key in object) keys.push(key);
|
||||
return keys.reverse(), function next() {
|
||||
for (; keys.length;) {
|
||||
var key = keys.pop();
|
||||
if (key in object) return next.value = key, next.done = !1, next;
|
||||
}
|
||||
|
||||
return next.done = !0, next;
|
||||
};
|
||||
}, exports.values = values, Context.prototype = {
|
||||
constructor: Context,
|
||||
reset: function reset(skipTempReset) {
|
||||
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
|
||||
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
||||
}
|
||||
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
||||
},
|
||||
stop: function stop() {
|
||||
this.done = !0;
|
||||
|
@ -273,20 +234,16 @@ export default function _regeneratorRuntime() {
|
|||
dispatchException: function dispatchException(exception) {
|
||||
if (this.done) throw exception;
|
||||
var context = this;
|
||||
|
||||
function handle(loc, caught) {
|
||||
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
||||
}
|
||||
|
||||
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
||||
var entry = this.tryEntries[i],
|
||||
record = entry.completion;
|
||||
record = entry.completion;
|
||||
if ("root" === entry.tryLoc) return handle("end");
|
||||
|
||||
if (entry.tryLoc <= this.prev) {
|
||||
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
||||
hasFinally = hasOwn.call(entry, "finallyLoc");
|
||||
|
||||
hasFinally = hasOwn.call(entry, "finallyLoc");
|
||||
if (hasCatch && hasFinally) {
|
||||
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
||||
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
||||
|
@ -302,13 +259,11 @@ export default function _regeneratorRuntime() {
|
|||
abrupt: function abrupt(type, arg) {
|
||||
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
||||
var entry = this.tryEntries[i];
|
||||
|
||||
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
||||
var finallyEntry = entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
||||
var record = finallyEntry ? finallyEntry.completion : {};
|
||||
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
||||
|
@ -326,19 +281,15 @@ export default function _regeneratorRuntime() {
|
|||
"catch": function _catch(tryLoc) {
|
||||
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
||||
var entry = this.tryEntries[i];
|
||||
|
||||
if (entry.tryLoc === tryLoc) {
|
||||
var record = entry.completion;
|
||||
|
||||
if ("throw" === record.type) {
|
||||
var thrown = record.arg;
|
||||
resetTryEntry(entry);
|
||||
}
|
||||
|
||||
return thrown;
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error("illegal catch attempt");
|
||||
},
|
||||
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue