diff --git a/demo/dist/demo.js b/demo/dist/demo.js index ebdce1a09..2ff16aab3 100644 --- a/demo/dist/demo.js +++ b/demo/dist/demo.js @@ -41,6 +41,8 @@ typeof navigator === "object" && (function () { // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + // `Object.prototype.propertyIsEnumerable` method implementation + // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable var f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor(this, V); return !!descriptor && descriptor.enumerable; @@ -65,12 +67,9 @@ typeof navigator === "object" && (function () { return toString.call(it).slice(8, -1); }; - // fallback for non-array-like ES3 and non-enumerable old V8 strings - - - var split = ''.split; + // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins @@ -98,15 +97,16 @@ typeof navigator === "object" && (function () { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; - // 7.1.1 ToPrimitive(input [, PreferredType]) + // `ToPrimitive` abstract operation + // https://tc39.github.io/ecma262/#sec-toprimitive // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string - var toPrimitive = function (it, S) { - if (!isObject(it)) return it; + var toPrimitive = function (input, PREFERRED_STRING) { + if (!isObject(input)) return input; var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; + if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; throw TypeError("Can't convert object to primitive value"); }; @@ -118,10 +118,10 @@ typeof navigator === "object" && (function () { var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE - var exist = isObject(document$1) && isObject(document$1.createElement); + var EXISTS = isObject(document$1) && isObject(document$1.createElement); var documentCreateElement = function (it) { - return exist ? document$1.createElement(it) : {}; + return EXISTS ? document$1.createElement(it) : {}; }; // Thank's IE8 for his funny defineProperty @@ -133,6 +133,8 @@ typeof navigator === "object" && (function () { var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + // `Object.getOwnPropertyDescriptor` method + // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPrimitive(P, true); @@ -154,6 +156,8 @@ typeof navigator === "object" && (function () { var nativeDefineProperty = Object.defineProperty; + // `Object.defineProperty` method + // https://tc39.github.io/ecma262/#sec-object.defineproperty var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); @@ -210,7 +214,7 @@ typeof navigator === "object" && (function () { var postfix = Math.random(); var uid = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36)); + return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); }; var keys = shared('keys'); @@ -309,6 +313,17 @@ typeof navigator === "object" && (function () { }); }); + var path = global_1; + + var aFunction = function (variable) { + return typeof variable == 'function' ? variable : undefined; + }; + + var getBuiltIn = function (namespace, method) { + return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) + : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; + }; + var ceil = Math.ceil; var floor = Math.floor; @@ -338,11 +353,7 @@ typeof navigator === "object" && (function () { }; // `Array.prototype.{ indexOf, includes }` methods implementation - // false -> Array#indexOf - // https://tc39.github.io/ecma262/#sec-array.prototype.indexof - // true -> Array#includes - // https://tc39.github.io/ecma262/#sec-array.prototype.includes - var arrayIncludes = function (IS_INCLUDES) { + var createMethod = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = toLength(O.length); @@ -355,13 +366,23 @@ typeof navigator === "object" && (function () { // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; - var arrayIndexOf = arrayIncludes(false); + var arrayIncludes = { + // `Array.prototype.includes` method + // https://tc39.github.io/ecma262/#sec-array.prototype.includes + includes: createMethod(true), + // `Array.prototype.indexOf` method + // https://tc39.github.io/ecma262/#sec-array.prototype.indexof + indexOf: createMethod(false) + }; + + var indexOf = arrayIncludes.indexOf; + var objectKeysInternal = function (object, names) { var O = toIndexedObject(object); @@ -371,7 +392,7 @@ typeof navigator === "object" && (function () { for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); + ~indexOf(result, key) || result.push(key); } return result; }; @@ -387,12 +408,10 @@ typeof navigator === "object" && (function () { 'valueOf' ]; - // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) - - - var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); + // `Object.getOwnPropertyNames` method + // https://tc39.github.io/ecma262/#sec-object.getownpropertynames var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return objectKeysInternal(O, hiddenKeys$1); }; @@ -407,10 +426,8 @@ typeof navigator === "object" && (function () { f: f$4 }; - var Reflect = global_1.Reflect; - // all object keys, includes non-enumerable and symbols - var ownKeys = Reflect && Reflect.ownKeys || function ownKeys(it) { + var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = objectGetOwnPropertyNames.f(anObject(it)); var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; @@ -500,7 +517,7 @@ typeof navigator === "object" && (function () { } }; - var aFunction = function (it) { + var aFunction$1 = function (it) { if (typeof it != 'function') { throw TypeError(String(it) + ' is not a function'); } return it; @@ -508,7 +525,7 @@ typeof navigator === "object" && (function () { // optional / simple context binding var bindContext = function (fn, that, length) { - aFunction(fn); + aFunction$1(fn); if (that === undefined) return fn; switch (length) { case 0: return function () { @@ -572,35 +589,23 @@ typeof navigator === "object" && (function () { } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); }; + var push = [].push; + // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation - // 0 -> Array#forEach - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - // 1 -> Array#map - // https://tc39.github.io/ecma262/#sec-array.prototype.map - // 2 -> Array#filter - // https://tc39.github.io/ecma262/#sec-array.prototype.filter - // 3 -> Array#some - // https://tc39.github.io/ecma262/#sec-array.prototype.some - // 4 -> Array#every - // https://tc39.github.io/ecma262/#sec-array.prototype.every - // 5 -> Array#find - // https://tc39.github.io/ecma262/#sec-array.prototype.find - // 6 -> Array#findIndex - // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - var arrayMethods = function (TYPE, specificCreate) { + var createMethod$1 = function (TYPE) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - var create = specificCreate || arraySpeciesCreate; - return function ($this, callbackfn, that) { + return function ($this, callbackfn, that, specificCreate) { var O = toObject($this); var self = indexedObject(O); var boundFunction = bindContext(callbackfn, that, 3); var length = toLength(self.length); var index = 0; + var create = specificCreate || arraySpeciesCreate; var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; var value, result; for (;length > index; index++) if (NO_HOLES || index in self) { @@ -612,7 +617,7 @@ typeof navigator === "object" && (function () { case 3: return true; // some case 5: return value; // find case 6: return index; // findIndex - case 2: target.push(value); // filter + case 2: push.call(target, value); // filter } else if (IS_EVERY) return false; // every } } @@ -620,6 +625,30 @@ typeof navigator === "object" && (function () { }; }; + var arrayIteration = { + // `Array.prototype.forEach` method + // https://tc39.github.io/ecma262/#sec-array.prototype.foreach + forEach: createMethod$1(0), + // `Array.prototype.map` method + // https://tc39.github.io/ecma262/#sec-array.prototype.map + map: createMethod$1(1), + // `Array.prototype.filter` method + // https://tc39.github.io/ecma262/#sec-array.prototype.filter + filter: createMethod$1(2), + // `Array.prototype.some` method + // https://tc39.github.io/ecma262/#sec-array.prototype.some + some: createMethod$1(3), + // `Array.prototype.every` method + // https://tc39.github.io/ecma262/#sec-array.prototype.every + every: createMethod$1(4), + // `Array.prototype.find` method + // https://tc39.github.io/ecma262/#sec-array.prototype.find + find: createMethod$1(5), + // `Array.prototype.findIndex` method + // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex + findIndex: createMethod$1(6) + }; + var sloppyArrayMethod = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !method || !fails(function () { @@ -628,13 +657,13 @@ typeof navigator === "object" && (function () { }); }; - var internalForEach = arrayMethods(0); - var SLOPPY_METHOD = sloppyArrayMethod('forEach'); + var $forEach = arrayIteration.forEach; + // `Array.prototype.forEach` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - var arrayForEach = SLOPPY_METHOD ? function forEach(callbackfn /* , thisArg */) { - return internalForEach(this, callbackfn, arguments[1]); + var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } : [].forEach; // `Array.prototype.forEach` method @@ -702,7 +731,7 @@ typeof navigator === "object" && (function () { || iterators[classof(it)]; }; - // `Array.from` method + // `Array.from` method implementation // https://tc39.github.io/ecma262/#sec-array.from var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); @@ -782,24 +811,25 @@ typeof navigator === "object" && (function () { from: arrayFrom }); - // 19.1.2.14 / 15.2.3.14 Object.keys(O) + // `Object.keys` method + // https://tc39.github.io/ecma262/#sec-object.keys var objectKeys = Object.keys || function keys(O) { return objectKeysInternal(O, enumBugKeys); }; + // `Object.defineProperties` method + // https://tc39.github.io/ecma262/#sec-object.defineproperties var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = objectKeys(Properties); var length = keys.length; - var i = 0; + var index = 0; var key; - while (length > i) objectDefineProperty.f(O, key = keys[i++], Properties[key]); + while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); return O; }; - var document$2 = global_1.document; - - var html = document$2 && document$2.documentElement; + var html = getBuiltIn('document', 'documentElement'); var IE_PROTO = sharedKey('IE_PROTO'); @@ -828,7 +858,8 @@ typeof navigator === "object" && (function () { return createDict(); }; - // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + // `Object.create` method + // https://tc39.github.io/ecma262/#sec-object.create var objectCreate = Object.create || function create(O, Properties) { var result; if (O !== null) { @@ -857,13 +888,14 @@ typeof navigator === "object" && (function () { ArrayPrototype$1[UNSCOPABLES][key] = true; }; - var internalIncludes = arrayIncludes(true); + var $includes = arrayIncludes.includes; + // `Array.prototype.includes` method // https://tc39.github.io/ecma262/#sec-array.prototype.includes _export({ target: 'Array', proto: true }, { includes: function includes(el /* , fromIndex = 0 */) { - return internalIncludes(this, el, arguments.length > 1 ? arguments[1] : undefined); + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -889,14 +921,10 @@ typeof navigator === "object" && (function () { return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); }; - // helper for String#{startsWith, endsWith, includes} - - - - var validateStringMethodArguments = function (that, searchString, NAME) { - if (isRegexp(searchString)) { - throw TypeError('String.prototype.' + NAME + " doesn't accept regex"); - } return String(requireObjectCoercible(that)); + var notARegexp = function (it) { + if (isRegexp(it)) { + throw TypeError("The method doesn't accept regular expressions"); + } return it; }; var MATCH$1 = wellKnownSymbol('match'); @@ -917,24 +945,34 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-string.prototype.includes _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */) { - return !!~validateStringMethodArguments(this, searchString, 'includes') - .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + return !!~String(requireObjectCoercible(this)) + .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined); } }); - // CONVERT_TO_STRING: true -> String#at - // CONVERT_TO_STRING: false -> String#codePointAt - var stringAt = function (that, pos, CONVERT_TO_STRING) { - var S = String(requireObjectCoercible(that)); - var position = toInteger(pos); - var size = S.length; - var first, second; - if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; - first = S.charCodeAt(position); - return first < 0xD800 || first > 0xDBFF || position + 1 === size - || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF - ? CONVERT_TO_STRING ? S.charAt(position) : first - : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + // `String.prototype.{ codePointAt, at }` methods implementation + var createMethod$2 = function (CONVERT_TO_STRING) { + return function ($this, pos) { + var S = String(requireObjectCoercible($this)); + var position = toInteger(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = S.charCodeAt(position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING ? S.charAt(position) : first + : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; + }; + + var stringMultibyte = { + // `String.prototype.codePointAt` method + // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat + codeAt: createMethod$2(false), + // `String.prototype.at` method + // https://github.com/mathiasbynens/String.prototype.at + charAt: createMethod$2(true) }; var correctPrototypeGetter = !fails(function () { @@ -946,7 +984,8 @@ typeof navigator === "object" && (function () { var IE_PROTO$1 = sharedKey('IE_PROTO'); var ObjectPrototype = Object.prototype; - // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + // `Object.getPrototypeOf` method + // https://tc39.github.io/ecma262/#sec-object.getprototypeof var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) { O = toObject(O); if (has(O, IE_PROTO$1)) return O[IE_PROTO$1]; @@ -1012,27 +1051,29 @@ typeof navigator === "object" && (function () { return IteratorConstructor; }; - var validateSetPrototypeOfArguments = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) { - throw TypeError("Can't set " + String(proto) + ' as a prototype'); - } + var aPossiblePrototype = function (it) { + if (!isObject(it) && it !== null) { + throw TypeError("Can't set " + String(it) + ' as a prototype'); + } return it; }; + // `Object.setPrototypeOf` method + // https://tc39.github.io/ecma262/#sec-object.setprototypeof // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { - var correctSetter = false; + var CORRECT_SETTER = false; var test = {}; var setter; try { setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; setter.call(test, []); - correctSetter = test instanceof Array; + CORRECT_SETTER = test instanceof Array; } catch (error) { /* empty */ } return function setPrototypeOf(O, proto) { - validateSetPrototypeOfArguments(O, proto); - if (correctSetter) setter.call(O, proto); + anObject(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) setter.call(O, proto); else O.__proto__ = proto; return O; }; @@ -1115,6 +1156,10 @@ typeof navigator === "object" && (function () { return methods; }; + var charAt = stringMultibyte.charAt; + + + var STRING_ITERATOR = 'String Iterator'; var setInternalState = internalState.set; var getInternalState = internalState.getterFor(STRING_ITERATOR); @@ -1135,7 +1180,7 @@ typeof navigator === "object" && (function () { var index = state.index; var point; if (index >= string.length) return { value: undefined, done: true }; - point = stringAt(string, index, true); + point = charAt(string, index); state.index += point.length; return { value: point, done: false }; }); @@ -1269,36 +1314,6 @@ typeof navigator === "object" && (function () { } })(); - var f$5 = wellKnownSymbol; - - var wrappedWellKnownSymbol = { - f: f$5 - }; - - var path = global_1; - - var defineProperty$1 = objectDefineProperty.f; - - var defineWellKnownSymbol = function (NAME) { - var Symbol = path.Symbol || (path.Symbol = {}); - if (!has(Symbol, NAME)) defineProperty$1(Symbol, NAME, { - value: wrappedWellKnownSymbol.f(NAME) - }); - }; - - // all enumerable object keys, includes symbols - var enumKeys = function (it) { - var result = objectKeys(it); - var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; - if (getOwnPropertySymbols) { - var symbols = getOwnPropertySymbols(it); - var propertyIsEnumerable = objectPropertyIsEnumerable.f; - var i = 0; - var key; - while (symbols.length > i) if (propertyIsEnumerable.call(it, key = symbols[i++])) result.push(key); - } return result; - }; - var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f; var toString$1 = {}.toString; @@ -1315,34 +1330,52 @@ typeof navigator === "object" && (function () { }; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window - var f$6 = function getOwnPropertyNames(it) { + var f$5 = function getOwnPropertyNames(it) { return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : nativeGetOwnPropertyNames(toIndexedObject(it)); }; var objectGetOwnPropertyNamesExternal = { + f: f$5 + }; + + var f$6 = wellKnownSymbol; + + var wrappedWellKnownSymbol = { f: f$6 }; + var defineProperty$1 = objectDefineProperty.f; + + var defineWellKnownSymbol = function (NAME) { + var Symbol = path.Symbol || (path.Symbol = {}); + if (!has(Symbol, NAME)) defineProperty$1(Symbol, NAME, { + value: wrappedWellKnownSymbol.f(NAME) + }); + }; + + var $forEach$1 = arrayIteration.forEach; + var HIDDEN = sharedKey('hidden'); var SYMBOL = 'Symbol'; + var PROTOTYPE$1 = 'prototype'; + var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); var setInternalState$1 = internalState.set; var getInternalState$1 = internalState.getterFor(SYMBOL); - var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; - var nativeDefineProperty$1 = objectDefineProperty.f; - var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f; + var ObjectPrototype$1 = Object[PROTOTYPE$1]; var $Symbol = global_1.Symbol; var JSON$1 = global_1.JSON; var nativeJSONStringify = JSON$1 && JSON$1.stringify; - var PROTOTYPE$1 = 'prototype'; - var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); + var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; + var nativeDefineProperty$1 = objectDefineProperty.f; + var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f; var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f; - var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var ObjectPrototypeSymbols = shared('op-symbols'); + var StringToSymbolRegistry = shared('string-to-symbol-registry'); + var SymbolToStringRegistry = shared('symbol-to-string-registry'); var WellKnownSymbolsStore = shared('wks'); - var ObjectPrototype$1 = Object[PROTOTYPE$1]; var QObject = global_1.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild; @@ -1352,12 +1385,12 @@ typeof navigator === "object" && (function () { return objectCreate(nativeDefineProperty$1({}, 'a', { get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; } })).a != 7; - }) ? function (it, key, D) { - var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype$1, key); - if (ObjectPrototypeDescriptor) delete ObjectPrototype$1[key]; - nativeDefineProperty$1(it, key, D); - if (ObjectPrototypeDescriptor && it !== ObjectPrototype$1) { - nativeDefineProperty$1(ObjectPrototype$1, key, ObjectPrototypeDescriptor); + }) ? function (O, P, Attributes) { + var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype$1, P); + if (ObjectPrototypeDescriptor) delete ObjectPrototype$1[P]; + nativeDefineProperty$1(O, P, Attributes); + if (ObjectPrototypeDescriptor && O !== ObjectPrototype$1) { + nativeDefineProperty$1(ObjectPrototype$1, P, ObjectPrototypeDescriptor); } } : nativeDefineProperty$1; @@ -1378,70 +1411,73 @@ typeof navigator === "object" && (function () { return Object(it) instanceof $Symbol; }; - var $defineProperty = function defineProperty(it, key, D) { - if (it === ObjectPrototype$1) $defineProperty(ObjectPrototypeSymbols, key, D); - anObject(it); - key = toPrimitive(key, true); - anObject(D); + var $defineProperty = function defineProperty(O, P, Attributes) { + if (O === ObjectPrototype$1) $defineProperty(ObjectPrototypeSymbols, P, Attributes); + anObject(O); + var key = toPrimitive(P, true); + anObject(Attributes); if (has(AllSymbols, key)) { - if (!D.enumerable) { - if (!has(it, HIDDEN)) nativeDefineProperty$1(it, HIDDEN, createPropertyDescriptor(1, {})); - it[HIDDEN][key] = true; + if (!Attributes.enumerable) { + if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {})); + O[HIDDEN][key] = true; } else { - if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; - D = objectCreate(D, { enumerable: createPropertyDescriptor(0, false) }); - } return setSymbolDescriptor(it, key, D); - } return nativeDefineProperty$1(it, key, D); + if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false; + Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) }); + } return setSymbolDescriptor(O, key, Attributes); + } return nativeDefineProperty$1(O, key, Attributes); }; - var $defineProperties = function defineProperties(it, P) { - anObject(it); - var keys = enumKeys(P = toIndexedObject(P)); - var i = 0; - var l = keys.length; - var key; - while (l > i) $defineProperty(it, key = keys[i++], P[key]); - return it; + var $defineProperties = function defineProperties(O, Properties) { + anObject(O); + var properties = toIndexedObject(Properties); + var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties)); + $forEach$1(keys, function (key) { + if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]); + }); + return O; }; - var $create = function create(it, P) { - return P === undefined ? objectCreate(it) : $defineProperties(objectCreate(it), P); + var $create = function create(O, Properties) { + return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties); }; - var $propertyIsEnumerable = function propertyIsEnumerable(key) { - var E = nativePropertyIsEnumerable$1.call(this, key = toPrimitive(key, true)); - if (this === ObjectPrototype$1 && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return false; - return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + var $propertyIsEnumerable = function propertyIsEnumerable(V) { + var P = toPrimitive(V, true); + var enumerable = nativePropertyIsEnumerable$1.call(this, P); + if (this === ObjectPrototype$1 && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false; + return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true; }; - var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { - it = toIndexedObject(it); - key = toPrimitive(key, true); + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { + var it = toIndexedObject(O); + var key = toPrimitive(P, true); if (it === ObjectPrototype$1 && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return; - var D = nativeGetOwnPropertyDescriptor$1(it, key); - if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; - return D; + var descriptor = nativeGetOwnPropertyDescriptor$1(it, key); + if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) { + descriptor.enumerable = true; + } + return descriptor; }; - var $getOwnPropertyNames = function getOwnPropertyNames(it) { - var names = nativeGetOwnPropertyNames$1(toIndexedObject(it)); + var $getOwnPropertyNames = function getOwnPropertyNames(O) { + var names = nativeGetOwnPropertyNames$1(toIndexedObject(O)); var result = []; - var i = 0; - var key; - while (names.length > i) { - if (!has(AllSymbols, key = names[i++]) && !has(hiddenKeys, key)) result.push(key); - } return result; + $forEach$1(names, function (key) { + if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key); + }); + return result; }; - var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { - var IS_OP = it === ObjectPrototype$1; - var names = nativeGetOwnPropertyNames$1(IS_OP ? ObjectPrototypeSymbols : toIndexedObject(it)); + var $getOwnPropertySymbols = function getOwnPropertySymbols(O) { + var IS_OBJECT_PROTOTYPE = O === ObjectPrototype$1; + var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O)); var result = []; - var i = 0; - var key; - while (names.length > i) { - if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectPrototype$1, key) : true)) result.push(AllSymbols[key]); - } return result; + $forEach$1(names, function (key) { + if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype$1, key))) { + result.push(AllSymbols[key]); + } + }); + return result; }; // `Symbol` constructor @@ -1449,7 +1485,7 @@ typeof navigator === "object" && (function () { if (!nativeSymbol) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor'); - var description = arguments[0] === undefined ? undefined : String(arguments[0]); + var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]); var tag = uid(description); var setter = function (value) { if (this === ObjectPrototype$1) setter.call(ObjectPrototypeSymbols, value); @@ -1459,6 +1495,7 @@ typeof navigator === "object" && (function () { if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype$1, tag, { configurable: true, set: setter }); return wrap(tag, description); }; + redefine($Symbol[PROTOTYPE$1], 'toString', function toString() { return getInternalState$1(this).tag; }); @@ -1491,23 +1528,26 @@ typeof navigator === "object" && (function () { Symbol: $Symbol }); - for (var wellKnownSymbols = objectKeys(WellKnownSymbolsStore), k = 0; wellKnownSymbols.length > k;) { - defineWellKnownSymbol(wellKnownSymbols[k++]); - } + $forEach$1(objectKeys(WellKnownSymbolsStore), function (name) { + defineWellKnownSymbol(name); + }); _export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, { // `Symbol.for` method // https://tc39.github.io/ecma262/#sec-symbol.for 'for': function (key) { - return has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = $Symbol(key); + var string = String(key); + if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string]; + var symbol = $Symbol(string); + StringToSymbolRegistry[string] = symbol; + SymbolToStringRegistry[symbol] = string; + return symbol; }, // `Symbol.keyFor` method // https://tc39.github.io/ecma262/#sec-symbol.keyfor keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol'); - for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; }, useSetter: function () { USE_SETTER = true; }, useSimple: function () { USE_SETTER = false; } @@ -1558,9 +1598,9 @@ typeof navigator === "object" && (function () { }) }, { stringify: function stringify(it) { var args = [it]; - var i = 1; + var index = 1; var replacer, $replacer; - while (arguments.length > i) args.push(arguments[i++]); + while (arguments.length > index) args.push(arguments[index++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { @@ -1628,20 +1668,22 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-symbol.iterator defineWellKnownSymbol('iterator'); - var internalIndexOf = arrayIncludes(false); + var $indexOf = arrayIncludes.indexOf; + + var nativeIndexOf = [].indexOf; var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0; - var SLOPPY_METHOD$1 = sloppyArrayMethod('indexOf'); + var SLOPPY_METHOD = sloppyArrayMethod('indexOf'); // `Array.prototype.indexOf` method // https://tc39.github.io/ecma262/#sec-array.prototype.indexof - _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD$1 }, { + _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, { indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { return NEGATIVE_ZERO // convert -0 to +0 ? nativeIndexOf.apply(this, arguments) || 0 - : internalIndexOf(this, searchElement, arguments[1]); + : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -1695,11 +1737,11 @@ typeof navigator === "object" && (function () { var nativeJoin = [].join; var ES3_STRINGS = indexedObject != Object; - var SLOPPY_METHOD$2 = sloppyArrayMethod('join', ','); + var SLOPPY_METHOD$1 = sloppyArrayMethod('join', ','); // `Array.prototype.join` method // https://tc39.github.io/ecma262/#sec-array.prototype.join - _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD$2 }, { + _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD$1 }, { join: function join(separator) { return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); } @@ -1722,12 +1764,10 @@ typeof navigator === "object" && (function () { var nativeSlice = [].slice; var max$1 = Math.max; - var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); - // `Array.prototype.slice` method // https://tc39.github.io/ecma262/#sec-array.prototype.slice // fallback for not array-like ES3 strings and DOM objects - _export({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT }, { + _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, { slice: function slice(start, end) { var O = toIndexedObject(this); var length = toLength(O.length); @@ -1782,6 +1822,7 @@ typeof navigator === "object" && (function () { if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; + if (that.dotAll) result += 's'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; @@ -1844,8 +1885,8 @@ typeof navigator === "object" && (function () { }); var TO_STRING = 'toString'; - var nativeToString = /./[TO_STRING]; var RegExpPrototype = RegExp.prototype; + var nativeToString = RegExpPrototype[TO_STRING]; var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); // FF44- RegExp#toString has a wrong name @@ -1950,10 +1991,12 @@ typeof navigator === "object" && (function () { } }; + var charAt$1 = stringMultibyte.charAt; + // `AdvanceStringIndex` abstract operation // https://tc39.github.io/ecma262/#sec-advancestringindex var advanceStringIndex = function (S, index, unicode) { - return index + (unicode ? stringAt(S, index, true).length : 1); + return index + (unicode ? charAt$1(S, index).length : 1); }; // `RegExpExec` abstract operation @@ -2134,7 +2177,7 @@ typeof navigator === "object" && (function () { var speciesConstructor = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; - return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction(S); + return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction$1(S); }; var arrayPush = [].push; @@ -2315,7 +2358,8 @@ typeof navigator === "object" && (function () { var nativeAssign = Object.assign; - // 19.1.2.1 Object.assign(target, source, ...) + // `Object.assign` method + // https://tc39.github.io/ecma262/#sec-object.assign // should work with symbols and should have deterministic property order (V8 bug) var objectAssign = !nativeAssign || fails(function () { var A = {}; @@ -2410,7 +2454,7 @@ typeof navigator === "object" && (function () { var k = 0; delta = firstTime ? floor$2(delta / damp) : delta >> 1; delta += floor$2(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + for (; delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor$2(delta / baseMinusTMin); } return floor$2(k + (baseMinusTMin + 1) * delta / (delta + skew)); @@ -2482,9 +2526,7 @@ typeof navigator === "object" && (function () { var q = delta; for (var k = base; /* no condition */; k += base) { var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } + if (q < t) break; var qMinusT = q - t; var baseMinusT = base - t; output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT))); @@ -2527,6 +2569,24 @@ typeof navigator === "object" && (function () { } return anObject(iteratorMethod.call(it)); }; + // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` + + + + + + + + + + + + + + + + + var ITERATOR$7 = wellKnownSymbol('iterator'); var URL_SEARCH_PARAMS = 'URLSearchParams'; var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator'; @@ -2584,10 +2644,10 @@ typeof navigator === "object" && (function () { var parseSearchParams = function (result, query) { if (query) { var attributes = query.split('&'); - var i = 0; + var index = 0; var attribute, entry; - while (i < attributes.length) { - attribute = attributes[i++]; + while (index < attributes.length) { + attribute = attributes[index++]; if (attribute.length) { entry = attribute.split('='); result.push({ @@ -2596,7 +2656,7 @@ typeof navigator === "object" && (function () { }); } } - } return result; + } }; var updateSearchParams = function (query) { @@ -2636,7 +2696,7 @@ typeof navigator === "object" && (function () { setInternalState$3(that, { type: URL_SEARCH_PARAMS, entries: entries, - updateURL: null, + updateURL: function () { /* empty */ }, updateSearchParams: updateSearchParams }); @@ -2670,7 +2730,7 @@ typeof navigator === "object" && (function () { validateArgumentsLength(arguments.length, 2); var state = getInternalParamsState(this); state.entries.push({ key: name + '', value: value + '' }); - if (state.updateURL) state.updateURL(); + state.updateURL(); }, // `URLSearchParams.prototype.delete` method // https://url.spec.whatwg.org/#dom-urlsearchparams-delete @@ -2679,12 +2739,12 @@ typeof navigator === "object" && (function () { var state = getInternalParamsState(this); var entries = state.entries; var key = name + ''; - var i = 0; - while (i < entries.length) { - if (entries[i].key === key) entries.splice(i, 1); - else i++; + var index = 0; + while (index < entries.length) { + if (entries[index].key === key) entries.splice(index, 1); + else index++; } - if (state.updateURL) state.updateURL(); + state.updateURL(); }, // `URLSearchParams.prototype.get` method // https://url.spec.whatwg.org/#dom-urlsearchparams-get @@ -2692,10 +2752,12 @@ typeof navigator === "object" && (function () { validateArgumentsLength(arguments.length, 1); var entries = getInternalParamsState(this).entries; var key = name + ''; - var i = 0; - for (; i < entries.length; i++) if (entries[i].key === key) return entries[i].value; - return null; - }, + var index = 0; + for (; index < entries.length; index++) { + if (entries[index].key === key) return entries[index].value; + } + return null; + }, // `URLSearchParams.prototype.getAll` method // https://url.spec.whatwg.org/#dom-urlsearchparams-getall getAll: function getAll(name) { @@ -2703,8 +2765,10 @@ typeof navigator === "object" && (function () { var entries = getInternalParamsState(this).entries; var key = name + ''; var result = []; - var i = 0; - for (; i < entries.length; i++) if (entries[i].key === key) result.push(entries[i].value); + var index = 0; + for (; index < entries.length; index++) { + if (entries[index].key === key) result.push(entries[index].value); + } return result; }, // `URLSearchParams.prototype.has` method @@ -2713,8 +2777,10 @@ typeof navigator === "object" && (function () { validateArgumentsLength(arguments.length, 1); var entries = getInternalParamsState(this).entries; var key = name + ''; - var i = 0; - while (i < entries.length) if (entries[i++].key === key) return true; + var index = 0; + while (index < entries.length) { + if (entries[index++].key === key) return true; + } return false; }, // `URLSearchParams.prototype.set` method @@ -2726,12 +2792,12 @@ typeof navigator === "object" && (function () { var found = false; var key = name + ''; var val = value + ''; - var i = 0; + var index = 0; var entry; - for (; i < entries.length; i++) { - entry = entries[i]; + for (; index < entries.length; index++) { + entry = entries[index]; if (entry.key === key) { - if (found) entries.splice(i--, 1); + if (found) entries.splice(index--, 1); else { found = true; entry.value = val; @@ -2739,7 +2805,7 @@ typeof navigator === "object" && (function () { } } if (!found) entries.push({ key: key, value: val }); - if (state.updateURL) state.updateURL(); + state.updateURL(); }, // `URLSearchParams.prototype.sort` method // https://url.spec.whatwg.org/#dom-urlsearchparams-sort @@ -2748,26 +2814,28 @@ typeof navigator === "object" && (function () { var entries = state.entries; // Array#sort is not stable in some engines var slice = entries.slice(); - var entry, i, j; + var entry, entriesIndex, sliceIndex; entries.length = 0; - for (i = 0; i < slice.length; i++) { - entry = slice[i]; - for (j = 0; j < i; j++) if (entries[j].key > entry.key) { - entries.splice(j, 0, entry); - break; + for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) { + entry = slice[sliceIndex]; + for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) { + if (entries[entriesIndex].key > entry.key) { + entries.splice(entriesIndex, 0, entry); + break; + } } - if (j === i) entries.push(entry); + if (entriesIndex === sliceIndex) entries.push(entry); } - if (state.updateURL) state.updateURL(); + state.updateURL(); }, // `URLSearchParams.prototype.forEach` method forEach: function forEach(callback /* , thisArg */) { var entries = getInternalParamsState(this).entries; var boundFunction = bindContext(callback, arguments.length > 1 ? arguments[1] : undefined, 3); - var i = 0; + var index = 0; var entry; - while (i < entries.length) { - entry = entries[i++]; + while (index < entries.length) { + entry = entries[index++]; boundFunction(entry.value, entry.key, this); } }, @@ -2793,10 +2861,10 @@ typeof navigator === "object" && (function () { redefine(URLSearchParamsPrototype, 'toString', function toString() { var entries = getInternalParamsState(this).entries; var result = []; - var i = 0; + var index = 0; var entry; - while (i < entries.length) { - entry = entries[i++]; + while (index < entries.length) { + entry = entries[index++]; result.push(serialize(entry.key) + '=' + serialize(entry.value)); } return result.join('&'); }, { enumerable: true }); @@ -2812,11 +2880,30 @@ typeof navigator === "object" && (function () { getState: getInternalParamsState }; + // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` + + + + + + + + + + + + var codeAt = stringMultibyte.codeAt; + + + + + var NativeURL = global_1.URL; var URLSearchParams$1 = web_urlSearchParams.URLSearchParams; var getInternalSearchParamsState = web_urlSearchParams.getState; var setInternalState$4 = internalState.set; var getInternalURLState = internalState.getterFor('URL'); + var floor$3 = Math.floor; var pow = Math.pow; var INVALID_AUTHORITY = 'Invalid authority'; @@ -2842,7 +2929,7 @@ typeof navigator === "object" && (function () { var EOF; var parseHost = function (url, input) { - var result, codePoints, i; + var result, codePoints, index; if (input.charAt(0) == '[') { if (input.charAt(input.length - 1) != ']') return INVALID_HOST; result = parseIPv6(input.slice(1, -1)); @@ -2853,7 +2940,9 @@ typeof navigator === "object" && (function () { if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST; result = ''; codePoints = arrayFrom(input); - for (i = 0; i < codePoints.length; i++) result += percentEncode(codePoints[i], C0ControlPercentEncodeSet); + for (index = 0; index < codePoints.length; index++) { + result += percentEncode(codePoints[index], C0ControlPercentEncodeSet); + } url.host = result; } else { input = punycodeToAscii(input); @@ -2866,38 +2955,38 @@ typeof navigator === "object" && (function () { var parseIPv4 = function (input) { var parts = input.split('.'); - var partsLength, numbers, i, part, R, n, ipv4; - if (parts[parts.length - 1] == '') { - if (parts.length) parts.pop(); + var partsLength, numbers, index, part, radix, number, ipv4; + if (parts.length && parts[parts.length - 1] == '') { + parts.pop(); } partsLength = parts.length; if (partsLength > 4) return input; numbers = []; - for (i = 0; i < partsLength; i++) { - part = parts[i]; + for (index = 0; index < partsLength; index++) { + part = parts[index]; if (part == '') return input; - R = 10; + radix = 10; if (part.length > 1 && part.charAt(0) == '0') { - R = HEX_START.test(part) ? 16 : 8; - part = part.slice(R == 8 ? 1 : 2); + radix = HEX_START.test(part) ? 16 : 8; + part = part.slice(radix == 8 ? 1 : 2); } if (part === '') { - n = 0; + number = 0; } else { - if (!(R == 10 ? DEC : R == 8 ? OCT : HEX).test(part)) return input; - n = parseInt(part, R); + if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input; + number = parseInt(part, radix); } - numbers.push(n); + numbers.push(number); } - for (i = 0; i < partsLength; i++) { - n = numbers[i]; - if (i == partsLength - 1) { - if (n >= pow(256, 5 - partsLength)) return null; - } else if (n > 255) return null; + for (index = 0; index < partsLength; index++) { + number = numbers[index]; + if (index == partsLength - 1) { + if (number >= pow(256, 5 - partsLength)) return null; + } else if (number > 255) return null; } ipv4 = numbers.pop(); - for (i = 0; i < numbers.length; i++) { - ipv4 += numbers[i] * pow(256, 3 - i); + for (index = 0; index < numbers.length; index++) { + ipv4 += numbers[index] * pow(256, 3 - index); } return ipv4; }; @@ -2984,9 +3073,9 @@ typeof navigator === "object" && (function () { var maxLength = 1; var currStart = null; var currLength = 0; - var i = 0; - for (; i < 8; i++) { - if (ipv6[i] !== 0) { + var index = 0; + for (; index < 8; index++) { + if (ipv6[index] !== 0) { if (currLength > maxLength) { maxIndex = currStart; maxLength = currLength; @@ -2994,7 +3083,7 @@ typeof navigator === "object" && (function () { currStart = null; currLength = 0; } else { - if (currStart === null) currStart = i; + if (currStart === null) currStart = index; ++currLength; } } @@ -3006,27 +3095,27 @@ typeof navigator === "object" && (function () { }; var serializeHost = function (host) { - var result, i, compress, ignore0; + var result, index, compress, ignore0; // ipv4 if (typeof host == 'number') { result = []; - for (i = 0; i < 4; i++) { + for (index = 0; index < 4; index++) { result.unshift(host % 256); - host = Math.floor(host / 256); + host = floor$3(host / 256); } return result.join('.'); // ipv6 } else if (typeof host == 'object') { result = ''; compress = findLongestZeroSequence(host); - for (i = 0; i < 8; i++) { - if (ignore0 && host[i] === 0) continue; + for (index = 0; index < 8; index++) { + if (ignore0 && host[index] === 0) continue; if (ignore0) ignore0 = false; - if (compress === i) { - result += i ? ':' : '::'; + if (compress === index) { + result += index ? ':' : '::'; ignore0 = true; } else { - result += host[i].toString(16); - if (i < 7) result += ':'; + result += host[index].toString(16); + if (index < 7) result += ':'; } } return '[' + result + ']'; @@ -3045,7 +3134,7 @@ typeof navigator === "object" && (function () { }); var percentEncode = function (char, set) { - var code = stringAt(char, 0); + var code = codeAt(char, 0); return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char); }; @@ -3169,13 +3258,11 @@ typeof navigator === "object" && (function () { if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) { buffer += char.toLowerCase(); } else if (char == ':') { - if (stateOverride) { - if ( - (isSpecial(url) != has(specialSchemes, buffer)) || - (buffer == 'file' && (includesCredentials(url) || url.port !== null)) || - (url.scheme == 'file' && !url.host) - ) return; - } + if (stateOverride && ( + (isSpecial(url) != has(specialSchemes, buffer)) || + (buffer == 'file' && (includesCredentials(url) || url.port !== null)) || + (url.scheme == 'file' && !url.host) + )) return; url.scheme = buffer; if (stateOverride) { if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null; @@ -4429,7 +4516,7 @@ typeof navigator === "object" && (function () { return array.concat()[0] !== array; }); - var SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('concat'); + var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; @@ -4437,7 +4524,7 @@ typeof navigator === "object" && (function () { return spreadable !== undefined ? !!spreadable : isArray(O); }; - var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT$1; + var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method // https://tc39.github.io/ecma262/#sec-array.prototype.concat @@ -4479,26 +4566,29 @@ typeof navigator === "object" && (function () { // `Array.prototype.fill` method // https://tc39.github.io/ecma262/#sec-array.prototype.fill - _export({ target: 'Array', proto: true }, { fill: arrayFill }); + _export({ target: 'Array', proto: true }, { + fill: arrayFill + }); // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('fill'); + var min$4 = Math.min; var nativeLastIndexOf = [].lastIndexOf; var NEGATIVE_ZERO$1 = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0; - var SLOPPY_METHOD$3 = sloppyArrayMethod('lastIndexOf'); + var SLOPPY_METHOD$2 = sloppyArrayMethod('lastIndexOf'); // `Array.prototype.lastIndexOf` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof - var arrayLastIndexOf = (NEGATIVE_ZERO$1 || SLOPPY_METHOD$3) ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + var arrayLastIndexOf = (NEGATIVE_ZERO$1 || SLOPPY_METHOD$2) ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { // convert -0 to +0 if (NEGATIVE_ZERO$1) return nativeLastIndexOf.apply(this, arguments) || 0; var O = toIndexedObject(this); var length = toLength(O.length); var index = length - 1; - if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (arguments.length > 1) index = min$4(index, toInteger(arguments[1])); if (index < 0) index = length + index; - for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0; return -1; } : nativeLastIndexOf; @@ -4530,34 +4620,31 @@ typeof navigator === "object" && (function () { }); } - var aFunction$1 = function (variable) { - return typeof variable == 'function' ? variable : undefined; - }; - - var getBuiltIn = function (namespace, method) { - return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace]) - : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; - }; - var SPECIES$5 = wellKnownSymbol('species'); var setSpecies = function (CONSTRUCTOR_NAME) { - var C = getBuiltIn(CONSTRUCTOR_NAME); + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); var defineProperty = objectDefineProperty.f; - if (descriptors && C && !C[SPECIES$5]) defineProperty(C, SPECIES$5, { - configurable: true, - get: function () { return this; } - }); + + if (descriptors && Constructor && !Constructor[SPECIES$5]) { + defineProperty(Constructor, SPECIES$5, { + configurable: true, + get: function () { return this; } + }); + } }; - var iterate = createCommonjsModule(function (module) { - var BREAK = {}; + var iterate_1 = createCommonjsModule(function (module) { + var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; + }; - var exports = module.exports = function (iterable, fn, that, ENTRIES, ITERATOR) { - var boundFunction = bindContext(fn, that, ENTRIES ? 2 : 1); + var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) { + var boundFunction = bindContext(fn, that, AS_ENTRIES ? 2 : 1); var iterator, iterFn, index, length, result, step; - if (ITERATOR) { + if (IS_ITERATOR) { iterator = iterable; } else { iterFn = getIteratorMethod(iterable); @@ -4565,19 +4652,24 @@ typeof navigator === "object" && (function () { // optimisation for array iterators if (isArrayIteratorMethod(iterFn)) { for (index = 0, length = toLength(iterable.length); length > index; index++) { - result = ENTRIES ? boundFunction(anObject(step = iterable[index])[0], step[1]) : boundFunction(iterable[index]); - if (result === BREAK) return BREAK; - } return; + result = AS_ENTRIES + ? boundFunction(anObject(step = iterable[index])[0], step[1]) + : boundFunction(iterable[index]); + if (result && result instanceof Result) return result; + } return new Result(false); } iterator = iterFn.call(iterable); } while (!(step = iterator.next()).done) { - if (callWithSafeIterationClosing(iterator, boundFunction, step.value, ENTRIES) === BREAK) return BREAK; - } + result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES); + if (result && result instanceof Result) return result; + } return new Result(false); }; - exports.BREAK = BREAK; + iterate.stop = function (result) { + return new Result(true, result); + }; }); var location = global_1.location; @@ -4673,9 +4765,7 @@ typeof navigator === "object" && (function () { clear: clear }; - var navigator$1 = global_1.navigator; - - var userAgent = navigator$1 && navigator$1.userAgent || ''; + var userAgent = getBuiltIn('navigator', 'userAgent') || ''; var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; @@ -4761,8 +4851,8 @@ typeof navigator === "object" && (function () { resolve = $$resolve; reject = $$reject; }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); + this.resolve = aFunction$1(resolve); + this.reject = aFunction$1(reject); }; // 25.4.1.5 NewPromiseCapability(C) @@ -4816,7 +4906,7 @@ typeof navigator === "object" && (function () { var getInternalPromiseState = internalState.getterFor(PROMISE); var PromiseConstructor = global_1[PROMISE]; var TypeError$1 = global_1.TypeError; - var document$3 = global_1.document; + var document$2 = global_1.document; var process$2 = global_1.process; var $fetch = global_1.fetch; var versions = process$2 && process$2.versions; @@ -4824,7 +4914,7 @@ typeof navigator === "object" && (function () { var newPromiseCapability$1 = newPromiseCapability.f; var newGenericPromiseCapability = newPromiseCapability$1; var IS_NODE$1 = classofRaw(process$2) == 'process'; - var DISPATCH_EVENT = !!(document$3 && document$3.createEvent && global_1.dispatchEvent); + var DISPATCH_EVENT = !!(document$2 && document$2.createEvent && global_1.dispatchEvent); var UNHANDLED_REJECTION = 'unhandledrejection'; var REJECTION_HANDLED = 'rejectionhandled'; var PENDING = 0; @@ -4869,8 +4959,10 @@ typeof navigator === "object" && (function () { microtask(function () { var value = state.value; var ok = state.state == FULFILLED; - var i = 0; - var run = function (reaction) { + var index = 0; + // variable length - can't use forEach + while (chain.length > index) { + var reaction = chain[index++]; var handler = ok ? reaction.ok : reaction.fail; var resolve = reaction.resolve; var reject = reaction.reject; @@ -4885,7 +4977,7 @@ typeof navigator === "object" && (function () { if (handler === true) result = value; else { if (domain) domain.enter(); - result = handler(value); // may throw + result = handler(value); // can throw if (domain) { domain.exit(); exited = true; @@ -4901,8 +4993,7 @@ typeof navigator === "object" && (function () { if (domain && !exited) domain.exit(); reject(error); } - }; - while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + } state.reactions = []; state.notified = false; if (isReject && !state.rejection) onUnhandled(promise, state); @@ -4912,7 +5003,7 @@ typeof navigator === "object" && (function () { var dispatchEvent = function (name, promise, reason) { var event, handler; if (DISPATCH_EVENT) { - event = document$3.createEvent('Event'); + event = document$2.createEvent('Event'); event.promise = promise; event.reason = reason; event.initEvent(name, false, true); @@ -5001,7 +5092,7 @@ typeof navigator === "object" && (function () { // 25.4.3.1 Promise(executor) PromiseConstructor = function Promise(executor) { anInstance(this, PromiseConstructor, PROMISE); - aFunction(executor); + aFunction$1(executor); Internal.call(this); var state = getInternalState$3(this); try { @@ -5102,11 +5193,11 @@ typeof navigator === "object" && (function () { var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { - var $promiseResolve = aFunction(C.resolve); + var $promiseResolve = aFunction$1(C.resolve); var values = []; var counter = 0; var remaining = 1; - iterate(iterable, function (promise) { + iterate_1(iterable, function (promise) { var index = counter++; var alreadyCalled = false; values.push(undefined); @@ -5130,8 +5221,8 @@ typeof navigator === "object" && (function () { var capability = newPromiseCapability$1(C); var reject = capability.reject; var result = perform(function () { - var $promiseResolve = aFunction(C.resolve); - iterate(iterable, function (promise) { + var $promiseResolve = aFunction$1(C.resolve); + iterate_1(iterable, function (promise) { $promiseResolve.call(C, promise).then(capability.resolve, reject); }); }); @@ -5141,16 +5232,14 @@ typeof navigator === "object" && (function () { }); var max$3 = Math.max; - var min$4 = Math.min; + var min$5 = Math.min; var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; - var SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('splice'); - // `Array.prototype.splice` method // https://tc39.github.io/ecma262/#sec-array.prototype.splice // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT$2 }, { + _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('splice') }, { splice: function splice(start, deleteCount /* , ...items */) { var O = toObject(this); var len = toLength(O.length); @@ -5164,7 +5253,7 @@ typeof navigator === "object" && (function () { actualDeleteCount = len - actualStart; } else { insertCount = argumentsLength - 2; - actualDeleteCount = min$4(max$3(toInteger(deleteCount), 0), len - actualStart); + actualDeleteCount = min$5(max$3(toInteger(deleteCount), 0), len - actualStart); } if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) { throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); @@ -5236,64 +5325,74 @@ typeof navigator === "object" && (function () { ]; }); - var internalFilter = arrayMethods(2); - var SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('filter'); + var $filter = arrayIteration.filter; + // `Array.prototype.filter` method // https://tc39.github.io/ecma262/#sec-array.prototype.filter // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT$3 }, { + _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, { filter: function filter(callbackfn /* , thisArg */) { - return internalFilter(this, callbackfn, arguments[1]); + return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); - var internalMap = arrayMethods(1); - var SPECIES_SUPPORT$4 = arrayMethodHasSpeciesSupport('map'); + var $map = arrayIteration.map; + // `Array.prototype.map` method // https://tc39.github.io/ecma262/#sec-array.prototype.map // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT$4 }, { + _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, { map: function map(callbackfn /* , thisArg */) { - return internalMap(this, callbackfn, arguments[1]); + return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // `Array.prototype.{ reduce, reduceRight }` methods implementation - // https://tc39.github.io/ecma262/#sec-array.prototype.reduce - // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright - var arrayReduce = function (that, callbackfn, argumentsLength, memo, isRight) { - aFunction(callbackfn); - var O = toObject(that); - var self = indexedObject(O); - var length = toLength(O.length); - var index = isRight ? length - 1 : 0; - var i = isRight ? -1 : 1; - if (argumentsLength < 2) while (true) { - if (index in self) { - memo = self[index]; + var createMethod$3 = function (IS_RIGHT) { + return function (that, callbackfn, argumentsLength, memo) { + aFunction$1(callbackfn); + var O = toObject(that); + var self = indexedObject(O); + var length = toLength(O.length); + var index = IS_RIGHT ? length - 1 : 0; + var i = IS_RIGHT ? -1 : 1; + if (argumentsLength < 2) while (true) { + if (index in self) { + memo = self[index]; + index += i; + break; + } index += i; - break; + if (IS_RIGHT ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } } - index += i; - if (isRight ? index < 0 : length <= index) { - throw TypeError('Reduce of empty array with no initial value'); + for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); } - } - for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { - memo = callbackfn(memo, self[index], index, O); - } - return memo; + return memo; + }; + }; + + var arrayReduce = { + // `Array.prototype.reduce` method + // https://tc39.github.io/ecma262/#sec-array.prototype.reduce + left: createMethod$3(false), + // `Array.prototype.reduceRight` method + // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright + right: createMethod$3(true) }; - var SLOPPY_METHOD$4 = sloppyArrayMethod('reduce'); + var $reduce = arrayReduce.left; + // `Array.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduce - _export({ target: 'Array', proto: true, forced: SLOPPY_METHOD$4 }, { + _export({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduce') }, { reduce: function reduce(callbackfn /* , initialValue */) { - return arrayReduce(this, callbackfn, arguments.length, arguments[1], false); + return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -5308,12 +5407,19 @@ typeof navigator === "object" && (function () { } }); - var inheritIfRequired = function (that, target, C) { - var S = target.constructor; - var P; - if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && objectSetPrototypeOf) { - objectSetPrototypeOf(that, P); - } return that; + // makes subclassing work correct for wrapped built-ins + var inheritIfRequired = function ($this, dummy, Wrapper) { + var NewTarget, NewTargetPrototype; + if ( + // it can work only with native `setPrototypeOf` + objectSetPrototypeOf && + // we haven't completely correct pre-ES6 way for getting `new.target`, so use this + typeof (NewTarget = dummy.constructor) == 'function' && + NewTarget !== Wrapper && + isObject(NewTargetPrototype = NewTarget.prototype) && + NewTargetPrototype !== Wrapper.prototype + ) objectSetPrototypeOf($this, NewTargetPrototype); + return $this; }; var defineProperty$4 = objectDefineProperty.f; @@ -5334,7 +5440,7 @@ typeof navigator === "object" && (function () { // "new" should create a new object, old webkit bug var CORRECT_NEW = new NativeRegExp(re1) !== re1; - var FORCED$2 = isForced_1('RegExp', descriptors && (!CORRECT_NEW || fails(function () { + var FORCED$2 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || fails(function () { re2[MATCH$2] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i'; @@ -5363,8 +5469,8 @@ typeof navigator === "object" && (function () { }); }; var keys$1 = getOwnPropertyNames(NativeRegExp); - var i = 0; - while (i < keys$1.length) proxy(keys$1[i++]); + var index = 0; + while (keys$1.length > index) proxy(keys$1[index++]); RegExpPrototype$1.constructor = RegExpWrapper; RegExpWrapper.prototype = RegExpPrototype$1; redefine(global_1, 'RegExp', RegExpWrapper); @@ -5392,7 +5498,7 @@ typeof navigator === "object" && (function () { var TO_STRING_TAG$4 = wellKnownSymbol('toStringTag'); var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG'); - var NATIVE_ARRAY_BUFFER = !!(global_1.ArrayBuffer && global_1.DataView); + var NATIVE_ARRAY_BUFFER = !!(global_1.ArrayBuffer && DataView); var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!objectSetPrototypeOf; var TYPED_ARRAY_TAG_REQIRED = false; var NAME$1; @@ -5771,24 +5877,24 @@ typeof navigator === "object" && (function () { return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /* , littleEndian */) { - var bytes = get(this, 2, byteOffset, arguments[1]); + var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /* , littleEndian */) { - var bytes = get(this, 2, byteOffset, arguments[1]); + var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /* , littleEndian */) { - return unpackInt32(get(this, 4, byteOffset, arguments[1])); + return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)); }, getUint32: function getUint32(byteOffset /* , littleEndian */) { - return unpackInt32(get(this, 4, byteOffset, arguments[1])) >>> 0; + return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0; }, getFloat32: function getFloat32(byteOffset /* , littleEndian */) { - return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23); + return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23); }, getFloat64: function getFloat64(byteOffset /* , littleEndian */) { - return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52); + return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52); }, setInt8: function setInt8(byteOffset, value) { set(this, 1, byteOffset, packInt8, value); @@ -5797,22 +5903,22 @@ typeof navigator === "object" && (function () { set(this, 1, byteOffset, packInt8, value); }, setInt16: function setInt16(byteOffset, value /* , littleEndian */) { - set(this, 2, byteOffset, packInt16, value, arguments[2]); + set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); }, setUint16: function setUint16(byteOffset, value /* , littleEndian */) { - set(this, 2, byteOffset, packInt16, value, arguments[2]); + set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); }, setInt32: function setInt32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packInt32, value, arguments[2]); + set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); }, setUint32: function setUint32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packInt32, value, arguments[2]); + set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); }, setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packFloat32, value, arguments[2]); + set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined); }, setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { - set(this, 8, byteOffset, packFloat64, value, arguments[2]); + set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined); } }); } else { @@ -5911,7 +6017,7 @@ typeof navigator === "object" && (function () { var getOwnPropertyNames = objectGetOwnPropertyNames.f; - + var forEach = arrayIteration.forEach; @@ -5921,7 +6027,7 @@ typeof navigator === "object" && (function () { var setInternalState = internalState.set; var nativeDefineProperty = objectDefineProperty.f; var nativeGetOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; - var forEach = arrayMethods(0); + var round = Math.round; var RangeError = global_1.RangeError; var ArrayBuffer = arrayBuffer.ArrayBuffer; var DataView = arrayBuffer.DataView; @@ -6014,7 +6120,7 @@ typeof navigator === "object" && (function () { var setter = function (that, index, value) { var data = getInternalState(that); - if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF; + if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF; data.view[SETTER](index * BYTES + data.byteOffset, value, true); }; @@ -6071,8 +6177,8 @@ typeof navigator === "object" && (function () { if (objectSetPrototypeOf) objectSetPrototypeOf(TypedArrayConstructor, TypedArray); TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = objectCreate(TypedArrayPrototype); } else if (typedArraysConstructorsRequiresWrappers) { - TypedArrayConstructor = wrapper(function (that, data, typedArrayOffset, $length) { - anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME); + TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) { + anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME); if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data)); if (isArrayBuffer(data)) return $length !== undefined ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length) @@ -6123,6 +6229,8 @@ typeof navigator === "object" && (function () { }; }); + var min$6 = Math.min; + // `Array.prototype.copyWithin` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.copywithin var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { @@ -6131,7 +6239,7 @@ typeof navigator === "object" && (function () { var to = toAbsoluteIndex(target, len); var from = toAbsoluteIndex(start, len); var end = arguments.length > 2 ? arguments[2] : undefined; - var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var count = min$6((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); var inc = 1; if (from < to && to < from + count) { inc = -1; @@ -6154,13 +6262,14 @@ typeof navigator === "object" && (function () { return arrayCopyWithin.call(aTypedArray$1(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }); - var arrayEvery = arrayMethods(4); + var $every = arrayIteration.every; + var aTypedArray$2 = arrayBufferViewCore.aTypedArray; // `%TypedArray%.prototype.every` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every arrayBufferViewCore.exportProto('every', function every(callbackfn /* , thisArg */) { - return arrayEvery(aTypedArray$2(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $every(aTypedArray$2(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); var aTypedArray$3 = arrayBufferViewCore.aTypedArray; @@ -6172,14 +6281,16 @@ typeof navigator === "object" && (function () { return arrayFill.apply(aTypedArray$3(this), arguments); }); - var arrayFilter = arrayMethods(2); + var $filter$1 = arrayIteration.filter; + + var aTypedArray$4 = arrayBufferViewCore.aTypedArray; var aTypedArrayConstructor$2 = arrayBufferViewCore.aTypedArrayConstructor; // `%TypedArray%.prototype.filter` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter arrayBufferViewCore.exportProto('filter', function filter(callbackfn /* , thisArg */) { - var list = arrayFilter(aTypedArray$4(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + var list = $filter$1(aTypedArray$4(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); var C = speciesConstructor(this, this.constructor); var index = 0; var length = list.length; @@ -6188,49 +6299,54 @@ typeof navigator === "object" && (function () { return result; }); - var arrayFind = arrayMethods(5); + var $find = arrayIteration.find; + var aTypedArray$5 = arrayBufferViewCore.aTypedArray; // `%TypedArray%.prototype.find` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find arrayBufferViewCore.exportProto('find', function find(predicate /* , thisArg */) { - return arrayFind(aTypedArray$5(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + return $find(aTypedArray$5(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); - var arrayFindIndex = arrayMethods(6); + var $findIndex = arrayIteration.findIndex; + var aTypedArray$6 = arrayBufferViewCore.aTypedArray; // `%TypedArray%.prototype.findIndex` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findindex arrayBufferViewCore.exportProto('findIndex', function findIndex(predicate /* , thisArg */) { - return arrayFindIndex(aTypedArray$6(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + return $findIndex(aTypedArray$6(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); - var arrayForEach$1 = arrayMethods(0); + var $forEach$2 = arrayIteration.forEach; + var aTypedArray$7 = arrayBufferViewCore.aTypedArray; // `%TypedArray%.prototype.forEach` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.foreach arrayBufferViewCore.exportProto('forEach', function forEach(callbackfn /* , thisArg */) { - arrayForEach$1(aTypedArray$7(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + $forEach$2(aTypedArray$7(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); + var $includes$1 = arrayIncludes.includes; + var aTypedArray$8 = arrayBufferViewCore.aTypedArray; - var arrayIncludes$1 = arrayIncludes(true); // `%TypedArray%.prototype.includes` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.includes arrayBufferViewCore.exportProto('includes', function includes(searchElement /* , fromIndex */) { - return arrayIncludes$1(aTypedArray$8(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + return $includes$1(aTypedArray$8(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }); + var $indexOf$1 = arrayIncludes.indexOf; + var aTypedArray$9 = arrayBufferViewCore.aTypedArray; - var arrayIndexOf$1 = arrayIncludes(false); // `%TypedArray%.prototype.indexOf` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.indexof arrayBufferViewCore.exportProto('indexOf', function indexOf(searchElement /* , fromIndex */) { - return arrayIndexOf$1(aTypedArray$9(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + return $indexOf$1(aTypedArray$9(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }); var ITERATOR$8 = wellKnownSymbol('iterator'); @@ -6267,13 +6383,13 @@ typeof navigator === "object" && (function () { exportProto$1(ITERATOR$8, typedArrayValues, !CORRECT_ITER_NAME); var aTypedArray$b = arrayBufferViewCore.aTypedArray; - var arrayJoin = [].join; + var $join = [].join; // `%TypedArray%.prototype.join` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join // eslint-disable-next-line no-unused-vars arrayBufferViewCore.exportProto('join', function join(separator) { - return arrayJoin.apply(aTypedArray$b(this), arguments); + return $join.apply(aTypedArray$b(this), arguments); }); var aTypedArray$c = arrayBufferViewCore.aTypedArray; @@ -6285,43 +6401,49 @@ typeof navigator === "object" && (function () { return arrayLastIndexOf.apply(aTypedArray$c(this), arguments); }); + var $map$1 = arrayIteration.map; + + var aTypedArray$d = arrayBufferViewCore.aTypedArray; var aTypedArrayConstructor$3 = arrayBufferViewCore.aTypedArrayConstructor; - var internalTypedArrayMap = arrayMethods(1, function (O, length) { - return new (aTypedArrayConstructor$3(speciesConstructor(O, O.constructor)))(length); - }); - // `%TypedArray%.prototype.map` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.map arrayBufferViewCore.exportProto('map', function map(mapfn /* , thisArg */) { - return internalTypedArrayMap(aTypedArray$d(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + return $map$1(aTypedArray$d(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) { + return new (aTypedArrayConstructor$3(speciesConstructor(O, O.constructor)))(length); + }); }); + var $reduce$1 = arrayReduce.left; + var aTypedArray$e = arrayBufferViewCore.aTypedArray; // `%TypedArray%.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce arrayBufferViewCore.exportProto('reduce', function reduce(callbackfn /* , initialValue */) { - return arrayReduce(aTypedArray$e(this), callbackfn, arguments.length, arguments[1], false); + return $reduce$1(aTypedArray$e(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); }); + var $reduceRight = arrayReduce.right; + var aTypedArray$f = arrayBufferViewCore.aTypedArray; // `%TypedArray%.prototype.reduceRicht` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright arrayBufferViewCore.exportProto('reduceRight', function reduceRight(callbackfn /* , initialValue */) { - return arrayReduce(aTypedArray$f(this), callbackfn, arguments.length, arguments[1], true); + return $reduceRight(aTypedArray$f(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); }); var aTypedArray$g = arrayBufferViewCore.aTypedArray; + var floor$4 = Math.floor; // `%TypedArray%.prototype.reverse` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reverse arrayBufferViewCore.exportProto('reverse', function reverse() { var that = this; var length = aTypedArray$g(that).length; - var middle = Math.floor(length / 2); + var middle = floor$4(length / 2); var index = 0; var value; while (index < middle) { @@ -6342,7 +6464,7 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.set arrayBufferViewCore.exportProto('set', function set(arrayLike /* , offset */) { aTypedArray$h(this); - var offset = toOffset(arguments[1], 1); + var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1); var length = this.length; var src = toObject(arrayLike); var len = toLength(src.length); @@ -6353,7 +6475,7 @@ typeof navigator === "object" && (function () { var aTypedArray$i = arrayBufferViewCore.aTypedArray; var aTypedArrayConstructor$4 = arrayBufferViewCore.aTypedArrayConstructor; - var arraySlice = [].slice; + var $slice = [].slice; var FORCED$4 = fails(function () { // eslint-disable-next-line no-undef @@ -6363,7 +6485,7 @@ typeof navigator === "object" && (function () { // `%TypedArray%.prototype.slice` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice arrayBufferViewCore.exportProto('slice', function slice(start, end) { - var list = arraySlice.call(aTypedArray$i(this), start, end); + var list = $slice.call(aTypedArray$i(this), start, end); var C = speciesConstructor(this, this.constructor); var index = 0; var length = list.length; @@ -6372,22 +6494,23 @@ typeof navigator === "object" && (function () { return result; }, FORCED$4); - var arraySome = arrayMethods(3); + var $some = arrayIteration.some; + var aTypedArray$j = arrayBufferViewCore.aTypedArray; // `%TypedArray%.prototype.some` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some arrayBufferViewCore.exportProto('some', function some(callbackfn /* , thisArg */) { - return arraySome(aTypedArray$j(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $some(aTypedArray$j(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); var aTypedArray$k = arrayBufferViewCore.aTypedArray; - var arraySort = [].sort; + var $sort = [].sort; // `%TypedArray%.prototype.sort` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort arrayBufferViewCore.exportProto('sort', function sort(comparefn) { - return arraySort.call(aTypedArray$k(this), comparefn); + return $sort.call(aTypedArray$k(this), comparefn); }); var aTypedArray$l = arrayBufferViewCore.aTypedArray; @@ -6407,13 +6530,14 @@ typeof navigator === "object" && (function () { var Int8Array$3 = global_1.Int8Array; var aTypedArray$m = arrayBufferViewCore.aTypedArray; - var arrayToLocaleString = [].toLocaleString; - var arraySlice$1 = [].slice; + var $toLocaleString = [].toLocaleString; + var $slice$1 = [].slice; // iOS Safari 6.x fails here - var TO_LOCALE_BUG = !!Int8Array$3 && fails(function () { - arrayToLocaleString.call(new Int8Array$3(1)); + var TO_LOCALE_STRING_BUG = !!Int8Array$3 && fails(function () { + $toLocaleString.call(new Int8Array$3(1)); }); + var FORCED$5 = fails(function () { return [1, 2].toLocaleString() != new Int8Array$3([1, 2]).toLocaleString(); }) || !fails(function () { @@ -6423,17 +6547,17 @@ typeof navigator === "object" && (function () { // `%TypedArray%.prototype.toLocaleString` method // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring arrayBufferViewCore.exportProto('toLocaleString', function toLocaleString() { - return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice$1.call(aTypedArray$m(this)) : aTypedArray$m(this), arguments); + return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice$1.call(aTypedArray$m(this)) : aTypedArray$m(this), arguments); }, FORCED$5); var Uint8Array$1 = global_1.Uint8Array; var Uint8ArrayPrototype = Uint8Array$1 && Uint8Array$1.prototype; var arrayToString = [].toString; - var arrayJoin$1 = [].join; + var arrayJoin = [].join; if (fails(function () { arrayToString.call({}); })) { arrayToString = function toString() { - return arrayJoin$1.call(this); + return arrayJoin.call(this); }; } @@ -8306,7 +8430,7 @@ typeof navigator === "object" && (function () { // webpack (using a build step causes webpack #1617). Grunt verifies that // this value matches package.json during build. // See: https://github.com/getsentry/raven-js/issues/465 - VERSION: '3.27.1', + VERSION: '3.27.2', debug: false, TraceKit: tracekit, // alias to TraceKit @@ -10276,7 +10400,9 @@ typeof navigator === "object" && (function () { var Client = raven; singleton.Client = Client; - var internalFind = arrayMethods(5); + var $find$1 = arrayIteration.find; + + var FIND = 'find'; var SKIPS_HOLES = true; @@ -10287,7 +10413,7 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-array.prototype.find _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { find: function find(callbackfn /* , that = undefined */) { - return internalFind(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $find$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -10302,20 +10428,32 @@ typeof navigator === "object" && (function () { var ltrim = RegExp('^' + whitespace + whitespace + '*'); var rtrim = RegExp(whitespace + whitespace + '*$'); - // 1 -> String#trimStart - // 2 -> String#trimEnd - // 3 -> String#trim - var stringTrim = function (string, TYPE) { - string = String(requireObjectCoercible(string)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); - return string; + // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation + var createMethod$4 = function (TYPE) { + return function ($this) { + var string = String(requireObjectCoercible($this)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }; + }; + + var stringTrim = { + // `String.prototype.{ trimLeft, trimStart }` methods + // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart + start: createMethod$4(1), + // `String.prototype.{ trimRight, trimEnd }` methods + // https://tc39.github.io/ecma262/#sec-string.prototype.trimend + end: createMethod$4(2), + // `String.prototype.trim` method + // https://tc39.github.io/ecma262/#sec-string.prototype.trim + trim: createMethod$4(3) }; var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f; var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f; var defineProperty$6 = objectDefineProperty.f; - + var trim = stringTrim.trim; var NUMBER = 'Number'; var NativeNumber = global_1[NUMBER]; @@ -10323,15 +10461,14 @@ typeof navigator === "object" && (function () { // Opera ~12 has broken Object#toString var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER; - var NATIVE_TRIM = 'trim' in String.prototype; // `ToNumber` abstract operation // https://tc39.github.io/ecma262/#sec-tonumber var toNumber = function (argument) { var it = toPrimitive(argument, false); - var first, third, radix, maxCode, digits, length, i, code; + var first, third, radix, maxCode, digits, length, index, code; if (typeof it == 'string' && it.length > 2) { - it = NATIVE_TRIM ? it.trim() : stringTrim(it, 3); + it = trim(it); first = it.charCodeAt(0); if (first === 43 || first === 45) { third = it.charCodeAt(2); @@ -10344,8 +10481,8 @@ typeof navigator === "object" && (function () { } digits = it.slice(2); length = digits.length; - for (i = 0; i < length; i++) { - code = digits.charCodeAt(i); + for (index = 0; index < length; index++) { + code = digits.charCodeAt(index); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if (code < 48 || code > maxCode) return NaN; @@ -10359,11 +10496,11 @@ typeof navigator === "object" && (function () { if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { var NumberWrapper = function Number(value) { var it = arguments.length < 1 ? 0 : value; - var that = this; - return that instanceof NumberWrapper + var dummy = this; + return dummy instanceof NumberWrapper // check on 1..constructor(foo) case - && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(that); }) : classofRaw(that) != NUMBER) - ? inheritIfRequired(new NativeNumber(toNumber(it)), that, NumberWrapper) : toNumber(it); + && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classofRaw(dummy) != NUMBER) + ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it); }; for (var keys$2 = descriptors ? getOwnPropertyNames$1(NativeNumber) : ( // ES3: @@ -10398,29 +10535,41 @@ typeof navigator === "object" && (function () { var propertyIsEnumerable = objectPropertyIsEnumerable.f; - // TO_ENTRIES: true -> Object.entries - // TO_ENTRIES: false -> Object.values - var objectToArray = function (it, TO_ENTRIES) { - var O = toIndexedObject(it); - var keys = objectKeys(O); - var length = keys.length; - var i = 0; - var result = []; - var key; - while (length > i) { - key = keys[i++]; - if (!descriptors || propertyIsEnumerable.call(O, key)) { - result.push(TO_ENTRIES ? [key, O[key]] : O[key]); - } - } - return result; - }; - - // `Object.entries` method - // https://tc39.github.io/ecma262/#sec-object.entries - _export({ target: 'Object', stat: true }, { - entries: function entries(O) { - return objectToArray(O, true); + // `Object.{ entries, values }` methods implementation + var createMethod$5 = function (TO_ENTRIES) { + return function (it) { + var O = toIndexedObject(it); + var keys = objectKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!descriptors || propertyIsEnumerable.call(O, key)) { + result.push(TO_ENTRIES ? [key, O[key]] : O[key]); + } + } + return result; + }; + }; + + var objectToArray = { + // `Object.entries` method + // https://tc39.github.io/ecma262/#sec-object.entries + entries: createMethod$5(true), + // `Object.values` method + // https://tc39.github.io/ecma262/#sec-object.values + values: createMethod$5(false) + }; + + var $entries = objectToArray.entries; + + // `Object.entries` method + // https://tc39.github.io/ecma262/#sec-object.entries + _export({ target: 'Object', stat: true }, { + entries: function entries(O) { + return $entries(O); } }); @@ -11050,12 +11199,12 @@ typeof navigator === "object" && (function () { return hasOwnProperty$1.call(it, key); }; - var document$4 = global_1$1.document; + var document$3 = global_1$1.document; // typeof document.createElement is 'object' in old IE - var EXISTS = isObject$4(document$4) && isObject$4(document$4.createElement); + var EXISTS$1 = isObject$4(document$3) && isObject$4(document$3.createElement); var documentCreateElement$1 = function (it) { - return EXISTS ? document$4.createElement(it) : {}; + return EXISTS$1 ? document$3.createElement(it) : {}; }; // Thank's IE8 for his funny defineProperty @@ -11266,35 +11415,35 @@ typeof navigator === "object" && (function () { }; var ceil$1 = Math.ceil; - var floor$3 = Math.floor; + var floor$5 = Math.floor; // `ToInteger` abstract operation // https://tc39.github.io/ecma262/#sec-tointeger var toInteger$1 = function (argument) { - return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor$3 : ceil$1)(argument); + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor$5 : ceil$1)(argument); }; - var min$5 = Math.min; + var min$7 = Math.min; // `ToLength` abstract operation // https://tc39.github.io/ecma262/#sec-tolength var toLength$1 = function (argument) { - return argument > 0 ? min$5(toInteger$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 + return argument > 0 ? min$7(toInteger$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; var max$4 = Math.max; - var min$6 = Math.min; + var min$8 = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). var toAbsoluteIndex$1 = function (index, length) { var integer = toInteger$1(index); - return integer < 0 ? max$4(integer + length, 0) : min$6(integer, length); + return integer < 0 ? max$4(integer + length, 0) : min$8(integer, length); }; // `Array.prototype.{ indexOf, includes }` methods implementation - var createMethod = function (IS_INCLUDES) { + var createMethod$6 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject$1($this); var length = toLength$1(O.length); @@ -11313,16 +11462,16 @@ typeof navigator === "object" && (function () { }; }; - var arrayIncludes$2 = { + var arrayIncludes$1 = { // `Array.prototype.includes` method // https://tc39.github.io/ecma262/#sec-array.prototype.includes - includes: createMethod(true), + includes: createMethod$6(true), // `Array.prototype.indexOf` method // https://tc39.github.io/ecma262/#sec-array.prototype.indexof - indexOf: createMethod(false) + indexOf: createMethod$6(false) }; - var indexOf = arrayIncludes$2.indexOf; + var indexOf$1 = arrayIncludes$1.indexOf; var objectKeysInternal$1 = function (object, names) { @@ -11333,7 +11482,7 @@ typeof navigator === "object" && (function () { for (key in O) !has$2(hiddenKeys$2, key) && has$2(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has$2(O, key = names[i++])) { - ~indexOf(result, key) || result.push(key); + ~indexOf$1(result, key) || result.push(key); } return result; }; @@ -11565,7 +11714,7 @@ typeof navigator === "object" && (function () { return array.concat()[0] !== array; }); - var SPECIES_SUPPORT$5 = arrayMethodHasSpeciesSupport$1('concat'); + var SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('concat'); var isConcatSpreadable$1 = function (O) { if (!isObject$4(O)) return false; @@ -11573,7 +11722,7 @@ typeof navigator === "object" && (function () { return spreadable !== undefined ? !!spreadable : isArray$4(O); }; - var FORCED$6 = !IS_CONCAT_SPREADABLE_SUPPORT$1 || !SPECIES_SUPPORT$5; + var FORCED$6 = !IS_CONCAT_SPREADABLE_SUPPORT$1 || !SPECIES_SUPPORT$1; // `Array.prototype.concat` method // https://tc39.github.io/ecma262/#sec-array.prototype.concat @@ -11629,10 +11778,10 @@ typeof navigator === "object" && (function () { }; }; - var push = [].push; + var push$1 = [].push; // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation - var createMethod$1 = function (TYPE) { + var createMethod$7 = function (TYPE) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; @@ -11657,7 +11806,7 @@ typeof navigator === "object" && (function () { case 3: return true; // some case 5: return value; // find case 6: return index; // findIndex - case 2: push.call(target, value); // filter + case 2: push$1.call(target, value); // filter } else if (IS_EVERY) return false; // every } } @@ -11665,28 +11814,28 @@ typeof navigator === "object" && (function () { }; }; - var arrayIteration = { + var arrayIteration$1 = { // `Array.prototype.forEach` method // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - forEach: createMethod$1(0), + forEach: createMethod$7(0), // `Array.prototype.map` method // https://tc39.github.io/ecma262/#sec-array.prototype.map - map: createMethod$1(1), + map: createMethod$7(1), // `Array.prototype.filter` method // https://tc39.github.io/ecma262/#sec-array.prototype.filter - filter: createMethod$1(2), + filter: createMethod$7(2), // `Array.prototype.some` method // https://tc39.github.io/ecma262/#sec-array.prototype.some - some: createMethod$1(3), + some: createMethod$7(3), // `Array.prototype.every` method // https://tc39.github.io/ecma262/#sec-array.prototype.every - every: createMethod$1(4), + every: createMethod$7(4), // `Array.prototype.find` method // https://tc39.github.io/ecma262/#sec-array.prototype.find - find: createMethod$1(5), + find: createMethod$7(5), // `Array.prototype.findIndex` method // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod$1(6) + findIndex: createMethod$7(6) }; var defineProperty$7 = Object.defineProperty; @@ -11713,7 +11862,7 @@ typeof navigator === "object" && (function () { }); }; - var $filter = arrayIteration.filter; + var $filter$2 = arrayIteration$1.filter; @@ -11726,7 +11875,7 @@ typeof navigator === "object" && (function () { // with adding support of @@species _export$1({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, { filter: function filter(callbackfn /* , thisArg */) { - return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $filter$2(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -11838,7 +11987,7 @@ typeof navigator === "object" && (function () { ArrayPrototype$2[UNSCOPABLES$1][key] = true; }; - var $find = arrayIteration.find; + var $find$2 = arrayIteration$1.find; @@ -11854,7 +12003,7 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-array.prototype.find _export$1({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 || !USES_TO_LENGTH$1 }, { find: function find(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $find$2(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -12001,7 +12150,7 @@ typeof navigator === "object" && (function () { from: arrayFrom$1 }); - var $includes = arrayIncludes$2.includes; + var $includes$2 = arrayIncludes$1.includes; @@ -12011,7 +12160,7 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-array.prototype.includes _export$1({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$2 }, { includes: function includes(el /* , fromIndex = 0 */) { - return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + return $includes$2(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -12096,7 +12245,7 @@ typeof navigator === "object" && (function () { return IteratorConstructor; }; - var aPossiblePrototype = function (it) { + var aPossiblePrototype$1 = function (it) { if (!isObject$4(it) && it !== null) { throw TypeError("Can't set " + String(it) + ' as a prototype'); } return it; @@ -12117,7 +12266,7 @@ typeof navigator === "object" && (function () { } catch (error) { /* empty */ } return function setPrototypeOf(O, proto) { anObject$1(O); - aPossiblePrototype(proto); + aPossiblePrototype$1(proto); if (CORRECT_SETTER) setter.call(O, proto); else O.__proto__ = proto; return O; @@ -12269,7 +12418,7 @@ typeof navigator === "object" && (function () { } }); - var $map = arrayIteration.map; + var $map$2 = arrayIteration$1.map; @@ -12282,7 +12431,7 @@ typeof navigator === "object" && (function () { // with adding support of @@species _export$1({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3 }, { map: function map(callbackfn /* , thisArg */) { - return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $map$2(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -12310,7 +12459,7 @@ typeof navigator === "object" && (function () { var rtrim$1 = RegExp(whitespace$1 + whitespace$1 + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation - var createMethod$2 = function (TYPE) { + var createMethod$8 = function (TYPE) { return function ($this) { var string = String(requireObjectCoercible$1($this)); if (TYPE & 1) string = string.replace(ltrim$1, ''); @@ -12322,19 +12471,19 @@ typeof navigator === "object" && (function () { var stringTrim$1 = { // `String.prototype.{ trimLeft, trimStart }` methods // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart - start: createMethod$2(1), + start: createMethod$8(1), // `String.prototype.{ trimRight, trimEnd }` methods // https://tc39.github.io/ecma262/#sec-string.prototype.trimend - end: createMethod$2(2), + end: createMethod$8(2), // `String.prototype.trim` method // https://tc39.github.io/ecma262/#sec-string.prototype.trim - trim: createMethod$2(3) + trim: createMethod$8(3) }; var getOwnPropertyNames$2 = objectGetOwnPropertyNames$1.f; var getOwnPropertyDescriptor$6 = objectGetOwnPropertyDescriptor$1.f; var defineProperty$9 = objectDefineProperty$1.f; - var trim = stringTrim$1.trim; + var trim$1 = stringTrim$1.trim; var NUMBER$1 = 'Number'; var NativeNumber$1 = global_1$1[NUMBER$1]; @@ -12349,7 +12498,7 @@ typeof navigator === "object" && (function () { var it = toPrimitive$1(argument, false); var first, third, radix, maxCode, digits, length, index, code; if (typeof it == 'string' && it.length > 2) { - it = trim(it); + it = trim$1(it); first = it.charCodeAt(0); if (first === 43 || first === 45) { third = it.charCodeAt(2); @@ -12577,7 +12726,7 @@ typeof navigator === "object" && (function () { return isObject$4(it) && ((isRegExp = it[MATCH$3]) !== undefined ? !!isRegExp : classofRaw$1(it) == 'RegExp'); }; - var notARegexp = function (it) { + var notARegexp$1 = function (it) { if (isRegexp$1(it)) { throw TypeError("The method doesn't accept regular expressions"); } return it; @@ -12602,12 +12751,12 @@ typeof navigator === "object" && (function () { _export$1({ target: 'String', proto: true, forced: !correctIsRegexpLogic$1('includes') }, { includes: function includes(searchString /* , position = 0 */) { return !!~String(requireObjectCoercible$1(this)) - .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined); + .indexOf(notARegexp$1(searchString), arguments.length > 1 ? arguments[1] : undefined); } }); // `String.prototype.{ codePointAt, at }` methods implementation - var createMethod$3 = function (CONVERT_TO_STRING) { + var createMethod$9 = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = String(requireObjectCoercible$1($this)); var position = toInteger$1(pos); @@ -12622,16 +12771,16 @@ typeof navigator === "object" && (function () { }; }; - var stringMultibyte = { + var stringMultibyte$1 = { // `String.prototype.codePointAt` method // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat - codeAt: createMethod$3(false), + codeAt: createMethod$9(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at - charAt: createMethod$3(true) + charAt: createMethod$9(true) }; - var charAt = stringMultibyte.charAt; + var charAt$2 = stringMultibyte$1.charAt; @@ -12655,7 +12804,7 @@ typeof navigator === "object" && (function () { var index = state.index; var point; if (index >= string.length) return { value: undefined, done: true }; - point = charAt(string, index); + point = charAt$2(string, index); state.index += point.length; return { value: point, done: false }; }); @@ -12913,7 +13062,7 @@ typeof navigator === "object" && (function () { var internalMetadata_3 = internalMetadata.getWeakData; var internalMetadata_4 = internalMetadata.onFreeze; - var iterate_1 = createCommonjsModule(function (module) { + var iterate_1$1 = createCommonjsModule(function (module) { var Result = function (stopped, result) { this.stopped = stopped; this.result = result; @@ -13015,7 +13164,7 @@ typeof navigator === "object" && (function () { Constructor = wrapper(function (dummy, iterable) { anInstance$1(dummy, Constructor, CONSTRUCTOR_NAME); var that = inheritIfRequired$1(new NativeConstructor(), dummy, Constructor); - if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP); + if (iterable != undefined) iterate_1$1(iterable, that[ADDER], that, IS_MAP); return that; }); Constructor.prototype = NativePrototype; @@ -13055,8 +13204,8 @@ typeof navigator === "object" && (function () { var setInternalState$8 = internalState$1.set; var internalStateGetterFor = internalState$1.getterFor; - var find$1 = arrayIteration.find; - var findIndex = arrayIteration.findIndex; + var find$1 = arrayIteration$1.find; + var findIndex = arrayIteration$1.findIndex; var id$2 = 0; // fallback for uncaught frozen keys @@ -13105,7 +13254,7 @@ typeof navigator === "object" && (function () { id: id$2++, frozen: undefined }); - if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP); + if (iterable != undefined) iterate_1$1(iterable, that[ADDER], that, IS_MAP); }); var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); @@ -13297,7 +13446,7 @@ typeof navigator === "object" && (function () { } } - var $every = arrayIteration.every; + var $every$1 = arrayIteration$1.every; @@ -13308,11 +13457,11 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-array.prototype.every _export$1({ target: 'Array', proto: true, forced: !STRICT_METHOD$1 || !USES_TO_LENGTH$4 }, { every: function every(callbackfn /* , thisArg */) { - return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $every$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); - var $forEach = arrayIteration.forEach; + var $forEach$3 = arrayIteration$1.forEach; @@ -13321,17 +13470,17 @@ typeof navigator === "object" && (function () { // `Array.prototype.forEach` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - var arrayForEach$2 = (!STRICT_METHOD$2 || !USES_TO_LENGTH$5) ? function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + var arrayForEach$1 = (!STRICT_METHOD$2 || !USES_TO_LENGTH$5) ? function forEach(callbackfn /* , thisArg */) { + return $forEach$3(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } : [].forEach; // `Array.prototype.forEach` method // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - _export$1({ target: 'Array', proto: true, forced: [].forEach != arrayForEach$2 }, { - forEach: arrayForEach$2 + _export$1({ target: 'Array', proto: true, forced: [].forEach != arrayForEach$1 }, { + forEach: arrayForEach$1 }); - var $indexOf = arrayIncludes$2.indexOf; + var $indexOf$2 = arrayIncludes$1.indexOf; @@ -13348,7 +13497,7 @@ typeof navigator === "object" && (function () { return NEGATIVE_ZERO$2 // convert -0 to +0 ? nativeIndexOf$1.apply(this, arguments) || 0 - : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); + : $indexOf$2(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -13412,16 +13561,16 @@ typeof navigator === "object" && (function () { return C === undefined || (S = anObject$1(C)[SPECIES$a]) == undefined ? defaultConstructor : aFunction$3(S); }; - var charAt$1 = stringMultibyte.charAt; + var charAt$3 = stringMultibyte$1.charAt; // `AdvanceStringIndex` abstract operation // https://tc39.github.io/ecma262/#sec-advancestringindex var advanceStringIndex$1 = function (S, index, unicode) { - return index + (unicode ? charAt$1(S, index).length : 1); + return index + (unicode ? charAt$3(S, index).length : 1); }; var arrayPush$1 = [].push; - var min$7 = Math.min; + var min$9 = Math.min; var MAX_UINT32$1 = 0xFFFFFFFF; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError @@ -13524,7 +13673,7 @@ typeof navigator === "object" && (function () { var e; if ( z === null || - (e = min$7(toLength$1(splitter.lastIndex + (SUPPORTS_Y$1 ? 0 : q)), S.length)) === p + (e = min$9(toLength$1(splitter.lastIndex + (SUPPORTS_Y$1 ? 0 : q)), S.length)) === p ) { q = advanceStringIndex$1(S, q, unicodeMatching); } else { @@ -13568,10 +13717,10 @@ typeof navigator === "object" && (function () { var Collection$3 = global_1$1[COLLECTION_NAME$3]; var CollectionPrototype$3 = Collection$3 && Collection$3.prototype; // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype$3 && CollectionPrototype$3.forEach !== arrayForEach$2) try { - createNonEnumerableProperty(CollectionPrototype$3, 'forEach', arrayForEach$2); + if (CollectionPrototype$3 && CollectionPrototype$3.forEach !== arrayForEach$1) try { + createNonEnumerableProperty(CollectionPrototype$3, 'forEach', arrayForEach$1); } catch (error) { - CollectionPrototype$3.forEach = arrayForEach$2; + CollectionPrototype$3.forEach = arrayForEach$1; } } @@ -13619,7 +13768,7 @@ typeof navigator === "object" && (function () { var regexSeparators$1 = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators var OVERFLOW_ERROR$1 = 'Overflow: input needs wider integers to process'; var baseMinusTMin$1 = base$1 - tMin$1; - var floor$4 = Math.floor; + var floor$6 = Math.floor; var stringFromCharCode$1 = String.fromCharCode; /** @@ -13668,12 +13817,12 @@ typeof navigator === "object" && (function () { */ var adapt$1 = function (delta, numPoints, firstTime) { var k = 0; - delta = firstTime ? floor$4(delta / damp$1) : delta >> 1; - delta += floor$4(delta / numPoints); + delta = firstTime ? floor$6(delta / damp$1) : delta >> 1; + delta += floor$6(delta / numPoints); for (; delta > baseMinusTMin$1 * tMax$1 >> 1; k += base$1) { - delta = floor$4(delta / baseMinusTMin$1); + delta = floor$6(delta / baseMinusTMin$1); } - return floor$4(k + (baseMinusTMin$1 + 1) * delta / (delta + skew$1)); + return floor$6(k + (baseMinusTMin$1 + 1) * delta / (delta + skew$1)); }; /** @@ -13725,7 +13874,7 @@ typeof navigator === "object" && (function () { // Increase `delta` enough to advance the decoder's state to , but guard against overflow. var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor$4((maxInt$1 - delta) / handledCPCountPlusOne)) { + if (m - n > floor$6((maxInt$1 - delta) / handledCPCountPlusOne)) { throw RangeError(OVERFLOW_ERROR$1); } @@ -13746,7 +13895,7 @@ typeof navigator === "object" && (function () { var qMinusT = q - t; var baseMinusT = base$1 - t; output.push(stringFromCharCode$1(digitToBasic$1(t + qMinusT % baseMinusT))); - q = floor$4(qMinusT / baseMinusT); + q = floor$6(qMinusT / baseMinusT); } output.push(stringFromCharCode$1(digitToBasic$1(q))); @@ -14139,7 +14288,7 @@ typeof navigator === "object" && (function () { - var codeAt = stringMultibyte.codeAt; + var codeAt$1 = stringMultibyte$1.codeAt; @@ -14150,7 +14299,7 @@ typeof navigator === "object" && (function () { var getInternalSearchParamsState$1 = web_urlSearchParams$1.getState; var setInternalState$a = internalState$1.set; var getInternalURLState$1 = internalState$1.getterFor('URL'); - var floor$5 = Math.floor; + var floor$7 = Math.floor; var pow$1 = Math.pow; var INVALID_AUTHORITY$1 = 'Invalid authority'; @@ -14348,7 +14497,7 @@ typeof navigator === "object" && (function () { result = []; for (index = 0; index < 4; index++) { result.unshift(host % 256); - host = floor$5(host / 256); + host = floor$7(host / 256); } return result.join('.'); // ipv6 } else if (typeof host == 'object') { @@ -14381,7 +14530,7 @@ typeof navigator === "object" && (function () { }); var percentEncode$1 = function (char, set) { - var code = codeAt(char, 0); + var code = codeAt$1(char, 0); return code > 0x20 && code < 0x7F && !has$2(set, char) ? char : encodeURIComponent(char); }; @@ -15134,7 +15283,7 @@ typeof navigator === "object" && (function () { URL: URLConstructor$1 }); - var $some = arrayIteration.some; + var $some$1 = arrayIteration$1.some; @@ -15145,7 +15294,7 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-array.prototype.some _export$1({ target: 'Array', proto: true, forced: !STRICT_METHOD$4 || !USES_TO_LENGTH$7 }, { some: function some(callbackfn /* , thisArg */) { - return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $some$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -15170,7 +15319,7 @@ typeof navigator === "object" && (function () { }; var nativeToFixed = 1.0.toFixed; - var floor$6 = Math.floor; + var floor$8 = Math.floor; var pow$2 = function (x, n, acc) { return n === 0 ? acc : n % 2 === 1 ? pow$2(x, n - 1, acc * x) : pow$2(x * x, n / 2, acc); @@ -15217,7 +15366,7 @@ typeof navigator === "object" && (function () { while (++index < 6) { c2 += n * data[index]; data[index] = c2 % 1e7; - c2 = floor$6(c2 / 1e7); + c2 = floor$8(c2 / 1e7); } }; @@ -15226,7 +15375,7 @@ typeof navigator === "object" && (function () { var c = 0; while (--index >= 0) { c += data[index]; - data[index] = floor$6(c / n); + data[index] = floor$8(c / n); c = (c % n) * 1e7; } }; @@ -15292,7 +15441,7 @@ typeof navigator === "object" && (function () { var propertyIsEnumerable$1 = objectPropertyIsEnumerable$1.f; // `Object.{ entries, values }` methods implementation - var createMethod$4 = function (TO_ENTRIES) { + var createMethod$a = function (TO_ENTRIES) { return function (it) { var O = toIndexedObject$1(it); var keys = objectKeys$1(O); @@ -15313,19 +15462,19 @@ typeof navigator === "object" && (function () { var objectToArray$1 = { // `Object.entries` method // https://tc39.github.io/ecma262/#sec-object.entries - entries: createMethod$4(true), + entries: createMethod$a(true), // `Object.values` method // https://tc39.github.io/ecma262/#sec-object.values - values: createMethod$4(false) + values: createMethod$a(false) }; - var $entries = objectToArray$1.entries; + var $entries$1 = objectToArray$1.entries; // `Object.entries` method // https://tc39.github.io/ecma262/#sec-object.entries _export$1({ target: 'Object', stat: true }, { entries: function entries(O) { - return $entries(O); + return $entries$1(O); } }); @@ -15340,8 +15489,8 @@ typeof navigator === "object" && (function () { }); var max$5 = Math.max; - var min$8 = Math.min; - var floor$7 = Math.floor; + var min$a = Math.min; + var floor$9 = Math.floor; var SUBSTITUTION_SYMBOLS$1 = /\$([$&'`]|\d\d?|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED$1 = /\$([$&'`]|\d\d?)/g; @@ -15405,7 +15554,7 @@ typeof navigator === "object" && (function () { result = results[i]; var matched = String(result[0]); - var position = max$5(min$8(toInteger$1(result.index), S.length), 0); + var position = max$5(min$a(toInteger$1(result.index), S.length), 0); var captures = []; // NOTE: This is equivalent to // captures = result.slice(1).map(maybeToString) @@ -15453,7 +15602,7 @@ typeof navigator === "object" && (function () { var n = +ch; if (n === 0) return match; if (n > m) { - var f = floor$7(n / 10); + var f = floor$9(n / 10); if (f === 0) return match; if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); return match; @@ -16079,13 +16228,13 @@ typeof navigator === "object" && (function () { var getInternalPromiseState$1 = internalState$1.getterFor(PROMISE$1); var PromiseConstructor$1 = nativePromiseConstructor; var TypeError$2 = global_1$1.TypeError; - var document$5 = global_1$1.document; + var document$4 = global_1$1.document; var process$6 = global_1$1.process; var $fetch$2 = getBuiltIn$1('fetch'); var newPromiseCapability$3 = newPromiseCapability$2.f; var newGenericPromiseCapability$1 = newPromiseCapability$3; var IS_NODE$3 = classofRaw$1(process$6) == 'process'; - var DISPATCH_EVENT$1 = !!(document$5 && document$5.createEvent && global_1$1.dispatchEvent); + var DISPATCH_EVENT$1 = !!(document$4 && document$4.createEvent && global_1$1.dispatchEvent); var UNHANDLED_REJECTION$1 = 'unhandledrejection'; var REJECTION_HANDLED$1 = 'rejectionhandled'; var PENDING$1 = 0; @@ -16180,7 +16329,7 @@ typeof navigator === "object" && (function () { var dispatchEvent$1 = function (name, promise, reason) { var event, handler; if (DISPATCH_EVENT$1) { - event = document$5.createEvent('Event'); + event = document$4.createEvent('Event'); event.promise = promise; event.reason = reason; event.initEvent(name, false, true); @@ -16387,7 +16536,7 @@ typeof navigator === "object" && (function () { var values = []; var counter = 0; var remaining = 1; - iterate_1(iterable, function (promise) { + iterate_1$1(iterable, function (promise) { var index = counter++; var alreadyCalled = false; values.push(undefined); @@ -16412,7 +16561,7 @@ typeof navigator === "object" && (function () { var reject = capability.reject; var result = perform$1(function () { var $promiseResolve = aFunction$3(C.resolve); - iterate_1(iterable, function (promise) { + iterate_1$1(iterable, function (promise) { $promiseResolve.call(C, promise).then(capability.resolve, reject); }); }); @@ -16429,7 +16578,7 @@ typeof navigator === "object" && (function () { var nativeStartsWith = ''.startsWith; - var min$9 = Math.min; + var min$b = Math.min; var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic$1('startsWith'); // https://github.com/zloirock/core-js/pull/702 @@ -16443,8 +16592,8 @@ typeof navigator === "object" && (function () { _export$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { startsWith: function startsWith(searchString /* , position = 0 */) { var that = String(requireObjectCoercible$1(this)); - notARegexp(searchString); - var index = toLength$1(min$9(arguments.length > 1 ? arguments[1] : undefined, that.length)); + notARegexp$1(searchString); + var index = toLength$1(min$b(arguments.length > 1 ? arguments[1] : undefined, that.length)); var search = String(searchString); return nativeStartsWith ? nativeStartsWith.call(that, search, index) @@ -16619,153 +16768,8 @@ typeof navigator === "object" && (function () { isIos: /(iPad|iPhone|iPod)/gi.test(navigator.platform) }; - // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md - // https://www.youtube.com/watch?v=NPM6172J22g - - var supportsPassiveListeners = function () { - // Test via a getter in the options object to see if the passive property is accessed - var supported = false; - - try { - var options = Object.defineProperty({}, 'passive', { - get: function get() { - supported = true; - return null; - } - }); - window.addEventListener('test', null, options); - window.removeEventListener('test', null, options); - } catch (e) {// Do nothing - } - - return supported; - }(); // Toggle event listener - - - function toggleListener(element, event, callback) { - var _this = this; - - var toggle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - var passive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - var capture = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; - - // Bail if no element, event, or callback - if (!element || !('addEventListener' in element) || is$2.empty(event) || !is$2.function(callback)) { - return; - } // Allow multiple events - - - var events = event.split(' '); // Build options - // Default to just the capture boolean for browsers with no passive listener support - - var options = capture; // If passive events listeners are supported - - if (supportsPassiveListeners) { - options = { - // Whether the listener can be passive (i.e. default never prevented) - passive: passive, - // Whether the listener is a capturing listener or not - capture: capture - }; - } // If a single node is passed, bind the event listener - - - events.forEach(function (type) { - if (_this && _this.eventListeners && toggle) { - // Cache event listener - _this.eventListeners.push({ - element: element, - type: type, - callback: callback, - options: options - }); - } - - element[toggle ? 'addEventListener' : 'removeEventListener'](type, callback, options); - }); - } // Bind event handler - - function on(element) { - var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - var callback = arguments.length > 2 ? arguments[2] : undefined; - var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; - toggleListener.call(this, element, events, callback, true, passive, capture); - } // Unbind event handler - - function off(element) { - var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - var callback = arguments.length > 2 ? arguments[2] : undefined; - var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; - toggleListener.call(this, element, events, callback, false, passive, capture); - } // Bind once-only event handler - - function once(element) { - var _this2 = this; - - var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - var callback = arguments.length > 2 ? arguments[2] : undefined; - var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; - - var onceCallback = function onceCallback() { - off(element, events, onceCallback, passive, capture); - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - callback.apply(_this2, args); - }; - - toggleListener.call(this, element, events, onceCallback, true, passive, capture); - } // Trigger event - - function triggerEvent(element) { - var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - var bubbles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - var detail = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - // Bail if no element - if (!is$2.element(element) || is$2.empty(type)) { - return; - } // Create and dispatch the event - - - var event = new CustomEvent(type, { - bubbles: bubbles, - detail: _objectSpread2({}, detail, { - plyr: this - }) - }); // Dispatch the event - - element.dispatchEvent(event); - } // Unbind all cached event listeners - - function unbindListeners() { - if (this && this.eventListeners) { - this.eventListeners.forEach(function (item) { - var element = item.element, - type = item.type, - callback = item.callback, - options = item.options; - element.removeEventListener(type, callback, options); - }); - this.eventListeners = []; - } - } // Run method when / if player is ready - - function ready() { - var _this3 = this; - - return new Promise(function (resolve) { - return _this3.ready ? setTimeout(resolve, 0) : on.call(_this3, _this3.elements.container, 'ready', resolve); - }).then(function () {}); - } - // `Array.prototype.{ reduce, reduceRight }` methods implementation - var createMethod$5 = function (IS_RIGHT) { + var createMethod$b = function (IS_RIGHT) { return function (that, callbackfn, argumentsLength, memo) { aFunction$3(callbackfn); var O = toObject$1(that); @@ -16794,13 +16798,13 @@ typeof navigator === "object" && (function () { var arrayReduce$1 = { // `Array.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduce - left: createMethod$5(false), + left: createMethod$b(false), // `Array.prototype.reduceRight` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright - right: createMethod$5(true) + right: createMethod$b(true) }; - var $reduce = arrayReduce$1.left; + var $reduce$2 = arrayReduce$1.left; @@ -16811,7 +16815,7 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-array.prototype.reduce _export$1({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$8 }, { reduce: function reduce(callbackfn /* , initialValue */) { - return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); + return $reduce$2(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); } }); @@ -17076,41 +17080,6 @@ typeof navigator === "object" && (function () { function getElement(selector) { return this.elements.container.querySelector(selector); - } // Trap focus inside container - - function trapFocus() { - var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - var toggle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (!is$2.element(element)) { - return; - } - - var focusable = getElements.call(this, 'button:not(:disabled), input:not(:disabled), [tabindex]'); - var first = focusable[0]; - var last = focusable[focusable.length - 1]; - - var trap = function trap(event) { - // Bail if not tab key or not fullscreen - if (event.key !== 'Tab' || event.keyCode !== 9) { - return; - } // Get the current focused element - - - var focused = document.activeElement; - - if (focused === last && !event.shiftKey) { - // Move focus to first element that can be tabbed if Shift isn't used - first.focus(); - event.preventDefault(); - } else if (focused === first && event.shiftKey) { - // Move focus to last element that can be tabbed if Shift is used - last.focus(); - event.preventDefault(); - } - }; - - toggleListener.call(this, this.elements.container, 'keydown', trap, toggle, false); } // Set focus and tab focus class function setFocus() { @@ -17139,94 +17108,239 @@ typeof navigator === "object" && (function () { 'video/ogg': 'theora' }; // Check for feature support - var support = { - // Basic support - audio: 'canPlayType' in document.createElement('audio'), - video: 'canPlayType' in document.createElement('video'), - // Check for support - // Basic functionality vs full UI - check: function check(type, provider, playsinline) { - var canPlayInline = browser.isIPhone && playsinline && support.playsinline; - var api = support[type] || provider !== 'html5'; - var ui = api && support.rangeInput && (type !== 'video' || !browser.isIPhone || canPlayInline); - return { - api: api, - ui: ui - }; - }, - // Picture-in-picture support - // Safari & Chrome only currently - pip: function () { - if (browser.isIPhone) { - return false; - } // Safari - // https://developer.apple.com/documentation/webkitjs/adding_picture_in_picture_to_your_safari_media_controls + var support = { + // Basic support + audio: 'canPlayType' in document.createElement('audio'), + video: 'canPlayType' in document.createElement('video'), + // Check for support + // Basic functionality vs full UI + check: function check(type, provider, playsinline) { + var canPlayInline = browser.isIPhone && playsinline && support.playsinline; + var api = support[type] || provider !== 'html5'; + var ui = api && support.rangeInput && (type !== 'video' || !browser.isIPhone || canPlayInline); + return { + api: api, + ui: ui + }; + }, + // Picture-in-picture support + // Safari & Chrome only currently + pip: function () { + if (browser.isIPhone) { + return false; + } // Safari + // https://developer.apple.com/documentation/webkitjs/adding_picture_in_picture_to_your_safari_media_controls + + + if (is$2.function(createElement$1('video').webkitSetPresentationMode)) { + return true; + } // Chrome + // https://developers.google.com/web/updates/2018/10/watch-video-using-picture-in-picture + + + if (document.pictureInPictureEnabled && !createElement$1('video').disablePictureInPicture) { + return true; + } + + return false; + }(), + // Airplay support + // Safari only currently + airplay: is$2.function(window.WebKitPlaybackTargetAvailabilityEvent), + // Inline playback support + // https://webkit.org/blog/6784/new-video-policies-for-ios/ + playsinline: 'playsInline' in document.createElement('video'), + // Check for mime type support against a player instance + // Credits: http://diveintohtml5.info/everything.html + // Related: http://www.leanbackplayer.com/test/h5mt.html + mime: function mime(input) { + if (is$2.empty(input)) { + return false; + } + + var _input$split = input.split('/'), + _input$split2 = _slicedToArray(_input$split, 1), + mediaType = _input$split2[0]; + + var type = input; // Verify we're using HTML5 and there's no media type mismatch + + if (!this.isHTML5 || mediaType !== this.type) { + return false; + } // Add codec if required + + + if (Object.keys(defaultCodecs).includes(type)) { + type += "; codecs=\"".concat(defaultCodecs[input], "\""); + } + + try { + return Boolean(type && this.media.canPlayType(type).replace(/no/, '')); + } catch (e) { + return false; + } + }, + // Check for textTracks support + textTracks: 'textTracks' in document.createElement('video'), + // Sliders + rangeInput: function () { + var range = document.createElement('input'); + range.type = 'range'; + return range.type === 'range'; + }(), + // Touch + // NOTE: Remember a device can be mouse + touch enabled so we check on first touch event + touch: 'ontouchstart' in document.documentElement, + // Detect transitions support + transitions: transitionEndEvent !== false, + // Reduced motion iOS & MacOS setting + // https://webkit.org/blog/7551/responsive-design-for-motion/ + reducedMotion: 'matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches + }; + + // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md + // https://www.youtube.com/watch?v=NPM6172J22g + + var supportsPassiveListeners = function () { + // Test via a getter in the options object to see if the passive property is accessed + var supported = false; + + try { + var options = Object.defineProperty({}, 'passive', { + get: function get() { + supported = true; + return null; + } + }); + window.addEventListener('test', null, options); + window.removeEventListener('test', null, options); + } catch (e) {// Do nothing + } + + return supported; + }(); // Toggle event listener + + + function toggleListener(element, event, callback) { + var _this = this; + + var toggle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var passive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var capture = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; + + // Bail if no element, event, or callback + if (!element || !('addEventListener' in element) || is$2.empty(event) || !is$2.function(callback)) { + return; + } // Allow multiple events + + + var events = event.split(' '); // Build options + // Default to just the capture boolean for browsers with no passive listener support + + var options = capture; // If passive events listeners are supported + + if (supportsPassiveListeners) { + options = { + // Whether the listener can be passive (i.e. default never prevented) + passive: passive, + // Whether the listener is a capturing listener or not + capture: capture + }; + } // If a single node is passed, bind the event listener + + + events.forEach(function (type) { + if (_this && _this.eventListeners && toggle) { + // Cache event listener + _this.eventListeners.push({ + element: element, + type: type, + callback: callback, + options: options + }); + } + + element[toggle ? 'addEventListener' : 'removeEventListener'](type, callback, options); + }); + } // Bind event handler + + function on(element) { + var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + var callback = arguments.length > 2 ? arguments[2] : undefined; + var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + toggleListener.call(this, element, events, callback, true, passive, capture); + } // Unbind event handler + + function off(element) { + var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + var callback = arguments.length > 2 ? arguments[2] : undefined; + var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + toggleListener.call(this, element, events, callback, false, passive, capture); + } // Bind once-only event handler + function once(element) { + var _this2 = this; - if (is$2.function(createElement$1('video').webkitSetPresentationMode)) { - return true; - } // Chrome - // https://developers.google.com/web/updates/2018/10/watch-video-using-picture-in-picture + var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + var callback = arguments.length > 2 ? arguments[2] : undefined; + var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + var onceCallback = function onceCallback() { + off(element, events, onceCallback, passive, capture); - if (document.pictureInPictureEnabled && !createElement$1('video').disablePictureInPicture) { - return true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; } - return false; - }(), - // Airplay support - // Safari only currently - airplay: is$2.function(window.WebKitPlaybackTargetAvailabilityEvent), - // Inline playback support - // https://webkit.org/blog/6784/new-video-policies-for-ios/ - playsinline: 'playsInline' in document.createElement('video'), - // Check for mime type support against a player instance - // Credits: http://diveintohtml5.info/everything.html - // Related: http://www.leanbackplayer.com/test/h5mt.html - mime: function mime(input) { - if (is$2.empty(input)) { - return false; - } + callback.apply(_this2, args); + }; - var _input$split = input.split('/'), - _input$split2 = _slicedToArray(_input$split, 1), - mediaType = _input$split2[0]; + toggleListener.call(this, element, events, onceCallback, true, passive, capture); + } // Trigger event - var type = input; // Verify we're using HTML5 and there's no media type mismatch + function triggerEvent(element) { + var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + var bubbles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var detail = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - if (!this.isHTML5 || mediaType !== this.type) { - return false; - } // Add codec if required + // Bail if no element + if (!is$2.element(element) || is$2.empty(type)) { + return; + } // Create and dispatch the event - if (Object.keys(defaultCodecs).includes(type)) { - type += "; codecs=\"".concat(defaultCodecs[input], "\""); - } + var event = new CustomEvent(type, { + bubbles: bubbles, + detail: _objectSpread2({}, detail, { + plyr: this + }) + }); // Dispatch the event - try { - return Boolean(type && this.media.canPlayType(type).replace(/no/, '')); - } catch (e) { - return false; - } - }, - // Check for textTracks support - textTracks: 'textTracks' in document.createElement('video'), - // Sliders - rangeInput: function () { - var range = document.createElement('input'); - range.type = 'range'; - return range.type === 'range'; - }(), - // Touch - // NOTE: Remember a device can be mouse + touch enabled so we check on first touch event - touch: 'ontouchstart' in document.documentElement, - // Detect transitions support - transitions: transitionEndEvent !== false, - // Reduced motion iOS & MacOS setting - // https://webkit.org/blog/7551/responsive-design-for-motion/ - reducedMotion: 'matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches - }; + element.dispatchEvent(event); + } // Unbind all cached event listeners + + function unbindListeners() { + if (this && this.eventListeners) { + this.eventListeners.forEach(function (item) { + var element = item.element, + type = item.type, + callback = item.callback, + options = item.options; + element.removeEventListener(type, callback, options); + }); + this.eventListeners = []; + } + } // Run method when / if player is ready + + function ready() { + var _this3 = this; + + return new Promise(function (resolve) { + return _this3.ready ? setTimeout(resolve, 0) : on.call(_this3, _this3.elements.container, 'ready', resolve); + }).then(function () {}); + } function validateRatio(input) { if (!is$2.array(input) && (!is$2.string(input) || !input.includes(':'))) { @@ -17365,7 +17479,11 @@ typeof navigator === "object" && (function () { return source && Number(source.getAttribute('size')); }, set: function set(input) { - // If we're using an an external handler... + if (player.quality === input) { + return; + } // If we're using an an external handler... + + if (player.config.quality.forced && is$2.function(player.config.quality.onChange)) { player.config.quality.onChange(input); } else { @@ -17385,17 +17503,15 @@ typeof navigator === "object" && (function () { currentTime = _player$media.currentTime, paused = _player$media.paused, preload = _player$media.preload, - readyState = _player$media.readyState; // Set new source + readyState = _player$media.readyState, + playbackRate = _player$media.playbackRate; // Set new source player.media.src = source.getAttribute('src'); // Prevent loading if preload="none" and the current source isn't loaded (#1044) if (preload !== 'none' || readyState) { // Restore time player.once('loadedmetadata', function () { - if (player.currentTime === 0) { - return; - } - + player.speed = playbackRate; player.currentTime = currentTime; // Resume playing if (!paused) { @@ -17436,6 +17552,28 @@ typeof navigator === "object" && (function () { } }; + // `Array.prototype.fill` method implementation + // https://tc39.github.io/ecma262/#sec-array.prototype.fill + var arrayFill$1 = function fill(value /* , start = 0, end = @length */) { + var O = toObject$1(this); + var length = toLength$1(O.length); + var argumentsLength = arguments.length; + var index = toAbsoluteIndex$1(argumentsLength > 1 ? arguments[1] : undefined, length); + var end = argumentsLength > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex$1(end, length); + while (endPos > index) O[index++] = value; + return O; + }; + + // `Array.prototype.fill` method + // https://tc39.github.io/ecma262/#sec-array.prototype.fill + _export$1({ target: 'Array', proto: true }, { + fill: arrayFill$1 + }); + + // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables$1('fill'); + function dedupe(array) { if (!is$2.array(array)) { return array; @@ -17455,6 +17593,13 @@ typeof navigator === "object" && (function () { return Math.abs(curr - value) < Math.abs(prev - value) ? curr : prev; }); } + function fillRange(start, end) { + var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var len = Math.floor((end - start) / step) + 1; + return Array(len).fill().map(function (_, idx) { + return start + idx * step; + }); + } var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$1('slice'); var USES_TO_LENGTH$9 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 }); @@ -17565,8 +17710,8 @@ typeof navigator === "object" && (function () { }); }; var keys$5 = getOwnPropertyNames$3(NativeRegExp$1); - var index = 0; - while (keys$5.length > index) proxy$1(keys$5[index++]); + var index$1 = 0; + while (keys$5.length > index$1) proxy$1(keys$5[index$1++]); RegExpPrototype$3.constructor = RegExpWrapper$1; RegExpWrapper$1.prototype = RegExpPrototype$3; redefine$1(global_1$1, 'RegExp', RegExpWrapper$1); @@ -17872,13 +18017,13 @@ typeof navigator === "object" && (function () { } var ceil$2 = Math.ceil; - var floor$8 = Math.floor; + var floor$a = Math.floor; // `Math.trunc` method // https://tc39.github.io/ecma262/#sec-math.trunc _export$1({ target: 'Math', stat: true }, { trunc: function trunc(it) { - return (it > 0 ? floor$8 : ceil$2)(it); + return (it > 0 ? floor$a : ceil$2)(it); } }); @@ -18806,7 +18951,7 @@ typeof navigator === "object" && (function () { controls.updateSetting.call(this, type, list); }, // Set a list of available captions languages - setSpeedMenu: function setSpeedMenu(options) { + setSpeedMenu: function setSpeedMenu() { var _this8 = this; // Menu required @@ -18815,18 +18960,17 @@ typeof navigator === "object" && (function () { } var type = 'speed'; - var list = this.elements.settings.panels.speed.querySelector('[role="menu"]'); // Set the speed options - - if (is$2.array(options)) { - this.options.speed = options; - } else if (this.isHTML5 || this.isVimeo) { - this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2]; - } // Set options if passed and filter based on config + var list = this.elements.settings.panels.speed.querySelector('[role="menu"]'); // Determine options to display + // Vimeo and YouTube limit to 0.5x-2x + if (this.isVimeo || this.isYouTube) { + this.options.speed = fillRange(0.5, 2, 0.25).filter(function (s) { + return _this8.config.speed.options.includes(s); + }); + } else { + this.options.speed = this.config.speed.options; + } // Toggle the pane and tab - this.options.speed = this.options.speed.filter(function (speed) { - return _this8.config.speed.options.includes(speed); - }); // Toggle the pane and tab var toggle = !is$2.empty(this.options.speed) && this.options.speed.length > 1; controls.toggleMenuButton.call(this, type, toggle); // Empty the menu @@ -19246,7 +19390,12 @@ typeof navigator === "object" && (function () { element: 'a', href: _this10.download, target: '_blank' - }); + }); // Set download attribute for HTML5 only + + + if (_this10.isHTML5) { + _attributes.download = ''; + } var download = _this10.config.urls.download; @@ -19865,12 +20014,13 @@ typeof navigator === "object" && (function () { // Sprite (for icons) loadSprite: true, iconPrefix: 'plyr', - iconUrl: 'https://cdn.plyr.io/3.5.7-beta.0/plyr.svg', + iconUrl: 'https://cdn.plyr.io/3.5.7/plyr.svg', // Blank video (used to prevent errors on source change) blankVideo: 'https://cdn.plyr.io/static/blank.mp4', // Quality default quality: { default: 576, + // The options to display in the UI, if available for the source media options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240], forced: false, onChange: null @@ -19884,7 +20034,8 @@ typeof navigator === "object" && (function () { // Speed default and options to display speed: { selected: 1, - options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2] + // The options to display in the UI, if available for the source media (e.g. Vimeo and YouTube only support 0.5x-4x) + options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 4] }, // Keyboard shortcut settings keyboard: { @@ -20246,73 +20397,6 @@ typeof navigator === "object" && (function () { return Console; }(); - function onChange() { - if (!this.enabled) { - return; - } // Update toggle button - - - var button = this.player.elements.buttons.fullscreen; - - if (is$2.element(button)) { - button.pressed = this.active; - } // Trigger an event - - - triggerEvent.call(this.player, this.target, this.active ? 'enterfullscreen' : 'exitfullscreen', true); // Trap focus in container - - if (!browser.isIos) { - trapFocus.call(this.player, this.target, this.active); - } - } - - function toggleFallback() { - var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - // Store or restore scroll position - if (toggle) { - this.scrollPosition = { - x: window.scrollX || 0, - y: window.scrollY || 0 - }; - } else { - window.scrollTo(this.scrollPosition.x, this.scrollPosition.y); - } // Toggle scroll - - - document.body.style.overflow = toggle ? 'hidden' : ''; // Toggle class hook - - toggleClass(this.target, this.player.config.classNames.fullscreen.fallback, toggle); // Force full viewport on iPhone X+ - - if (browser.isIos) { - var viewport = document.head.querySelector('meta[name="viewport"]'); - var property = 'viewport-fit=cover'; // Inject the viewport meta if required - - if (!viewport) { - viewport = document.createElement('meta'); - viewport.setAttribute('name', 'viewport'); - } // Check if the property already exists - - - var hasProperty = is$2.string(viewport.content) && viewport.content.includes(property); - - if (toggle) { - this.cleanupViewport = !hasProperty; - - if (!hasProperty) { - viewport.content += ",".concat(property); - } - } else if (this.cleanupViewport) { - viewport.content = viewport.content.split(',').filter(function (part) { - return part.trim() !== property; - }).join(','); - } - } // Toggle button and fire events - - - onChange.call(this); - } - var Fullscreen = /*#__PURE__*/ function () { @@ -20337,7 +20421,7 @@ typeof navigator === "object" && (function () { on.call(this.player, document, this.prefix === 'ms' ? 'MSFullscreenChange' : "".concat(this.prefix, "fullscreenchange"), function () { // TODO: Filter for target?? - onChange.call(_this); + _this.onChange(); }); // Fullscreen toggle on double click on.call(this.player, this.player.elements.container, 'dblclick', function (event) { @@ -20347,6 +20431,10 @@ typeof navigator === "object" && (function () { } _this.toggle(); + }); // Tap focus when in fullscreen + + on.call(this, this.player.elements.container, 'keydown', function (event) { + return _this.trapFocus(event); }); // Update the UI this.update(); @@ -20354,8 +20442,101 @@ typeof navigator === "object" && (function () { _createClass(Fullscreen, [{ + key: "onChange", + value: function onChange() { + if (!this.enabled) { + return; + } // Update toggle button + + + var button = this.player.elements.buttons.fullscreen; + + if (is$2.element(button)) { + button.pressed = this.active; + } // Trigger an event + + + triggerEvent.call(this.player, this.target, this.active ? 'enterfullscreen' : 'exitfullscreen', true); + } + }, { + key: "toggleFallback", + value: function toggleFallback() { + var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + // Store or restore scroll position + if (toggle) { + this.scrollPosition = { + x: window.scrollX || 0, + y: window.scrollY || 0 + }; + } else { + window.scrollTo(this.scrollPosition.x, this.scrollPosition.y); + } // Toggle scroll + + + document.body.style.overflow = toggle ? 'hidden' : ''; // Toggle class hook + + toggleClass(this.target, this.player.config.classNames.fullscreen.fallback, toggle); // Force full viewport on iPhone X+ + + if (browser.isIos) { + var viewport = document.head.querySelector('meta[name="viewport"]'); + var property = 'viewport-fit=cover'; // Inject the viewport meta if required + + if (!viewport) { + viewport = document.createElement('meta'); + viewport.setAttribute('name', 'viewport'); + } // Check if the property already exists + + + var hasProperty = is$2.string(viewport.content) && viewport.content.includes(property); + + if (toggle) { + this.cleanupViewport = !hasProperty; + + if (!hasProperty) { + viewport.content += ",".concat(property); + } + } else if (this.cleanupViewport) { + viewport.content = viewport.content.split(',').filter(function (part) { + return part.trim() !== property; + }).join(','); + } + } // Toggle button and fire events + + + this.onChange(); + } // Trap focus inside container + + }, { + key: "trapFocus", + value: function trapFocus(event) { + // Bail if iOS, not active, not the tab key + if (browser.isIos || !this.active || event.key !== 'Tab' || event.keyCode !== 9) { + return; + } // Get the current focused element + + + var focused = document.activeElement; + var focusable = getElements.call(this.player, 'a[href], button:not(:disabled), input:not(:disabled), [tabindex]'); + + var _focusable = _slicedToArray(focusable, 1), + first = _focusable[0]; + + var last = focusable[focusable.length - 1]; + + if (focused === last && !event.shiftKey) { + // Move focus to first element that can be tabbed if Shift isn't used + first.focus(); + event.preventDefault(); + } else if (focused === first && event.shiftKey) { + // Move focus to last element that can be tabbed if Shift is used + last.focus(); + event.preventDefault(); + } + } // Update UI + + }, { key: "update", - // Update UI value: function update() { if (this.enabled) { var mode; @@ -20388,10 +20569,10 @@ typeof navigator === "object" && (function () { if (browser.isIos && this.player.config.fullscreen.iosNative) { this.target.webkitEnterFullscreen(); } else if (!Fullscreen.native || this.forceFallback) { - toggleFallback.call(this, true); + this.toggleFallback(true); } else if (!this.prefix) { this.target.requestFullscreen({ - navigationUI: "hide" + navigationUI: 'hide' }); } else if (!is$2.empty(this.prefix)) { this.target["".concat(this.prefix, "Request").concat(this.property)](); @@ -20410,7 +20591,7 @@ typeof navigator === "object" && (function () { this.target.webkitExitFullscreen(); this.player.play(); } else if (!Fullscreen.native || this.forceFallback) { - toggleFallback.call(this, false); + this.toggleFallback(false); } else if (!this.prefix) { (document.cancelFullScreen || document.exitFullscreen).call(document); } else if (!is$2.empty(this.prefix)) { @@ -21296,9 +21477,11 @@ typeof navigator === "object" && (function () { this.bind(elements.buttons.settings, 'click', function (event) { // Prevent the document click listener closing the menu event.stopPropagation(); + event.preventDefault(); controls.toggleMenu.call(player, event); - }); // Settings menu - keyboard toggle + }, null, false); // Can't be passive as we're preventing default + // Settings menu - keyboard toggle // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143 @@ -21400,7 +21583,7 @@ typeof navigator === "object" && (function () { } }); // Hide thumbnail preview - on mouse click, mouse leave, and video play/seek. All four are required, e.g., for buffering - this.bind(elements.progress, 'mouseleave click', function () { + this.bind(elements.progress, 'mouseleave touchend click', function () { var previewThumbnails = player.previewThumbnails; if (previewThumbnails && previewThumbnails.loaded) { @@ -21509,33 +21692,11 @@ typeof navigator === "object" && (function () { return Listeners; }(); - var defineProperty$c = objectDefineProperty$1.f; - - var FunctionPrototype$1 = Function.prototype; - var FunctionPrototypeToString$1 = FunctionPrototype$1.toString; - var nameRE$1 = /^\s*function ([^ (]*)/; - var NAME$2 = 'name'; - - // Function instances `.name` property - // https://tc39.github.io/ecma262/#sec-function-instances-name - if (descriptors$1 && !(NAME$2 in FunctionPrototype$1)) { - defineProperty$c(FunctionPrototype$1, NAME$2, { - configurable: true, - get: function () { - try { - return FunctionPrototypeToString$1.call(this).match(nameRE$1)[1]; - } catch (error) { - return ''; - } - } - }); - } - var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport$1('splice'); var USES_TO_LENGTH$a = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 }); var max$7 = Math.max; - var min$a = Math.min; + var min$c = Math.min; var MAX_SAFE_INTEGER$3 = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_LENGTH_EXCEEDED$1 = 'Maximum allowed length exceeded'; @@ -21556,7 +21717,7 @@ typeof navigator === "object" && (function () { actualDeleteCount = len - actualStart; } else { insertCount = argumentsLength - 2; - actualDeleteCount = min$a(max$7(toInteger$1(deleteCount), 0), len - actualStart); + actualDeleteCount = min$c(max$7(toInteger$1(deleteCount), 0), len - actualStart); } if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$3) { throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED$1); @@ -22059,11 +22220,6 @@ typeof navigator === "object" && (function () { player.embed.setPlaybackRate(input).then(function () { speed = input; triggerEvent.call(player, player.media, 'ratechange'); - }).catch(function (error) { - // Hide menu item (and menu if empty) - if (error.name === 'Error') { - controls.setSpeedMenu.call(player, []); - } }); } }); // Volume @@ -23320,7 +23476,7 @@ typeof navigator === "object" && (function () { return Ads; }(); - var $findIndex = arrayIteration.findIndex; + var $findIndex$1 = arrayIteration$1.findIndex; @@ -23336,14 +23492,14 @@ typeof navigator === "object" && (function () { // https://tc39.github.io/ecma262/#sec-array.prototype.findindex _export$1({ target: 'Array', proto: true, forced: SKIPS_HOLES$2 || !USES_TO_LENGTH$b }, { findIndex: function findIndex(callbackfn /* , that = undefined */) { - return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return $findIndex$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables addToUnscopables$1(FIND_INDEX); - var min$b = Math.min; + var min$d = Math.min; var nativeLastIndexOf$1 = [].lastIndexOf; var NEGATIVE_ZERO$3 = !!nativeLastIndexOf$1 && 1 / [1].lastIndexOf(1, -0) < 0; var STRICT_METHOD$6 = arrayMethodIsStrict('lastIndexOf'); @@ -23359,7 +23515,7 @@ typeof navigator === "object" && (function () { var O = toIndexedObject$1(this); var length = toLength$1(O.length); var index = length - 1; - if (arguments.length > 1) index = min$b(index, toInteger$1(arguments[1])); + if (arguments.length > 1) index = min$d(index, toInteger$1(arguments[1])); if (index < 0) index = length + index; for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0; return -1; @@ -23611,8 +23767,8 @@ typeof navigator === "object" && (function () { }, { key: "startScrubbing", value: function startScrubbing(event) { - // Only act on left mouse button (0), or touch device (event.button is false) - if (event.button === false || event.button === 0) { + // Only act on left mouse button (0), or touch device (event.button does not exist or is false) + if (is$2.nullOrUndefined(event.button) || event.button === false || event.button === 0) { this.mouseDown = true; // Wait until media has a duration if (this.player.media.duration) { diff --git a/demo/dist/demo.min.js b/demo/dist/demo.min.js index b845a556f..d558fe14a 100644 --- a/demo/dist/demo.min.js +++ b/demo/dist/demo.min.js @@ -1,4 +1,4 @@ -"object"==typeof navigator&&function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n,r,i,o="object",a=function(e){return e&&e.Math==Math&&e},s=a(typeof globalThis==o&&globalThis)||a(typeof window==o&&window)||a(typeof self==o&&self)||a(typeof e==o&&e)||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},l=!c((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),u={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,h={f:f&&!u.call({1:2},1)?function(e){var t=f(this,e);return!!t&&t.enumerable}:u},d=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},p={}.toString,g=function(e){return p.call(e).slice(8,-1)},m="".split,v=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==g(e)?m.call(e,""):Object(e)}:Object,y=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},b=function(e){return v(y(e))},w=function(e){return"object"==typeof e?null!==e:"function"==typeof e},k=function(e,t){if(!w(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!w(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!w(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!w(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},E={}.hasOwnProperty,S=function(e,t){return E.call(e,t)},_=s.document,T=w(_)&&w(_.createElement),x=function(e){return T?_.createElement(e):{}},A=!l&&!c((function(){return 7!=Object.defineProperty(x("div"),"a",{get:function(){return 7}}).a})),O=Object.getOwnPropertyDescriptor,P={f:l?O:function(e,t){if(e=b(e),t=k(t,!0),A)try{return O(e,t)}catch(e){}if(S(e,t))return d(!h.f.call(e,t),e[t])}},C=function(e){if(!w(e))throw TypeError(String(e)+" is not an object");return e},I=Object.defineProperty,R={f:l?I:function(e,t,n){if(C(e),t=k(t,!0),C(n),A)try{return I(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},L=l?function(e,t,n){return R.f(e,t,d(1,n))}:function(e,t,n){return e[t]=n,e},j=function(e,t){try{L(s,e,t)}catch(n){s[e]=t}return t},N=t((function(e){var t=s["__core-js_shared__"]||j("__core-js_shared__",{});(e.exports=function(e,n){return t[e]||(t[e]=void 0!==n?n:{})})("versions",[]).push({version:"3.1.3",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),M=N("native-function-to-string",Function.toString),U=s.WeakMap,F="function"==typeof U&&/native code/.test(M.call(U)),D=0,B=Math.random(),q=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++D+B).toString(36))},H=N("keys"),V=function(e){return H[e]||(H[e]=q(e))},z={},W=s.WeakMap;if(F){var $=new W,K=$.get,Y=$.has,G=$.set;n=function(e,t){return G.call($,e,t),t},r=function(e){return K.call($,e)||{}},i=function(e){return Y.call($,e)}}else{var X=V("state");z[X]=!0,n=function(e,t){return L(e,X,t),t},r=function(e){return S(e,X)?e[X]:{}},i=function(e){return S(e,X)}}var J={set:n,get:r,has:i,enforce:function(e){return i(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var n;if(!w(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Q=t((function(e){var t=J.get,n=J.enforce,r=String(M).split("toString");N("inspectSource",(function(e){return M.call(e)})),(e.exports=function(e,t,i,o){var a=!!o&&!!o.unsafe,c=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||S(i,"name")||L(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==s?(a?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=i:L(e,t,i)):c?e[t]=i:j(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||M.call(this)}))})),Z=Math.ceil,ee=Math.floor,te=function(e){return isNaN(e=+e)?0:(e>0?ee:Z)(e)},ne=Math.min,re=function(e){return e>0?ne(te(e),9007199254740991):0},ie=Math.max,oe=Math.min,ae=function(e,t){var n=te(e);return n<0?ie(n+t,0):oe(n,t)},se=function(e){return function(t,n,r){var i,o=b(t),a=re(o.length),s=ae(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ce=se(!1),le=function(e,t){var n,r=b(e),i=0,o=[];for(n in r)!S(z,n)&&S(r,n)&&o.push(n);for(;t.length>i;)S(r,n=t[i++])&&(~ce(o,n)||o.push(n));return o},ue=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fe=ue.concat("length","prototype"),he={f:Object.getOwnPropertyNames||function(e){return le(e,fe)}},de={f:Object.getOwnPropertySymbols},pe=s.Reflect,ge=pe&&pe.ownKeys||function(e){var t=he.f(C(e)),n=de.f;return n?t.concat(n(e)):t},me=function(e,t){for(var n=ge(t),r=R.f,i=P.f,o=0;oy;y++)if((s||y in p)&&(h=g(f=p[y],y,d),e))if(n)b[y]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:b.push(f)}else if(o)return!1;return a?-1:i||o?o:b}},Ue=function(e,t){var n=[][e];return!n||!c((function(){n.call(null,t||function(){throw 1},1)}))},Fe=Me(0),De=Ue("forEach")?function(e){return Fe(this,e,arguments[1])}:[].forEach;Te({target:"Array",proto:!0,forced:[].forEach!=De},{forEach:De});var Be=function(e,t,n,r){try{return r?t(C(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&C(i.call(e)),t}},qe={},He=Le("iterator"),Ve=Array.prototype,ze=function(e){return void 0!==e&&(qe.Array===e||Ve[He]===e)},We=function(e,t,n){var r=k(t);r in e?R.f(e,r,d(0,n)):e[r]=n},$e=Le("toStringTag"),Ke="Arguments"==g(function(){return arguments}()),Ye=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),$e))?n:Ke?g(t):"Object"==(r=g(t))&&"function"==typeof t.callee?"Arguments":r},Ge=Le("iterator"),Xe=function(e){if(null!=e)return e[Ge]||e["@@iterator"]||qe[Ye(e)]},Je=function(e){var t,n,r,i,o=Oe(e),a="function"==typeof this?this:Array,s=arguments.length,c=s>1?arguments[1]:void 0,l=void 0!==c,u=0,f=Xe(o);if(l&&(c=Ae(c,s>2?arguments[2]:void 0,2)),null==f||a==Array&&ze(f))for(n=new a(t=re(o.length));t>u;u++)We(n,u,l?c(o[u],u):o[u]);else for(i=f.call(o),n=new a;!(r=i.next()).done;u++)We(n,u,l?Be(i,c,[r.value,u],!0):r.value);return n.length=u,n},Qe=Le("iterator"),Ze=!1;try{var et=0,tt={next:function(){return{done:!!et++}},return:function(){Ze=!0}};tt[Qe]=function(){return this},Array.from(tt,(function(){throw 2}))}catch(e){}var nt=function(e,t){if(!t&&!Ze)return!1;var n=!1;try{var r={};r[Qe]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},rt=!nt((function(e){Array.from(e)}));Te({target:"Array",stat:!0,forced:rt},{from:Je});var it=Object.keys||function(e){return le(e,ue)},ot=l?Object.defineProperties:function(e,t){C(e);for(var n,r=it(t),i=r.length,o=0;i>o;)R.f(e,n=r[o++],t[n]);return e},at=s.document,st=at&&at.documentElement,ct=V("IE_PROTO"),lt=function(){},ut=function(){var e,t=x("iframe"),n=ue.length;for(t.style.display="none",st.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(" + ``` ...or... ```html - + ``` ## CSS @@ -150,13 +150,13 @@ Include the `plyr.css` stylsheet into your ``. If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following: ```html - + ``` ## SVG Sprite The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For -reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.5.7-beta.0/plyr.svg`. +reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.5.7/plyr.svg`. # Ads diff --git a/src/js/config/defaults.js b/src/js/config/defaults.js index 289764e43..bf0f8c421 100644 --- a/src/js/config/defaults.js +++ b/src/js/config/defaults.js @@ -61,7 +61,7 @@ const defaults = { // Sprite (for icons) loadSprite: true, iconPrefix: 'plyr', - iconUrl: 'https://cdn.plyr.io/3.5.7-beta.0/plyr.svg', + iconUrl: 'https://cdn.plyr.io/3.5.7/plyr.svg', // Blank video (used to prevent errors on source change) blankVideo: 'https://cdn.plyr.io/static/blank.mp4', diff --git a/src/js/plyr.js b/src/js/plyr.js index 8dc2b388f..b5c4612cf 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1,6 +1,6 @@ // ========================================================================== // Plyr -// plyr.js v3.5.7-beta.0 +// plyr.js v3.5.7 // https://github.com/sampotts/plyr // License: The MIT License (MIT) // ========================================================================== diff --git a/src/js/plyr.polyfilled.js b/src/js/plyr.polyfilled.js index 03e9a0f4d..8b86a6444 100644 --- a/src/js/plyr.polyfilled.js +++ b/src/js/plyr.polyfilled.js @@ -1,6 +1,6 @@ // ========================================================================== // Plyr Polyfilled Build -// plyr.js v3.5.7-beta.0 +// plyr.js v3.5.7 // https://github.com/sampotts/plyr // License: The MIT License (MIT) // ========================================================================== diff --git a/yarn.lock b/yarn.lock index 3c0664c7d..ce59fe5a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,9 +10,9 @@ "@babel/highlight" "^7.8.3" "@babel/compat-data@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.4.tgz#bbe65d05a291667a8394fe8a0e0e277ef22b0d2a" - integrity sha512-lHLhlsvFjJAqNU71b7k6Vv9ewjmTXKvqaMv7n0G1etdCabWLw3nEYE8mmgoVOxMIFE07xOvo7H7XBASirX6Rrg== + version "7.8.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.5.tgz#d28ce872778c23551cbb9432fc68d28495b613b9" + integrity sha512-jWYUqQX/ObOhG1UiEkbH5SANsE/8oKXiQWjj7p7xgj9Zmnt//aUvyz4dBkK0HNsS8/cbyC5NmmH87VekW+mXFg== dependencies: browserslist "^4.8.5" invariant "^2.2.4" @@ -810,9 +810,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*": - version "13.5.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.5.2.tgz#3de53b55fd39efc428a901a0f6db31f761cfa131" - integrity sha512-Fr6a47c84PRLfd7M7u3/hEknyUdQrrBA6VoPmkze0tcflhU5UnpWEX2kn12ktA/lb+MNHSqFlSiPHIHsaErTPA== + version "13.7.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4" + integrity sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1362,7 +1362,7 @@ autoprefixer@^7.1.2: postcss "^6.0.17" postcss-value-parser "^3.2.3" -autoprefixer@^9.6.1, autoprefixer@^9.7.3: +autoprefixer@^9.6.1, autoprefixer@^9.7.4: version "9.7.4" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.4.tgz#f8bf3e06707d047f0641d87aee8cfb174b2a5378" integrity sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g== @@ -1375,10 +1375,10 @@ autoprefixer@^9.6.1, autoprefixer@^9.7.3: postcss "^7.0.26" postcss-value-parser "^4.0.2" -aws-sdk@^2.389.0, aws-sdk@^2.610.0: - version "2.610.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.610.0.tgz#a8633204bed83df763095824f8110ced4a717d2a" - integrity sha512-kqcoCTKjbxrUo2KeLQR2Jw6l4PvkbHXSDk8KqF2hXcpHibiOcMXZZPVe9X+s90RC/B2+qU95M7FImp9ByMcw7A== +aws-sdk@^2.389.0, aws-sdk@^2.614.0: + version "2.614.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.614.0.tgz#e954824c1b9e566691a24ed8491ebf1d68350d37" + integrity sha512-o7utaxDMo9ri1VyPKw8Kcmpy5uZOqMeok2cgur70iZ94zsLIRnHKrBv1wMBbyRGuUbfJRq76HGAS9QxdiSqQHw== dependencies: buffer "4.9.1" events "1.1.1" @@ -1909,9 +1909,9 @@ camelcase@^5.0.0, camelcase@^5.3.1: integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== caniuse-lite@^1.0.30000792, caniuse-lite@^1.0.30000805, caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001023: - version "1.0.30001023" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz#b82155827f3f5009077bdd2df3d8968bcbcc6fc4" - integrity sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA== + version "1.0.30001025" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001025.tgz#30336a8aca7f98618eb3cf38e35184e13d4e5fe6" + integrity sha512-SKyFdHYfXUZf5V85+PJgLYyit27q4wgvZuf8QTOk1osbypcROihMBlx9GRar2/pIcKH2r4OehdlBr9x6PXetAQ== capture-stack-trace@^1.0.0: version "1.0.1" @@ -2991,9 +2991,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.30, electron-to-chromium@^1.3.341: - version "1.3.344" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz#f1397a633c35e726730c24be1084cd25c3ee8148" - integrity sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw== + version "1.3.345" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.345.tgz#2569d0d54a64ef0f32a4b7e8c80afa5fe57c5d98" + integrity sha512-f8nx53+Z9Y+SPWGg3YdHrbYYfIJAtbUjpFfW4X1RwTZ94iUG7geg9tV8HqzAXX7XTNgyWgAFvce4yce8ZKxKmg== "emoji-regex@>=6.0.0 <=6.1.1": version "6.1.1" @@ -3211,10 +3211,10 @@ eslint-module-utils@^2.4.1: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-import@^2.20.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz#d749a7263fb6c29980def8e960d380a6aa6aecaa" - integrity sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ== +eslint-plugin-import@^2.20.1: + version "2.20.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz#802423196dcb11d9ce8435a5fc02a6d3b46939b3" + integrity sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw== dependencies: array-includes "^3.0.3" array.prototype.flat "^1.2.1" @@ -5320,11 +5320,9 @@ is-extglob@^2.1.0, is-extglob@^2.1.1: integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== is-fullwidth-code-point@^1.0.0: version "1.0.0" @@ -5815,10 +5813,10 @@ kind-of@^6.0.0, kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -known-css-properties@^0.17.0: - version "0.17.0" - resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.17.0.tgz#1c535f530ee8e9e3e27bb6a718285780e1d07326" - integrity sha512-Vi3nxDGMm/z+lAaCjvAR1u+7fiv+sG6gU/iYDj5QOF8h76ytK9EW/EKfF0NeTyiGBi8Jy6Hklty/vxISrLox3w== +known-css-properties@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.18.0.tgz#d6e00b56ee1d5b0d171fd86df1583cfb012c521f" + integrity sha512-69AgJ1rQa7VvUsd2kpvVq+VeObDuo3zrj0CzM5Slmf6yduQFAI2kXPDQJR2IE/u6MSAUOJrwSzjg5vlz8qcMiw== known-css-properties@^0.5.0: version "0.5.0" @@ -6279,7 +6277,7 @@ math-random@^1.0.1: resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== -mathml-tag-names@^2.0.1, mathml-tag-names@^2.1.1: +mathml-tag-names@^2.0.1, mathml-tag-names@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== @@ -6597,9 +6595,9 @@ natural-compare@^1.4.0: integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= needle@^2.2.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" - integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== + version "2.3.2" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.2.tgz#3342dea100b7160960a450dc8c22160ac712a528" + integrity sha512-DUzITvPVDUy6vczKKYTnWc/pBZ0EnjMJnQ3y+Jo5zfKFimJs7S3HFCxCRZYB9FUZcrzUQr3WsmvZgddMEIZv6w== dependencies: debug "^3.2.6" iconv-lite "^0.4.4" @@ -6662,9 +6660,9 @@ node-pre-gyp@*: tar "^4.4.2" node-releases@^1.1.47: - version "1.1.47" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.47.tgz#c59ef739a1fd7ecbd9f0b7cf5b7871e8a8b591e4" - integrity sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA== + version "1.1.48" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.48.tgz#7f647f0c453a0495bcd64cbd4778c26035c2f03a" + integrity sha512-Hr8BbmUl1ujAST0K0snItzEA5zkJTQup8VNTKNfT6Zw8vTJkIiagUPNfxHmgDOyfFYNfKAul40sD0UEYTvwebw== dependencies: semver "^6.3.0" @@ -7508,7 +7506,7 @@ postcss-html@^0.36.0: dependencies: htmlparser2 "^3.10.0" -postcss-jsx@^0.36.3: +postcss-jsx@^0.36.4: version "0.36.4" resolved "https://registry.yarnpkg.com/postcss-jsx/-/postcss-jsx-0.36.4.tgz#37a68f300a39e5748d547f19a747b3257240bd50" integrity sha512-jwO/7qWUvYuWYnpOb0+4bIIgJt7003pgU3P6nETBLaOyBXuTD55ho21xnals5nBrlpTIFodyd3/jBi6UO3dHvA== @@ -7583,11 +7581,11 @@ postcss-safe-parser@^3.0.1: postcss "^6.0.6" postcss-safe-parser@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-4.0.1.tgz#8756d9e4c36fdce2c72b091bbc8ca176ab1fcdea" - integrity sha512-xZsFA3uX8MO3yAda03QrG3/Eg1LN3EPfjjf07vke/46HERLZyHrTsQ9E1r1w1W//fWEhtYNndo2hQplN2cVpCQ== + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz#a6d4e48f0f37d9f7c11b2a581bf00f8ba4870b96" + integrity sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g== dependencies: - postcss "^7.0.0" + postcss "^7.0.26" postcss-sass@^0.2.0: version "0.2.0" @@ -7661,9 +7659,9 @@ postcss-value-parser@^4.0.2: integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== postcss-values-parser@^3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-3.0.5.tgz#9f83849fb89eaac74c2d5bf75e8e9715508a8c8d" - integrity sha512-0N6EUBx2Vzl0c9LQipuus90EkVh7saBQFRhgAYpHHcDCIvxRt+K/q0zwcIYtDQVNs5Y9NGqei4AuCEvAOsePfQ== + version "3.1.1" + resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-3.1.1.tgz#487111a0446117d3463d2d429a380788f1365f69" + integrity sha512-p56/Cu9wb8+lck/iOTeuFeSHKEUH1bbWQ03T6N3jDkw+15pV65rMY5pK+OWhVpRn5TIrByS6UVpO3mSqvlhZYA== dependencies: color-name "^1.1.4" is-number "^7.0.0" @@ -8492,9 +8490,9 @@ resolve-url@^0.2.1: integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.4.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5" - integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw== + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== dependencies: path-parse "^1.0.6" @@ -8554,9 +8552,9 @@ rimraf@2.6.3, rimraf@~2.6.2: glob "^7.1.3" rimraf@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.1.tgz#48d3d4cb46c80d388ab26cd61b1b466ae9ae225a" - integrity sha512-IQ4ikL8SjBiEDZfk+DFVwqRK8md24RWMEJkdSlgNLkyyAImcjf8SWvU1qFMDOb4igBClbTQ/ugPqXcRwdFTxZw== + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" @@ -8597,10 +8595,10 @@ rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@^1.30.1: - version "1.30.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.30.1.tgz#3fd28d6198beb2f3cd1640732047d5ec16c2d3a0" - integrity sha512-Uus8mwQXwaO+ZVoNwBcXKhT0AvycFCBW/W8VZtkpVGsotRllWk9oldfCjqWmTnFRI0y7x6BnEqSqc65N+/YdBw== +rollup@^1.31.0: + version "1.31.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.31.0.tgz#e2a87212e96aa7850f3eb53fdd02cf89f2d2fe9a" + integrity sha512-9C6ovSyNeEwvuRuUUmsTpJcXac1AwSL1a3x+O5lpmQKZqi5mmrjauLeqIjvREC+yNRR8fPdzByojDng+af3nVw== dependencies: "@types/estree" "*" "@types/node" "*" @@ -9388,23 +9386,14 @@ stylelint-config-recommended@^3.0.0: resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz#e0e547434016c5539fe2650afd58049a2fd1d657" integrity sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ== -stylelint-config-sass-guidelines@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-6.2.0.tgz#f71f2b4341b7dc64c6404bd12ef9c2b91512046c" - integrity sha512-weTmQt+D/qp9t3gPMgvdtu02W07m5pEKXFXnz7Jb0I85W02IxPSBVpaAu2mibvU0wk5e3McasEnHut5UuwXE/Q== +stylelint-config-sass-guidelines@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-7.0.0.tgz#ad94d9ed78731aba3b67c3cf31d5fc644523a4be" + integrity sha512-nWO8gtxv8T+UbAw7iM0RQp6VC3iJgOvqEIeqFBgHW+KgpZu65lYoe9Bf0fqvqxKJ/ngBD+/65BT3ql2u+7Qasg== dependencies: - stylelint-order "^3.0.0" + stylelint-order "^4.0.0" stylelint-scss "^3.4.0" -stylelint-order@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/stylelint-order/-/stylelint-order-3.1.1.tgz#ba9ea6844d1482f97f31204e7c9605c7b792c294" - integrity sha512-4gP/r8j/6JGZ/LL41b2sYtQqfwZl4VSqTp7WeIwI67v/OXNQ08dnn64BGXNwAUSgb2+YIvIOxQaMzqMyQMzoyQ== - dependencies: - lodash "^4.17.15" - postcss "^7.0.17" - postcss-sorting "^5.0.1" - stylelint-order@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/stylelint-order/-/stylelint-order-4.0.0.tgz#2a945c2198caac3ff44687d7c8582c81d044b556" @@ -9435,12 +9424,12 @@ stylelint-selector-bem-pattern@^2.1.0: postcss-bem-linter "^3.0.0" stylelint ">=3.0.2" -stylelint@>=3.0.2, stylelint@^13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-13.0.0.tgz#532007f7154c1a5ed14245d857a5884316f5111f" - integrity sha512-6sjgOJbM3iLhnUtmRO0J1vvxie9VnhIZX/2fCehjylv9Gl9u0ytehGCTm9Lhw2p1F8yaNZn5UprvhCB8C3g/Tg== +stylelint@>=3.0.2, stylelint@^13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-13.1.0.tgz#693fca947873ff34c92bf08cdaa6f3db1cac91e2" + integrity sha512-Ei+nCSQTyZYrsLSUIxq48/QfzCQD9r9sQiBqy7Z4IpIMcj+E0R6b0CHrSFeE7jNgREpBfJKJd6DpstuDrwUiew== dependencies: - autoprefixer "^9.7.3" + autoprefixer "^9.7.4" balanced-match "^1.0.0" chalk "^3.0.0" cosmiconfig "^6.0.0" @@ -9455,17 +9444,17 @@ stylelint@>=3.0.2, stylelint@^13.0.0: ignore "^5.1.4" import-lazy "^4.0.0" imurmurhash "^0.1.4" - known-css-properties "^0.17.0" + known-css-properties "^0.18.0" leven "^3.1.0" lodash "^4.17.15" log-symbols "^3.0.0" - mathml-tag-names "^2.1.1" + mathml-tag-names "^2.1.3" meow "^6.0.0" micromatch "^4.0.2" normalize-selector "^0.2.0" postcss "^7.0.26" postcss-html "^0.36.0" - postcss-jsx "^0.36.3" + postcss-jsx "^0.36.4" postcss-less "^3.1.4" postcss-markdown "^0.36.0" postcss-media-query-parser "^0.2.3"