From c7ea321dcef5d5e080b4861595d1684610504d11 Mon Sep 17 00:00:00 2001 From: Darren Hampton Date: Wed, 26 Jun 2024 00:53:00 -0500 Subject: [PATCH] Add improved interactivity that functions similar to the Android input type="time" control where the user can click and drag the dial. Handles both mouse and touch events. --- dist/mdtimepicker.js | 4151 +++++++++++++++++++++----------------- dist/mdtimepicker.min.js | 2 +- package.json | 4 +- src/mdtimepicker.js | 150 +- 4 files changed, 2476 insertions(+), 1831 deletions(-) diff --git a/dist/mdtimepicker.js b/dist/mdtimepicker.js index ac80ea5..aa09f27 100644 --- a/dist/mdtimepicker.js +++ b/dist/mdtimepicker.js @@ -1,5 +1,5 @@ /*!DO NOT REMOVE! - * MDTimePicker 2.0.1 plugin + * MDTimePicker 2.0.3 plugin * https://dmuy.github.io/MDTimePicker/ * * Author: Dionlee Uy @@ -11,86 +11,73 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.mdtimepicker = factory()); })(this, (function () { 'use strict'; - function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); - } - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { - writable: false - }); - return Constructor; + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; } - function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; } - function _toPrimitive(input, hint) { - if (typeof input !== "object" || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") return res; + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } - return (hint === "string" ? String : Number)(input); + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; } - function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); + function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; var check = function (it) { - return it && it.Math == Math && it; + return it && it.Math === Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global$f = + var global$g = // eslint-disable-next-line es/no-global-this -- safe check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || + check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); var objectGetOwnPropertyDescriptor = {}; - var fails$j = function (exec) { + var fails$k = function (exec) { try { return !!exec(); } catch (error) { @@ -98,17 +85,17 @@ } }; - var fails$i = fails$j; + var fails$j = fails$k; // Detect IE8's incomplete defineProperty implementation - var descriptors = !fails$i(function () { + var descriptors = !fails$j(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing - return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; }); - var fails$h = fails$j; + var fails$i = fails$k; - var functionBindNative = !fails$h(function () { + var functionBindNative = !fails$i(function () { // eslint-disable-next-line es/no-function-prototype-bind -- safe var test = (function () { /* empty */ }).bind(); // eslint-disable-next-line no-prototype-builtins -- safe @@ -117,10 +104,10 @@ var NATIVE_BIND$3 = functionBindNative; - var call$g = Function.prototype.call; + var call$m = Function.prototype.call; - var functionCall = NATIVE_BIND$3 ? call$g.bind(call$g) : function () { - return call$g.apply(call$g, arguments); + var functionCall = NATIVE_BIND$3 ? call$m.bind(call$m) : function () { + return call$m.apply(call$m, arguments); }; var objectPropertyIsEnumerable = {}; @@ -151,38 +138,38 @@ var NATIVE_BIND$2 = functionBindNative; var FunctionPrototype$2 = Function.prototype; - var call$f = FunctionPrototype$2.call; - var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$f, call$f); + var call$l = FunctionPrototype$2.call; + var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$l, call$l); var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) { return function () { - return call$f.apply(fn, arguments); + return call$l.apply(fn, arguments); }; }; - var uncurryThis$j = functionUncurryThis; + var uncurryThis$i = functionUncurryThis; - var toString$8 = uncurryThis$j({}.toString); - var stringSlice$5 = uncurryThis$j(''.slice); + var toString$8 = uncurryThis$i({}.toString); + var stringSlice$5 = uncurryThis$i(''.slice); var classofRaw$2 = function (it) { return stringSlice$5(toString$8(it), 8, -1); }; - var uncurryThis$i = functionUncurryThis; - var fails$g = fails$j; + var uncurryThis$h = functionUncurryThis; + var fails$h = fails$k; var classof$7 = classofRaw$2; var $Object$4 = Object; - var split = uncurryThis$i(''.split); + var split = uncurryThis$h(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings - var indexedObject = fails$g(function () { + var indexedObject = fails$h(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !$Object$4('z').propertyIsEnumerable(0); }) ? function (it) { - return classof$7(it) == 'String' ? split(it, '') : $Object$4(it); + return classof$7(it) === 'String' ? split(it, '') : $Object$4(it); } : $Object$4; // we can't use just `it == null` since of `document.all` special case @@ -193,79 +180,63 @@ var isNullOrUndefined$4 = isNullOrUndefined$5; - var $TypeError$b = TypeError; + var $TypeError$c = TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible - var requireObjectCoercible$5 = function (it) { - if (isNullOrUndefined$4(it)) throw $TypeError$b("Can't call method on " + it); + var requireObjectCoercible$6 = function (it) { + if (isNullOrUndefined$4(it)) throw new $TypeError$c("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var IndexedObject$1 = indexedObject; - var requireObjectCoercible$4 = requireObjectCoercible$5; + var requireObjectCoercible$5 = requireObjectCoercible$6; var toIndexedObject$5 = function (it) { - return IndexedObject$1(requireObjectCoercible$4(it)); + return IndexedObject$1(requireObjectCoercible$5(it)); }; - var documentAll$2 = typeof document == 'object' && document.all; - // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot - // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing - var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined; - - var documentAll_1 = { - all: documentAll$2, - IS_HTMLDDA: IS_HTMLDDA - }; - - var $documentAll$1 = documentAll_1; - - var documentAll$1 = $documentAll$1.all; + var documentAll = typeof document == 'object' && document.all; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable - var isCallable$j = $documentAll$1.IS_HTMLDDA ? function (argument) { - return typeof argument == 'function' || argument === documentAll$1; + // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing + var isCallable$j = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { + return typeof argument == 'function' || argument === documentAll; } : function (argument) { return typeof argument == 'function'; }; var isCallable$i = isCallable$j; - var $documentAll = documentAll_1; - var documentAll = $documentAll.all; - - var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) { - return typeof it == 'object' ? it !== null : isCallable$i(it) || it === documentAll; - } : function (it) { + var isObject$c = function (it) { return typeof it == 'object' ? it !== null : isCallable$i(it); }; - var global$e = global$f; + var global$f = global$g; var isCallable$h = isCallable$j; var aFunction = function (argument) { return isCallable$h(argument) ? argument : undefined; }; - var getBuiltIn$6 = function (namespace, method) { - return arguments.length < 2 ? aFunction(global$e[namespace]) : global$e[namespace] && global$e[namespace][method]; + var getBuiltIn$7 = function (namespace, method) { + return arguments.length < 2 ? aFunction(global$f[namespace]) : global$f[namespace] && global$f[namespace][method]; }; - var uncurryThis$h = functionUncurryThis; + var uncurryThis$g = functionUncurryThis; - var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf); + var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf); var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || ''; - var global$d = global$f; + var global$e = global$g; var userAgent = engineUserAgent; - var process = global$d.process; - var Deno = global$d.Deno; + var process = global$e.process; + var Deno = global$e.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; @@ -290,31 +261,34 @@ var engineV8Version = version; /* eslint-disable es/no-symbol -- required for testing */ - var V8_VERSION$1 = engineV8Version; - var fails$f = fails$j; + var fails$g = fails$k; + var global$d = global$g; + + var $String$5 = global$d.String; // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing - var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$f(function () { - var symbol = Symbol(); + var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$g(function () { + var symbol = Symbol('symbol detection'); // Chrome 38 Symbol has incorrect toString conversion // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances - return !String(symbol) || !(Object(symbol) instanceof Symbol) || + // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will, + // of course, fail. + return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41; }); /* eslint-disable es/no-symbol -- required for testing */ - var NATIVE_SYMBOL$1 = symbolConstructorDetection; var useSymbolAsUid = NATIVE_SYMBOL$1 && !Symbol.sham && typeof Symbol.iterator == 'symbol'; - var getBuiltIn$5 = getBuiltIn$6; + var getBuiltIn$6 = getBuiltIn$7; var isCallable$g = isCallable$j; - var isPrototypeOf$2 = objectIsPrototypeOf; + var isPrototypeOf$3 = objectIsPrototypeOf; var USE_SYMBOL_AS_UID$1 = useSymbolAsUid; var $Object$3 = Object; @@ -322,8 +296,8 @@ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) { return typeof it == 'symbol'; } : function (it) { - var $Symbol = getBuiltIn$5('Symbol'); - return isCallable$g($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$3(it)); + var $Symbol = getBuiltIn$6('Symbol'); + return isCallable$g($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it)); }; var $String$4 = String; @@ -339,91 +313,93 @@ var isCallable$f = isCallable$j; var tryToString$2 = tryToString$3; - var $TypeError$a = TypeError; + var $TypeError$b = TypeError; // `Assert: IsCallable(argument) is true` - var aCallable$7 = function (argument) { + var aCallable$8 = function (argument) { if (isCallable$f(argument)) return argument; - throw $TypeError$a(tryToString$2(argument) + ' is not a function'); + throw new $TypeError$b(tryToString$2(argument) + ' is not a function'); }; - var aCallable$6 = aCallable$7; + var aCallable$7 = aCallable$8; var isNullOrUndefined$3 = isNullOrUndefined$5; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod - var getMethod$6 = function (V, P) { + var getMethod$8 = function (V, P) { var func = V[P]; - return isNullOrUndefined$3(func) ? undefined : aCallable$6(func); + return isNullOrUndefined$3(func) ? undefined : aCallable$7(func); }; - var call$e = functionCall; + var call$k = functionCall; var isCallable$e = isCallable$j; - var isObject$8 = isObject$9; + var isObject$b = isObject$c; - var $TypeError$9 = TypeError; + var $TypeError$a = TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive$1 = function (input, pref) { var fn, val; - if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$8(val = call$e(fn, input))) return val; - if (isCallable$e(fn = input.valueOf) && !isObject$8(val = call$e(fn, input))) return val; - if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$8(val = call$e(fn, input))) return val; - throw $TypeError$9("Can't convert object to primitive value"); + if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$b(val = call$k(fn, input))) return val; + if (isCallable$e(fn = input.valueOf) && !isObject$b(val = call$k(fn, input))) return val; + if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$b(val = call$k(fn, input))) return val; + throw new $TypeError$a("Can't convert object to primitive value"); }; - var shared$4 = {exports: {}}; + var sharedStore = {exports: {}}; + + var isPure = false; - var global$c = global$f; + var global$c = global$g; // eslint-disable-next-line es/no-object-defineproperty -- safe - var defineProperty$2 = Object.defineProperty; + var defineProperty$3 = Object.defineProperty; var defineGlobalProperty$3 = function (key, value) { try { - defineProperty$2(global$c, key, { value: value, configurable: true, writable: true }); + defineProperty$3(global$c, key, { value: value, configurable: true, writable: true }); } catch (error) { global$c[key] = value; } return value; }; - var global$b = global$f; + var globalThis$1 = global$g; var defineGlobalProperty$2 = defineGlobalProperty$3; var SHARED = '__core-js_shared__'; - var store$3 = global$b[SHARED] || defineGlobalProperty$2(SHARED, {}); - - var sharedStore = store$3; + var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {}); - var store$2 = sharedStore; - - (shared$4.exports = function (key, value) { - return store$2[key] || (store$2[key] = value !== undefined ? value : {}); - })('versions', []).push({ - version: '3.30.1', + (store$3.versions || (store$3.versions = [])).push({ + version: '3.37.1', mode: 'global', - copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE', + copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', + license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); - var sharedExports = shared$4.exports; + var sharedStoreExports = sharedStore.exports; + + var store$2 = sharedStoreExports; - var requireObjectCoercible$3 = requireObjectCoercible$5; + var shared$5 = function (key, value) { + return store$2[key] || (store$2[key] = value || {}); + }; + + var requireObjectCoercible$4 = requireObjectCoercible$6; var $Object$2 = Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject$5 = function (argument) { - return $Object$2(requireObjectCoercible$3(argument)); + return $Object$2(requireObjectCoercible$4(argument)); }; - var uncurryThis$g = functionUncurryThis; + var uncurryThis$f = functionUncurryThis; var toObject$4 = toObject$5; - var hasOwnProperty = uncurryThis$g({}.hasOwnProperty); + var hasOwnProperty = uncurryThis$f({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty @@ -432,56 +408,56 @@ return hasOwnProperty(toObject$4(it), key); }; - var uncurryThis$f = functionUncurryThis; + var uncurryThis$e = functionUncurryThis; var id = 0; var postfix = Math.random(); - var toString$7 = uncurryThis$f(1.0.toString); + var toString$7 = uncurryThis$e(1.0.toString); var uid$2 = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$7(++id + postfix, 36); }; - var global$a = global$f; - var shared$3 = sharedExports; - var hasOwn$9 = hasOwnProperty_1; + var global$b = global$g; + var shared$4 = shared$5; + var hasOwn$a = hasOwnProperty_1; var uid$1 = uid$2; var NATIVE_SYMBOL = symbolConstructorDetection; var USE_SYMBOL_AS_UID = useSymbolAsUid; - var Symbol$1 = global$a.Symbol; - var WellKnownSymbolsStore = shared$3('wks'); + var Symbol$1 = global$b.Symbol; + var WellKnownSymbolsStore = shared$4('wks'); var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1; - var wellKnownSymbol$f = function (name) { - if (!hasOwn$9(WellKnownSymbolsStore, name)) { - WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name) + var wellKnownSymbol$i = function (name) { + if (!hasOwn$a(WellKnownSymbolsStore, name)) { + WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$a(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore[name]; }; - var call$d = functionCall; - var isObject$7 = isObject$9; + var call$j = functionCall; + var isObject$a = isObject$c; var isSymbol$1 = isSymbol$2; - var getMethod$5 = getMethod$6; + var getMethod$7 = getMethod$8; var ordinaryToPrimitive = ordinaryToPrimitive$1; - var wellKnownSymbol$e = wellKnownSymbol$f; + var wellKnownSymbol$h = wellKnownSymbol$i; - var $TypeError$8 = TypeError; - var TO_PRIMITIVE = wellKnownSymbol$e('toPrimitive'); + var $TypeError$9 = TypeError; + var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive$1 = function (input, pref) { - if (!isObject$7(input) || isSymbol$1(input)) return input; - var exoticToPrim = getMethod$5(input, TO_PRIMITIVE); + if (!isObject$a(input) || isSymbol$1(input)) return input; + var exoticToPrim = getMethod$7(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; - result = call$d(exoticToPrim, input, pref); - if (!isObject$7(result) || isSymbol$1(result)) return result; - throw $TypeError$8("Can't convert object to primitive value"); + result = call$j(exoticToPrim, input, pref); + if (!isObject$a(result) || isSymbol$1(result)) return result; + throw new $TypeError$9("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); @@ -492,41 +468,41 @@ // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey - var toPropertyKey$3 = function (argument) { + var toPropertyKey$2 = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; - var global$9 = global$f; - var isObject$6 = isObject$9; + var global$a = global$g; + var isObject$9 = isObject$c; - var document$1 = global$9.document; + var document$1 = global$a.document; // typeof document.createElement is 'object' in old IE - var EXISTS$1 = isObject$6(document$1) && isObject$6(document$1.createElement); + var EXISTS$1 = isObject$9(document$1) && isObject$9(document$1.createElement); var documentCreateElement$2 = function (it) { return EXISTS$1 ? document$1.createElement(it) : {}; }; - var DESCRIPTORS$7 = descriptors; - var fails$e = fails$j; + var DESCRIPTORS$9 = descriptors; + var fails$f = fails$k; var createElement = documentCreateElement$2; // Thanks to IE8 for its funny defineProperty - var ie8DomDefine = !DESCRIPTORS$7 && !fails$e(function () { + var ie8DomDefine = !DESCRIPTORS$9 && !fails$f(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(createElement('div'), 'a', { get: function () { return 7; } - }).a != 7; + }).a !== 7; }); - var DESCRIPTORS$6 = descriptors; - var call$c = functionCall; + var DESCRIPTORS$8 = descriptors; + var call$i = functionCall; var propertyIsEnumerableModule = objectPropertyIsEnumerable; var createPropertyDescriptor$3 = createPropertyDescriptor$4; var toIndexedObject$4 = toIndexedObject$5; - var toPropertyKey$2 = toPropertyKey$3; - var hasOwn$8 = hasOwnProperty_1; + var toPropertyKey$1 = toPropertyKey$2; + var hasOwn$9 = hasOwnProperty_1; var IE8_DOM_DEFINE$1 = ie8DomDefine; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe @@ -534,48 +510,48 @@ // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor - objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { + objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject$4(O); - P = toPropertyKey$2(P); + P = toPropertyKey$1(P); if (IE8_DOM_DEFINE$1) try { return $getOwnPropertyDescriptor$1(O, P); } catch (error) { /* empty */ } - if (hasOwn$8(O, P)) return createPropertyDescriptor$3(!call$c(propertyIsEnumerableModule.f, O, P), O[P]); + if (hasOwn$9(O, P)) return createPropertyDescriptor$3(!call$i(propertyIsEnumerableModule.f, O, P), O[P]); }; var objectDefineProperty = {}; - var DESCRIPTORS$5 = descriptors; - var fails$d = fails$j; + var DESCRIPTORS$7 = descriptors; + var fails$e = fails$k; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 - var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$d(function () { + var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$e(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false - }).prototype != 42; + }).prototype !== 42; }); - var isObject$5 = isObject$9; + var isObject$8 = isObject$c; var $String$3 = String; - var $TypeError$7 = TypeError; + var $TypeError$8 = TypeError; // `Assert: Type(argument) is Object` - var anObject$f = function (argument) { - if (isObject$5(argument)) return argument; - throw $TypeError$7($String$3(argument) + ' is not an object'); + var anObject$j = function (argument) { + if (isObject$8(argument)) return argument; + throw new $TypeError$8($String$3(argument) + ' is not an object'); }; - var DESCRIPTORS$4 = descriptors; + var DESCRIPTORS$6 = descriptors; var IE8_DOM_DEFINE = ie8DomDefine; var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug; - var anObject$e = anObject$f; - var toPropertyKey$1 = toPropertyKey$3; + var anObject$i = anObject$j; + var toPropertyKey = toPropertyKey$2; - var $TypeError$6 = TypeError; + var $TypeError$7 = TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe @@ -586,10 +562,10 @@ // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty - objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) { - anObject$e(O); - P = toPropertyKey$1(P); - anObject$e(Attributes); + objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) { + anObject$i(O); + P = toPropertyKey(P); + anObject$i(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor(O, P); if (current && current[WRITABLE]) { @@ -602,41 +578,41 @@ } } return $defineProperty(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { - anObject$e(O); - P = toPropertyKey$1(P); - anObject$e(Attributes); + anObject$i(O); + P = toPropertyKey(P); + anObject$i(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw $TypeError$6('Accessors not supported'); + if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$7('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; - var DESCRIPTORS$3 = descriptors; + var DESCRIPTORS$5 = descriptors; var definePropertyModule$4 = objectDefineProperty; var createPropertyDescriptor$2 = createPropertyDescriptor$4; - var createNonEnumerableProperty$6 = DESCRIPTORS$3 ? function (object, key, value) { + var createNonEnumerableProperty$7 = DESCRIPTORS$5 ? function (object, key, value) { return definePropertyModule$4.f(object, key, createPropertyDescriptor$2(1, value)); } : function (object, key, value) { object[key] = value; return object; }; - var makeBuiltIn$2 = {exports: {}}; + var makeBuiltIn$3 = {exports: {}}; - var DESCRIPTORS$2 = descriptors; - var hasOwn$7 = hasOwnProperty_1; + var DESCRIPTORS$4 = descriptors; + var hasOwn$8 = hasOwnProperty_1; var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe - var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor; + var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor; - var EXISTS = hasOwn$7(FunctionPrototype$1, 'name'); + var EXISTS = hasOwn$8(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; - var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype$1, 'name').configurable)); + var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype$1, 'name').configurable)); var functionName = { EXISTS: EXISTS, @@ -644,11 +620,11 @@ CONFIGURABLE: CONFIGURABLE }; - var uncurryThis$e = functionUncurryThis; + var uncurryThis$d = functionUncurryThis; var isCallable$d = isCallable$j; - var store$1 = sharedStore; + var store$1 = sharedStoreExports; - var functionToString = uncurryThis$e(Function.toString); + var functionToString = uncurryThis$d(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable$d(store$1.inspectSource)) { @@ -659,17 +635,17 @@ var inspectSource$2 = store$1.inspectSource; - var global$8 = global$f; + var global$9 = global$g; var isCallable$c = isCallable$j; - var WeakMap$1 = global$8.WeakMap; + var WeakMap$1 = global$9.WeakMap; var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1)); - var shared$2 = sharedExports; + var shared$3 = shared$5; var uid = uid$2; - var keys = shared$2('keys'); + var keys = shared$3('keys'); var sharedKey$3 = function (key) { return keys[key] || (keys[key] = uid(key)); @@ -678,17 +654,17 @@ var hiddenKeys$4 = {}; var NATIVE_WEAK_MAP = weakMapBasicDetection; - var global$7 = global$f; - var isObject$4 = isObject$9; - var createNonEnumerableProperty$5 = createNonEnumerableProperty$6; - var hasOwn$6 = hasOwnProperty_1; - var shared$1 = sharedStore; + var global$8 = global$g; + var isObject$7 = isObject$c; + var createNonEnumerableProperty$6 = createNonEnumerableProperty$7; + var hasOwn$7 = hasOwnProperty_1; + var shared$2 = sharedStoreExports; var sharedKey$2 = sharedKey$3; var hiddenKeys$3 = hiddenKeys$4; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; - var TypeError$1 = global$7.TypeError; - var WeakMap = global$7.WeakMap; + var TypeError$1 = global$8.TypeError; + var WeakMap = global$8.WeakMap; var set, get, has; var enforce = function (it) { @@ -698,21 +674,21 @@ var getterFor = function (TYPE) { return function (it) { var state; - if (!isObject$4(it) || (state = get(it)).type !== TYPE) { - throw TypeError$1('Incompatible receiver, ' + TYPE + ' required'); + if (!isObject$7(it) || (state = get(it)).type !== TYPE) { + throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; - if (NATIVE_WEAK_MAP || shared$1.state) { - var store = shared$1.state || (shared$1.state = new WeakMap()); + if (NATIVE_WEAK_MAP || shared$2.state) { + var store = shared$2.state || (shared$2.state = new WeakMap()); /* eslint-disable no-self-assign -- prototype methods protection */ store.get = store.get; store.has = store.has; store.set = store.set; /* eslint-enable no-self-assign -- prototype methods protection */ set = function (it, metadata) { - if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED); + if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; store.set(it, metadata); return metadata; @@ -727,16 +703,16 @@ var STATE = sharedKey$2('state'); hiddenKeys$3[STATE] = true; set = function (it, metadata) { - if (hasOwn$6(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED); + if (hasOwn$7(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; - createNonEnumerableProperty$5(it, STATE, metadata); + createNonEnumerableProperty$6(it, STATE, metadata); return metadata; }; get = function (it) { - return hasOwn$6(it, STATE) ? it[STATE] : {}; + return hasOwn$7(it, STATE) ? it[STATE] : {}; }; has = function (it) { - return hasOwn$6(it, STATE); + return hasOwn$7(it, STATE); }; } @@ -748,73 +724,73 @@ getterFor: getterFor }; - var uncurryThis$d = functionUncurryThis; - var fails$c = fails$j; + var uncurryThis$c = functionUncurryThis; + var fails$d = fails$k; var isCallable$b = isCallable$j; - var hasOwn$5 = hasOwnProperty_1; - var DESCRIPTORS$1 = descriptors; + var hasOwn$6 = hasOwnProperty_1; + var DESCRIPTORS$3 = descriptors; var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE; var inspectSource$1 = inspectSource$2; - var InternalStateModule$1 = internalState; + var InternalStateModule$3 = internalState; - var enforceInternalState = InternalStateModule$1.enforce; - var getInternalState$2 = InternalStateModule$1.get; + var enforceInternalState = InternalStateModule$3.enforce; + var getInternalState$2 = InternalStateModule$3.get; var $String$2 = String; // eslint-disable-next-line es/no-object-defineproperty -- safe - var defineProperty$1 = Object.defineProperty; - var stringSlice$4 = uncurryThis$d(''.slice); - var replace$2 = uncurryThis$d(''.replace); - var join = uncurryThis$d([].join); + var defineProperty$2 = Object.defineProperty; + var stringSlice$4 = uncurryThis$c(''.slice); + var replace$2 = uncurryThis$c(''.replace); + var join = uncurryThis$c([].join); - var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$c(function () { - return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; + var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$d(function () { + return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; }); var TEMPLATE = String(String).split('String'); - var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) { + var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) { if (stringSlice$4($String$2(name), 0, 7) === 'Symbol(') { - name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']'; + name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']'; } if (options && options.getter) name = 'get ' + name; if (options && options.setter) name = 'set ' + name; - if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) { - if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true }); + if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) { + if (DESCRIPTORS$3) defineProperty$2(value, 'name', { value: name, configurable: true }); else value.name = name; } - if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) { - defineProperty$1(value, 'length', { value: options.arity }); + if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) { + defineProperty$2(value, 'length', { value: options.arity }); } try { - if (options && hasOwn$5(options, 'constructor') && options.constructor) { - if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false }); + if (options && hasOwn$6(options, 'constructor') && options.constructor) { + if (DESCRIPTORS$3) defineProperty$2(value, 'prototype', { writable: false }); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable } else if (value.prototype) value.prototype = undefined; } catch (error) { /* empty */ } var state = enforceInternalState(value); - if (!hasOwn$5(state, 'source')) { + if (!hasOwn$6(state, 'source')) { state.source = join(TEMPLATE, typeof name == 'string' ? name : ''); } return value; }; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative // eslint-disable-next-line no-extend-native -- required - Function.prototype.toString = makeBuiltIn$1(function toString() { + Function.prototype.toString = makeBuiltIn$2(function toString() { return isCallable$b(this) && getInternalState$2(this).source || inspectSource$1(this); }, 'toString'); - var makeBuiltInExports = makeBuiltIn$2.exports; + var makeBuiltInExports = makeBuiltIn$3.exports; var isCallable$a = isCallable$j; var definePropertyModule$3 = objectDefineProperty; - var makeBuiltIn = makeBuiltInExports; + var makeBuiltIn$1 = makeBuiltInExports; var defineGlobalProperty$1 = defineGlobalProperty$3; - var defineBuiltIn$5 = function (O, key, value, options) { + var defineBuiltIn$8 = function (O, key, value, options) { if (!options) options = {}; var simple = options.enumerable; var name = options.name !== undefined ? options.name : key; - if (isCallable$a(value)) makeBuiltIn(value, name, options); + if (isCallable$a(value)) makeBuiltIn$1(value, name, options); if (options.global) { if (simple) O[key] = value; else defineGlobalProperty$1(key, value); @@ -876,7 +852,8 @@ // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength$3 = function (argument) { - return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 + var len = toIntegerOrInfinity$2(argument); + return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; var toLength$2 = toLength$3; @@ -896,14 +873,15 @@ return function ($this, el, fromIndex) { var O = toIndexedObject$3($this); var length = lengthOfArrayLike$4(O); + if (length === 0) return !IS_INCLUDES && -1; var index = toAbsoluteIndex$1(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare -- NaN check - if (IS_INCLUDES && el != el) while (length > index) { + if (IS_INCLUDES && el !== el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check - if (value != value) return true; + if (value !== value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) { if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; @@ -920,22 +898,22 @@ indexOf: createMethod$3(false) }; - var uncurryThis$c = functionUncurryThis; - var hasOwn$4 = hasOwnProperty_1; + var uncurryThis$b = functionUncurryThis; + var hasOwn$5 = hasOwnProperty_1; var toIndexedObject$2 = toIndexedObject$5; var indexOf$1 = arrayIncludes.indexOf; var hiddenKeys$2 = hiddenKeys$4; - var push$2 = uncurryThis$c([].push); + var push$2 = uncurryThis$b([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject$2(object); var i = 0; var result = []; var key; - for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push$2(result, key); + for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push$2(result, key); // Don't enum bug & hidden keys - while (names.length > i) if (hasOwn$4(O, key = names[i++])) { + while (names.length > i) if (hasOwn$5(O, key = names[i++])) { ~indexOf$1(result, key) || push$2(result, key); } return result; @@ -969,22 +947,22 @@ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols; - var getBuiltIn$4 = getBuiltIn$6; - var uncurryThis$b = functionUncurryThis; + var getBuiltIn$5 = getBuiltIn$7; + var uncurryThis$a = functionUncurryThis; var getOwnPropertyNamesModule = objectGetOwnPropertyNames; var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols; - var anObject$d = anObject$f; + var anObject$h = anObject$j; - var concat$1 = uncurryThis$b([].concat); + var concat$1 = uncurryThis$a([].concat); // all object keys, includes non-enumerable and symbols - var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) { - var keys = getOwnPropertyNamesModule.f(anObject$d(it)); + var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = getOwnPropertyNamesModule.f(anObject$h(it)); var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys; }; - var hasOwn$3 = hasOwnProperty_1; + var hasOwn$4 = hasOwnProperty_1; var ownKeys = ownKeys$1; var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor; var definePropertyModule$2 = objectDefineProperty; @@ -995,22 +973,22 @@ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; - if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) { + if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) { defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } } }; - var fails$b = fails$j; + var fails$c = fails$k; var isCallable$9 = isCallable$j; var replacement = /#|\.prototype\./; var isForced$1 = function (feature, detection) { var value = data[normalize(feature)]; - return value == POLYFILL ? true - : value == NATIVE ? false - : isCallable$9(detection) ? fails$b(detection) + return value === POLYFILL ? true + : value === NATIVE ? false + : isCallable$9(detection) ? fails$c(detection) : !!detection; }; @@ -1024,10 +1002,10 @@ var isForced_1 = isForced$1; - var global$6 = global$f; + var global$7 = global$g; var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; - var createNonEnumerableProperty$4 = createNonEnumerableProperty$6; - var defineBuiltIn$4 = defineBuiltIn$5; + var createNonEnumerableProperty$5 = createNonEnumerableProperty$7; + var defineBuiltIn$7 = defineBuiltIn$8; var defineGlobalProperty = defineGlobalProperty$3; var copyConstructorProperties = copyConstructorProperties$1; var isForced = isForced_1; @@ -1053,11 +1031,11 @@ var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { - target = global$6; + target = global$7; } else if (STATIC) { - target = global$6[TARGET] || defineGlobalProperty(TARGET, {}); + target = global$7[TARGET] || defineGlobalProperty(TARGET, {}); } else { - target = (global$6[TARGET] || {}).prototype; + target = global$7[TARGET] && global$7[TARGET].prototype; } if (target) for (key in source) { sourceProperty = source[key]; @@ -1073,31 +1051,104 @@ } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { - createNonEnumerableProperty$4(sourceProperty, 'sham', true); + createNonEnumerableProperty$5(sourceProperty, 'sham', true); + } + defineBuiltIn$7(target, key, sourceProperty, options); + } + }; + + var classofRaw$1 = classofRaw$2; + var uncurryThis$9 = functionUncurryThis; + + var functionUncurryThisClause = function (fn) { + // Nashorn bug: + // https://github.com/zloirock/core-js/issues/1128 + // https://github.com/zloirock/core-js/issues/1130 + if (classofRaw$1(fn) === 'Function') return uncurryThis$9(fn); + }; + + var uncurryThis$8 = functionUncurryThisClause; + var aCallable$6 = aCallable$8; + var NATIVE_BIND$1 = functionBindNative; + + var bind$3 = uncurryThis$8(uncurryThis$8.bind); + + // optional / simple context binding + var functionBindContext = function (fn, that) { + aCallable$6(fn); + return that === undefined ? fn : NATIVE_BIND$1 ? bind$3(fn, that) : function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var call$h = functionCall; + var anObject$g = anObject$j; + var getMethod$6 = getMethod$8; + + var iteratorClose$4 = function (iterator, kind, value) { + var innerResult, innerError; + anObject$g(iterator); + try { + innerResult = getMethod$6(iterator, 'return'); + if (!innerResult) { + if (kind === 'throw') throw value; + return value; } - defineBuiltIn$4(target, key, sourceProperty, options); + innerResult = call$h(innerResult, iterator); + } catch (error) { + innerError = true; + innerResult = error; + } + if (kind === 'throw') throw value; + if (innerError) throw innerResult; + anObject$g(innerResult); + return value; + }; + + var anObject$f = anObject$j; + var iteratorClose$3 = iteratorClose$4; + + // call something on iterator step with safe closing on error + var callWithSafeIterationClosing$2 = function (iterator, fn, value, ENTRIES) { + try { + return ENTRIES ? fn(anObject$f(value)[0], value[1]) : fn(value); + } catch (error) { + iteratorClose$3(iterator, 'throw', error); } }; - var wellKnownSymbol$d = wellKnownSymbol$f; + var iterators = {}; + + var wellKnownSymbol$g = wellKnownSymbol$i; + var Iterators$3 = iterators; + + var ITERATOR$5 = wellKnownSymbol$g('iterator'); + var ArrayPrototype = Array.prototype; + + // check on default Array iterator + var isArrayIteratorMethod$2 = function (it) { + return it !== undefined && (Iterators$3.Array === it || ArrayPrototype[ITERATOR$5] === it); + }; + + var wellKnownSymbol$f = wellKnownSymbol$i; - var TO_STRING_TAG$3 = wellKnownSymbol$d('toStringTag'); + var TO_STRING_TAG$5 = wellKnownSymbol$f('toStringTag'); var test = {}; - test[TO_STRING_TAG$3] = 'z'; + test[TO_STRING_TAG$5] = 'z'; var toStringTagSupport = String(test) === '[object z]'; var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport; var isCallable$8 = isCallable$j; - var classofRaw$1 = classofRaw$2; - var wellKnownSymbol$c = wellKnownSymbol$f; + var classofRaw = classofRaw$2; + var wellKnownSymbol$e = wellKnownSymbol$i; - var TO_STRING_TAG$2 = wellKnownSymbol$c('toStringTag'); + var TO_STRING_TAG$4 = wellKnownSymbol$e('toStringTag'); var $Object$1 = Object; // ES3 wrong here - var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments'; + var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { @@ -1107,915 +1158,806 @@ }; // getting tag from ES6+ `Object.prototype.toString` - var classof$6 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) { + var classof$6 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case - : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$2)) == 'string' ? tag + : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$4)) == 'string' ? tag // builtinTag case - : CORRECT_ARGUMENTS ? classofRaw$1(O) + : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback - : (result = classofRaw$1(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result; + : (result = classofRaw(O)) === 'Object' && isCallable$8(O.callee) ? 'Arguments' : result; }; + var uncurryThis$7 = functionUncurryThis; + var fails$b = fails$k; + var isCallable$7 = isCallable$j; var classof$5 = classof$6; + var getBuiltIn$4 = getBuiltIn$7; + var inspectSource = inspectSource$2; - var $String$1 = String; + var noop = function () { /* empty */ }; + var construct = getBuiltIn$4('Reflect', 'construct'); + var constructorRegExp = /^\s*(?:class|function)\b/; + var exec$1 = uncurryThis$7(constructorRegExp.exec); + var INCORRECT_TO_STRING = !constructorRegExp.test(noop); - var toString$6 = function (argument) { - if (classof$5(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); - return $String$1(argument); + var isConstructorModern = function isConstructor(argument) { + if (!isCallable$7(argument)) return false; + try { + construct(noop, [], argument); + return true; + } catch (error) { + return false; + } }; - var anObject$c = anObject$f; - - // `RegExp.prototype.flags` getter implementation - // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags - var regexpFlags$1 = function () { - var that = anObject$c(this); - var result = ''; - if (that.hasIndices) result += 'd'; - 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.unicodeSets) result += 'v'; - if (that.sticky) result += 'y'; - return result; + var isConstructorLegacy = function isConstructor(argument) { + if (!isCallable$7(argument)) return false; + switch (classof$5(argument)) { + case 'AsyncFunction': + case 'GeneratorFunction': + case 'AsyncGeneratorFunction': return false; + } + try { + // we can't check .prototype since constructors produced by .bind haven't it + // `Function#toString` throws on some built-it function in some legacy engines + // (for example, `DOMQuad` and similar in FF41-) + return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument)); + } catch (error) { + return true; + } }; - var fails$a = fails$j; - var global$5 = global$f; - - // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError - var $RegExp$2 = global$5.RegExp; - - var UNSUPPORTED_Y$1 = fails$a(function () { - var re = $RegExp$2('a', 'y'); - re.lastIndex = 2; - return re.exec('abcd') != null; - }); + isConstructorLegacy.sham = true; - // UC Browser bug - // https://github.com/zloirock/core-js/issues/1008 - var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$a(function () { - return !$RegExp$2('a', 'y').sticky; - }); + // `IsConstructor` abstract operation + // https://tc39.es/ecma262/#sec-isconstructor + var isConstructor$3 = !construct || fails$b(function () { + var called; + return isConstructorModern(isConstructorModern.call) + || !isConstructorModern(Object) + || !isConstructorModern(function () { called = true; }) + || called; + }) ? isConstructorLegacy : isConstructorModern; - var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$a(function () { - // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 - var re = $RegExp$2('^r', 'gy'); - re.lastIndex = 2; - return re.exec('str') != null; - }); + var DESCRIPTORS$2 = descriptors; + var definePropertyModule$1 = objectDefineProperty; + var createPropertyDescriptor$1 = createPropertyDescriptor$4; - var regexpStickyHelpers = { - BROKEN_CARET: BROKEN_CARET, - MISSED_STICKY: MISSED_STICKY, - UNSUPPORTED_Y: UNSUPPORTED_Y$1 + var createProperty$3 = function (object, key, value) { + if (DESCRIPTORS$2) definePropertyModule$1.f(object, key, createPropertyDescriptor$1(0, value)); + else object[key] = value; }; - var objectDefineProperties = {}; - - var internalObjectKeys = objectKeysInternal; - var enumBugKeys$1 = enumBugKeys$3; - - // `Object.keys` method - // https://tc39.es/ecma262/#sec-object.keys - // eslint-disable-next-line es/no-object-keys -- safe - var objectKeys$1 = Object.keys || function keys(O) { - return internalObjectKeys(O, enumBugKeys$1); - }; + var classof$4 = classof$6; + var getMethod$5 = getMethod$8; + var isNullOrUndefined$2 = isNullOrUndefined$5; + var Iterators$2 = iterators; + var wellKnownSymbol$d = wellKnownSymbol$i; - var DESCRIPTORS = descriptors; - var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug; - var definePropertyModule$1 = objectDefineProperty; - var anObject$b = anObject$f; - var toIndexedObject$1 = toIndexedObject$5; - var objectKeys = objectKeys$1; + var ITERATOR$4 = wellKnownSymbol$d('iterator'); - // `Object.defineProperties` method - // https://tc39.es/ecma262/#sec-object.defineproperties - // eslint-disable-next-line es/no-object-defineproperties -- safe - objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { - anObject$b(O); - var props = toIndexedObject$1(Properties); - var keys = objectKeys(Properties); - var length = keys.length; - var index = 0; - var key; - while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]); - return O; + var getIteratorMethod$3 = function (it) { + if (!isNullOrUndefined$2(it)) return getMethod$5(it, ITERATOR$4) + || getMethod$5(it, '@@iterator') + || Iterators$2[classof$4(it)]; }; - var getBuiltIn$3 = getBuiltIn$6; + var call$g = functionCall; + var aCallable$5 = aCallable$8; + var anObject$e = anObject$j; + var tryToString$1 = tryToString$3; + var getIteratorMethod$2 = getIteratorMethod$3; - var html$1 = getBuiltIn$3('document', 'documentElement'); + var $TypeError$6 = TypeError; - /* global ActiveXObject -- old IE, WSH */ + var getIterator$2 = function (argument, usingIterator) { + var iteratorMethod = arguments.length < 2 ? getIteratorMethod$2(argument) : usingIterator; + if (aCallable$5(iteratorMethod)) return anObject$e(call$g(iteratorMethod, argument)); + throw new $TypeError$6(tryToString$1(argument) + ' is not iterable'); + }; - var anObject$a = anObject$f; - var definePropertiesModule = objectDefineProperties; - var enumBugKeys = enumBugKeys$3; - var hiddenKeys = hiddenKeys$4; - var html = html$1; - var documentCreateElement$1 = documentCreateElement$2; - var sharedKey$1 = sharedKey$3; - - var GT = '>'; - var LT = '<'; - var PROTOTYPE = 'prototype'; - var SCRIPT = 'script'; - var IE_PROTO$1 = sharedKey$1('IE_PROTO'); + var bind$2 = functionBindContext; + var call$f = functionCall; + var toObject$3 = toObject$5; + var callWithSafeIterationClosing$1 = callWithSafeIterationClosing$2; + var isArrayIteratorMethod$1 = isArrayIteratorMethod$2; + var isConstructor$2 = isConstructor$3; + var lengthOfArrayLike$3 = lengthOfArrayLike$5; + var createProperty$2 = createProperty$3; + var getIterator$1 = getIterator$2; + var getIteratorMethod$1 = getIteratorMethod$3; - var EmptyConstructor = function () { /* empty */ }; + var $Array$2 = Array; - var scriptTag = function (content) { - return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; + // `Array.from` method implementation + // https://tc39.es/ecma262/#sec-array.from + var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject$3(arrayLike); + var IS_CONSTRUCTOR = isConstructor$2(this); + var argumentsLength = arguments.length; + var mapfn = argumentsLength > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + if (mapping) mapfn = bind$2(mapfn, argumentsLength > 2 ? arguments[2] : undefined); + var iteratorMethod = getIteratorMethod$1(O); + var index = 0; + var length, result, step, iterator, next, value; + // if the target is not iterable or it's an array with the default iterator - use a simple case + if (iteratorMethod && !(this === $Array$2 && isArrayIteratorMethod$1(iteratorMethod))) { + result = IS_CONSTRUCTOR ? new this() : []; + iterator = getIterator$1(O, iteratorMethod); + next = iterator.next; + for (;!(step = call$f(next, iterator)).done; index++) { + value = mapping ? callWithSafeIterationClosing$1(iterator, mapfn, [step.value, index], true) : step.value; + createProperty$2(result, index, value); + } + } else { + length = lengthOfArrayLike$3(O); + result = IS_CONSTRUCTOR ? new this(length) : $Array$2(length); + for (;length > index; index++) { + value = mapping ? mapfn(O[index], index) : O[index]; + createProperty$2(result, index, value); + } + } + result.length = index; + return result; }; - // Create object with fake `null` prototype: use ActiveX Object with cleared prototype - var NullProtoObjectViaActiveX = function (activeXDocument) { - activeXDocument.write(scriptTag('')); - activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - activeXDocument = null; // avoid memory leak - return temp; - }; + var wellKnownSymbol$c = wellKnownSymbol$i; - // Create object with fake `null` prototype: use iframe Object with cleared prototype - var NullProtoObjectViaIFrame = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = documentCreateElement$1('iframe'); - var JS = 'java' + SCRIPT + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - // https://github.com/zloirock/core-js/issues/475 - iframe.src = String(JS); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(scriptTag('document.F=Object')); - iframeDocument.close(); - return iframeDocument.F; - }; - - // Check for document.domain and active x support - // No need to use active x approach when document.domain is not set - // see https://github.com/es-shims/es5-shim/issues/150 - // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 - // avoid IE GC bug - var activeXDocument; - var NullProtoObject = function () { - try { - activeXDocument = new ActiveXObject('htmlfile'); - } catch (error) { /* ignore */ } - NullProtoObject = typeof document != 'undefined' - ? document.domain && activeXDocument - ? NullProtoObjectViaActiveX(activeXDocument) // old IE - : NullProtoObjectViaIFrame() - : NullProtoObjectViaActiveX(activeXDocument); // WSH - var length = enumBugKeys.length; - while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; - return NullProtoObject(); - }; + var ITERATOR$3 = wellKnownSymbol$c('iterator'); + var SAFE_CLOSING = false; - hiddenKeys[IE_PROTO$1] = true; + try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR$3] = function () { + return this; + }; + // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing + Array.from(iteratorWithReturn, function () { throw 2; }); + } catch (error) { /* empty */ } - // `Object.create` method - // https://tc39.es/ecma262/#sec-object.create - // eslint-disable-next-line es/no-object-create -- safe - var objectCreate = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - EmptyConstructor[PROTOTYPE] = anObject$a(O); - result = new EmptyConstructor(); - EmptyConstructor[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO$1] = O; - } else result = NullProtoObject(); - return Properties === undefined ? result : definePropertiesModule.f(result, Properties); + var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) { + try { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + } catch (error) { return false; } // workaround of old WebKit + `eval` bug + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR$3] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { /* empty */ } + return ITERATION_SUPPORT; }; - var fails$9 = fails$j; - var global$4 = global$f; - - // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError - var $RegExp$1 = global$4.RegExp; + var $$9 = _export; + var from = arrayFrom; + var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1; - var regexpUnsupportedDotAll = fails$9(function () { - var re = $RegExp$1('.', 's'); - return !(re.dotAll && re.exec('\n') && re.flags === 's'); + var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { + // eslint-disable-next-line es/no-array-from -- required for testing + Array.from(iterable); }); - var fails$8 = fails$j; - var global$3 = global$f; - - // babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError - var $RegExp = global$3.RegExp; - - var regexpUnsupportedNcg = fails$8(function () { - var re = $RegExp('(?b)', 'g'); - return re.exec('b').groups.a !== 'b' || - 'b'.replace(re, '$c') !== 'bc'; + // `Array.from` method + // https://tc39.es/ecma262/#sec-array.from + $$9({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { + from: from }); - /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ - /* eslint-disable regexp/no-useless-quantifier -- testing */ - var call$b = functionCall; - var uncurryThis$a = functionUncurryThis; - var toString$5 = toString$6; - var regexpFlags = regexpFlags$1; - var stickyHelpers = regexpStickyHelpers; - var shared = sharedExports; - var create$1 = objectCreate; - var getInternalState$1 = internalState.get; - var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll; - var UNSUPPORTED_NCG = regexpUnsupportedNcg; - - var nativeReplace = shared('native-string-replace', String.prototype.replace); - var nativeExec = RegExp.prototype.exec; - var patchedExec = nativeExec; - var charAt$4 = uncurryThis$a(''.charAt); - var indexOf = uncurryThis$a(''.indexOf); - var replace$1 = uncurryThis$a(''.replace); - var stringSlice$3 = uncurryThis$a(''.slice); - - var UPDATES_LAST_INDEX_WRONG = (function () { - var re1 = /a/; - var re2 = /b*/g; - call$b(nativeExec, re1, 'a'); - call$b(nativeExec, re2, 'a'); - return re1.lastIndex !== 0 || re2.lastIndex !== 0; - })(); - - var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET; + var classof$3 = classofRaw$2; - // nonparticipating capturing group, copied from es5-shim's String#split patch. - var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + // `IsArray` abstract operation + // https://tc39.es/ecma262/#sec-isarray + // eslint-disable-next-line es/no-array-isarray -- safe + var isArray$2 = Array.isArray || function isArray(argument) { + return classof$3(argument) === 'Array'; + }; - var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG; + var isArray$1 = isArray$2; + var isConstructor$1 = isConstructor$3; + var isObject$6 = isObject$c; + var wellKnownSymbol$b = wellKnownSymbol$i; - if (PATCH) { - patchedExec = function exec(string) { - var re = this; - var state = getInternalState$1(re); - var str = toString$5(string); - var raw = state.raw; - var result, reCopy, lastIndex, match, i, object, group; + var SPECIES$3 = wellKnownSymbol$b('species'); + var $Array$1 = Array; - if (raw) { - raw.lastIndex = re.lastIndex; - result = call$b(patchedExec, raw, str); - re.lastIndex = raw.lastIndex; - return result; + // a part of `ArraySpeciesCreate` abstract operation + // https://tc39.es/ecma262/#sec-arrayspeciescreate + var arraySpeciesConstructor$1 = function (originalArray) { + var C; + if (isArray$1(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (isConstructor$1(C) && (C === $Array$1 || isArray$1(C.prototype))) C = undefined; + else if (isObject$6(C)) { + C = C[SPECIES$3]; + if (C === null) C = undefined; } + } return C === undefined ? $Array$1 : C; + }; - var groups = state.groups; - var sticky = UNSUPPORTED_Y && re.sticky; - var flags = call$b(regexpFlags, re); - var source = re.source; - var charsAdded = 0; - var strCopy = str; - - if (sticky) { - flags = replace$1(flags, 'y', ''); - if (indexOf(flags, 'g') === -1) { - flags += 'g'; - } + var arraySpeciesConstructor = arraySpeciesConstructor$1; - strCopy = stringSlice$3(str, re.lastIndex); - // Support anchored sticky behavior. - if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) { - source = '(?: ' + source + ')'; - strCopy = ' ' + strCopy; - charsAdded++; - } - // ^(? + rx + ) is needed, in combination with some str slicing, to - // simulate the 'y' flag. - reCopy = new RegExp('^(?:' + source + ')', flags); - } + // `ArraySpeciesCreate` abstract operation + // https://tc39.es/ecma262/#sec-arrayspeciescreate + var arraySpeciesCreate$1 = function (originalArray, length) { + return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); + }; - if (NPCG_INCLUDED) { - reCopy = new RegExp('^' + source + '$(?!\\s)', flags); - } - if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; + var bind$1 = functionBindContext; + var uncurryThis$6 = functionUncurryThis; + var IndexedObject = indexedObject; + var toObject$2 = toObject$5; + var lengthOfArrayLike$2 = lengthOfArrayLike$5; + var arraySpeciesCreate = arraySpeciesCreate$1; - match = call$b(nativeExec, sticky ? reCopy : re, strCopy); + var push$1 = uncurryThis$6([].push); - if (sticky) { - if (match) { - match.input = stringSlice$3(match.input, charsAdded); - match[0] = stringSlice$3(match[0], charsAdded); - match.index = re.lastIndex; - re.lastIndex += match[0].length; - } else re.lastIndex = 0; - } else if (UPDATES_LAST_INDEX_WRONG && match) { - re.lastIndex = re.global ? match.index + match[0].length : lastIndex; - } - if (NPCG_INCLUDED && match && match.length > 1) { - // Fix browsers whose `exec` methods don't consistently return `undefined` - // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/ - call$b(nativeReplace, match[0], reCopy, function () { - for (i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) match[i] = undefined; + // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation + var createMethod$2 = 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 IS_FILTER_REJECT = TYPE === 7; + var NO_HOLES = TYPE === 5 || IS_FIND_INDEX; + return function ($this, callbackfn, that, specificCreate) { + var O = toObject$2($this); + var self = IndexedObject(O); + var length = lengthOfArrayLike$2(self); + var boundFunction = bind$1(callbackfn, that); + var index = 0; + var create = specificCreate || arraySpeciesCreate; + var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: push$1(target, value); // filter + } else switch (TYPE) { + case 4: return false; // every + case 7: push$1(target, value); // filterReject } - }); - } - - if (match && groups) { - match.groups = object = create$1(null); - for (i = 0; i < groups.length; i++) { - group = groups[i]; - object[group[0]] = match[group[1]]; } } - - return match; + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; - } - - var regexpExec$2 = patchedExec; + }; - var $$6 = _export; - var exec$1 = regexpExec$2; + var arrayIteration = { + // `Array.prototype.forEach` method + // https://tc39.es/ecma262/#sec-array.prototype.foreach + forEach: createMethod$2(0), + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + map: createMethod$2(1), + // `Array.prototype.filter` method + // https://tc39.es/ecma262/#sec-array.prototype.filter + filter: createMethod$2(2), + // `Array.prototype.some` method + // https://tc39.es/ecma262/#sec-array.prototype.some + some: createMethod$2(3), + // `Array.prototype.every` method + // https://tc39.es/ecma262/#sec-array.prototype.every + every: createMethod$2(4), + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + find: createMethod$2(5), + // `Array.prototype.findIndex` method + // https://tc39.es/ecma262/#sec-array.prototype.findIndex + findIndex: createMethod$2(6), + // `Array.prototype.filterReject` method + // https://github.com/tc39/proposal-array-filtering + filterReject: createMethod$2(7) + }; - // `RegExp.prototype.exec` method - // https://tc39.es/ecma262/#sec-regexp.prototype.exec - $$6({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, { - exec: exec$1 - }); + var fails$a = fails$k; + var wellKnownSymbol$a = wellKnownSymbol$i; + var V8_VERSION = engineV8Version; - var classofRaw = classofRaw$2; - var uncurryThis$9 = functionUncurryThis; + var SPECIES$2 = wellKnownSymbol$a('species'); - var functionUncurryThisClause = function (fn) { - // Nashorn bug: - // https://github.com/zloirock/core-js/issues/1128 - // https://github.com/zloirock/core-js/issues/1130 - if (classofRaw(fn) === 'Function') return uncurryThis$9(fn); + var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return V8_VERSION >= 51 || !fails$a(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES$2] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); }; - // TODO: Remove from `core-js@4` since it's moved to entry points + var $$8 = _export; + var $map = arrayIteration.map; + var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2; - var uncurryThis$8 = functionUncurryThisClause; - var defineBuiltIn$3 = defineBuiltIn$5; - var regexpExec$1 = regexpExec$2; - var fails$7 = fails$j; - var wellKnownSymbol$b = wellKnownSymbol$f; - var createNonEnumerableProperty$3 = createNonEnumerableProperty$6; + var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('map'); - var SPECIES$3 = wellKnownSymbol$b('species'); - var RegExpPrototype = RegExp.prototype; - - var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) { - var SYMBOL = wellKnownSymbol$b(KEY); + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + // with adding support of @@species + $$8({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, { + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); - var DELEGATES_TO_SYMBOL = !fails$7(function () { - // String methods call symbol-named RegEp methods - var O = {}; - O[SYMBOL] = function () { return 7; }; - return ''[KEY](O) != 7; - }); + var uncurryThis$5 = functionUncurryThis; - var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$7(function () { - // Symbol-named RegExp methods call .exec - var execCalled = false; - var re = /a/; + var arraySlice = uncurryThis$5([].slice); - if (KEY === 'split') { - // We can't use real regex here since it causes deoptimization - // and serious performance degradation in V8 - // https://github.com/zloirock/core-js/issues/306 - re = {}; - // RegExp[@@split] doesn't call the regex's exec method, but first creates - // a new one. We need to return the patched regex when creating the new one. - re.constructor = {}; - re.constructor[SPECIES$3] = function () { return re; }; - re.flags = ''; - re[SYMBOL] = /./[SYMBOL]; - } + var $$7 = _export; + var isArray = isArray$2; + var isConstructor = isConstructor$3; + var isObject$5 = isObject$c; + var toAbsoluteIndex = toAbsoluteIndex$2; + var lengthOfArrayLike$1 = lengthOfArrayLike$5; + var toIndexedObject$1 = toIndexedObject$5; + var createProperty$1 = createProperty$3; + var wellKnownSymbol$9 = wellKnownSymbol$i; + var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2; + var nativeSlice = arraySlice; - re.exec = function () { execCalled = true; return null; }; + var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); - re[SYMBOL](''); - return !execCalled; - }); + var SPECIES$1 = wellKnownSymbol$9('species'); + var $Array = Array; + var max$1 = Math.max; - if ( - !DELEGATES_TO_SYMBOL || - !DELEGATES_TO_EXEC || - FORCED - ) { - var uncurriedNativeRegExpMethod = uncurryThis$8(/./[SYMBOL]); - var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { - var uncurriedNativeMethod = uncurryThis$8(nativeMethod); - var $exec = regexp.exec; - if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) { - if (DELEGATES_TO_SYMBOL && !forceStringMethod) { - // The native String method already delegates to @@method (this - // polyfilled function), leasing to infinite recursion. - // We avoid it by directly calling the native @@method method. - return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) }; - } - return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) }; + // `Array.prototype.slice` method + // https://tc39.es/ecma262/#sec-array.prototype.slice + // fallback for not array-like ES3 strings and DOM objects + $$7({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + slice: function slice(start, end) { + var O = toIndexedObject$1(this); + var length = lengthOfArrayLike$1(O); + var k = toAbsoluteIndex(start, length); + var fin = toAbsoluteIndex(end === undefined ? length : end, length); + // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible + var Constructor, result, n; + if (isArray(O)) { + Constructor = O.constructor; + // cross-realm fallback + if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) { + Constructor = undefined; + } else if (isObject$5(Constructor)) { + Constructor = Constructor[SPECIES$1]; + if (Constructor === null) Constructor = undefined; } - return { done: false }; - }); - - defineBuiltIn$3(String.prototype, KEY, methods[0]); - defineBuiltIn$3(RegExpPrototype, SYMBOL, methods[1]); + if (Constructor === $Array || Constructor === undefined) { + return nativeSlice(O, k, fin); + } + } + result = new (Constructor === undefined ? $Array : Constructor)(max$1(fin - k, 0)); + for (n = 0; k < fin; k++, n++) if (k in O) createProperty$1(result, n, O[k]); + result.length = n; + return result; } + }); - if (SHAM) createNonEnumerableProperty$3(RegExpPrototype[SYMBOL], 'sham', true); - }; + var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport; + var classof$2 = classof$6; - var uncurryThis$7 = functionUncurryThis; - var toIntegerOrInfinity$1 = toIntegerOrInfinity$4; - var toString$4 = toString$6; - var requireObjectCoercible$2 = requireObjectCoercible$5; + // `Object.prototype.toString` method implementation + // https://tc39.es/ecma262/#sec-object.prototype.tostring + var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() { + return '[object ' + classof$2(this) + ']'; + }; - var charAt$3 = uncurryThis$7(''.charAt); - var charCodeAt = uncurryThis$7(''.charCodeAt); - var stringSlice$2 = uncurryThis$7(''.slice); + var TO_STRING_TAG_SUPPORT = toStringTagSupport; + var defineBuiltIn$6 = defineBuiltIn$8; + var toString$6 = objectToString; - var createMethod$2 = function (CONVERT_TO_STRING) { - return function ($this, pos) { - var S = toString$4(requireObjectCoercible$2($this)); - var position = toIntegerOrInfinity$1(pos); - var size = S.length; - var first, second; - if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; - first = charCodeAt(S, position); - return first < 0xD800 || first > 0xDBFF || position + 1 === size - || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF - ? CONVERT_TO_STRING - ? charAt$3(S, position) - : first - : CONVERT_TO_STRING - ? stringSlice$2(S, position, position + 2) - : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; - }; - }; + // `Object.prototype.toString` method + // https://tc39.es/ecma262/#sec-object.prototype.tostring + if (!TO_STRING_TAG_SUPPORT) { + defineBuiltIn$6(Object.prototype, 'toString', toString$6, { unsafe: true }); + } - var stringMultibyte = { - // `String.prototype.codePointAt` method - // https://tc39.es/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 classof$1 = classof$6; - var charAt$2 = stringMultibyte.charAt; + var $String$1 = String; - // `AdvanceStringIndex` abstract operation - // https://tc39.es/ecma262/#sec-advancestringindex - var advanceStringIndex$2 = function (S, index, unicode) { - return index + (unicode ? charAt$2(S, index).length : 1); + var toString$5 = function (argument) { + if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string'); + return $String$1(argument); }; - var call$a = functionCall; - var anObject$9 = anObject$f; - var isCallable$7 = isCallable$j; - var classof$4 = classofRaw$2; - var regexpExec = regexpExec$2; - - var $TypeError$5 = TypeError; + var anObject$d = anObject$j; - // `RegExpExec` abstract operation - // https://tc39.es/ecma262/#sec-regexpexec - var regexpExecAbstract = function (R, S) { - var exec = R.exec; - if (isCallable$7(exec)) { - var result = call$a(exec, R, S); - if (result !== null) anObject$9(result); - return result; - } - if (classof$4(R) === 'RegExp') return call$a(regexpExec, R, S); - throw $TypeError$5('RegExp#exec called on incompatible receiver'); + // `RegExp.prototype.flags` getter implementation + // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags + var regexpFlags$1 = function () { + var that = anObject$d(this); + var result = ''; + if (that.hasIndices) result += 'd'; + 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.unicodeSets) result += 'v'; + if (that.sticky) result += 'y'; + return result; }; - var call$9 = functionCall; - var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic; - var anObject$8 = anObject$f; - var isNullOrUndefined$2 = isNullOrUndefined$5; - var toLength$1 = toLength$3; - var toString$3 = toString$6; - var requireObjectCoercible$1 = requireObjectCoercible$5; - var getMethod$4 = getMethod$6; - var advanceStringIndex$1 = advanceStringIndex$2; - var regExpExec$1 = regexpExecAbstract; + var fails$9 = fails$k; + var global$6 = global$g; - // @@match logic - fixRegExpWellKnownSymbolLogic$1('match', function (MATCH, nativeMatch, maybeCallNative) { - return [ - // `String.prototype.match` method - // https://tc39.es/ecma262/#sec-string.prototype.match - function match(regexp) { - var O = requireObjectCoercible$1(this); - var matcher = isNullOrUndefined$2(regexp) ? undefined : getMethod$4(regexp, MATCH); - return matcher ? call$9(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$3(O)); - }, - // `RegExp.prototype[@@match]` method - // https://tc39.es/ecma262/#sec-regexp.prototype-@@match - function (string) { - var rx = anObject$8(this); - var S = toString$3(string); - var res = maybeCallNative(nativeMatch, rx, S); + // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError + var $RegExp$2 = global$6.RegExp; - if (res.done) return res.value; + var UNSUPPORTED_Y$1 = fails$9(function () { + var re = $RegExp$2('a', 'y'); + re.lastIndex = 2; + return re.exec('abcd') !== null; + }); - if (!rx.global) return regExpExec$1(rx, S); + // UC Browser bug + // https://github.com/zloirock/core-js/issues/1008 + var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$9(function () { + return !$RegExp$2('a', 'y').sticky; + }); - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - var A = []; - var n = 0; - var result; - while ((result = regExpExec$1(rx, S)) !== null) { - var matchStr = toString$3(result[0]); - A[n] = matchStr; - if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode); - n++; - } - return n === 0 ? null : A; - } - ]; + var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$9(function () { + // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 + var re = $RegExp$2('^r', 'gy'); + re.lastIndex = 2; + return re.exec('str') !== null; }); - var NATIVE_BIND$1 = functionBindNative; + var regexpStickyHelpers = { + BROKEN_CARET: BROKEN_CARET, + MISSED_STICKY: MISSED_STICKY, + UNSUPPORTED_Y: UNSUPPORTED_Y$1 + }; - var FunctionPrototype = Function.prototype; - var apply$1 = FunctionPrototype.apply; - var call$8 = FunctionPrototype.call; + var objectDefineProperties = {}; - // eslint-disable-next-line es/no-reflect -- safe - var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$8.bind(apply$1) : function () { - return call$8.apply(apply$1, arguments); - }); + var internalObjectKeys = objectKeysInternal; + var enumBugKeys$1 = enumBugKeys$3; - var uncurryThis$6 = functionUncurryThis; - var toObject$3 = toObject$5; + // `Object.keys` method + // https://tc39.es/ecma262/#sec-object.keys + // eslint-disable-next-line es/no-object-keys -- safe + var objectKeys$1 = Object.keys || function keys(O) { + return internalObjectKeys(O, enumBugKeys$1); + }; - var floor = Math.floor; - var charAt$1 = uncurryThis$6(''.charAt); - var replace = uncurryThis$6(''.replace); - var stringSlice$1 = uncurryThis$6(''.slice); - // eslint-disable-next-line redos/no-vulnerable -- safe - var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; - var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; + var DESCRIPTORS$1 = descriptors; + var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug; + var definePropertyModule = objectDefineProperty; + var anObject$c = anObject$j; + var toIndexedObject = toIndexedObject$5; + var objectKeys = objectKeys$1; - // `GetSubstitution` abstract operation - // https://tc39.es/ecma262/#sec-getsubstitution - var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) { - var tailPos = position + matched.length; - var m = captures.length; - var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; - if (namedCaptures !== undefined) { - namedCaptures = toObject$3(namedCaptures); - symbols = SUBSTITUTION_SYMBOLS; - } - return replace(replacement, symbols, function (match, ch) { - var capture; - switch (charAt$1(ch, 0)) { - case '$': return '$'; - case '&': return matched; - case '`': return stringSlice$1(str, 0, position); - case "'": return stringSlice$1(str, tailPos); - case '<': - capture = namedCaptures[stringSlice$1(ch, 1, -1)]; - break; - default: // \d\d? - var n = +ch; - if (n === 0) return match; - if (n > m) { - var f = floor(n / 10); - if (f === 0) return match; - if (f <= m) return captures[f - 1] === undefined ? charAt$1(ch, 1) : captures[f - 1] + charAt$1(ch, 1); - return match; - } - capture = captures[n - 1]; - } - return capture === undefined ? '' : capture; - }); + // `Object.defineProperties` method + // https://tc39.es/ecma262/#sec-object.defineproperties + // eslint-disable-next-line es/no-object-defineproperties -- safe + objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { + anObject$c(O); + var props = toIndexedObject(Properties); + var keys = objectKeys(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]); + return O; }; - var apply = functionApply; - var call$7 = functionCall; - var uncurryThis$5 = functionUncurryThis; - var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic; - var fails$6 = fails$j; - var anObject$7 = anObject$f; - var isCallable$6 = isCallable$j; - var isNullOrUndefined$1 = isNullOrUndefined$5; - var toIntegerOrInfinity = toIntegerOrInfinity$4; - var toLength = toLength$3; - var toString$2 = toString$6; - var requireObjectCoercible = requireObjectCoercible$5; - var advanceStringIndex = advanceStringIndex$2; - var getMethod$3 = getMethod$6; - var getSubstitution = getSubstitution$1; - var regExpExec = regexpExecAbstract; - var wellKnownSymbol$a = wellKnownSymbol$f; + var getBuiltIn$3 = getBuiltIn$7; - var REPLACE = wellKnownSymbol$a('replace'); - var max$1 = Math.max; - var min = Math.min; - var concat = uncurryThis$5([].concat); - var push$1 = uncurryThis$5([].push); - var stringIndexOf = uncurryThis$5(''.indexOf); - var stringSlice = uncurryThis$5(''.slice); + var html$1 = getBuiltIn$3('document', 'documentElement'); - var maybeToString = function (it) { - return it === undefined ? it : String(it); + /* global ActiveXObject -- old IE, WSH */ + var anObject$b = anObject$j; + var definePropertiesModule = objectDefineProperties; + var enumBugKeys = enumBugKeys$3; + var hiddenKeys = hiddenKeys$4; + var html = html$1; + var documentCreateElement$1 = documentCreateElement$2; + var sharedKey$1 = sharedKey$3; + + var GT = '>'; + var LT = '<'; + var PROTOTYPE = 'prototype'; + var SCRIPT = 'script'; + var IE_PROTO$1 = sharedKey$1('IE_PROTO'); + + var EmptyConstructor = function () { /* empty */ }; + + var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; - // IE <= 11 replaces $0 with the whole match, as if it was $& - // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 - var REPLACE_KEEPS_$0 = (function () { - // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing - return 'a'.replace(/./, '$0') === '$0'; - })(); + // Create object with fake `null` prototype: use ActiveX Object with cleared prototype + var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + activeXDocument = null; // avoid memory leak + return temp; + }; - // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string - var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { - if (/./[REPLACE]) { - return /./[REPLACE]('a', '$0') === ''; - } - return false; - })(); + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var NullProtoObjectViaIFrame = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement$1('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + // https://github.com/zloirock/core-js/issues/475 + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; + }; - var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () { - var re = /./; - re.exec = function () { - var result = []; - result.groups = { a: '7' }; - return result; - }; - // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive - return ''.replace(re, '$') !== '7'; - }); + // Check for document.domain and active x support + // No need to use active x approach when document.domain is not set + // see https://github.com/es-shims/es5-shim/issues/150 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 + // avoid IE GC bug + var activeXDocument; + var NullProtoObject = function () { + try { + activeXDocument = new ActiveXObject('htmlfile'); + } catch (error) { /* ignore */ } + NullProtoObject = typeof document != 'undefined' + ? document.domain && activeXDocument + ? NullProtoObjectViaActiveX(activeXDocument) // old IE + : NullProtoObjectViaIFrame() + : NullProtoObjectViaActiveX(activeXDocument); // WSH + var length = enumBugKeys.length; + while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); + }; + + hiddenKeys[IE_PROTO$1] = true; + + // `Object.create` method + // https://tc39.es/ecma262/#sec-object.create + // eslint-disable-next-line es/no-object-create -- safe + var objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject$b(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO$1] = O; + } else result = NullProtoObject(); + return Properties === undefined ? result : definePropertiesModule.f(result, Properties); + }; - // @@replace logic - fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { - var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; + var fails$8 = fails$k; + var global$5 = global$g; - return [ - // `String.prototype.replace` method - // https://tc39.es/ecma262/#sec-string.prototype.replace - function replace(searchValue, replaceValue) { - var O = requireObjectCoercible(this); - var replacer = isNullOrUndefined$1(searchValue) ? undefined : getMethod$3(searchValue, REPLACE); - return replacer - ? call$7(replacer, searchValue, O, replaceValue) - : call$7(nativeReplace, toString$2(O), searchValue, replaceValue); - }, - // `RegExp.prototype[@@replace]` method - // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace - function (string, replaceValue) { - var rx = anObject$7(this); - var S = toString$2(string); + // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError + var $RegExp$1 = global$5.RegExp; - if ( - typeof replaceValue == 'string' && - stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 && - stringIndexOf(replaceValue, '$<') === -1 - ) { - var res = maybeCallNative(nativeReplace, rx, S, replaceValue); - if (res.done) return res.value; - } + var regexpUnsupportedDotAll = fails$8(function () { + var re = $RegExp$1('.', 's'); + return !(re.dotAll && re.test('\n') && re.flags === 's'); + }); - var functionalReplace = isCallable$6(replaceValue); - if (!functionalReplace) replaceValue = toString$2(replaceValue); + var fails$7 = fails$k; + var global$4 = global$g; - var global = rx.global; - if (global) { - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - } - var results = []; - while (true) { - var result = regExpExec(rx, S); - if (result === null) break; + // babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError + var $RegExp = global$4.RegExp; - push$1(results, result); - if (!global) break; + var regexpUnsupportedNcg = fails$7(function () { + var re = $RegExp('(?b)', 'g'); + return re.exec('b').groups.a !== 'b' || + 'b'.replace(re, '$c') !== 'bc'; + }); - var matchStr = toString$2(result[0]); - if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); - } + /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ + /* eslint-disable regexp/no-useless-quantifier -- testing */ + var call$e = functionCall; + var uncurryThis$4 = functionUncurryThis; + var toString$4 = toString$5; + var regexpFlags = regexpFlags$1; + var stickyHelpers = regexpStickyHelpers; + var shared$1 = shared$5; + var create$3 = objectCreate; + var getInternalState$1 = internalState.get; + var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll; + var UNSUPPORTED_NCG = regexpUnsupportedNcg; - var accumulatedResult = ''; - var nextSourcePosition = 0; - for (var i = 0; i < results.length; i++) { - result = results[i]; + var nativeReplace = shared$1('native-string-replace', String.prototype.replace); + var nativeExec = RegExp.prototype.exec; + var patchedExec = nativeExec; + var charAt$4 = uncurryThis$4(''.charAt); + var indexOf = uncurryThis$4(''.indexOf); + var replace$1 = uncurryThis$4(''.replace); + var stringSlice$3 = uncurryThis$4(''.slice); - var matched = toString$2(result[0]); - var position = max$1(min(toIntegerOrInfinity(result.index), S.length), 0); - var captures = []; - // NOTE: This is equivalent to - // captures = result.slice(1).map(maybeToString) - // but for some reason `nativeSlice.call(result, 1, result.length)` (called in - // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and - // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. - for (var j = 1; j < result.length; j++) push$1(captures, maybeToString(result[j])); - var namedCaptures = result.groups; - if (functionalReplace) { - var replacerArgs = concat([matched], captures, position, S); - if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures); - var replacement = toString$2(apply(replaceValue, undefined, replacerArgs)); - } else { - replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); - } - if (position >= nextSourcePosition) { - accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement; - nextSourcePosition = position + matched.length; - } - } - return accumulatedResult + stringSlice(S, nextSourcePosition); - } - ]; - }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE); + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/; + var re2 = /b*/g; + call$e(nativeExec, re1, 'a'); + call$e(nativeExec, re2, 'a'); + return re1.lastIndex !== 0 || re2.lastIndex !== 0; + })(); - var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport; - var classof$3 = classof$6; + var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET; - // `Object.prototype.toString` method implementation - // https://tc39.es/ecma262/#sec-object.prototype.tostring - var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() { - return '[object ' + classof$3(this) + ']'; - }; + // nonparticipating capturing group, copied from es5-shim's String#split patch. + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; - var TO_STRING_TAG_SUPPORT = toStringTagSupport; - var defineBuiltIn$2 = defineBuiltIn$5; - var toString$1 = objectToString; + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG; - // `Object.prototype.toString` method - // https://tc39.es/ecma262/#sec-object.prototype.tostring - if (!TO_STRING_TAG_SUPPORT) { - defineBuiltIn$2(Object.prototype, 'toString', toString$1, { unsafe: true }); - } + if (PATCH) { + patchedExec = function exec(string) { + var re = this; + var state = getInternalState$1(re); + var str = toString$4(string); + var raw = state.raw; + var result, reCopy, lastIndex, match, i, object, group; - var $TypeError$4 = TypeError; - var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991 + if (raw) { + raw.lastIndex = re.lastIndex; + result = call$e(patchedExec, raw, str); + re.lastIndex = raw.lastIndex; + return result; + } - var doesNotExceedSafeInteger$1 = function (it) { - if (it > MAX_SAFE_INTEGER) throw $TypeError$4('Maximum allowed index exceeded'); - return it; - }; + var groups = state.groups; + var sticky = UNSUPPORTED_Y && re.sticky; + var flags = call$e(regexpFlags, re); + var source = re.source; + var charsAdded = 0; + var strCopy = str; - var aCallable$5 = aCallable$7; + if (sticky) { + flags = replace$1(flags, 'y', ''); + if (indexOf(flags, 'g') === -1) { + flags += 'g'; + } - var getIteratorDirect$2 = function (obj) { - return { - iterator: obj, - next: aCallable$5(obj.next) - }; - }; + strCopy = stringSlice$3(str, re.lastIndex); + // Support anchored sticky behavior. + if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) { + source = '(?: ' + source + ')'; + strCopy = ' ' + strCopy; + charsAdded++; + } + // ^(? + rx + ) is needed, in combination with some str slicing, to + // simulate the 'y' flag. + reCopy = new RegExp('^(?:' + source + ')', flags); + } - var call$6 = functionCall; - var getBuiltIn$2 = getBuiltIn$6; - var getMethod$2 = getMethod$6; + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + source + '$(?!\\s)', flags); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; - var asyncIteratorClose = function (iterator, method, argument, reject) { - try { - var returnMethod = getMethod$2(iterator, 'return'); - if (returnMethod) { - return getBuiltIn$2('Promise').resolve(call$6(returnMethod, iterator)).then(function () { - method(argument); - }, function (error) { - reject(error); + match = call$e(nativeExec, sticky ? reCopy : re, strCopy); + + if (sticky) { + if (match) { + match.input = stringSlice$3(match.input, charsAdded); + match[0] = stringSlice$3(match[0], charsAdded); + match.index = re.lastIndex; + re.lastIndex += match[0].length; + } else re.lastIndex = 0; + } else if (UPDATES_LAST_INDEX_WRONG && match) { + re.lastIndex = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/ + call$e(nativeReplace, match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } }); } - } catch (error2) { - return reject(error2); - } method(argument); - }; - // https://github.com/tc39/proposal-iterator-helpers - // https://github.com/tc39/proposal-array-from-async - var call$5 = functionCall; - var aCallable$4 = aCallable$7; - var anObject$6 = anObject$f; - var isObject$3 = isObject$9; - var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1; - var getBuiltIn$1 = getBuiltIn$6; - var getIteratorDirect$1 = getIteratorDirect$2; - var closeAsyncIteration = asyncIteratorClose; + if (match && groups) { + match.groups = object = create$3(null); + for (i = 0; i < groups.length; i++) { + group = groups[i]; + object[group[0]] = match[group[1]]; + } + } - var createMethod$1 = function (TYPE) { - var IS_TO_ARRAY = TYPE == 0; - var IS_FOR_EACH = TYPE == 1; - var IS_EVERY = TYPE == 2; - var IS_SOME = TYPE == 3; - return function (object, fn, target) { - anObject$6(object); - var MAPPING = fn !== undefined; - if (MAPPING || !IS_TO_ARRAY) aCallable$4(fn); - var record = getIteratorDirect$1(object); - var Promise = getBuiltIn$1('Promise'); - var iterator = record.iterator; - var next = record.next; - var counter = 0; + return match; + }; + } - return new Promise(function (resolve, reject) { - var ifAbruptCloseAsyncIterator = function (error) { - closeAsyncIteration(iterator, reject, error, reject); - }; + var regexpExec$2 = patchedExec; - var loop = function () { - try { - if (MAPPING) try { - doesNotExceedSafeInteger(counter); - } catch (error5) { ifAbruptCloseAsyncIterator(error5); } - Promise.resolve(anObject$6(call$5(next, iterator))).then(function (step) { - try { - if (anObject$6(step).done) { - if (IS_TO_ARRAY) { - target.length = counter; - resolve(target); - } else resolve(IS_SOME ? false : IS_EVERY || undefined); - } else { - var value = step.value; - try { - if (MAPPING) { - var result = fn(value, counter); + var $$6 = _export; + var exec = regexpExec$2; - var handler = function ($result) { - if (IS_FOR_EACH) { - loop(); - } else if (IS_EVERY) { - $result ? loop() : closeAsyncIteration(iterator, resolve, false, reject); - } else if (IS_TO_ARRAY) { - try { - target[counter++] = $result; - loop(); - } catch (error4) { ifAbruptCloseAsyncIterator(error4); } - } else { - $result ? closeAsyncIteration(iterator, resolve, IS_SOME || value, reject) : loop(); - } - }; + // `RegExp.prototype.exec` method + // https://tc39.es/ecma262/#sec-regexp.prototype.exec + $$6({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { + exec: exec + }); - if (isObject$3(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator); - else handler(result); - } else { - target[counter++] = value; - loop(); - } - } catch (error3) { ifAbruptCloseAsyncIterator(error3); } - } - } catch (error2) { reject(error2); } - }, reject); - } catch (error) { reject(error); } - }; + var uncurryThis$3 = functionUncurryThis; + var toIntegerOrInfinity$1 = toIntegerOrInfinity$4; + var toString$3 = toString$5; + var requireObjectCoercible$3 = requireObjectCoercible$6; - loop(); - }); - }; - }; + var charAt$3 = uncurryThis$3(''.charAt); + var charCodeAt = uncurryThis$3(''.charCodeAt); + var stringSlice$2 = uncurryThis$3(''.slice); - var asyncIteratorIteration = { - toArray: createMethod$1(0), - forEach: createMethod$1(1), - every: createMethod$1(2), - some: createMethod$1(3), - find: createMethod$1(4) + var createMethod$1 = function (CONVERT_TO_STRING) { + return function ($this, pos) { + var S = toString$3(requireObjectCoercible$3($this)); + var position = toIntegerOrInfinity$1(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = charCodeAt(S, position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING + ? charAt$3(S, position) + : first + : CONVERT_TO_STRING + ? stringSlice$2(S, position, position + 2) + : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; }; - var $$5 = _export; - var $forEach$1 = asyncIteratorIteration.forEach; - - // `AsyncIterator.prototype.forEach` method - // https://github.com/tc39/proposal-async-iterator-helpers - $$5({ target: 'AsyncIterator', proto: true, real: true }, { - forEach: function forEach(fn) { - return $forEach$1(this, fn); - } - }); - - var isPrototypeOf$1 = objectIsPrototypeOf; - - var $TypeError$3 = TypeError; - - var anInstance$1 = function (it, Prototype) { - if (isPrototypeOf$1(Prototype, it)) return it; - throw $TypeError$3('Incorrect invocation'); + var stringMultibyte = { + // `String.prototype.codePointAt` method + // https://tc39.es/ecma262/#sec-string.prototype.codepointat + codeAt: createMethod$1(false), + // `String.prototype.at` method + // https://github.com/mathiasbynens/String.prototype.at + charAt: createMethod$1(true) }; - var fails$5 = fails$j; + var fails$6 = fails$k; - var correctPrototypeGetter = !fails$5(function () { + var correctPrototypeGetter = !fails$6(function () { function F() { /* empty */ } F.prototype.constructor = null; // eslint-disable-next-line es/no-object-getprototypeof -- required for testing return Object.getPrototypeOf(new F()) !== F.prototype; }); - var hasOwn$2 = hasOwnProperty_1; - var isCallable$5 = isCallable$j; - var toObject$2 = toObject$5; + var hasOwn$3 = hasOwnProperty_1; + var isCallable$6 = isCallable$j; + var toObject$1 = toObject$5; var sharedKey = sharedKey$3; var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter; @@ -2027,27 +1969,27 @@ // https://tc39.es/ecma262/#sec-object.getprototypeof // eslint-disable-next-line es/no-object-getprototypeof -- safe var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) { - var object = toObject$2(O); - if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO]; + var object = toObject$1(O); + if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO]; var constructor = object.constructor; - if (isCallable$5(constructor) && object instanceof constructor) { + if (isCallable$6(constructor) && object instanceof constructor) { return constructor.prototype; } return object instanceof $Object ? ObjectPrototype : null; }; - var fails$4 = fails$j; - var isCallable$4 = isCallable$j; - var isObject$2 = isObject$9; - var getPrototypeOf$1 = objectGetPrototypeOf; - var defineBuiltIn$1 = defineBuiltIn$5; - var wellKnownSymbol$9 = wellKnownSymbol$f; + var fails$5 = fails$k; + var isCallable$5 = isCallable$j; + var isObject$4 = isObject$c; + var getPrototypeOf$3 = objectGetPrototypeOf; + var defineBuiltIn$5 = defineBuiltIn$8; + var wellKnownSymbol$8 = wellKnownSymbol$i; - var ITERATOR$4 = wellKnownSymbol$9('iterator'); + var ITERATOR$2 = wellKnownSymbol$8('iterator'); var BUGGY_SAFARI_ITERATORS$1 = false; // `%IteratorPrototype%` object // https://tc39.es/ecma262/#sec-%iteratorprototype%-object - var IteratorPrototype$3, PrototypeOfArrayIteratorPrototype, arrayIterator; + var IteratorPrototype$4, PrototypeOfArrayIteratorPrototype, arrayIterator; /* eslint-disable es/no-array-prototype-keys -- safe */ if ([].keys) { @@ -2055,901 +1997,1333 @@ // Safari 8 has buggy iterators w/o `next` if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true; else { - PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator)); - if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$3 = PrototypeOfArrayIteratorPrototype; + PrototypeOfArrayIteratorPrototype = getPrototypeOf$3(getPrototypeOf$3(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$4 = PrototypeOfArrayIteratorPrototype; } } - var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$3) || fails$4(function () { + var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$4) || fails$5(function () { var test = {}; // FF44- legacy iterators case - return IteratorPrototype$3[ITERATOR$4].call(test) !== test; + return IteratorPrototype$4[ITERATOR$2].call(test) !== test; }); - if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$3 = {}; + if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$4 = {}; // `%IteratorPrototype%[@@iterator]()` method // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator - if (!isCallable$4(IteratorPrototype$3[ITERATOR$4])) { - defineBuiltIn$1(IteratorPrototype$3, ITERATOR$4, function () { + if (!isCallable$5(IteratorPrototype$4[ITERATOR$2])) { + defineBuiltIn$5(IteratorPrototype$4, ITERATOR$2, function () { return this; }); } var iteratorsCore = { - IteratorPrototype: IteratorPrototype$3, + IteratorPrototype: IteratorPrototype$4, BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1 }; - var $$4 = _export; - var global$2 = global$f; - var anInstance = anInstance$1; - var isCallable$3 = isCallable$j; - var createNonEnumerableProperty$2 = createNonEnumerableProperty$6; - var fails$3 = fails$j; - var hasOwn$1 = hasOwnProperty_1; - var wellKnownSymbol$8 = wellKnownSymbol$f; - var IteratorPrototype$2 = iteratorsCore.IteratorPrototype; + var defineProperty$1 = objectDefineProperty.f; + var hasOwn$2 = hasOwnProperty_1; + var wellKnownSymbol$7 = wellKnownSymbol$i; - var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag'); + var TO_STRING_TAG$3 = wellKnownSymbol$7('toStringTag'); - var NativeIterator = global$2.Iterator; + var setToStringTag$2 = function (target, TAG, STATIC) { + if (target && !STATIC) target = target.prototype; + if (target && !hasOwn$2(target, TO_STRING_TAG$3)) { + defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG }); + } + }; - // FF56- have non-standard global helper `Iterator` - var FORCED = !isCallable$3(NativeIterator) - || NativeIterator.prototype !== IteratorPrototype$2 - // FF44- non-standard `Iterator` passes previous tests - || !fails$3(function () { NativeIterator({}); }); + var IteratorPrototype$3 = iteratorsCore.IteratorPrototype; + var create$2 = objectCreate; + var createPropertyDescriptor = createPropertyDescriptor$4; + var setToStringTag$1 = setToStringTag$2; + var Iterators$1 = iterators; - var IteratorConstructor = function Iterator() { - anInstance(this, IteratorPrototype$2); + var returnThis$1 = function () { return this; }; + + var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { + var TO_STRING_TAG = NAME + ' Iterator'; + IteratorConstructor.prototype = create$2(IteratorPrototype$3, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) }); + setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false); + Iterators$1[TO_STRING_TAG] = returnThis$1; + return IteratorConstructor; }; - if (!hasOwn$1(IteratorPrototype$2, TO_STRING_TAG$1)) { - createNonEnumerableProperty$2(IteratorPrototype$2, TO_STRING_TAG$1, 'Iterator'); - } + var uncurryThis$2 = functionUncurryThis; + var aCallable$4 = aCallable$8; - if (FORCED || !hasOwn$1(IteratorPrototype$2, 'constructor') || IteratorPrototype$2.constructor === Object) { - createNonEnumerableProperty$2(IteratorPrototype$2, 'constructor', IteratorConstructor); - } + var functionUncurryThisAccessor = function (object, key, method) { + try { + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + return uncurryThis$2(aCallable$4(Object.getOwnPropertyDescriptor(object, key)[method])); + } catch (error) { /* empty */ } + }; - IteratorConstructor.prototype = IteratorPrototype$2; + var isObject$3 = isObject$c; - // `Iterator` constructor - // https://github.com/tc39/proposal-iterator-helpers - $$4({ global: true, constructor: true, forced: FORCED }, { - Iterator: IteratorConstructor - }); + var isPossiblePrototype$1 = function (argument) { + return isObject$3(argument) || argument === null; + }; - var uncurryThis$4 = functionUncurryThisClause; - var aCallable$3 = aCallable$7; - var NATIVE_BIND = functionBindNative; + var isPossiblePrototype = isPossiblePrototype$1; - var bind$3 = uncurryThis$4(uncurryThis$4.bind); + var $String = String; + var $TypeError$5 = TypeError; - // optional / simple context binding - var functionBindContext = function (fn, that) { - aCallable$3(fn); - return that === undefined ? fn : NATIVE_BIND ? bind$3(fn, that) : function (/* ...args */) { - return fn.apply(that, arguments); - }; + var aPossiblePrototype$1 = function (argument) { + if (isPossiblePrototype(argument)) return argument; + throw new $TypeError$5("Can't set " + $String(argument) + ' as a prototype'); }; - var iterators = {}; + /* eslint-disable no-proto -- safe */ + var uncurryThisAccessor = functionUncurryThisAccessor; + var isObject$2 = isObject$c; + var requireObjectCoercible$2 = requireObjectCoercible$6; + var aPossiblePrototype = aPossiblePrototype$1; - var wellKnownSymbol$7 = wellKnownSymbol$f; - var Iterators$3 = iterators; + // `Object.setPrototypeOf` method + // https://tc39.es/ecma262/#sec-object.setprototypeof + // Works with __proto__ only. Old v8 can't work with null proto objects. + // eslint-disable-next-line es/no-object-setprototypeof -- safe + var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set'); + setter(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + requireObjectCoercible$2(O); + aPossiblePrototype(proto); + if (!isObject$2(O)) return O; + if (CORRECT_SETTER) setter(O, proto); + else O.__proto__ = proto; + return O; + }; + }() : undefined); - var ITERATOR$3 = wellKnownSymbol$7('iterator'); - var ArrayPrototype = Array.prototype; + var $$5 = _export; + var call$d = functionCall; + var FunctionName = functionName; + var isCallable$4 = isCallable$j; + var createIteratorConstructor = iteratorCreateConstructor; + var getPrototypeOf$2 = objectGetPrototypeOf; + var setPrototypeOf = objectSetPrototypeOf; + var setToStringTag = setToStringTag$2; + var createNonEnumerableProperty$4 = createNonEnumerableProperty$7; + var defineBuiltIn$4 = defineBuiltIn$8; + var wellKnownSymbol$6 = wellKnownSymbol$i; + var Iterators = iterators; + var IteratorsCore = iteratorsCore; - // check on default Array iterator - var isArrayIteratorMethod$2 = function (it) { - return it !== undefined && (Iterators$3.Array === it || ArrayPrototype[ITERATOR$3] === it); - }; + var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER; + var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; + var IteratorPrototype$2 = IteratorsCore.IteratorPrototype; + var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; + var ITERATOR$1 = wellKnownSymbol$6('iterator'); + var KEYS = 'keys'; + var VALUES = 'values'; + var ENTRIES = 'entries'; - var classof$2 = classof$6; - var getMethod$1 = getMethod$6; - var isNullOrUndefined = isNullOrUndefined$5; - var Iterators$2 = iterators; - var wellKnownSymbol$6 = wellKnownSymbol$f; + var returnThis = function () { return this; }; - var ITERATOR$2 = wellKnownSymbol$6('iterator'); + var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor(IteratorConstructor, NAME, next); - var getIteratorMethod$3 = function (it) { - if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$2) - || getMethod$1(it, '@@iterator') - || Iterators$2[classof$2(it)]; - }; + var getIterationMethod = function (KIND) { + if (KIND === DEFAULT && defaultIterator) return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND]; - var call$4 = functionCall; - var aCallable$2 = aCallable$7; - var anObject$5 = anObject$f; - var tryToString$1 = tryToString$3; - var getIteratorMethod$2 = getIteratorMethod$3; + switch (KIND) { + case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; + case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; + case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; + } - var $TypeError$2 = TypeError; + return function () { return new IteratorConstructor(this); }; + }; - var getIterator$2 = function (argument, usingIterator) { - var iteratorMethod = arguments.length < 2 ? getIteratorMethod$2(argument) : usingIterator; - if (aCallable$2(iteratorMethod)) return anObject$5(call$4(iteratorMethod, argument)); - throw $TypeError$2(tryToString$1(argument) + ' is not iterable'); + var TO_STRING_TAG = NAME + ' Iterator'; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR$1] + || IterablePrototype['@@iterator'] + || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + + // fix native + if (anyNativeIterator) { + CurrentIteratorPrototype = getPrototypeOf$2(anyNativeIterator.call(new Iterable())); + if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { + if (getPrototypeOf$2(CurrentIteratorPrototype) !== IteratorPrototype$2) { + if (setPrototypeOf) { + setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2); + } else if (!isCallable$4(CurrentIteratorPrototype[ITERATOR$1])) { + defineBuiltIn$4(CurrentIteratorPrototype, ITERATOR$1, returnThis); + } + } + // Set @@toStringTag to native iterators + setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true); + } + } + + // fix Array.prototype.{ values, @@iterator }.name in V8 / FF + if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) { + if (CONFIGURABLE_FUNCTION_NAME) { + createNonEnumerableProperty$4(IterablePrototype, 'name', VALUES); + } else { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { return call$d(nativeIterator, this); }; + } + } + + // export additional methods + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + defineBuiltIn$4(IterablePrototype, KEY, methods[KEY]); + } + } else $$5({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); + } + + // define iterator + if (IterablePrototype[ITERATOR$1] !== defaultIterator) { + defineBuiltIn$4(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT }); + } + Iterators[NAME] = defaultIterator; + + return methods; }; - var call$3 = functionCall; - var anObject$4 = anObject$f; - var getMethod = getMethod$6; + // `CreateIterResultObject` abstract operation + // https://tc39.es/ecma262/#sec-createiterresultobject + var createIterResultObject$4 = function (value, done) { + return { value: value, done: done }; + }; - var iteratorClose$2 = function (iterator, kind, value) { - var innerResult, innerError; - anObject$4(iterator); - try { - innerResult = getMethod(iterator, 'return'); - if (!innerResult) { - if (kind === 'throw') throw value; - return value; + var charAt$2 = stringMultibyte.charAt; + var toString$2 = toString$5; + var InternalStateModule$2 = internalState; + var defineIterator = iteratorDefine; + var createIterResultObject$3 = createIterResultObject$4; + + var STRING_ITERATOR = 'String Iterator'; + var setInternalState$2 = InternalStateModule$2.set; + var getInternalState = InternalStateModule$2.getterFor(STRING_ITERATOR); + + // `String.prototype[@@iterator]` method + // https://tc39.es/ecma262/#sec-string.prototype-@@iterator + defineIterator(String, 'String', function (iterated) { + setInternalState$2(this, { + type: STRING_ITERATOR, + string: toString$2(iterated), + index: 0 + }); + // `%StringIteratorPrototype%.next` method + // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next + }, function next() { + var state = getInternalState(this); + var string = state.string; + var index = state.index; + var point; + if (index >= string.length) return createIterResultObject$3(undefined, true); + point = charAt$2(string, index); + state.index += point.length; + return createIterResultObject$3(point, false); + }); + + // TODO: Remove from `core-js@4` since it's moved to entry points + + var call$c = functionCall; + var defineBuiltIn$3 = defineBuiltIn$8; + var regexpExec$1 = regexpExec$2; + var fails$4 = fails$k; + var wellKnownSymbol$5 = wellKnownSymbol$i; + var createNonEnumerableProperty$3 = createNonEnumerableProperty$7; + + var SPECIES = wellKnownSymbol$5('species'); + var RegExpPrototype$2 = RegExp.prototype; + + var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) { + var SYMBOL = wellKnownSymbol$5(KEY); + + var DELEGATES_TO_SYMBOL = !fails$4(function () { + // String methods call symbol-named RegExp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) !== 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$4(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + + if (KEY === 'split') { + // We can't use real regex here since it causes deoptimization + // and serious performance degradation in V8 + // https://github.com/zloirock/core-js/issues/306 + re = {}; + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + re.flags = ''; + re[SYMBOL] = /./[SYMBOL]; } - innerResult = call$3(innerResult, iterator); - } catch (error) { - innerError = true; - innerResult = error; + + re.exec = function () { + execCalled = true; + return null; + }; + + re[SYMBOL](''); + return !execCalled; + }); + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + FORCED + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + var $exec = regexp.exec; + if ($exec === regexpExec$1 || $exec === RegExpPrototype$2.exec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: call$c(nativeRegExpMethod, regexp, str, arg2) }; + } + return { done: true, value: call$c(nativeMethod, str, regexp, arg2) }; + } + return { done: false }; + }); + + defineBuiltIn$3(String.prototype, KEY, methods[0]); + defineBuiltIn$3(RegExpPrototype$2, SYMBOL, methods[1]); } - if (kind === 'throw') throw value; - if (innerError) throw innerResult; - anObject$4(innerResult); - return value; - }; - var bind$2 = functionBindContext; - var call$2 = functionCall; - var anObject$3 = anObject$f; - var tryToString = tryToString$3; - var isArrayIteratorMethod$1 = isArrayIteratorMethod$2; - var lengthOfArrayLike$3 = lengthOfArrayLike$5; - var isPrototypeOf = objectIsPrototypeOf; - var getIterator$1 = getIterator$2; - var getIteratorMethod$1 = getIteratorMethod$3; - var iteratorClose$1 = iteratorClose$2; + if (SHAM) createNonEnumerableProperty$3(RegExpPrototype$2[SYMBOL], 'sham', true); + }; - var $TypeError$1 = TypeError; + var charAt$1 = stringMultibyte.charAt; - var Result = function (stopped, result) { - this.stopped = stopped; - this.result = result; + // `AdvanceStringIndex` abstract operation + // https://tc39.es/ecma262/#sec-advancestringindex + var advanceStringIndex$2 = function (S, index, unicode) { + return index + (unicode ? charAt$1(S, index).length : 1); }; - var ResultPrototype = Result.prototype; + var call$b = functionCall; + var anObject$a = anObject$j; + var isCallable$3 = isCallable$j; + var classof = classofRaw$2; + var regexpExec = regexpExec$2; - var iterate$1 = function (iterable, unboundFunction, options) { - var that = options && options.that; - var AS_ENTRIES = !!(options && options.AS_ENTRIES); - var IS_RECORD = !!(options && options.IS_RECORD); - var IS_ITERATOR = !!(options && options.IS_ITERATOR); - var INTERRUPTED = !!(options && options.INTERRUPTED); - var fn = bind$2(unboundFunction, that); - var iterator, iterFn, index, length, result, next, step; + var $TypeError$4 = TypeError; - var stop = function (condition) { - if (iterator) iteratorClose$1(iterator, 'normal', condition); - return new Result(true, condition); - }; + // `RegExpExec` abstract operation + // https://tc39.es/ecma262/#sec-regexpexec + var regexpExecAbstract = function (R, S) { + var exec = R.exec; + if (isCallable$3(exec)) { + var result = call$b(exec, R, S); + if (result !== null) anObject$a(result); + return result; + } + if (classof(R) === 'RegExp') return call$b(regexpExec, R, S); + throw new $TypeError$4('RegExp#exec called on incompatible receiver'); + }; - var callFn = function (value) { - if (AS_ENTRIES) { - anObject$3(value); - return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); - } return INTERRUPTED ? fn(value, stop) : fn(value); - }; + var call$a = functionCall; + var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic; + var anObject$9 = anObject$j; + var isNullOrUndefined$1 = isNullOrUndefined$5; + var toLength$1 = toLength$3; + var toString$1 = toString$5; + var requireObjectCoercible$1 = requireObjectCoercible$6; + var getMethod$4 = getMethod$8; + var advanceStringIndex$1 = advanceStringIndex$2; + var regExpExec$1 = regexpExecAbstract; - if (IS_RECORD) { - iterator = iterable.iterator; - } else if (IS_ITERATOR) { - iterator = iterable; - } else { - iterFn = getIteratorMethod$1(iterable); - if (!iterFn) throw $TypeError$1(tryToString(iterable) + ' is not iterable'); - // optimisation for array iterators - if (isArrayIteratorMethod$1(iterFn)) { - for (index = 0, length = lengthOfArrayLike$3(iterable); length > index; index++) { - result = callFn(iterable[index]); - if (result && isPrototypeOf(ResultPrototype, result)) return result; - } return new Result(false); - } - iterator = getIterator$1(iterable, iterFn); - } + // @@match logic + fixRegExpWellKnownSymbolLogic$1('match', function (MATCH, nativeMatch, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.es/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = requireObjectCoercible$1(this); + var matcher = isNullOrUndefined$1(regexp) ? undefined : getMethod$4(regexp, MATCH); + return matcher ? call$a(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$1(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@match + function (string) { + var rx = anObject$9(this); + var S = toString$1(string); + var res = maybeCallNative(nativeMatch, rx, S); - next = IS_RECORD ? iterable.next : iterator.next; - while (!(step = call$2(next, iterator)).done) { - try { - result = callFn(step.value); - } catch (error) { - iteratorClose$1(iterator, 'throw', error); - } - if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result; - } return new Result(false); - }; + if (res.done) return res.value; - var $$3 = _export; - var iterate = iterate$1; - var aCallable$1 = aCallable$7; - var anObject$2 = anObject$f; - var getIteratorDirect = getIteratorDirect$2; + if (!rx.global) return regExpExec$1(rx, S); - // `Iterator.prototype.forEach` method - // https://github.com/tc39/proposal-iterator-helpers - $$3({ target: 'Iterator', proto: true, real: true }, { - forEach: function forEach(fn) { - anObject$2(this); - aCallable$1(fn); - var record = getIteratorDirect(this); - var counter = 0; - iterate(record, function (value) { - fn(value, counter++); - }, { IS_RECORD: true }); - } + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec$1(rx, S)) !== null) { + var matchStr = toString$1(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; }); - // iterable DOM collections - // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods - var domIterables = { - CSSRuleList: 0, - CSSStyleDeclaration: 0, - CSSValueList: 0, - ClientRectList: 0, - DOMRectList: 0, - DOMStringList: 0, - DOMTokenList: 1, - DataTransferItemList: 0, - FileList: 0, - HTMLAllCollection: 0, - HTMLCollection: 0, - HTMLFormElement: 0, - HTMLSelectElement: 0, - MediaList: 0, - MimeTypeArray: 0, - NamedNodeMap: 0, - NodeList: 1, - PaintRequestList: 0, - Plugin: 0, - PluginArray: 0, - SVGLengthList: 0, - SVGNumberList: 0, - SVGPathSegList: 0, - SVGPointList: 0, - SVGStringList: 0, - SVGTransformList: 0, - SourceBufferList: 0, - StyleSheetList: 0, - TextTrackCueList: 0, - TextTrackList: 0, - TouchList: 0 - }; + var NATIVE_BIND = functionBindNative; - // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` - var documentCreateElement = documentCreateElement$2; + var FunctionPrototype = Function.prototype; + var apply$1 = FunctionPrototype.apply; + var call$9 = FunctionPrototype.call; - var classList = documentCreateElement('span').classList; - var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype; + // eslint-disable-next-line es/no-reflect -- safe + var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$9.bind(apply$1) : function () { + return call$9.apply(apply$1, arguments); + }); - var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1; + var uncurryThis$1 = functionUncurryThis; + var toObject = toObject$5; - var classof$1 = classofRaw$2; + var floor = Math.floor; + var charAt = uncurryThis$1(''.charAt); + var replace = uncurryThis$1(''.replace); + var stringSlice$1 = uncurryThis$1(''.slice); + // eslint-disable-next-line redos/no-vulnerable -- safe + var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; - // `IsArray` abstract operation - // https://tc39.es/ecma262/#sec-isarray - // eslint-disable-next-line es/no-array-isarray -- safe - var isArray$2 = Array.isArray || function isArray(argument) { - return classof$1(argument) == 'Array'; + // `GetSubstitution` abstract operation + // https://tc39.es/ecma262/#sec-getsubstitution + var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return replace(replacement, symbols, function (match, ch) { + var capture; + switch (charAt(ch, 0)) { + case '$': return '$'; + case '&': return matched; + case '`': return stringSlice$1(str, 0, position); + case "'": return stringSlice$1(str, tailPos); + case '<': + capture = namedCaptures[stringSlice$1(ch, 1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); }; - var uncurryThis$3 = functionUncurryThis; - var fails$2 = fails$j; + var apply = functionApply; + var call$8 = functionCall; + var uncurryThis = functionUncurryThis; + var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic; + var fails$3 = fails$k; + var anObject$8 = anObject$j; var isCallable$2 = isCallable$j; - var classof = classof$6; - var getBuiltIn = getBuiltIn$6; - var inspectSource = inspectSource$2; + var isNullOrUndefined = isNullOrUndefined$5; + var toIntegerOrInfinity = toIntegerOrInfinity$4; + var toLength = toLength$3; + var toString = toString$5; + var requireObjectCoercible = requireObjectCoercible$6; + var advanceStringIndex = advanceStringIndex$2; + var getMethod$3 = getMethod$8; + var getSubstitution = getSubstitution$1; + var regExpExec = regexpExecAbstract; + var wellKnownSymbol$4 = wellKnownSymbol$i; - var noop = function () { /* empty */ }; - var empty = []; - var construct = getBuiltIn('Reflect', 'construct'); - var constructorRegExp = /^\s*(?:class|function)\b/; - var exec = uncurryThis$3(constructorRegExp.exec); - var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); + var REPLACE = wellKnownSymbol$4('replace'); + var max = Math.max; + var min = Math.min; + var concat = uncurryThis([].concat); + var push = uncurryThis([].push); + var stringIndexOf = uncurryThis(''.indexOf); + var stringSlice = uncurryThis(''.slice); - var isConstructorModern = function isConstructor(argument) { - if (!isCallable$2(argument)) return false; - try { - construct(noop, empty, argument); - return true; - } catch (error) { - return false; - } + var maybeToString = function (it) { + return it === undefined ? it : String(it); }; - var isConstructorLegacy = function isConstructor(argument) { - if (!isCallable$2(argument)) return false; - switch (classof(argument)) { - case 'AsyncFunction': - case 'GeneratorFunction': - case 'AsyncGeneratorFunction': return false; - } - try { - // we can't check .prototype since constructors produced by .bind haven't it - // `Function#toString` throws on some built-it function in some legacy engines - // (for example, `DOMQuad` and similar in FF41-) - return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument)); - } catch (error) { - return true; + // IE <= 11 replaces $0 with the whole match, as if it was $& + // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 + var REPLACE_KEEPS_$0 = (function () { + // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing + return 'a'.replace(/./, '$0') === '$0'; + })(); + + // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string + var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { + if (/./[REPLACE]) { + return /./[REPLACE]('a', '$0') === ''; } - }; + return false; + })(); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$3(function () { + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive + return ''.replace(re, '$') !== '7'; + }); - isConstructorLegacy.sham = true; + // @@replace logic + fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { + var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; - // `IsConstructor` abstract operation - // https://tc39.es/ecma262/#sec-isconstructor - var isConstructor$3 = !construct || fails$2(function () { - var called; - return isConstructorModern(isConstructorModern.call) - || !isConstructorModern(Object) - || !isConstructorModern(function () { called = true; }) - || called; - }) ? isConstructorLegacy : isConstructorModern; + return [ + // `String.prototype.replace` method + // https://tc39.es/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = requireObjectCoercible(this); + var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod$3(searchValue, REPLACE); + return replacer + ? call$8(replacer, searchValue, O, replaceValue) + : call$8(nativeReplace, toString(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace + function (string, replaceValue) { + var rx = anObject$8(this); + var S = toString(string); - var isArray$1 = isArray$2; - var isConstructor$2 = isConstructor$3; - var isObject$1 = isObject$9; - var wellKnownSymbol$5 = wellKnownSymbol$f; + if ( + typeof replaceValue == 'string' && + stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 && + stringIndexOf(replaceValue, '$<') === -1 + ) { + var res = maybeCallNative(nativeReplace, rx, S, replaceValue); + if (res.done) return res.value; + } - var SPECIES$2 = wellKnownSymbol$5('species'); - var $Array$2 = Array; + var functionalReplace = isCallable$2(replaceValue); + if (!functionalReplace) replaceValue = toString(replaceValue); - // a part of `ArraySpeciesCreate` abstract operation - // https://tc39.es/ecma262/#sec-arrayspeciescreate - var arraySpeciesConstructor$1 = function (originalArray) { - var C; - if (isArray$1(originalArray)) { - C = originalArray.constructor; - // cross-realm fallback - if (isConstructor$2(C) && (C === $Array$2 || isArray$1(C.prototype))) C = undefined; - else if (isObject$1(C)) { - C = C[SPECIES$2]; - if (C === null) C = undefined; - } - } return C === undefined ? $Array$2 : C; - }; + var global = rx.global; + var fullUnicode; + if (global) { + fullUnicode = rx.unicode; + rx.lastIndex = 0; + } - var arraySpeciesConstructor = arraySpeciesConstructor$1; + var results = []; + var result; + while (true) { + result = regExpExec(rx, S); + if (result === null) break; - // `ArraySpeciesCreate` abstract operation - // https://tc39.es/ecma262/#sec-arrayspeciescreate - var arraySpeciesCreate$1 = function (originalArray, length) { - return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); - }; + push(results, result); + if (!global) break; - var bind$1 = functionBindContext; - var uncurryThis$2 = functionUncurryThis; - var IndexedObject = indexedObject; - var toObject$1 = toObject$5; - var lengthOfArrayLike$2 = lengthOfArrayLike$5; - var arraySpeciesCreate = arraySpeciesCreate$1; + var matchStr = toString(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } - var push = uncurryThis$2([].push); + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; - // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation - var createMethod = 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 IS_FILTER_REJECT = TYPE == 7; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function ($this, callbackfn, that, specificCreate) { - var O = toObject$1($this); - var self = IndexedObject(O); - var boundFunction = bind$1(callbackfn, that); - var length = lengthOfArrayLike$2(self); - var index = 0; - var create = specificCreate || arraySpeciesCreate; - var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; - var value, result; - for (;length > index; index++) if (NO_HOLES || index in self) { - value = self[index]; - result = boundFunction(value, index, O); - if (TYPE) { - if (IS_MAP) target[index] = result; // map - else if (result) switch (TYPE) { - case 3: return true; // some - case 5: return value; // find - case 6: return index; // findIndex - case 2: push(target, value); // filter - } else switch (TYPE) { - case 4: return false; // every - case 7: push(target, value); // filterReject + var matched = toString(result[0]); + var position = max(min(toIntegerOrInfinity(result.index), S.length), 0); + var captures = []; + var replacement; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = concat([matched], captures, position, S); + if (namedCaptures !== undefined) push(replacerArgs, namedCaptures); + replacement = toString(apply(replaceValue, undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; } } + + return accumulatedResult + stringSlice(S, nextSourcePosition); } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; - }; + ]; + }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE); + + var $TypeError$3 = TypeError; + var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991 + + var doesNotExceedSafeInteger$1 = function (it) { + if (it > MAX_SAFE_INTEGER) throw $TypeError$3('Maximum allowed index exceeded'); + return it; }; - var arrayIteration = { - // `Array.prototype.forEach` method - // https://tc39.es/ecma262/#sec-array.prototype.foreach - forEach: createMethod(0), - // `Array.prototype.map` method - // https://tc39.es/ecma262/#sec-array.prototype.map - map: createMethod(1), - // `Array.prototype.filter` method - // https://tc39.es/ecma262/#sec-array.prototype.filter - filter: createMethod(2), - // `Array.prototype.some` method - // https://tc39.es/ecma262/#sec-array.prototype.some - some: createMethod(3), - // `Array.prototype.every` method - // https://tc39.es/ecma262/#sec-array.prototype.every - every: createMethod(4), - // `Array.prototype.find` method - // https://tc39.es/ecma262/#sec-array.prototype.find - find: createMethod(5), - // `Array.prototype.findIndex` method - // https://tc39.es/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod(6), - // `Array.prototype.filterReject` method - // https://github.com/tc39/proposal-array-filtering - filterReject: createMethod(7) + // `GetIteratorDirect(obj)` abstract operation + // https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect + var getIteratorDirect$4 = function (obj) { + return { + iterator: obj, + next: obj.next, + done: false + }; }; - var fails$1 = fails$j; + var call$7 = functionCall; + var getBuiltIn$2 = getBuiltIn$7; + var getMethod$2 = getMethod$8; - var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) { - var method = [][METHOD_NAME]; - return !!method && fails$1(function () { - // eslint-disable-next-line no-useless-call -- required for testing - method.call(null, argument || function () { return 1; }, 1); - }); + var asyncIteratorClose = function (iterator, method, argument, reject) { + try { + var returnMethod = getMethod$2(iterator, 'return'); + if (returnMethod) { + return getBuiltIn$2('Promise').resolve(call$7(returnMethod, iterator)).then(function () { + method(argument); + }, function (error) { + reject(error); + }); + } + } catch (error2) { + return reject(error2); + } method(argument); }; - var $forEach = arrayIteration.forEach; - var arrayMethodIsStrict = arrayMethodIsStrict$1; + // https://github.com/tc39/proposal-iterator-helpers + // https://github.com/tc39/proposal-array-from-async + var call$6 = functionCall; + var aCallable$3 = aCallable$8; + var anObject$7 = anObject$j; + var isObject$1 = isObject$c; + var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1; + var getBuiltIn$1 = getBuiltIn$7; + var getIteratorDirect$3 = getIteratorDirect$4; + var closeAsyncIteration$1 = asyncIteratorClose; - var STRICT_METHOD = arrayMethodIsStrict('forEach'); + var createMethod = function (TYPE) { + var IS_TO_ARRAY = TYPE === 0; + var IS_FOR_EACH = TYPE === 1; + var IS_EVERY = TYPE === 2; + var IS_SOME = TYPE === 3; + return function (object, fn, target) { + anObject$7(object); + var MAPPING = fn !== undefined; + if (MAPPING || !IS_TO_ARRAY) aCallable$3(fn); + var record = getIteratorDirect$3(object); + var Promise = getBuiltIn$1('Promise'); + var iterator = record.iterator; + var next = record.next; + var counter = 0; - // `Array.prototype.forEach` method implementation - // https://tc39.es/ecma262/#sec-array.prototype.foreach - var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - // eslint-disable-next-line es/no-array-prototype-foreach -- safe - } : [].forEach; + return new Promise(function (resolve, reject) { + var ifAbruptCloseAsyncIterator = function (error) { + closeAsyncIteration$1(iterator, reject, error, reject); + }; - var global$1 = global$f; - var DOMIterables = domIterables; - var DOMTokenListPrototype = domTokenListPrototype; - var forEach = arrayForEach; - var createNonEnumerableProperty$1 = createNonEnumerableProperty$6; + var loop = function () { + try { + if (MAPPING) try { + doesNotExceedSafeInteger(counter); + } catch (error5) { ifAbruptCloseAsyncIterator(error5); } + Promise.resolve(anObject$7(call$6(next, iterator))).then(function (step) { + try { + if (anObject$7(step).done) { + if (IS_TO_ARRAY) { + target.length = counter; + resolve(target); + } else resolve(IS_SOME ? false : IS_EVERY || undefined); + } else { + var value = step.value; + try { + if (MAPPING) { + var result = fn(value, counter); - var handlePrototype = function (CollectionPrototype) { - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { - createNonEnumerableProperty$1(CollectionPrototype, 'forEach', forEach); - } catch (error) { - CollectionPrototype.forEach = forEach; - } + var handler = function ($result) { + if (IS_FOR_EACH) { + loop(); + } else if (IS_EVERY) { + $result ? loop() : closeAsyncIteration$1(iterator, resolve, false, reject); + } else if (IS_TO_ARRAY) { + try { + target[counter++] = $result; + loop(); + } catch (error4) { ifAbruptCloseAsyncIterator(error4); } + } else { + $result ? closeAsyncIteration$1(iterator, resolve, IS_SOME || value, reject) : loop(); + } + }; + + if (isObject$1(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator); + else handler(result); + } else { + target[counter++] = value; + loop(); + } + } catch (error3) { ifAbruptCloseAsyncIterator(error3); } + } + } catch (error2) { reject(error2); } + }, reject); + } catch (error) { reject(error); } + }; + + loop(); + }); + }; }; - for (var COLLECTION_NAME in DOMIterables) { - if (DOMIterables[COLLECTION_NAME]) { - handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype); - } - } + var asyncIteratorIteration = { + toArray: createMethod(0), + forEach: createMethod(1), + every: createMethod(2), + some: createMethod(3), + find: createMethod(4) + }; - handlePrototype(DOMTokenListPrototype); + var $$4 = _export; + var $forEach$1 = asyncIteratorIteration.forEach; - var anObject$1 = anObject$f; - var iteratorClose = iteratorClose$2; + // `AsyncIterator.prototype.forEach` method + // https://github.com/tc39/proposal-async-iterator-helpers + $$4({ target: 'AsyncIterator', proto: true, real: true }, { + forEach: function forEach(fn) { + return $forEach$1(this, fn); + } + }); - // call something on iterator step with safe closing on error - var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) { + var perform$1 = function (exec) { try { - return ENTRIES ? fn(anObject$1(value)[0], value[1]) : fn(value); + return { error: false, value: exec() }; } catch (error) { - iteratorClose(iterator, 'throw', error); + return { error: true, value: error }; } }; - var toPropertyKey = toPropertyKey$3; - var definePropertyModule = objectDefineProperty; - var createPropertyDescriptor$1 = createPropertyDescriptor$4; + var defineBuiltIn$2 = defineBuiltIn$8; - var createProperty$2 = function (object, key, value) { - var propertyKey = toPropertyKey(key); - if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor$1(0, value)); - else object[propertyKey] = value; + var defineBuiltIns$2 = function (target, src, options) { + for (var key in src) defineBuiltIn$2(target, key, src[key], options); + return target; }; - var bind = functionBindContext; - var call$1 = functionCall; - var toObject = toObject$5; - var callWithSafeIterationClosing = callWithSafeIterationClosing$1; - var isArrayIteratorMethod = isArrayIteratorMethod$2; - var isConstructor$1 = isConstructor$3; - var lengthOfArrayLike$1 = lengthOfArrayLike$5; - var createProperty$1 = createProperty$2; - var getIterator = getIterator$2; - var getIteratorMethod = getIteratorMethod$3; + var global$3 = global$g; + var shared = sharedStoreExports; + var isCallable$1 = isCallable$j; + var getPrototypeOf$1 = objectGetPrototypeOf; + var defineBuiltIn$1 = defineBuiltIn$8; + var wellKnownSymbol$3 = wellKnownSymbol$i; + + var USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR'; + var ASYNC_ITERATOR = wellKnownSymbol$3('asyncIterator'); + var AsyncIterator = global$3.AsyncIterator; + var PassedAsyncIteratorPrototype = shared.AsyncIteratorPrototype; + var AsyncIteratorPrototype$1, prototype; + + if (PassedAsyncIteratorPrototype) { + AsyncIteratorPrototype$1 = PassedAsyncIteratorPrototype; + } else if (isCallable$1(AsyncIterator)) { + AsyncIteratorPrototype$1 = AsyncIterator.prototype; + } else if (shared[USE_FUNCTION_CONSTRUCTOR] || global$3[USE_FUNCTION_CONSTRUCTOR]) { + try { + // eslint-disable-next-line no-new-func -- we have no alternatives without usage of modern syntax + prototype = getPrototypeOf$1(getPrototypeOf$1(getPrototypeOf$1(Function('return async function*(){}()')()))); + if (getPrototypeOf$1(prototype) === Object.prototype) AsyncIteratorPrototype$1 = prototype; + } catch (error) { /* empty */ } + } - var $Array$1 = Array; + if (!AsyncIteratorPrototype$1) AsyncIteratorPrototype$1 = {}; - // `Array.from` method implementation - // https://tc39.es/ecma262/#sec-array.from - var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var IS_CONSTRUCTOR = isConstructor$1(this); - var argumentsLength = arguments.length; - var mapfn = argumentsLength > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined); - var iteratorMethod = getIteratorMethod(O); - var index = 0; - var length, result, step, iterator, next, value; - // if the target is not iterable or it's an array with the default iterator - use a simple case - if (iteratorMethod && !(this === $Array$1 && isArrayIteratorMethod(iteratorMethod))) { - iterator = getIterator(O, iteratorMethod); - next = iterator.next; - result = IS_CONSTRUCTOR ? new this() : []; - for (;!(step = call$1(next, iterator)).done; index++) { - value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; - createProperty$1(result, index, value); - } - } else { - length = lengthOfArrayLike$1(O); - result = IS_CONSTRUCTOR ? new this(length) : $Array$1(length); - for (;length > index; index++) { - value = mapping ? mapfn(O[index], index) : O[index]; - createProperty$1(result, index, value); - } - } - result.length = index; - return result; - }; + if (!isCallable$1(AsyncIteratorPrototype$1[ASYNC_ITERATOR])) { + defineBuiltIn$1(AsyncIteratorPrototype$1, ASYNC_ITERATOR, function () { + return this; + }); + } - var wellKnownSymbol$4 = wellKnownSymbol$f; + var asyncIteratorPrototype = AsyncIteratorPrototype$1; - var ITERATOR$1 = wellKnownSymbol$4('iterator'); - var SAFE_CLOSING = false; + var call$5 = functionCall; + var perform = perform$1; + var anObject$6 = anObject$j; + var create$1 = objectCreate; + var createNonEnumerableProperty$2 = createNonEnumerableProperty$7; + var defineBuiltIns$1 = defineBuiltIns$2; + var wellKnownSymbol$2 = wellKnownSymbol$i; + var InternalStateModule$1 = internalState; + var getBuiltIn = getBuiltIn$7; + var getMethod$1 = getMethod$8; + var AsyncIteratorPrototype = asyncIteratorPrototype; + var createIterResultObject$2 = createIterResultObject$4; + var iteratorClose$2 = iteratorClose$4; + + var Promise$1 = getBuiltIn('Promise'); + + var TO_STRING_TAG$2 = wellKnownSymbol$2('toStringTag'); + var ASYNC_ITERATOR_HELPER = 'AsyncIteratorHelper'; + var WRAP_FOR_VALID_ASYNC_ITERATOR = 'WrapForValidAsyncIterator'; + var setInternalState$1 = InternalStateModule$1.set; + + var createAsyncIteratorProxyPrototype = function (IS_ITERATOR) { + var IS_GENERATOR = !IS_ITERATOR; + var getInternalState = InternalStateModule$1.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER); + + var getStateOrEarlyExit = function (that) { + var stateCompletion = perform(function () { + return getInternalState(that); + }); - try { - var called = 0; - var iteratorWithReturn = { - next: function () { - return { done: !!called++ }; + var stateError = stateCompletion.error; + var state = stateCompletion.value; + + if (stateError || (IS_GENERATOR && state.done)) { + return { exit: true, value: stateError ? Promise$1.reject(state) : Promise$1.resolve(createIterResultObject$2(undefined, true)) }; + } return { exit: false, value: state }; + }; + + return defineBuiltIns$1(create$1(AsyncIteratorPrototype), { + next: function next() { + var stateCompletion = getStateOrEarlyExit(this); + var state = stateCompletion.value; + if (stateCompletion.exit) return state; + var handlerCompletion = perform(function () { + return anObject$6(state.nextHandler(Promise$1)); + }); + var handlerError = handlerCompletion.error; + var value = handlerCompletion.value; + if (handlerError) state.done = true; + return handlerError ? Promise$1.reject(value) : Promise$1.resolve(value); }, 'return': function () { - SAFE_CLOSING = true; + var stateCompletion = getStateOrEarlyExit(this); + var state = stateCompletion.value; + if (stateCompletion.exit) return state; + state.done = true; + var iterator = state.iterator; + var returnMethod, result; + var completion = perform(function () { + if (state.inner) try { + iteratorClose$2(state.inner.iterator, 'normal'); + } catch (error) { + return iteratorClose$2(iterator, 'throw', error); + } + return getMethod$1(iterator, 'return'); + }); + returnMethod = result = completion.value; + if (completion.error) return Promise$1.reject(result); + if (returnMethod === undefined) return Promise$1.resolve(createIterResultObject$2(undefined, true)); + completion = perform(function () { + return call$5(returnMethod, iterator); + }); + result = completion.value; + if (completion.error) return Promise$1.reject(result); + return IS_ITERATOR ? Promise$1.resolve(result) : Promise$1.resolve(result).then(function (resolved) { + anObject$6(resolved); + return createIterResultObject$2(undefined, true); + }); } + }); + }; + + var WrapForValidAsyncIteratorPrototype = createAsyncIteratorProxyPrototype(true); + var AsyncIteratorHelperPrototype = createAsyncIteratorProxyPrototype(false); + + createNonEnumerableProperty$2(AsyncIteratorHelperPrototype, TO_STRING_TAG$2, 'Async Iterator Helper'); + + var asyncIteratorCreateProxy = function (nextHandler, IS_ITERATOR) { + var AsyncIteratorProxy = function AsyncIterator(record, state) { + if (state) { + state.iterator = record.iterator; + state.next = record.next; + } else state = record; + state.type = IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER; + state.nextHandler = nextHandler; + state.counter = 0; + state.done = false; + setInternalState$1(this, state); }; - iteratorWithReturn[ITERATOR$1] = function () { - return this; - }; - // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing - Array.from(iteratorWithReturn, function () { throw 2; }); - } catch (error) { /* empty */ } - var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) { - if (!SKIP_CLOSING && !SAFE_CLOSING) return false; - var ITERATION_SUPPORT = false; - try { - var object = {}; - object[ITERATOR$1] = function () { - return { - next: function () { - return { done: ITERATION_SUPPORT = true }; - } - }; - }; - exec(object); - } catch (error) { /* empty */ } - return ITERATION_SUPPORT; + AsyncIteratorProxy.prototype = IS_ITERATOR ? WrapForValidAsyncIteratorPrototype : AsyncIteratorHelperPrototype; + + return AsyncIteratorProxy; }; - var $$2 = _export; - var from = arrayFrom; - var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1; + var call$4 = functionCall; + var aCallable$2 = aCallable$8; + var anObject$5 = anObject$j; + var isObject = isObject$c; + var getIteratorDirect$2 = getIteratorDirect$4; + var createAsyncIteratorProxy = asyncIteratorCreateProxy; + var createIterResultObject$1 = createIterResultObject$4; + var closeAsyncIteration = asyncIteratorClose; - var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { - // eslint-disable-next-line es/no-array-from -- required for testing - Array.from(iterable); + var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { + var state = this; + var iterator = state.iterator; + var mapper = state.mapper; + + return new Promise(function (resolve, reject) { + var doneAndReject = function (error) { + state.done = true; + reject(error); + }; + + var ifAbruptCloseAsyncIterator = function (error) { + closeAsyncIteration(iterator, doneAndReject, error, doneAndReject); + }; + + Promise.resolve(anObject$5(call$4(state.next, iterator))).then(function (step) { + try { + if (anObject$5(step).done) { + state.done = true; + resolve(createIterResultObject$1(undefined, true)); + } else { + var value = step.value; + try { + var result = mapper(value, state.counter++); + + var handler = function (mapped) { + resolve(createIterResultObject$1(mapped, false)); + }; + + if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator); + else handler(result); + } catch (error2) { ifAbruptCloseAsyncIterator(error2); } + } + } catch (error) { doneAndReject(error); } + }, doneAndReject); + }); }); - // `Array.from` method - // https://tc39.es/ecma262/#sec-array.from - $$2({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { - from: from + // `AsyncIterator.prototype.map` method + // https://github.com/tc39/proposal-iterator-helpers + var asyncIteratorMap = function map(mapper) { + anObject$5(this); + aCallable$2(mapper); + return new AsyncIteratorProxy(getIteratorDirect$2(this), { + mapper: mapper + }); + }; + + var $$3 = _export; + var map$1 = asyncIteratorMap; + var IS_PURE$1 = isPure; + + // `AsyncIterator.prototype.map` method + // https://github.com/tc39/proposal-async-iterator-helpers + $$3({ target: 'AsyncIterator', proto: true, real: true, forced: IS_PURE$1 }, { + map: map$1 }); - var defineProperty = objectDefineProperty.f; - var hasOwn = hasOwnProperty_1; - var wellKnownSymbol$3 = wellKnownSymbol$f; + var isPrototypeOf$2 = objectIsPrototypeOf; - var TO_STRING_TAG = wellKnownSymbol$3('toStringTag'); + var $TypeError$2 = TypeError; - var setToStringTag$2 = function (target, TAG, STATIC) { - if (target && !STATIC) target = target.prototype; - if (target && !hasOwn(target, TO_STRING_TAG)) { - defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG }); - } + var anInstance$1 = function (it, Prototype) { + if (isPrototypeOf$2(Prototype, it)) return it; + throw new $TypeError$2('Incorrect invocation'); + }; + + var makeBuiltIn = makeBuiltInExports; + var defineProperty = objectDefineProperty; + + var defineBuiltInAccessor$1 = function (target, name, descriptor) { + if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true }); + if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true }); + return defineProperty.f(target, name, descriptor); }; + var $$2 = _export; + var global$2 = global$g; + var anInstance = anInstance$1; + var anObject$4 = anObject$j; + var isCallable = isCallable$j; + var getPrototypeOf = objectGetPrototypeOf; + var defineBuiltInAccessor = defineBuiltInAccessor$1; + var createProperty = createProperty$3; + var fails$2 = fails$k; + var hasOwn$1 = hasOwnProperty_1; + var wellKnownSymbol$1 = wellKnownSymbol$i; var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; - var create = objectCreate; - var createPropertyDescriptor = createPropertyDescriptor$4; - var setToStringTag$1 = setToStringTag$2; - var Iterators$1 = iterators; + var DESCRIPTORS = descriptors; - var returnThis$1 = function () { return this; }; + var CONSTRUCTOR = 'constructor'; + var ITERATOR = 'Iterator'; + var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag'); - var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { - var TO_STRING_TAG = NAME + ' Iterator'; - IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) }); - setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false); - Iterators$1[TO_STRING_TAG] = returnThis$1; - return IteratorConstructor; - }; + var $TypeError$1 = TypeError; + var NativeIterator = global$2[ITERATOR]; - var uncurryThis$1 = functionUncurryThis; - var aCallable = aCallable$7; + // FF56- have non-standard global helper `Iterator` + var FORCED = !isCallable(NativeIterator) + || NativeIterator.prototype !== IteratorPrototype$1 + // FF44- non-standard `Iterator` passes previous tests + || !fails$2(function () { NativeIterator({}); }); - var functionUncurryThisAccessor = function (object, key, method) { - try { - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe - return uncurryThis$1(aCallable(Object.getOwnPropertyDescriptor(object, key)[method])); - } catch (error) { /* empty */ } + var IteratorConstructor = function Iterator() { + anInstance(this, IteratorPrototype$1); + if (getPrototypeOf(this) === IteratorPrototype$1) throw new $TypeError$1('Abstract class Iterator not directly constructable'); }; - var isCallable$1 = isCallable$j; + var defineIteratorPrototypeAccessor = function (key, value) { + if (DESCRIPTORS) { + defineBuiltInAccessor(IteratorPrototype$1, key, { + configurable: true, + get: function () { + return value; + }, + set: function (replacement) { + anObject$4(this); + if (this === IteratorPrototype$1) throw new $TypeError$1("You can't redefine this property"); + if (hasOwn$1(this, key)) this[key] = replacement; + else createProperty(this, key, replacement); + } + }); + } else IteratorPrototype$1[key] = value; + }; - var $String = String; - var $TypeError = TypeError; + if (!hasOwn$1(IteratorPrototype$1, TO_STRING_TAG$1)) defineIteratorPrototypeAccessor(TO_STRING_TAG$1, ITERATOR); - var aPossiblePrototype$1 = function (argument) { - if (typeof argument == 'object' || isCallable$1(argument)) return argument; - throw $TypeError("Can't set " + $String(argument) + ' as a prototype'); - }; + if (FORCED || !hasOwn$1(IteratorPrototype$1, CONSTRUCTOR) || IteratorPrototype$1[CONSTRUCTOR] === Object) { + defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor); + } - /* eslint-disable no-proto -- safe */ + IteratorConstructor.prototype = IteratorPrototype$1; - var uncurryThisAccessor = functionUncurryThisAccessor; - var anObject = anObject$f; - var aPossiblePrototype = aPossiblePrototype$1; + // `Iterator` constructor + // https://github.com/tc39/proposal-iterator-helpers + $$2({ global: true, constructor: true, forced: FORCED }, { + Iterator: IteratorConstructor + }); - // `Object.setPrototypeOf` method - // https://tc39.es/ecma262/#sec-object.setprototypeof - // Works with __proto__ only. Old v8 can't work with null proto objects. - // eslint-disable-next-line es/no-object-setprototypeof -- safe - var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { - var CORRECT_SETTER = false; - var test = {}; - var setter; - try { - setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set'); - setter(test, []); - CORRECT_SETTER = test instanceof Array; - } catch (error) { /* empty */ } - return function setPrototypeOf(O, proto) { - anObject(O); - aPossiblePrototype(proto); - if (CORRECT_SETTER) setter(O, proto); - else O.__proto__ = proto; - return O; - }; - }() : undefined); + var bind = functionBindContext; + var call$3 = functionCall; + var anObject$3 = anObject$j; + var tryToString = tryToString$3; + var isArrayIteratorMethod = isArrayIteratorMethod$2; + var lengthOfArrayLike = lengthOfArrayLike$5; + var isPrototypeOf$1 = objectIsPrototypeOf; + var getIterator = getIterator$2; + var getIteratorMethod = getIteratorMethod$3; + var iteratorClose$1 = iteratorClose$4; - var $$1 = _export; - var call = functionCall; - var FunctionName = functionName; - var isCallable = isCallable$j; - var createIteratorConstructor = iteratorCreateConstructor; - var getPrototypeOf = objectGetPrototypeOf; - var setPrototypeOf = objectSetPrototypeOf; - var setToStringTag = setToStringTag$2; - var createNonEnumerableProperty = createNonEnumerableProperty$6; - var defineBuiltIn = defineBuiltIn$5; - var wellKnownSymbol$2 = wellKnownSymbol$f; - var Iterators = iterators; - var IteratorsCore = iteratorsCore; + var $TypeError = TypeError; - var PROPER_FUNCTION_NAME = FunctionName.PROPER; - var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; - var IteratorPrototype = IteratorsCore.IteratorPrototype; - var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; - var ITERATOR = wellKnownSymbol$2('iterator'); - var KEYS = 'keys'; - var VALUES = 'values'; - var ENTRIES = 'entries'; + var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; + }; - var returnThis = function () { return this; }; + var ResultPrototype = Result.prototype; - var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { - createIteratorConstructor(IteratorConstructor, NAME, next); + var iterate$1 = function (iterable, unboundFunction, options) { + var that = options && options.that; + var AS_ENTRIES = !!(options && options.AS_ENTRIES); + var IS_RECORD = !!(options && options.IS_RECORD); + var IS_ITERATOR = !!(options && options.IS_ITERATOR); + var INTERRUPTED = !!(options && options.INTERRUPTED); + var fn = bind(unboundFunction, that); + var iterator, iterFn, index, length, result, next, step; - var getIterationMethod = function (KIND) { - if (KIND === DEFAULT && defaultIterator) return defaultIterator; - if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; - switch (KIND) { - case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; - case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; - case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; - } return function () { return new IteratorConstructor(this); }; + var stop = function (condition) { + if (iterator) iteratorClose$1(iterator, 'normal', condition); + return new Result(true, condition); }; - var TO_STRING_TAG = NAME + ' Iterator'; - var INCORRECT_VALUES_NAME = false; - var IterablePrototype = Iterable.prototype; - var nativeIterator = IterablePrototype[ITERATOR] - || IterablePrototype['@@iterator'] - || DEFAULT && IterablePrototype[DEFAULT]; - var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); - var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; - var CurrentIteratorPrototype, methods, KEY; + var callFn = function (value) { + if (AS_ENTRIES) { + anObject$3(value); + return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); + } return INTERRUPTED ? fn(value, stop) : fn(value); + }; - // fix native - if (anyNativeIterator) { - CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); - if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { - if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { - if (setPrototypeOf) { - setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); - } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) { - defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis); - } - } - // Set @@toStringTag to native iterators - setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true); + if (IS_RECORD) { + iterator = iterable.iterator; + } else if (IS_ITERATOR) { + iterator = iterable; + } else { + iterFn = getIteratorMethod(iterable); + if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable'); + // optimisation for array iterators + if (isArrayIteratorMethod(iterFn)) { + for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) { + result = callFn(iterable[index]); + if (result && isPrototypeOf$1(ResultPrototype, result)) return result; + } return new Result(false); } + iterator = getIterator(iterable, iterFn); } - // fix Array.prototype.{ values, @@iterator }.name in V8 / FF - if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { - if (CONFIGURABLE_FUNCTION_NAME) { - createNonEnumerableProperty(IterablePrototype, 'name', VALUES); - } else { - INCORRECT_VALUES_NAME = true; - defaultIterator = function values() { return call(nativeIterator, this); }; + next = IS_RECORD ? iterable.next : iterator.next; + while (!(step = call$3(next, iterator)).done) { + try { + result = callFn(step.value); + } catch (error) { + iteratorClose$1(iterator, 'throw', error); } - } + if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result; + } return new Result(false); + }; - // export additional methods - if (DEFAULT) { - methods = { - values: getIterationMethod(VALUES), - keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), - entries: getIterationMethod(ENTRIES) - }; - if (FORCED) for (KEY in methods) { - if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { - defineBuiltIn(IterablePrototype, KEY, methods[KEY]); - } - } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); - } + var $$1 = _export; + var iterate = iterate$1; + var aCallable$1 = aCallable$8; + var anObject$2 = anObject$j; + var getIteratorDirect$1 = getIteratorDirect$4; - // define iterator - if (IterablePrototype[ITERATOR] !== defaultIterator) { - defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT }); + // `Iterator.prototype.forEach` method + // https://github.com/tc39/proposal-iterator-helpers + $$1({ target: 'Iterator', proto: true, real: true }, { + forEach: function forEach(fn) { + anObject$2(this); + aCallable$1(fn); + var record = getIteratorDirect$1(this); + var counter = 0; + iterate(record, function (value) { + fn(value, counter++); + }, { IS_RECORD: true }); } - Iterators[NAME] = defaultIterator; + }); - return methods; - }; + var call$2 = functionCall; + var create = objectCreate; + var createNonEnumerableProperty$1 = createNonEnumerableProperty$7; + var defineBuiltIns = defineBuiltIns$2; + var wellKnownSymbol = wellKnownSymbol$i; + var InternalStateModule = internalState; + var getMethod = getMethod$8; + var IteratorPrototype = iteratorsCore.IteratorPrototype; + var createIterResultObject = createIterResultObject$4; + var iteratorClose = iteratorClose$4; + + var TO_STRING_TAG = wellKnownSymbol('toStringTag'); + var ITERATOR_HELPER = 'IteratorHelper'; + var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator'; + var setInternalState = InternalStateModule.set; - // `CreateIterResultObject` abstract operation - // https://tc39.es/ecma262/#sec-createiterresultobject - var createIterResultObject$1 = function (value, done) { - return { value: value, done: done }; + var createIteratorProxyPrototype = function (IS_ITERATOR) { + var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER); + + return defineBuiltIns(create(IteratorPrototype), { + next: function next() { + var state = getInternalState(this); + // for simplification: + // for `%WrapForValidIteratorPrototype%.next` our `nextHandler` returns `IterResultObject` + // for `%IteratorHelperPrototype%.next` - just a value + if (IS_ITERATOR) return state.nextHandler(); + try { + var result = state.done ? undefined : state.nextHandler(); + return createIterResultObject(result, state.done); + } catch (error) { + state.done = true; + throw error; + } + }, + 'return': function () { + var state = getInternalState(this); + var iterator = state.iterator; + state.done = true; + if (IS_ITERATOR) { + var returnMethod = getMethod(iterator, 'return'); + return returnMethod ? call$2(returnMethod, iterator) : createIterResultObject(undefined, true); + } + if (state.inner) try { + iteratorClose(state.inner.iterator, 'normal'); + } catch (error) { + return iteratorClose(iterator, 'throw', error); + } + iteratorClose(iterator, 'normal'); + return createIterResultObject(undefined, true); + } + }); }; - var charAt = stringMultibyte.charAt; - var toString = toString$6; - var InternalStateModule = internalState; - var defineIterator = iteratorDefine; - var createIterResultObject = createIterResultObject$1; + var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true); + var IteratorHelperPrototype = createIteratorProxyPrototype(false); + + createNonEnumerableProperty$1(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper'); + + var iteratorCreateProxy = function (nextHandler, IS_ITERATOR) { + var IteratorProxy = function Iterator(record, state) { + if (state) { + state.iterator = record.iterator; + state.next = record.next; + } else state = record; + state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER; + state.nextHandler = nextHandler; + state.counter = 0; + state.done = false; + setInternalState(this, state); + }; - var STRING_ITERATOR = 'String Iterator'; - var setInternalState = InternalStateModule.set; - var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); + IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype; - // `String.prototype[@@iterator]` method - // https://tc39.es/ecma262/#sec-string.prototype-@@iterator - defineIterator(String, 'String', function (iterated) { - setInternalState(this, { - type: STRING_ITERATOR, - string: toString(iterated), - index: 0 + return IteratorProxy; + }; + + var call$1 = functionCall; + var aCallable = aCallable$8; + var anObject$1 = anObject$j; + var getIteratorDirect = getIteratorDirect$4; + var createIteratorProxy = iteratorCreateProxy; + var callWithSafeIterationClosing = callWithSafeIterationClosing$2; + + var IteratorProxy = createIteratorProxy(function () { + var iterator = this.iterator; + var result = anObject$1(call$1(this.next, iterator)); + var done = this.done = !!result.done; + if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true); + }); + + // `Iterator.prototype.map` method + // https://github.com/tc39/proposal-iterator-helpers + var iteratorMap = function map(mapper) { + anObject$1(this); + aCallable(mapper); + return new IteratorProxy(getIteratorDirect(this), { + mapper: mapper }); - // `%StringIteratorPrototype%.next` method - // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next - }, function next() { - var state = getInternalState(this); - var string = state.string; - var index = state.index; - var point; - if (index >= string.length) return createIterResultObject(undefined, true); - point = charAt(string, index); - state.index += point.length; - return createIterResultObject(point, false); + }; + + var $ = _export; + var map = iteratorMap; + var IS_PURE = isPure; + + // `Iterator.prototype.map` method + // https://github.com/tc39/proposal-iterator-helpers + $({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, { + map: map }); - var fails = fails$j; - var wellKnownSymbol$1 = wellKnownSymbol$f; - var V8_VERSION = engineV8Version; + // iterable DOM collections + // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods + var domIterables = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 + }; - var SPECIES$1 = wellKnownSymbol$1('species'); + // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` + var documentCreateElement = documentCreateElement$2; - var arrayMethodHasSpeciesSupport$1 = function (METHOD_NAME) { - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/677 - return V8_VERSION >= 51 || !fails(function () { - var array = []; - var constructor = array.constructor = {}; - constructor[SPECIES$1] = function () { - return { foo: 1 }; - }; - return array[METHOD_NAME](Boolean).foo !== 1; + var classList = documentCreateElement('span').classList; + var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype; + + var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1; + + var fails$1 = fails$k; + + var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) { + var method = [][METHOD_NAME]; + return !!method && fails$1(function () { + // eslint-disable-next-line no-useless-call -- required for testing + method.call(null, argument || function () { return 1; }, 1); }); }; - var uncurryThis = functionUncurryThis; + var $forEach = arrayIteration.forEach; + var arrayMethodIsStrict = arrayMethodIsStrict$1; - var arraySlice = uncurryThis([].slice); + var STRICT_METHOD = arrayMethodIsStrict('forEach'); - var $ = _export; - var isArray = isArray$2; - var isConstructor = isConstructor$3; - var isObject = isObject$9; - var toAbsoluteIndex = toAbsoluteIndex$2; - var lengthOfArrayLike = lengthOfArrayLike$5; - var toIndexedObject = toIndexedObject$5; - var createProperty = createProperty$2; - var wellKnownSymbol = wellKnownSymbol$f; - var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$1; - var nativeSlice = arraySlice; + // `Array.prototype.forEach` method implementation + // https://tc39.es/ecma262/#sec-array.prototype.foreach + var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + // eslint-disable-next-line es/no-array-prototype-foreach -- safe + } : [].forEach; - var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); + var global$1 = global$g; + var DOMIterables = domIterables; + var DOMTokenListPrototype = domTokenListPrototype; + var forEach = arrayForEach; + var createNonEnumerableProperty = createNonEnumerableProperty$7; - var SPECIES = wellKnownSymbol('species'); - var $Array = Array; - var max = Math.max; + var handlePrototype = function (CollectionPrototype) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { + createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); + } catch (error) { + CollectionPrototype.forEach = forEach; + } + }; - // `Array.prototype.slice` method - // https://tc39.es/ecma262/#sec-array.prototype.slice - // fallback for not array-like ES3 strings and DOM objects - $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { - slice: function slice(start, end) { - var O = toIndexedObject(this); - var length = lengthOfArrayLike(O); - var k = toAbsoluteIndex(start, length); - var fin = toAbsoluteIndex(end === undefined ? length : end, length); - // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible - var Constructor, result, n; - if (isArray(O)) { - Constructor = O.constructor; - // cross-realm fallback - if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) { - Constructor = undefined; - } else if (isObject(Constructor)) { - Constructor = Constructor[SPECIES]; - if (Constructor === null) Constructor = undefined; - } - if (Constructor === $Array || Constructor === undefined) { - return nativeSlice(O, k, fin); - } - } - result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0)); - for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); - result.length = n; - return result; + for (var COLLECTION_NAME in DOMIterables) { + if (DOMIterables[COLLECTION_NAME]) { + handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype); } - }); + } + + handlePrototype(DOMTokenListPrototype); var MDTP_DATA = '_mdtimepicker'; @@ -3013,6 +3387,45 @@ } }; + var call = functionCall; + var hasOwn = hasOwnProperty_1; + var isPrototypeOf = objectIsPrototypeOf; + var regExpFlags = regexpFlags$1; + + var RegExpPrototype$1 = RegExp.prototype; + + var regexpGetFlags = function (R) { + var flags = R.flags; + return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R) + ? call(regExpFlags, R) : flags; + }; + + var PROPER_FUNCTION_NAME = functionName.PROPER; + var defineBuiltIn = defineBuiltIn$8; + var anObject = anObject$j; + var $toString = toString$5; + var fails = fails$k; + var getRegExpFlags = regexpGetFlags; + + var TO_STRING = 'toString'; + 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 + var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING; + + // `RegExp.prototype.toString` method + // https://tc39.es/ecma262/#sec-regexp.prototype.tostring + if (NOT_GENERIC || INCORRECT_NAME) { + defineBuiltIn(RegExpPrototype, TO_STRING, function toString() { + var R = anObject(this); + var pattern = $toString(R.source); + var flags = $toString(getRegExpFlags(R)); + return '/' + pattern + '/' + flags; + }, { unsafe: true }); + } + /** * Helper functions */ @@ -3170,7 +3583,7 @@ this.hour = hour; this.minute = minute; } - _createClass(Time, [{ + return _createClass(Time, [{ key: "setHour", value: function setHour(value) { this.hour = value; @@ -3224,16 +3637,11 @@ }); } }]); - return Time; }(); /** * Time picker class */ var MDTimePicker = /*#__PURE__*/function () { - /** - * Default configurations - */ - /** * Creates a time picker object * @param {HTMLInputElement} el Input element @@ -3411,7 +3819,7 @@ /** * Setup time picker html elements */ - _createClass(MDTimePicker, [{ + return _createClass(MDTimePicker, [{ key: "_setup", value: function _setup() { var _ = this, @@ -3423,6 +3831,11 @@ hf.appendTo([time.hour, time.dots, time.minute], time.wrapper); hf.appendTo(time.wrapper, wrapper); if (!_.config.is24hour) hf.appendTo(time.am_pm, time.wrapper); + var isMouseDown = false; + var hasStartingTouchElementChanged = false; + var getDataSetFromHandElement = function getDataSetFromHandElement(el) { + return (el.tagName === "SPAN" ? el.parentNode : el).dataset; + }; // Setup hours var _hours = _.config.is24hour ? 24 : 12; @@ -3437,17 +3850,84 @@ hourInner = hf.createElem('span', null, is24 ? '00' : value); hf.appendTo(hourInner, hour); if (_.config.is24hour && value < 13) hour.classList.add('inner--digit'); - hf.addEvent(hourInner, 'click', function () { - var _hour = parseInt(this.parentNode.dataset.hour), + hour.mdtpTouchable = true; + hourInner.mdtpTouchable = true; + var onTouchStart = function onTouchStart(event) { + var _event$target; + event.preventDefault(); + isMouseDown = true; + if (((_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.mdtpTouchable) !== true) return; + hasStartingTouchElementChanged = false; + var _hour = parseInt(getDataSetFromHandElement(event.target).hour), + _selectedT = _.selected.getPeriod(), + _value = _.config.is24hour ? _hour : (_hour + (_selectedT === 'PM' && _hour < 12 || _selectedT === 'AM' && _hour === 12 ? 12 : 0)) % 24, + disabled = _.isDisabled(_value, 0, true); + if (disabled) return; + _.setHour(_value); + }; + var onTouchMove = function onTouchMove(event) { + event.preventDefault(); + if (!isMouseDown) return; + var touch = event.targetTouches[0]; + var target = document.elementFromPoint(touch.clientX, touch.clientY); + if ((target === null || target === void 0 ? void 0 : target.mdtpTouchable) !== true) return; + if (event.target !== target) hasStartingTouchElementChanged = true; + var _hour = parseInt(getDataSetFromHandElement(target).hour), _selectedT = _.selected.getPeriod(), _value = _.config.is24hour ? _hour : (_hour + (_selectedT === 'PM' && _hour < 12 || _selectedT === 'AM' && _hour === 12 ? 12 : 0)) % 24, disabled = _.isDisabled(_value, 0, true); if (disabled) return; _.setHour(_value); + }; + var onMouseMove = function onMouseMove(event) { + if (!isMouseDown) return; + var _hour = parseInt(getDataSetFromHandElement(event.target).hour), + _selectedT = _.selected.getPeriod(), + _value = _.config.is24hour ? _hour : (_hour + (_selectedT === 'PM' && _hour < 12 || _selectedT === 'AM' && _hour === 12 ? 12 : 0)) % 24, + disabled = _.isDisabled(_value, 0, true); + if (disabled) return; + _.setHour(_value); + }; + var onClick = function onClick(event) { + var _hour = parseInt(getDataSetFromHandElement(event.target).hour), + _selectedT = _.selected.getPeriod(), + _value = _.config.is24hour ? _hour : (_hour + (_selectedT === 'PM' && _hour < 12 || _selectedT === 'AM' && _hour === 12 ? 12 : 0)) % 24, + disabled = _.isDisabled(_value, 0, true); + if (disabled) return; + isMouseDown = false; + _.setHour(_value); _._switchView('minutes'); - }); + }; + var onTouchEnd = function onTouchEnd(event) { + event.preventDefault(); + isMouseDown = false; + if (!hasStartingTouchElementChanged) _._switchView('minutes'); + }; + hf.addEvent(hourInner, 'click', onClick); + hf.addEvent(hourInner, 'mousemove', onMouseMove); + hf.addEvent(hourInner, 'touchmove', onTouchMove); + hf.addEvent(hourInner, 'touchstart', onTouchStart); + hf.addEvent(hourInner, 'touchend', onTouchEnd); + hf.addEvent(hour, 'click', onClick); + hf.addEvent(hour, 'mousemove', onMouseMove); + hf.addEvent(hour, 'touchmove', onTouchMove); + hf.addEvent(hour, 'touchstart', onTouchStart); + hf.addEvent(hour, 'touchend', onTouchEnd); hf.appendTo(hour, clock.clock.hours); } + hf.addEvent(clock.clock.hours, 'mousedown', function () { + isMouseDown = true; + }); + hf.addEvent(clock.clock.hours, 'mouseup', function () { + isMouseDown = false; + }); + hf.addEvent(clock.clock.hours, 'touchstart', function () { + isMouseDown = true; + hasStartingTouchElementChanged = false; + }); + hf.addEvent(clock.clock.hours, 'touchend', function () { + isMouseDown = false; + }); // Setup minutes for (var _i = 0; _i < 60; _i++) { @@ -3463,15 +3943,55 @@ minute.classList.add('marker'); minuteInner.innerText = min; } - hf.addEvent(minuteInner, 'click', function () { - var _minute = parseInt(this.parentNode.dataset.minute), + minute.mdtpTouchable = true; + minuteInner.mdtpTouchable = true; + var onTouchMove = function onTouchMove(event) { + event.preventDefault(); + if (!isMouseDown) return; + var touch = event.touches[0]; + var target = document.elementFromPoint(touch.clientX, touch.clientY); + if ((target === null || target === void 0 ? void 0 : target.mdtpTouchable) !== true) return; + var _minute = parseInt(getDataSetFromHandElement(target).minute), _hour = _.selected.getHour(), disabled = _.isDisabled(_hour, _minute, true); if (disabled) return; _.setMinute(_minute); - }); + }; + var onMouseMove = function onMouseMove(event) { + if (!isMouseDown) return; + var _minute = parseInt(getDataSetFromHandElement(event.target).minute), + _hour = _.selected.getHour(), + disabled = _.isDisabled(_hour, _minute, true); + if (disabled) return; + _.setMinute(_minute); + }; + var onClick = function onClick(event) { + var _minute = parseInt(getDataSetFromHandElement(event.target).minute), + _hour = _.selected.getHour(), + disabled = _.isDisabled(_hour, _minute, true); + if (disabled) return; + _.setMinute(_minute); + isMouseDown = false; + }; + hf.addEvent(minuteInner, 'click', onClick); + hf.addEvent(minuteInner, 'mousemove', onMouseMove); + hf.addEvent(minuteInner, 'touchmove', onTouchMove); + hf.addEvent(minute, 'mousemove', onMouseMove); + hf.addEvent(minute, 'touchmove', onTouchMove); hf.appendTo(minute, clock.clock.minutes); } + hf.addEvent(clock.clock.minutes, 'mousedown', function () { + isMouseDown = true; + }); + hf.addEvent(clock.clock.minutes, 'touchstart', function () { + isMouseDown = true; + }); + hf.addEvent(clock.clock.minutes, 'mouseup', function () { + isMouseDown = false; + }); + hf.addEvent(clock.clock.minutes, 'touchend', function () { + isMouseDown = false; + }); // Setup clock if (!_.config.is24hour) { @@ -3820,11 +4340,13 @@ if (this.config.events && this.config.events.timeChanged) this.config.events.timeChanged.call(this, data, this); } }]); - return MDTimePicker; }(); /** * Time picker wrapper */ + /** + * Default configurations + */ _defineProperty(MDTimePicker, "default_configs", null); function mdtimepicker() { var args = arguments, @@ -3844,6 +4366,11 @@ picker[args[1]].apply(picker, Array.prototype.slice.call(args).slice(2)); } }); + + // Allow for inspection or manipulation of the timepicker after configuration + return Array.from(inputs).map(function (el) { + return el[MDTP_DATA]; + }); } mdtimepicker.defaults = function (configs) { MDTimePicker.default_configs = hf.extend(DEFAULTS, configs); diff --git a/dist/mdtimepicker.min.js b/dist/mdtimepicker.min.js index db64bee..365cc1b 100644 --- a/dist/mdtimepicker.min.js +++ b/dist/mdtimepicker.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).mdtimepicker=e()}(this,function(){"use strict";function R(t){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(t,e){for(var n=0;ni;)!_n(r,n=e[i++])||~In(o,n)||Ln(o,n);return o}function sn(t,e){return(t=zn[qn(t)])==Wn||t!=Yn&&(Bn(e)?$n(e):!!e)}function P(t,e){var n,r,i,o=t.target,c=t.global,u=t.stat,a=c?Kn:u?Kn[o]||Zn(o,{}):(Kn[o]||{}).prototype;if(a)for(n in e){if(r=e[n],i=t.dontCallGetSet?(i=Xn(a,n))&&i.value:a[n],!er(c?n:o+(u?".":"#")+n,t.forced)&&void 0!==i){if(typeof r==typeof i)continue;tr(r,i)}(t.sham||i&&i.sham)&&Jn(r,"sham",!0),Qn(a,n,r,t)}}function ln(t){if("Symbol"===ur(t))throw TypeError("Cannot convert a Symbol value to a string");return ar(t)}var fn=g,dn=y,pn=p.exports,hn=W,_={},mn=Math.ceil,vn=Math.floor,gn=Math.trunc||function(t){t=+t;return(0"+t+""},Dr=function(){try{_r=new ActiveXObject("htmlfile")}catch(t){}Dr="undefined"==typeof document||document.domain&&_r?yr(_r):(t=jr("iframe"),e="java"+Mr+":",t.style.display="none",Lr.appendChild(t),t.src=String(e),(e=t.contentWindow.document).open(),e.write(Rr("document.F=Object")),e.close(),e.F);for(var t,e,n=Pr.length;n--;)delete Dr[Hr][Pr[n]];return Dr()},zt=(l[Cr]=!0,Object.create||function(t,e){var n;return null!==t?(gr[Hr]=Ar(t),n=new gr,gr[Hr]=null,n[Cr]=t):n=Dr(),void 0===e?n:Ir.f(n,e)}),x=t,Fr=a.RegExp,A=x(function(){var t=Fr(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}),O=t,Vr=a.RegExp,_=O(function(){var t=Vr("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}),Nr=d,l=m,Gr=ln,x=s,O=T,$r=zt,Br=S.get,s=A,T=_,Ur=O("native-string-replace",String.prototype.replace),qr=RegExp.prototype.exec,zr=qr,Yr=l("".charAt),Wr=l("".indexOf),Kr=l("".replace),Xr=l("".slice),Jr=(A=/b*/g,Nr(qr,_=/a/,"a"),Nr(qr,A,"a"),0!==_.lastIndex||0!==A.lastIndex),Qr=x.BROKEN_CARET,Zr=void 0!==/()??/.exec("")[1],O=zr=Jr||Zr||Qr||s||T?function(t){var e,n,r,i,o,c,u=this,a=Br(u),t=Gr(t),s=a.raw;if(s)return s.lastIndex=u.lastIndex,f=Nr(zr,s,t),u.lastIndex=s.lastIndex,f;var l=a.groups,s=Qr&&u.sticky,f=Nr(br,u),a=u.source,d=0,p=t;if(s&&(f=Kr(f,"y",""),-1===Wr(f,"g")&&(f+="g"),p=Xr(t,u.lastIndex),0]*>)/g,Ni=/\$([$&'`]|\d{1,2})/g,Gi=s,$i=d,l=m,O=Er,x=t,Bi=o,Ui=g,qi=U,zi=nn,Yi=on,Wi=ln,Ki=q,Xi=xr,Ji=r,Qi=function(o,c,u,a,s,t){var l=u+o.length,f=a.length,e=Ni;return void 0!==s&&(s=Mi(s),e=Vi),Di(t,e,function(t,e){var n;switch(Ri(e,0)){case"$":return"$";case"&":return o;case"`":return Fi(c,0,u);case"'":return Fi(c,l);case"<":n=s[Fi(e,1,-1)];break;default:var r,i=+e;if(0==i)return t;if(f")})||!A||uo),p),ao=I,so=(p||en(Object.prototype,"toString",T?{}.toString:function(){return"[object "+ao(this)+"]"},{unsafe:!0}),TypeError),lo=n,fo=d,po=e,ho=r,mo=d,vo=n,go=o,yo=v,bo=function(t){if(9007199254740991=e.length?la(void 0,!0):(e=aa(e,n),t.index+=e.length,la(e,!1))}),t),ma=b,va=i("species"),p=m([].slice),h=P,ga=A,ya=f,ba=v,wa=rn,Ea=cn,ka=z,xa=iu,bt=i,Ta=p,a=function(e){return 51<=ma||!ha(function(){var t=[];return(t.constructor={})[va]=function(){return{foo:1}},1!==t[e](Boolean).foo})}("slice"),Sa=bt("species"),Oa=Array,_a=Math.max,Aa=(h({target:"Array",proto:!0,forced:!a},{slice:function(t,e){var n,r,i,o=ka(this),c=Ea(o),u=wa(t,c),a=wa(void 0===e?c:e,c);if(ga(o)&&(n=o.constructor,(n=ya(n)&&(n===Oa||ga(n.prototype))||ba(n)&&null===(n=n[Sa])?void 0:n)===Oa||void 0===n))return Ta(o,u,a);for(r=new(void 0===n?Oa:n)(_a(a-u,0)),i=0;uo;)!Rn(r,n=e[o++])||~Fn(i,n)||Vn(i,n);return i}function ut(t,e){return(t=er[tr(t)])===rr||t!==nr&&(Qn(e)?Jn(e):!!e)}function u(t,e){var n,r,o,i=t.target,c=t.global,u=t.stat,a=c?or:u?or[i]||ar(i,{}):or[i]&&or[i].prototype;if(a)for(n in e){if(r=e[n],o=t.dontCallGetSet?(o=ir(a,n))&&o.value:a[n],!lr(c?n:i+(u?".":"#")+n,t.forced)&&void 0!==o){if(typeof r==typeof o)continue;sr(r,o)}(t.sham||o&&o.sham)&&cr(r,"sham",!0),ur(a,n,r,t)}}function at(t,e){return pr(t),void 0===e?t:hr?mr(t,e):function(){return t.apply(e,arguments)}}function st(t,e,n){var r,o;gr(t);try{if(!(r=yr(t,"return"))){if("throw"===e)throw n;return n}r=vr(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return gr(r),n}function lt(e,t,n,r){try{return r?t(br(n)[0],n[1]):t(n)}catch(t){wr(e,"throw",t)}}function ft(t){return void 0!==t&&(Er.Array===t||xr[kr]===t)}function dt(){}function pt(t){if(!Pr(t))return!1;try{return Lr(dt,[],t),!0}catch(t){return!1}}function ht(t){if(!Pr(t))return!1;switch(jr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Rr||!!Cr(Mr,Hr(t))}catch(t){return!0}}function mt(t,e,n){Dr?Fr.f(t,e,Nr(0,n)):t[e]=n}function vt(t){if(!Gr(t))return $r(t,Ur)||$r(t,"@@iterator")||Br[Vr(t)]}function gt(t,e){if(e=arguments.length<2?Kr(t):e,qr(e))return zr(Yr(e,t));throw new Xr(Wr(t)+" is not iterable")}var yt,bt,a,wt,s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=V("object"==typeof globalThis&&globalThis)||V("object"==typeof window&&window)||V("object"==typeof self&&self)||V("object"==typeof s&&s)||V("object"==typeof s&&s)||function(){return this}()||Function("return this")(),l={},f=!t(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),d=!t(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),Et=Function.prototype.call,p=d?Et.bind(Et):function(){return Et.apply(Et,arguments)},h={},m={}.propertyIsEnumerable,kt=Object.getOwnPropertyDescriptor,v=kt&&!m.call({1:2},1),v=(h.f=v?function(t){t=kt(this,t);return!!t&&t.enumerable}:m,d),m=Function.prototype,xt=m.call,m=v&&m.bind.bind(xt,xt),v=v?m:function(t){return function(){return xt.apply(t,arguments)}},m=v,Tt=m({}.toString),St=m("".slice),m=t,Ot=G,_t=Object,It=v("".split),m=m(function(){return!_t("z").propertyIsEnumerable(0)})?function(t){return"String"===Ot(t)?It(t,""):_t(t)}:_t,At=B,Pt=TypeError,jt=m,Ht=U,Lt="object"==typeof document&&document.all,g=void 0===Lt&&void 0!==Lt?function(t){return"function"==typeof t||t===Lt}:function(t){return"function"==typeof t},Mt=g,Ct=s,Rt=g,Dt=v({}.isPrototypeOf),y="undefined"!=typeof navigator&&String(navigator.userAgent)||"",b=s.process,w=s.Deno,b=b&&b.versions||w&&w.version,w=b&&b.v8,b=k=!(k=w?0<(E=w.split("."))[0]&&E[0]<4?1:+(E[0]+E[1]):k)&&y&&(!(E=y.match(/Edge\/(\d+)/))||74<=E[1])&&(E=y.match(/Chrome\/(\d+)/))?+E[1]:k,Ft=b,w=t,Nt=s.String,y=!!Object.getOwnPropertySymbols&&!w(function(){var t=Symbol("symbol detection");return!Nt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ft&&Ft<41}),E=y&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Vt=q,$t=g,Gt=Dt,Bt=Object,k=E?function(t){return"symbol"==typeof t}:function(t){var e=Vt("Symbol");return $t(e)&&Gt(e.prototype,Bt(t))},Ut=String,Yt=g,qt=z,zt=TypeError,Wt=n,Kt=B,Xt=p,Jt=g,Qt=e,Zt=TypeError,w={exports:{}},te=s,ee=Object.defineProperty,x=W,T="__core-js_shared__",x=w.exports=s[T]||x(T,{}),T=((x.versions||(x.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"}),w.exports),ne=T,re=U,oe=Object,ie=X,ce=v({}.hasOwnProperty),x=Object.hasOwn||function(t,e){return ce(ie(t),e)},w=v,ue=0,ae=Math.random(),se=w(1..toString),w=K,le=x,S=J,fe=y,y=E,de=s.Symbol,pe=w("wks"),he=y?de.for||de:de&&de.withoutSetter||S,me=p,ve=e,ge=k,ye=r,be=function(t,e){var n,r;if("string"===e&&Jt(n=t.toString)&&!Qt(r=Xt(n,t)))return r;if(Jt(n=t.valueOf)&&!Qt(r=Xt(n,t)))return r;if("string"!==e&&Jt(n=t.toString)&&!Qt(r=Xt(n,t)))return r;throw new Zt("Can't convert object to primitive value")},we=TypeError,Ee=o("toPrimitive"),ke=function(t,e){if(!ve(t)||ge(t))return t;var n=ye(t,Ee);if(n){if(n=me(n,t,e=void 0===e?"default":e),!ve(n)||ge(n))return n;throw new we("Can't convert object to primitive value")}return be(t,e=void 0===e?"number":e)},xe=k,E=e,Te=s.document,Se=E(Te)&&E(Te.createElement),Oe=Z,w=!f&&!t(function(){return 7!==Object.defineProperty(Oe("div"),"a",{get:function(){return 7}}).a}),_e=p,Ie=h,Ae=$,Pe=Y,je=Q,He=x,Le=w,Me=Object.getOwnPropertyDescriptor,y=(l.f=f?Me:function(t,e){if(t=Pe(t),e=je(e),Le)try{return Me(t,e)}catch(t){}if(He(t,e))return Ae(!_e(Ie.f,t,e),t[e])},{}),S=f&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ce=e,Re=String,De=TypeError,Fe=w,Ne=i,Ve=Q,$e=TypeError,Ge=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,Ue="enumerable",Ye="configurable",qe="writable",k=(y.f=f?S?function(t,e,n){var r;return Ne(t),e=Ve(e),Ne(n),"function"==typeof t&&"prototype"===e&&"value"in n&&qe in n&&!n[qe]&&(r=Be(t,e))&&r[qe]&&(t[e]=n.value,n={configurable:(Ye in n?n:r)[Ye],enumerable:(Ue in n?n:r)[Ue],writable:!1}),Ge(t,e,n)}:Ge:function(t,e,n){if(Ne(t),e=Ve(e),Ne(n),Fe)try{return Ge(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new $e("Accessors not supported");return"value"in n&&(t[e]=n.value),t},f),ze=y,We=$,E=k?function(t,e,n){return ze.f(t,e,We(1,n))}:function(t,e,n){return t[e]=n,t},h={exports:{}},w=f,k=x,O=Function.prototype,_=w&&Object.getOwnPropertyDescriptor,k=k(O,"name"),k={EXISTS:k,PROPER:k&&"something"===function(){}.name,CONFIGURABLE:k&&(!w||_(O,"name").configurable)},w=g,_=T,Ke=v(Function.toString),O=(w(_.inspectSource)||(_.inspectSource=function(t){return Ke(t)}),_.inspectSource),w=g,_=s.WeakMap,w=w(_)&&/native code/.test(String(_)),Xe=J,Je=K("keys"),_={},Qe=e,Ze=E,tn=x,I=T,en=tt,A=_,nn="Object already initialized",rn=s.TypeError,P=s.WeakMap,on=w||I.state?((a=I.state||(I.state=new P)).get=a.get,a.has=a.has,a.set=a.set,yt=function(t,e){if(a.has(t))throw new rn(nn);return e.facade=t,a.set(t,e),e},bt=function(t){return a.get(t)||{}},function(t){return a.has(t)}):(A[wt=en("state")]=!0,yt=function(t,e){if(tn(t,wt))throw new rn(nn);return e.facade=t,Ze(t,wt,e),e},bt=function(t){return tn(t,wt)?t[wt]:{}},function(t){return tn(t,wt)}),w={set:yt,get:bt,has:on,enforce:function(t){return on(t)?bt(t):yt(t,{})},getterFor:function(e){return function(t){if(Qe(t)&&(t=bt(t)).type===e)return t;throw new rn("Incompatible receiver, "+e+" required")}}},I=v,P=t,cn=g,un=x,an=f,sn=k.CONFIGURABLE,ln=O,fn=w.enforce,dn=w.get,pn=String,hn=Object.defineProperty,mn=I("".slice),vn=I("".replace),gn=I([].join),yn=an&&!P(function(){return 8!==hn(function(){},"length",{value:8}).length}),bn=String(String).split("String"),A=h.exports=function(t,e,n){"Symbol("===mn(pn(e),0,7)&&(e="["+vn(pn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!un(t,"name")||sn&&t.name!==e)&&(an?hn(t,"name",{value:e,configurable:!0}):t.name=e),yn&&n&&un(n,"arity")&&t.length!==n.arity&&hn(t,"length",{value:n.arity});try{n&&un(n,"constructor")&&n.constructor?an&&hn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}n=fn(t);return un(n,"source")||(n.source=gn(bn,"string"==typeof e?e:"")),t},en=(Function.prototype.toString=A(function(){return cn(this)&&dn(this).source||ln(this)},"toString"),h.exports),wn=g,En=y,kn=en,xn=W,I={},Tn=Math.ceil,Sn=Math.floor,On=Math.trunc||function(t){t=+t;return(0",di="<",pi="prototype",hi="script",mi=tt("IE_PROTO"),vi=function(t){return di+hi+fi+t+di+"/"+hi+fi},gi=function(){try{oi=new ActiveXObject("htmlfile")}catch(t){}gi="undefined"==typeof document||document.domain&&oi?ni(oi):(t=li("iframe"),e="java"+hi+":",t.style.display="none",si.appendChild(t),t.src=String(e),(e=t.contentWindow.document).open(),e.write(vi("document.F=Object")),e.close(),e.F);for(var t,e,n=ai.length;n--;)delete gi[pi][ai[n]];return gi()},b=(m[mi]=!0,Object.create||function(t,e){var n;return null!==t?(ei[pi]=ci(t),n=new ei,ei[pi]=null,n[mi]=t):n=gi(),void 0===e?n:ui.f(n,e)}),j=t,yi=s.RegExp,O=j(function(){var t=yi(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}),S=t,bi=s.RegExp,l=S(function(){var t=bi("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}),wi=p,h=v,Ei=jo,ki=Ho,_=P,I=K,xi=b,Ti=w.get,m=O,j=l,Si=I("native-string-replace",String.prototype.replace),Oi=RegExp.prototype.exec,_i=Oi,Ii=h("".charAt),Ai=h("".indexOf),Pi=h("".replace),ji=h("".slice),Hi=(S=/b*/g,wi(Oi,P=/a/,"a"),wi(Oi,S,"a"),0!==P.lastIndex||0!==S.lastIndex),Li=_.BROKEN_CARET,Mi=void 0!==/()??/.exec("")[1],O=_i=Hi||Mi||Li||m||j?function(t){var e,n,r,o,i,c,u=this,a=Ti(u),t=Ei(t),s=a.raw;if(s)return s.lastIndex=u.lastIndex,f=wi(_i,s,t),u.lastIndex=s.lastIndex,f;var l=a.groups,s=Li&&u.sticky,f=wi(ki,u),a=u.source,d=0,p=t;if(s&&(f=Pi(f,"y",""),-1===Ai(f,"g")&&(f+="g"),p=ji(t,u.lastIndex),0=e.length?Bc(void 0,!0):(e=$c(e,n),t.index+=e.length,Bc(e,!1))}),p),Wc=c,Kc=O,Xc=t,Jc=o,Qc=E,Zc=Jc("species"),tu=RegExp.prototype,eu=I.charAt,nu=p,ru=i,ou=g,iu=G,cu=O,uu=TypeError,au=p,su=i,lu=B,fu=rt,du=jo,pu=U,hu=r,mu=Zi,vu=tc,h=(Qi("match",function(r,u,a){return[function(t){var e=pu(this),n=lu(t)?void 0:hu(t,r);return n?au(n,t,e):new RegExp(t)[r](du(e))},function(t){var e=su(this),n=du(t),t=a(u,e,n);if(t.done)return t.value;if(!e.global)return vu(e,n);for(var r=e.unicode,o=[],i=e.lastIndex=0;null!==(c=vu(e,n));){var c=du(c[0]);""===(o[i]=c)&&(e.lastIndex=mu(n,fu(e.lastIndex),r)),i++}return 0===i?null:o}]}),d),P=Function.prototype,gu=P.apply,yu=P.call,l="object"==typeof Reflect&&Reflect.apply||(h?yu.bind(gu):function(){return yu.apply(gu,arguments)}),A=v,bu=X,wu=Math.floor,Eu=A("".charAt),ku=A("".replace),xu=A("".slice),Tu=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Su=/\$([$&'`]|\d{1,2})/g,Ou=l,_u=p,m=v,j=Qi,_=t,Iu=i,Au=g,Pu=B,ju=et,Hu=rt,Lu=jo,Mu=U,Cu=Zi,Ru=r,Du=function(i,c,u,a,s,t){var l=u+i.length,f=a.length,e=Su;return void 0!==s&&(s=bu(s),e=Tu),ku(t,e,function(t,e){var n;switch(Eu(e,0)){case"$":return"$";case"&":return i;case"`":return xu(c,0,u);case"'":return xu(c,l);case"<":n=s[xu(e,1,-1)];break;default:var r,o=+e;if(0==o)return t;if(f")})||!I||qu),TypeError),Wu=p,Ku=q,Xu=r,Ju=p,Qu=n,Zu=i,ta=e,ea=function(t){if(9007199254740991 (el.tagName === "SPAN" ? el.parentNode : el).dataset; + // Setup hours let _hours = _.config.is24hour ? 24 : 12 for (let i = 0; i < _hours; i++) { @@ -223,23 +228,94 @@ class MDTimePicker { hf.appendTo(hourInner, hour) if (_.config.is24hour && value < 13) hour.classList.add('inner--digit') + + hour.mdtpTouchable = true; + hourInner.mdtpTouchable = true; - hf.addEvent(hourInner, 'click', function() { - let _hour = parseInt(this.parentNode.dataset.hour), + let onTouchStart = (event) => { + event.preventDefault(); + isMouseDown = true; + if (event.target?.mdtpTouchable !== true) return; + + hasStartingTouchElementChanged = false; + + let _hour = parseInt(getDataSetFromHandElement(event.target).hour), _selectedT = _.selected.getPeriod(), - _value = _.config.is24hour ? _hour : - (_hour + ((_selectedT === 'PM' && _hour < 12) || (_selectedT === 'AM' && _hour === 12) ? 12 : 0)) % 24, - disabled = _.isDisabled(_value, 0, true) + _value = _.config.is24hour ? _hour : (_hour + (_selectedT === 'PM' && _hour < 12 || _selectedT === 'AM' && _hour === 12 ? 12 : 0)) % 24, + disabled = _.isDisabled(_value, 0, true); - if (disabled) return + if (disabled) return; + _.setHour(_value); + }; - _.setHour(_value) - _._switchView('minutes') - }) + var onTouchMove = (event) => { + event.preventDefault(); + if (!isMouseDown) return; + + var touch = event.targetTouches[0]; + var target = document.elementFromPoint(touch.clientX, touch.clientY); + + if (target?.mdtpTouchable !== true) return; + + if (event.target !== target) + hasStartingTouchElementChanged = true; + + var _hour = parseInt(getDataSetFromHandElement(target).hour), + _selectedT = _.selected.getPeriod(), + _value = _.config.is24hour ? _hour : (_hour + (_selectedT === 'PM' && _hour < 12 || _selectedT === 'AM' && _hour === 12 ? 12 : 0)) % 24, + disabled = _.isDisabled(_value, 0, true); + + if (disabled) return; + _.setHour(_value); + }; + + var onMouseMove = (event) => { + if (!isMouseDown) return; + var _hour = parseInt(getDataSetFromHandElement(event.target).hour), + _selectedT = _.selected.getPeriod(), + _value = _.config.is24hour ? _hour : (_hour + (_selectedT === 'PM' && _hour < 12 || _selectedT === 'AM' && _hour === 12 ? 12 : 0)) % 24, + disabled = _.isDisabled(_value, 0, true); + if (disabled) return; + _.setHour(_value); + }; + + var onClick = (event) => { + var _hour = parseInt(getDataSetFromHandElement(event.target).hour), + _selectedT = _.selected.getPeriod(), + _value = _.config.is24hour ? _hour : (_hour + (_selectedT === 'PM' && _hour < 12 || _selectedT === 'AM' && _hour === 12 ? 12 : 0)) % 24, + disabled = _.isDisabled(_value, 0, true); + if (disabled) return; + isMouseDown = false; + _.setHour(_value); + _._switchView('minutes'); + }; + + var onTouchEnd = (event) => { + event.preventDefault(); + isMouseDown = false; + if (!hasStartingTouchElementChanged) + _._switchView('minutes'); + }; + + hf.addEvent(hourInner, 'click', onClick); + hf.addEvent(hourInner, 'mousemove', onMouseMove); + hf.addEvent(hourInner, 'touchmove', onTouchMove); + hf.addEvent(hourInner, 'touchstart', onTouchStart); + hf.addEvent(hourInner, 'touchend', onTouchEnd); + hf.addEvent(hour, 'click', onClick); + hf.addEvent(hour, 'mousemove', onMouseMove); + hf.addEvent(hour, 'touchmove', onTouchMove); + hf.addEvent(hour, 'touchstart', onTouchStart); + hf.addEvent(hour, 'touchend', onTouchEnd); hf.appendTo(hour, clock.clock.hours) } + hf.addEvent(clock.clock.hours, 'mousedown', () => { isMouseDown = true; }) + hf.addEvent(clock.clock.hours, 'mouseup', () => { isMouseDown = false; }) + hf.addEvent(clock.clock.hours, 'touchstart', () => { isMouseDown = true; hasStartingTouchElementChanged = false; }); + hf.addEvent(clock.clock.hours, 'touchend', () => { isMouseDown = false; }); + // Setup minutes for (let i = 0; i < 60; i++) { let min = i < 10 ? '0' + i : i, deg = (MIN_START_DEG + (i * MIN_DEG_INCR)) % END_DEG, @@ -253,19 +329,58 @@ class MDTimePicker { minuteInner.innerText = min } - hf.addEvent(minuteInner, 'click', function() { - let _minute = parseInt(this.parentNode.dataset.minute), + minute.mdtpTouchable = true; + minuteInner.mdtpTouchable = true; + + var onTouchMove = (event) => { + event.preventDefault(); + if (!isMouseDown) return; + + var touch = event.touches[0]; + var target = document.elementFromPoint(touch.clientX, touch.clientY); + + if (target?.mdtpTouchable !== true) return; + + var _minute = parseInt(getDataSetFromHandElement(target).minute), _hour = _.selected.getHour(), - disabled = _.isDisabled(_hour, _minute, true) + disabled = _.isDisabled(_hour, _minute, true); - if (disabled) return + if (disabled) return; + _.setMinute(_minute); + }; - _.setMinute(_minute) - }) + var onMouseMove = (event) => { + if (!isMouseDown) return; + var _minute = parseInt(getDataSetFromHandElement(event.target).minute), + _hour = _.selected.getHour(), + disabled = _.isDisabled(_hour, _minute, true); + if (disabled) return; + _.setMinute(_minute); + }; - hf.appendTo(minute, clock.clock.minutes) + var onClick = (event) => { + var _minute = parseInt(getDataSetFromHandElement(event.target).minute), + _hour = _.selected.getHour(), + disabled = _.isDisabled(_hour, _minute, true); + if (disabled) return; + _.setMinute(_minute); + isMouseDown = false; + }; + + hf.addEvent(minuteInner, 'click', onClick); + hf.addEvent(minuteInner, 'mousemove', onMouseMove); + hf.addEvent(minuteInner, 'touchmove', onTouchMove); + hf.addEvent(minute, 'mousemove', onMouseMove); + hf.addEvent(minute, 'touchmove', onTouchMove); + + hf.appendTo(minute, clock.clock.minutes); } + hf.addEvent(clock.clock.minutes, 'mousedown', () => { isMouseDown = true; }); + hf.addEvent(clock.clock.minutes, 'touchstart', () => { isMouseDown = true; }); + hf.addEvent(clock.clock.minutes, 'mouseup', () => { isMouseDown = false; }); + hf.addEvent(clock.clock.minutes, 'touchend', () => { isMouseDown = false; }); + // Setup clock if (!_.config.is24hour) { hf.appendTo([clock.am, clock.pm], clock.clock.wrapper) @@ -662,6 +777,9 @@ function mdtimepicker() { picker[args[1]].apply(picker, Array.prototype.slice.call(args).slice(2)) } }) + + // Allow for inspection or manipulation of the timepicker after configuration + return Array.from(inputs).map(el => el[MDTP_DATA]); } mdtimepicker.defaults = function (configs) {