(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BootstrapTable = factory(global.jQuery)); })(this, (function ($) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var $__default = /*#__PURE__*/_interopDefaultLegacy($); 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 _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, descriptor.key, descriptor); } } 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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function () {}; return { s: F, n: function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (e) { throw e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function () { it = it.call(o); }, n: function () { var step = it.next(); normalCompletion = step.done; return step; }, e: function (e) { didErr = true; err = e; }, f: function () { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global_1 = // 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) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); var fails = function (exec) { try { return !!exec(); } catch (error) { return true; } }; // Detect IE8's incomplete defineProperty implementation var descriptors = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; }); var functionBindNative = !fails(function () { var test = (function () { /* empty */ }).bind(); // eslint-disable-next-line no-prototype-builtins -- safe return typeof test != 'function' || test.hasOwnProperty('prototype'); }); var call$2 = Function.prototype.call; var functionCall = functionBindNative ? call$2.bind(call$2) : function () { return call$2.apply(call$2, arguments); }; var $propertyIsEnumerable$1 = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor$4 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor$4(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable$1; var objectPropertyIsEnumerable = { f: f$5 }; var createPropertyDescriptor = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var FunctionPrototype$2 = Function.prototype; var bind$1 = FunctionPrototype$2.bind; var call$1 = FunctionPrototype$2.call; var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1); var functionUncurryThis = functionBindNative ? function (fn) { return fn && uncurryThis(fn); } : function (fn) { return fn && function () { return call$1.apply(fn, arguments); }; }; var toString$1 = functionUncurryThis({}.toString); var stringSlice$7 = functionUncurryThis(''.slice); var classofRaw = function (it) { return stringSlice$7(toString$1(it), 8, -1); }; var Object$5 = global_1.Object; var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !Object$5('z').propertyIsEnumerable(0); }) ? function (it) { return classofRaw(it) == 'String' ? split(it, '') : Object$5(it); } : Object$5; var TypeError$e = global_1.TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible = function (it) { if (it == undefined) throw TypeError$e("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var toIndexedObject = function (it) { return indexedObject(requireObjectCoercible(it)); }; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable var isCallable = function (argument) { return typeof argument == 'function'; }; var isObject = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; var aFunction = function (argument) { return isCallable(argument) ? argument : undefined; }; var getBuiltIn = function (namespace, method) { return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method]; }; var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf); var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; var process = global_1.process; var Deno = global_1.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && engineUserAgent) { match = engineUserAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = engineUserAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } var engineV8Version = version; /* eslint-disable es/no-symbol -- required for testing */ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol(); // 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) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && engineV8Version && engineV8Version < 41; }); /* eslint-disable es/no-symbol -- required for testing */ var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol'; var Object$4 = global_1.Object; var isSymbol = useSymbolAsUid ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$4(it)); }; var String$4 = global_1.String; var tryToString = function (argument) { try { return String$4(argument); } catch (error) { return 'Object'; } }; var TypeError$d = global_1.TypeError; // `Assert: IsCallable(argument) is true` var aCallable = function (argument) { if (isCallable(argument)) return argument; throw TypeError$d(tryToString(argument) + ' is not a function'); }; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod = function (V, P) { var func = V[P]; return func == null ? undefined : aCallable(func); }; var TypeError$c = global_1.TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val; throw TypeError$c("Can't convert object to primitive value"); }; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$5 = Object.defineProperty; var setGlobal = function (key, value) { try { defineProperty$5(global_1, key, { value: value, configurable: true, writable: true }); } catch (error) { global_1[key] = value; } return value; }; var SHARED = '__core-js_shared__'; var store$1 = global_1[SHARED] || setGlobal(SHARED, {}); var sharedStore = store$1; var shared = createCommonjsModule(function (module) { (module.exports = function (key, value) { return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.21.1', mode: 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); }); var Object$3 = global_1.Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject = function (argument) { return Object$3(requireObjectCoercible(argument)); }; var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; var id = 0; var postfix = Math.random(); var toString = functionUncurryThis(1.0.toString); var uid = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); }; var WellKnownSymbolsStore = shared('wks'); var Symbol$3 = global_1.Symbol; var symbolFor = Symbol$3 && Symbol$3['for']; var createWellKnownSymbol = useSymbolAsUid ? Symbol$3 : Symbol$3 && Symbol$3.withoutSetter || uid; var wellKnownSymbol = function (name) { if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { var description = 'Symbol.' + name; if (nativeSymbol && hasOwnProperty_1(Symbol$3, name)) { WellKnownSymbolsStore[name] = Symbol$3[name]; } else if (useSymbolAsUid && symbolFor) { WellKnownSymbolsStore[name] = symbolFor(description); } else { WellKnownSymbolsStore[name] = createWellKnownSymbol(description); } } return WellKnownSymbolsStore[name]; }; var TypeError$b = global_1.TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = functionCall(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw TypeError$b("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey var toPropertyKey = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement); var documentCreateElement = function (it) { return EXISTS$1 ? document$1.createElement(it) : {}; }; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !descriptors && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(documentCreateElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey(P); if (ie8DomDefine) try { return $getOwnPropertyDescriptor$1(O, P); } catch (error) { /* empty */ } if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]); }; var objectGetOwnPropertyDescriptor = { f: f$4 }; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = descriptors && fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false }).prototype != 42; }); var String$3 = global_1.String; var TypeError$a = global_1.TypeError; // `Assert: Type(argument) is Object` var anObject = function (argument) { if (isObject(argument)) return argument; throw TypeError$a(String$3(argument) + ' is not an object'); }; var TypeError$9 = global_1.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE$1 = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor(O, P); if (current && current[WRITABLE]) { O[P] = Attributes.value; Attributes = { configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1], enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], writable: false }; } } return $defineProperty(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (ie8DomDefine) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError$9('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var objectDefineProperty = { f: f$3 }; var createNonEnumerableProperty = descriptors ? function (object, key, value) { return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable(sharedStore.inspectSource)) { sharedStore.inspectSource = function (it) { return functionToString(it); }; } var inspectSource = sharedStore.inspectSource; var WeakMap$1 = global_1.WeakMap; var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1)); var keys$2 = shared('keys'); var sharedKey = function (key) { return keys$2[key] || (keys$2[key] = uid(key)); }; var hiddenKeys$1 = {}; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$8 = global_1.TypeError; var WeakMap = global_1.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError$8('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (nativeWeakMap || sharedStore.state) { var store = sharedStore.state || (sharedStore.state = new WeakMap()); var wmget = functionUncurryThis(store.get); var wmhas = functionUncurryThis(store.has); var wmset = functionUncurryThis(store.set); set = function (it, metadata) { if (wmhas(store, it)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; wmset(store, it, metadata); return metadata; }; get = function (it) { return wmget(store, it) || {}; }; has = function (it) { return wmhas(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys$1[STATE] = true; set = function (it, metadata) { if (hasOwnProperty_1(it, STATE)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwnProperty_1(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwnProperty_1(it, STATE); }; } var internalState = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = descriptors && Object.getOwnPropertyDescriptor; var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable)); var functionName = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; var redefine = createCommonjsModule(function (module) { var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE; var getInternalState = internalState.get; var enforceInternalState = internalState.enforce; var TEMPLATE = String(String).split('String'); (module.exports = function (O, key, value, options) { var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; var name = options && options.name !== undefined ? options.name : key; var state; if (isCallable(value)) { if (String(name).slice(0, 7) === 'Symbol(') { name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; } if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { createNonEnumerableProperty(value, 'name', name); } state = enforceInternalState(value); if (!state.source) { state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); } } if (O === global_1) { if (simple) O[key] = value; else setGlobal(key, value); return; } else if (!unsafe) { delete O[key]; } else if (!noTargetGet && O[key]) { simple = true; } if (simple) O[key] = value; else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, 'toString', function toString() { return isCallable(this) && getInternalState(this).source || inspectSource(this); }); }); var ceil = Math.ceil; var floor$2 = Math.floor; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity var toIntegerOrInfinity = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- safe return number !== number || number === 0 ? 0 : (number > 0 ? floor$2 : ceil)(number); }; var max$4 = Math.max; var min$6 = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). var toAbsoluteIndex = function (index, length) { var integer = toIntegerOrInfinity(index); return integer < 0 ? max$4(integer + length, 0) : min$6(integer, length); }; var min$5 = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength = function (argument) { return argument > 0 ? min$5(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike var lengthOfArrayLike = function (obj) { return toLength(obj.length); }; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod$4 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); var index = toAbsoluteIndex(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) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check 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; } return !IS_INCLUDES && -1; }; }; var arrayIncludes = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod$4(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod$4(false) }; var indexOf$1 = arrayIncludes.indexOf; var push$5 = functionUncurryThis([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$5(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) { ~indexOf$1(result, key) || push$5(result, key); } return result; }; // IE8- don't enum bug keys var enumBugKeys = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return objectKeysInternal(O, hiddenKeys); }; var objectGetOwnPropertyNames = { f: f$2 }; // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe var f$1 = Object.getOwnPropertySymbols; var objectGetOwnPropertySymbols = { f: f$1 }; var concat$2 = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = objectGetOwnPropertyNames.f(anObject(it)); var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys; }; var copyConstructorProperties = function (target, source, exceptions) { var keys = ownKeys(source); var defineProperty = objectDefineProperty.f; var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) { defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } } }; var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; var isForced_1 = isForced; var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f; /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target options.name - the .name of the function if it does not match the key */ var _export = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global_1; } else if (STATIC) { target = global_1[TARGET] || setGlobal(TARGET, {}); } else { target = (global_1[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor$3(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe var objectKeys = Object.keys || function keys(O) { return objectKeysInternal(O, enumBugKeys); }; // eslint-disable-next-line es/no-object-assign -- safe var $assign = Object.assign; // eslint-disable-next-line es/no-object-defineproperty -- required for testing var defineProperty$4 = Object.defineProperty; var concat$1 = functionUncurryThis([].concat); // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign var objectAssign = !$assign || fails(function () { // should have correct order of operations (Edge bug) if (descriptors && $assign({ b: 1 }, $assign(defineProperty$4({}, 'a', { enumerable: true, get: function () { defineProperty$4(this, 'b', { value: 3, enumerable: false }); } }), { b: 2 })).b !== 1) return true; // should work with symbols and should have deterministic property order (V8 bug) var A = {}; var B = {}; // eslint-disable-next-line es/no-symbol -- safe var symbol = Symbol(); var alphabet = 'abcdefghijklmnopqrst'; A[symbol] = 7; alphabet.split('').forEach(function (chr) { B[chr] = chr; }); return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` var T = toObject(target); var argumentsLength = arguments.length; var index = 1; var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; var propertyIsEnumerable = objectPropertyIsEnumerable.f; while (argumentsLength > index) { var S = indexedObject(arguments[index++]); var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key]; } } return T; } : $assign; // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign // eslint-disable-next-line es/no-object-assign -- required for testing _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { assign: objectAssign }); var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag'); var test$2 = {}; test$2[TO_STRING_TAG$3] = 'z'; var toStringTagSupport = String(test$2) === '[object z]'; var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag'); var Object$2 = global_1.Object; // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` var classof = toStringTagSupport ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$2)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; var String$2 = global_1.String; var toString_1 = function (argument) { if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); return String$2(argument); }; // a string of all valid unicode whitespaces var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; var replace$3 = functionUncurryThis(''.replace); var whitespace = '[' + whitespaces + ']'; var ltrim = RegExp('^' + whitespace + whitespace + '*'); var rtrim = RegExp(whitespace + whitespace + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation var createMethod$3 = function (TYPE) { return function ($this) { var string = toString_1(requireObjectCoercible($this)); if (TYPE & 1) string = replace$3(string, ltrim, ''); if (TYPE & 2) string = replace$3(string, rtrim, ''); return string; }; }; var stringTrim = { // `String.prototype.{ trimLeft, trimStart }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimstart start: createMethod$3(1), // `String.prototype.{ trimRight, trimEnd }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimend end: createMethod$3(2), // `String.prototype.trim` method // https://tc39.es/ecma262/#sec-string.prototype.trim trim: createMethod$3(3) }; var PROPER_FUNCTION_NAME$2 = functionName.PROPER; var non = '\u200B\u0085\u180E'; // check that a method works with the correct list // of whitespaces and has a correct name var stringTrimForced = function (METHOD_NAME) { return fails(function () { return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() !== non || (PROPER_FUNCTION_NAME$2 && whitespaces[METHOD_NAME].name !== METHOD_NAME); }); }; var $trim = stringTrim.trim; // `String.prototype.trim` method // https://tc39.es/ecma262/#sec-string.prototype.trim _export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, { trim: function trim() { return $trim(this); } }); var arrayMethodIsStrict = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call -- required for testing method.call(null, argument || function () { return 1; }, 1); }); }; var un$Join = functionUncurryThis([].join); var ES3_STRINGS = indexedObject != Object; var STRICT_METHOD$3 = arrayMethodIsStrict('join', ','); // `Array.prototype.join` method // https://tc39.es/ecma262/#sec-array.prototype.join _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$3 }, { join: function join(separator) { return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator); } }); // `RegExp.prototype.flags` getter implementation // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags var regexpFlags = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.dotAll) result += 's'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError var $RegExp$2 = global_1.RegExp; var UNSUPPORTED_Y$3 = fails(function () { var re = $RegExp$2('a', 'y'); re.lastIndex = 2; return re.exec('abcd') != null; }); // UC Browser bug // https://github.com/zloirock/core-js/issues/1008 var MISSED_STICKY$1 = UNSUPPORTED_Y$3 || fails(function () { return !$RegExp$2('a', 'y').sticky; }); var BROKEN_CARET = UNSUPPORTED_Y$3 || fails(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 regexpStickyHelpers = { BROKEN_CARET: BROKEN_CARET, MISSED_STICKY: MISSED_STICKY$1, UNSUPPORTED_Y: UNSUPPORTED_Y$3 }; // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var props = toIndexedObject(Properties); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]); return O; }; var objectDefineProperties = { f: f }; var html = getBuiltIn('document', 'documentElement'); /* global ActiveXObject -- old IE, WSH */ var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO$1 = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // 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; }; // 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('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(); }; hiddenKeys$1[IE_PROTO$1] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create var objectCreate = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(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 : objectDefineProperties.f(result, Properties); }; // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError var $RegExp$1 = global_1.RegExp; var regexpUnsupportedDotAll = fails(function () { var re = $RegExp$1('.', 's'); return !(re.dotAll && re.exec('\n') && re.flags === 's'); }); // babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError var $RegExp = global_1.RegExp; var regexpUnsupportedNcg = fails(function () { var re = $RegExp('(?b)', 'g'); return re.exec('b').groups.a !== 'b' || 'b'.replace(re, '$c') !== 'bc'; }); /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ /* eslint-disable regexp/no-useless-quantifier -- testing */ var getInternalState$1 = internalState.get; var nativeReplace = shared('native-string-replace', String.prototype.replace); var nativeExec = RegExp.prototype.exec; var patchedExec = nativeExec; var charAt$5 = functionUncurryThis(''.charAt); var indexOf = functionUncurryThis(''.indexOf); var replace$2 = functionUncurryThis(''.replace); var stringSlice$6 = functionUncurryThis(''.slice); var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/; var re2 = /b*/g; functionCall(nativeExec, re1, 'a'); functionCall(nativeExec, re2, 'a'); return re1.lastIndex !== 0 || re2.lastIndex !== 0; })(); var UNSUPPORTED_Y$2 = regexpStickyHelpers.BROKEN_CARET; // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$2 || regexpUnsupportedDotAll || regexpUnsupportedNcg; if (PATCH) { patchedExec = function exec(string) { var re = this; var state = getInternalState$1(re); var str = toString_1(string); var raw = state.raw; var result, reCopy, lastIndex, match, i, object, group; if (raw) { raw.lastIndex = re.lastIndex; result = functionCall(patchedExec, raw, str); re.lastIndex = raw.lastIndex; return result; } var groups = state.groups; var sticky = UNSUPPORTED_Y$2 && re.sticky; var flags = functionCall(regexpFlags, re); var source = re.source; var charsAdded = 0; var strCopy = str; if (sticky) { flags = replace$2(flags, 'y', ''); if (indexOf(flags, 'g') === -1) { flags += 'g'; } strCopy = stringSlice$6(str, re.lastIndex); // Support anchored sticky behavior. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$5(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); } if (NPCG_INCLUDED) { reCopy = new RegExp('^' + source + '$(?!\\s)', flags); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; match = functionCall(nativeExec, sticky ? reCopy : re, strCopy); if (sticky) { if (match) { match.input = stringSlice$6(match.input, charsAdded); match[0] = stringSlice$6(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' work for /(.?)?/ functionCall(nativeReplace, match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (match && groups) { match.groups = object = objectCreate(null); for (i = 0; i < groups.length; i++) { group = groups[i]; object[group[0]] = match[group[1]]; } } return match; }; } var regexpExec = patchedExec; // `RegExp.prototype.exec` method // https://tc39.es/ecma262/#sec-regexp.prototype.exec _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { exec: regexpExec }); var FunctionPrototype = Function.prototype; var apply = FunctionPrototype.apply; var call = FunctionPrototype.call; // eslint-disable-next-line es/no-reflect -- safe var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () { return call.apply(apply, arguments); }); // TODO: Remove from `core-js@4` since it's moved to entry points var SPECIES$5 = wellKnownSymbol('species'); var RegExpPrototype$2 = RegExp.prototype; var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) { var SYMBOL = wellKnownSymbol(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(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$5] = function () { return re; }; re.flags = ''; re[SYMBOL] = /./[SYMBOL]; } re.exec = function () { execCalled = true; return null; }; re[SYMBOL](''); return !execCalled; }); if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || FORCED ) { var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]); var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { var uncurriedNativeMethod = functionUncurryThis(nativeMethod); var $exec = regexp.exec; if ($exec === regexpExec || $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: uncurriedNativeRegExpMethod(regexp, str, arg2) }; } return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) }; } return { done: false }; }); redefine(String.prototype, KEY, methods[0]); redefine(RegExpPrototype$2, SYMBOL, methods[1]); } if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true); }; var MATCH$2 = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.es/ecma262/#sec-isregexp var isRegexp = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); }; var noop = function () { /* empty */ }; var empty = []; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec$3 = functionUncurryThis(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); var isConstructorModern = function isConstructor(argument) { if (!isCallable(argument)) return false; try { construct(noop, empty, argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function isConstructor(argument) { if (!isCallable(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$3(constructorRegExp, inspectSource(argument)); } catch (error) { return true; } }; isConstructorLegacy.sham = true; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor var isConstructor = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; var TypeError$7 = global_1.TypeError; // `Assert: IsConstructor(argument) is true` var aConstructor = function (argument) { if (isConstructor(argument)) return argument; throw TypeError$7(tryToString(argument) + ' is not a constructor'); }; var SPECIES$4 = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.es/ecma262/#sec-speciesconstructor var speciesConstructor = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aConstructor(S); }; var charAt$4 = functionUncurryThis(''.charAt); var charCodeAt$1 = functionUncurryThis(''.charCodeAt); var stringSlice$5 = functionUncurryThis(''.slice); var createMethod$2 = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = toString_1(requireObjectCoercible($this)); var position = toIntegerOrInfinity(pos); var size = S.length; var first, second; if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; first = charCodeAt$1(S, position); return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt$1(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt$4(S, position) : first : CONVERT_TO_STRING ? stringSlice$5(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; 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 charAt$3 = stringMultibyte.charAt; // `AdvanceStringIndex` abstract operation // https://tc39.es/ecma262/#sec-advancestringindex var advanceStringIndex = function (S, index, unicode) { return index + (unicode ? charAt$3(S, index).length : 1); }; var createProperty = function (object, key, value) { var propertyKey = toPropertyKey(key); if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); else object[propertyKey] = value; }; var Array$3 = global_1.Array; var max$3 = Math.max; var arraySliceSimple = function (O, start, end) { var length = lengthOfArrayLike(O); var k = toAbsoluteIndex(start, length); var fin = toAbsoluteIndex(end === undefined ? length : end, length); var result = Array$3(max$3(fin - k, 0)); for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]); result.length = n; return result; }; var TypeError$6 = global_1.TypeError; // `RegExpExec` abstract operation // https://tc39.es/ecma262/#sec-regexpexec var regexpExecAbstract = function (R, S) { var exec = R.exec; if (isCallable(exec)) { var result = functionCall(exec, R, S); if (result !== null) anObject(result); return result; } if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S); throw TypeError$6('RegExp#exec called on incompatible receiver'); }; var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y; var MAX_UINT32 = 0xFFFFFFFF; var min$4 = Math.min; var $push = [].push; var exec$2 = functionUncurryThis(/./.exec); var push$4 = functionUncurryThis($push); var stringSlice$4 = functionUncurryThis(''.slice); // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec // Weex JS has frozen built-in prototypes, so use try / catch wrapper var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { // eslint-disable-next-line regexp/no-empty-group -- required for testing var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; }); // @@split logic fixRegexpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) { var internalSplit; if ( 'abbc'.split(/(b)*/)[1] == 'c' || // eslint-disable-next-line regexp/no-empty-group -- required for testing 'test'.split(/(?:)/, -1).length != 4 || 'ab'.split(/(?:ab)*/).length != 2 || '.'.split(/(.?)(.?)/).length != 4 || // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing '.'.split(/()()/).length > 1 || ''.split(/.?/).length ) { // based on es5-shim implementation, need to rework it internalSplit = function (separator, limit) { var string = toString_1(requireObjectCoercible(this)); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (separator === undefined) return [string]; // If `separator` is not a regex, use native split if (!isRegexp(separator)) { return functionCall(nativeSplit, string, separator, lim); } var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var match, lastIndex, lastLength; while (match = functionCall(regexpExec, separatorCopy, string)) { lastIndex = separatorCopy.lastIndex; if (lastIndex > lastLastIndex) { push$4(output, stringSlice$4(string, lastLastIndex, match.index)); if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySliceSimple(match, 1)); lastLength = match[0].length; lastLastIndex = lastIndex; if (output.length >= lim) break; } if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop } if (lastLastIndex === string.length) { if (lastLength || !exec$2(separatorCopy, '')) push$4(output, ''); } else push$4(output, stringSlice$4(string, lastLastIndex)); return output.length > lim ? arraySliceSimple(output, 0, lim) : output; }; // Chakra, V8 } else if ('0'.split(undefined, 0).length) { internalSplit = function (separator, limit) { return separator === undefined && limit === 0 ? [] : functionCall(nativeSplit, this, separator, limit); }; } else internalSplit = nativeSplit; return [ // `String.prototype.split` method // https://tc39.es/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = requireObjectCoercible(this); var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT); return splitter ? functionCall(splitter, separator, O, limit) : functionCall(internalSplit, toString_1(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (string, limit) { var rx = anObject(this); var S = toString_1(string); var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit); if (res.done) return res.value; var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (UNSUPPORTED_Y$1 ? 'g' : 'y'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(UNSUPPORTED_Y$1 ? '^(?:' + rx.source + ')' : rx, flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = UNSUPPORTED_Y$1 ? 0 : q; var z = regexpExecAbstract(splitter, UNSUPPORTED_Y$1 ? stringSlice$4(S, q) : S); var e; if ( z === null || (e = min$4(toLength(splitter.lastIndex + (UNSUPPORTED_Y$1 ? q : 0)), S.length)) === p ) { q = advanceStringIndex(S, q, unicodeMatching); } else { push$4(A, stringSlice$4(S, p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { push$4(A, z[i]); if (A.length === lim) return A; } q = p = e; } } push$4(A, stringSlice$4(S, p)); return A; } ]; }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y$1); var $propertyIsEnumerable = objectPropertyIsEnumerable.f; var propertyIsEnumerable = functionUncurryThis($propertyIsEnumerable); var push$3 = functionUncurryThis([].push); // `Object.{ entries, values }` methods implementation var createMethod$1 = function (TO_ENTRIES) { return function (it) { var O = toIndexedObject(it); var keys = objectKeys(O); var length = keys.length; var i = 0; var result = []; var key; while (length > i) { key = keys[i++]; if (!descriptors || propertyIsEnumerable(O, key)) { push$3(result, TO_ENTRIES ? [key, O[key]] : O[key]); } } return result; }; }; var objectToArray = { // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries entries: createMethod$1(true), // `Object.values` method // https://tc39.es/ecma262/#sec-object.values values: createMethod$1(false) }; var $entries = objectToArray.entries; // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries _export({ target: 'Object', stat: true }, { entries: function entries(O) { return $entries(O); } }); var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] == undefined) { objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { configurable: true, value: objectCreate(null) }); } // add a key to Array.prototype[@@unscopables] var addToUnscopables = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; var $includes = arrayIncludes.includes; // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes _export({ target: 'Array', proto: true }, { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('includes'); // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe var isArray = Array.isArray || function isArray(argument) { return classofRaw(argument) == 'Array'; }; var SPECIES$3 = wellKnownSymbol('species'); var Array$2 = global_1.Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesConstructor = function (originalArray) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === Array$2 || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES$3]; if (C === null) C = undefined; } } return C === undefined ? Array$2 : C; }; // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesCreate = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; var SPECIES$2 = wellKnownSymbol('species'); var arrayMethodHasSpeciesSupport = 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 engineV8Version >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES$2] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; var TypeError$5 = global_1.TypeError; // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED$3 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species _export({ target: 'Array', proto: true, forced: FORCED$3 }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); if (n + len > MAX_SAFE_INTEGER$1) throw TypeError$5(MAXIMUM_ALLOWED_INDEX_EXCEEDED); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { if (n >= MAX_SAFE_INTEGER$1) throw TypeError$5(MAXIMUM_ALLOWED_INDEX_EXCEEDED); createProperty(A, n++, E); } } A.length = n; return A; } }); var bind = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding var functionBindContext = function (fn, that) { aCallable(fn); return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; var push$2 = functionUncurryThis([].push); // `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($this); var self = indexedObject(O); var boundFunction = functionBindContext(callbackfn, that); var length = lengthOfArrayLike(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$2(target, value); // filter } else switch (TYPE) { case 4: return false; // every case 7: push$2(target, value); // filterReject } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; 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) }; var $find = arrayIteration.find; var FIND = 'find'; var SKIPS_HOLES$1 = true; // Shouldn't skip holes if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES$1 = false; }); // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find _export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 }, { find: function find(callbackfn /* , that = undefined */) { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables(FIND); // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring var objectToString = toStringTagSupport ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; // `Object.prototype.toString` method // https://tc39.es/ecma262/#sec-object.prototype.tostring if (!toStringTagSupport) { redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); } var TypeError$4 = global_1.TypeError; var notARegexp = function (it) { if (isRegexp(it)) { throw TypeError$4("The method doesn't accept regular expressions"); } return it; }; var MATCH$1 = wellKnownSymbol('match'); var correctIsRegexpLogic = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); } catch (error1) { try { regexp[MATCH$1] = false; return '/./'[METHOD_NAME](regexp); } catch (error2) { /* empty */ } } return false; }; var stringIndexOf$2 = functionUncurryThis(''.indexOf); // `String.prototype.includes` method // https://tc39.es/ecma262/#sec-string.prototype.includes _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */) { return !!~stringIndexOf$2( toString_1(requireObjectCoercible(this)), toString_1(notARegexp(searchString)), arguments.length > 1 ? arguments[1] : undefined ); } }); // 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 }; // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` var classList = documentCreateElement('span').classList; var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype; var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype; var $forEach = arrayIteration.forEach; var STRICT_METHOD$2 = arrayMethodIsStrict('forEach'); // `Array.prototype.forEach` method implementation // https://tc39.es/ecma262/#sec-array.prototype.foreach var arrayForEach = !STRICT_METHOD$2 ? 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 handlePrototype$1 = function (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach); } catch (error) { CollectionPrototype.forEach = arrayForEach; } }; for (var COLLECTION_NAME$1 in domIterables) { if (domIterables[COLLECTION_NAME$1]) { handlePrototype$1(global_1[COLLECTION_NAME$1] && global_1[COLLECTION_NAME$1].prototype); } } handlePrototype$1(domTokenListPrototype); var trim$2 = stringTrim.trim; var charAt$2 = functionUncurryThis(''.charAt); var n$ParseFloat = global_1.parseFloat; var Symbol$2 = global_1.Symbol; var ITERATOR$4 = Symbol$2 && Symbol$2.iterator; var FORCED$2 = 1 / n$ParseFloat(whitespaces + '-0') !== -Infinity // MS Edge 18- broken with boxed symbols || (ITERATOR$4 && !fails(function () { n$ParseFloat(Object(ITERATOR$4)); })); // `parseFloat` method // https://tc39.es/ecma262/#sec-parsefloat-string var numberParseFloat = FORCED$2 ? function parseFloat(string) { var trimmedString = trim$2(toString_1(string)); var result = n$ParseFloat(trimmedString); return result === 0 && charAt$2(trimmedString, 0) == '-' ? -0 : result; } : n$ParseFloat; // `parseFloat` method // https://tc39.es/ecma262/#sec-parsefloat-string _export({ global: true, forced: parseFloat != numberParseFloat }, { parseFloat: numberParseFloat }); /* eslint-disable es/no-array-prototype-indexof -- required for testing */ var $IndexOf = arrayIncludes.indexOf; var un$IndexOf = functionUncurryThis([].indexOf); var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0; var STRICT_METHOD$1 = arrayMethodIsStrict('indexOf'); // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 }, { indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { var fromIndex = arguments.length > 1 ? arguments[1] : undefined; return NEGATIVE_ZERO // convert -0 to +0 ? un$IndexOf(this, searchElement, fromIndex) || 0 : $IndexOf(this, searchElement, fromIndex); } }); var floor$1 = Math.floor; var mergeSort = function (array, comparefn) { var length = array.length; var middle = floor$1(length / 2); return length < 8 ? insertionSort(array, comparefn) : merge( array, mergeSort(arraySliceSimple(array, 0, middle), comparefn), mergeSort(arraySliceSimple(array, middle), comparefn), comparefn ); }; var insertionSort = function (array, comparefn) { var length = array.length; var i = 1; var element, j; while (i < length) { j = i; element = array[i]; while (j && comparefn(array[j - 1], element) > 0) { array[j] = array[--j]; } if (j !== i++) array[j] = element; } return array; }; var merge = function (array, left, right, comparefn) { var llength = left.length; var rlength = right.length; var lindex = 0; var rindex = 0; while (lindex < llength || rindex < rlength) { array[lindex + rindex] = (lindex < llength && rindex < rlength) ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] : lindex < llength ? left[lindex++] : right[rindex++]; } return array; }; var arraySort = mergeSort; var firefox = engineUserAgent.match(/firefox\/(\d+)/i); var engineFfVersion = !!firefox && +firefox[1]; var engineIsIeOrEdge = /MSIE|Trident/.test(engineUserAgent); var webkit = engineUserAgent.match(/AppleWebKit\/(\d+)\./); var engineWebkitVersion = !!webkit && +webkit[1]; var test$1 = []; var un$Sort = functionUncurryThis(test$1.sort); var push$1 = functionUncurryThis(test$1.push); // IE8- var FAILS_ON_UNDEFINED = fails(function () { test$1.sort(undefined); }); // V8 bug var FAILS_ON_NULL = fails(function () { test$1.sort(null); }); // Old WebKit var STRICT_METHOD = arrayMethodIsStrict('sort'); var STABLE_SORT = !fails(function () { // feature detection can be too slow, so check engines versions if (engineV8Version) return engineV8Version < 70; if (engineFfVersion && engineFfVersion > 3) return; if (engineIsIeOrEdge) return true; if (engineWebkitVersion) return engineWebkitVersion < 603; var result = ''; var code, chr, value, index; // generate an array with more 512 elements (Chakra and old V8 fails only in this case) for (code = 65; code < 76; code++) { chr = String.fromCharCode(code); switch (code) { case 66: case 69: case 70: case 72: value = 3; break; case 68: case 71: value = 4; break; default: value = 2; } for (index = 0; index < 47; index++) { test$1.push({ k: chr + index, v: value }); } } test$1.sort(function (a, b) { return b.v - a.v; }); for (index = 0; index < test$1.length; index++) { chr = test$1[index].k.charAt(0); if (result.charAt(result.length - 1) !== chr) result += chr; } return result !== 'DGBEFHACIJK'; }); var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT; var getSortCompare = function (comparefn) { return function (x, y) { if (y === undefined) return -1; if (x === undefined) return 1; if (comparefn !== undefined) return +comparefn(x, y) || 0; return toString_1(x) > toString_1(y) ? 1 : -1; }; }; // `Array.prototype.sort` method // https://tc39.es/ecma262/#sec-array.prototype.sort _export({ target: 'Array', proto: true, forced: FORCED$1 }, { sort: function sort(comparefn) { if (comparefn !== undefined) aCallable(comparefn); var array = toObject(this); if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn); var items = []; var arrayLength = lengthOfArrayLike(array); var itemsLength, index; for (index = 0; index < arrayLength; index++) { if (index in array) push$1(items, array[index]); } arraySort(items, getSortCompare(comparefn)); itemsLength = items.length; index = 0; while (index < itemsLength) array[index] = items[index++]; while (index < arrayLength) delete array[index++]; return array; } }); var floor = Math.floor; var charAt$1 = functionUncurryThis(''.charAt); var replace$1 = functionUncurryThis(''.replace); var stringSlice$3 = functionUncurryThis(''.slice); var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; // `GetSubstitution` abstract operation // https://tc39.es/ecma262/#sec-getsubstitution var getSubstitution = 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$1(replacement, symbols, function (match, ch) { var capture; switch (charAt$1(ch, 0)) { case '$': return '$'; case '&': return matched; case '`': return stringSlice$3(str, 0, position); case "'": return stringSlice$3(str, tailPos); case '<': capture = namedCaptures[stringSlice$3(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; }); }; var REPLACE = wellKnownSymbol('replace'); var max$2 = Math.max; var min$3 = Math.min; var concat = functionUncurryThis([].concat); var push = functionUncurryThis([].push); var stringIndexOf$1 = functionUncurryThis(''.indexOf); var stringSlice$2 = functionUncurryThis(''.slice); var maybeToString = function (it) { return it === undefined ? it : String(it); }; // 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(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'; }); // @@replace logic fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; return [ // `String.prototype.replace` method // https://tc39.es/ecma262/#sec-string.prototype.replace function replace(searchValue, replaceValue) { var O = requireObjectCoercible(this); var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE); return replacer ? functionCall(replacer, searchValue, O, replaceValue) : functionCall(nativeReplace, toString_1(O), searchValue, replaceValue); }, // `RegExp.prototype[@@replace]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace function (string, replaceValue) { var rx = anObject(this); var S = toString_1(string); if ( typeof replaceValue == 'string' && stringIndexOf$1(replaceValue, UNSAFE_SUBSTITUTE) === -1 && stringIndexOf$1(replaceValue, '$<') === -1 ) { var res = maybeCallNative(nativeReplace, rx, S, replaceValue); if (res.done) return res.value; } var functionalReplace = isCallable(replaceValue); if (!functionalReplace) replaceValue = toString_1(replaceValue); var global = rx.global; if (global) { var fullUnicode = rx.unicode; rx.lastIndex = 0; } var results = []; while (true) { var result = regexpExecAbstract(rx, S); if (result === null) break; push(results, result); if (!global) break; var matchStr = toString_1(result[0]); if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); } var accumulatedResult = ''; var nextSourcePosition = 0; for (var i = 0; i < results.length; i++) { result = results[i]; var matched = toString_1(result[0]); var position = max$2(min$3(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(captures, maybeToString(result[j])); var namedCaptures = result.groups; if (functionalReplace) { var replacerArgs = concat([matched], captures, position, S); if (namedCaptures !== undefined) push(replacerArgs, namedCaptures); var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs)); } else { replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); } if (position >= nextSourcePosition) { accumulatedResult += stringSlice$2(S, nextSourcePosition, position) + replacement; nextSourcePosition = position + matched.length; } } return accumulatedResult + stringSlice$2(S, nextSourcePosition); } ]; }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE); var $filter = arrayIteration.filter; var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('filter'); // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 }, { filter: function filter(callbackfn /* , thisArg */) { return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // `SameValue` abstract operation // https://tc39.es/ecma262/#sec-samevalue // eslint-disable-next-line es/no-object-is -- safe var sameValue = Object.is || function is(x, y) { // eslint-disable-next-line no-self-compare -- NaN check return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; // @@search logic fixRegexpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) { return [ // `String.prototype.search` method // https://tc39.es/ecma262/#sec-string.prototype.search function search(regexp) { var O = requireObjectCoercible(this); var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH); return searcher ? functionCall(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString_1(O)); }, // `RegExp.prototype[@@search]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@search function (string) { var rx = anObject(this); var S = toString_1(string); var res = maybeCallNative(nativeSearch, rx, S); if (res.done) return res.value; var previousLastIndex = rx.lastIndex; if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; var result = regexpExecAbstract(rx, S); if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; return result === null ? -1 : result.index; } ]; }); var trim$1 = stringTrim.trim; var $parseInt = global_1.parseInt; var Symbol$1 = global_1.Symbol; var ITERATOR$3 = Symbol$1 && Symbol$1.iterator; var hex = /^[+-]?0x/i; var exec$1 = functionUncurryThis(hex.exec); var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22 // MS Edge 18- broken with boxed symbols || (ITERATOR$3 && !fails(function () { $parseInt(Object(ITERATOR$3)); })); // `parseInt` method // https://tc39.es/ecma262/#sec-parseint-string-radix var numberParseInt = FORCED ? function parseInt(string, radix) { var S = trim$1(toString_1(string)); return $parseInt(S, (radix >>> 0) || (exec$1(hex, S) ? 16 : 10)); } : $parseInt; // `parseInt` method // https://tc39.es/ecma262/#sec-parseint-string-radix _export({ global: true, forced: parseInt != numberParseInt }, { parseInt: numberParseInt }); var $map = arrayIteration.map; var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('map'); // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, { map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); var $findIndex = arrayIteration.findIndex; var FIND_INDEX = 'findIndex'; var SKIPS_HOLES = true; // Shouldn't skip holes if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; }); // `Array.prototype.findIndex` method // https://tc39.es/ecma262/#sec-array.prototype.findindex _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { findIndex: function findIndex(callbackfn /* , that = undefined */) { return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables(FIND_INDEX); var String$1 = global_1.String; var TypeError$3 = global_1.TypeError; var aPossiblePrototype = function (argument) { if (typeof argument == 'object' || isCallable(argument)) return argument; throw TypeError$3("Can't set " + String$1(argument) + ' as a prototype'); }; /* eslint-disable no-proto -- safe */ // `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 { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe setter = functionUncurryThis(Object.getOwnPropertyDescriptor(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); // makes subclassing work correct for wrapped built-ins var inheritIfRequired = function ($this, dummy, Wrapper) { var NewTarget, NewTargetPrototype; if ( // it can work only with native `setPrototypeOf` objectSetPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this isCallable(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype ) objectSetPrototypeOf($this, NewTargetPrototype); return $this; }; var SPECIES$1 = wellKnownSymbol('species'); var setSpecies = function (CONSTRUCTOR_NAME) { var Constructor = getBuiltIn(CONSTRUCTOR_NAME); var defineProperty = objectDefineProperty.f; if (descriptors && Constructor && !Constructor[SPECIES$1]) { defineProperty(Constructor, SPECIES$1, { configurable: true, get: function () { return this; } }); } }; var defineProperty$3 = objectDefineProperty.f; var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f; var enforceInternalState = internalState.enforce; var MATCH = wellKnownSymbol('match'); var NativeRegExp = global_1.RegExp; var RegExpPrototype$1 = NativeRegExp.prototype; var SyntaxError = global_1.SyntaxError; var getFlags$1 = functionUncurryThis(regexpFlags); var exec = functionUncurryThis(RegExpPrototype$1.exec); var charAt = functionUncurryThis(''.charAt); var replace = functionUncurryThis(''.replace); var stringIndexOf = functionUncurryThis(''.indexOf); var stringSlice$1 = functionUncurryThis(''.slice); // TODO: Use only propper RegExpIdentifierName var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/; var re1 = /a/g; var re2 = /a/g; // "new" should create a new object, old webkit bug var CORRECT_NEW = new NativeRegExp(re1) !== re1; var MISSED_STICKY = regexpStickyHelpers.MISSED_STICKY; var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y; var BASE_FORCED = descriptors && (!CORRECT_NEW || MISSED_STICKY || regexpUnsupportedDotAll || regexpUnsupportedNcg || fails(function () { re2[MATCH] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i'; })); var handleDotAll = function (string) { var length = string.length; var index = 0; var result = ''; var brackets = false; var chr; for (; index <= length; index++) { chr = charAt(string, index); if (chr === '\\') { result += chr + charAt(string, ++index); continue; } if (!brackets && chr === '.') { result += '[\\s\\S]'; } else { if (chr === '[') { brackets = true; } else if (chr === ']') { brackets = false; } result += chr; } } return result; }; var handleNCG = function (string) { var length = string.length; var index = 0; var result = ''; var named = []; var names = {}; var brackets = false; var ncg = false; var groupid = 0; var groupname = ''; var chr; for (; index <= length; index++) { chr = charAt(string, index); if (chr === '\\') { chr = chr + charAt(string, ++index); } else if (chr === ']') { brackets = false; } else if (!brackets) switch (true) { case chr === '[': brackets = true; break; case chr === '(': if (exec(IS_NCG, stringSlice$1(string, index + 1))) { index += 2; ncg = true; } result += chr; groupid++; continue; case chr === '>' && ncg: if (groupname === '' || hasOwnProperty_1(names, groupname)) { throw new SyntaxError('Invalid capture group name'); } names[groupname] = true; named[named.length] = [groupname, groupid]; ncg = false; groupname = ''; continue; } if (ncg) groupname += chr; else result += chr; } return [result, named]; }; // `RegExp` constructor // https://tc39.es/ecma262/#sec-regexp-constructor if (isForced_1('RegExp', BASE_FORCED)) { var RegExpWrapper = function RegExp(pattern, flags) { var thisIsRegExp = objectIsPrototypeOf(RegExpPrototype$1, this); var patternIsRegExp = isRegexp(pattern); var flagsAreUndefined = flags === undefined; var groups = []; var rawPattern = pattern; var rawFlags, dotAll, sticky, handled, result, state; if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) { return pattern; } if (patternIsRegExp || objectIsPrototypeOf(RegExpPrototype$1, pattern)) { pattern = pattern.source; if (flagsAreUndefined) flags = 'flags' in rawPattern ? rawPattern.flags : getFlags$1(rawPattern); } pattern = pattern === undefined ? '' : toString_1(pattern); flags = flags === undefined ? '' : toString_1(flags); rawPattern = pattern; if (regexpUnsupportedDotAll && 'dotAll' in re1) { dotAll = !!flags && stringIndexOf(flags, 's') > -1; if (dotAll) flags = replace(flags, /s/g, ''); } rawFlags = flags; if (MISSED_STICKY && 'sticky' in re1) { sticky = !!flags && stringIndexOf(flags, 'y') > -1; if (sticky && UNSUPPORTED_Y) flags = replace(flags, /y/g, ''); } if (regexpUnsupportedNcg) { handled = handleNCG(pattern); pattern = handled[0]; groups = handled[1]; } result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype$1, RegExpWrapper); if (dotAll || sticky || groups.length) { state = enforceInternalState(result); if (dotAll) { state.dotAll = true; state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags); } if (sticky) state.sticky = true; if (groups.length) state.groups = groups; } if (pattern !== rawPattern) try { // fails in old engines, but we have no alternatives for unsupported regex syntax createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern); } catch (error) { /* empty */ } return result; }; var proxy = function (key) { key in RegExpWrapper || defineProperty$3(RegExpWrapper, key, { configurable: true, get: function () { return NativeRegExp[key]; }, set: function (it) { NativeRegExp[key] = it; } }); }; for (var keys$1 = getOwnPropertyNames$1(NativeRegExp), index = 0; keys$1.length > index;) { proxy(keys$1[index++]); } RegExpPrototype$1.constructor = RegExpWrapper; RegExpWrapper.prototype = RegExpPrototype$1; redefine(global_1, 'RegExp', RegExpWrapper); } // https://tc39.es/ecma262/#sec-get-regexp-@@species setSpecies('RegExp'); var PROPER_FUNCTION_NAME$1 = functionName.PROPER; var TO_STRING = 'toString'; var RegExpPrototype = RegExp.prototype; var n$ToString = RegExpPrototype[TO_STRING]; var getFlags = functionUncurryThis(regexpFlags); var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); // FF44- RegExp#toString has a wrong name var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && n$ToString.name != TO_STRING; // `RegExp.prototype.toString` method // https://tc39.es/ecma262/#sec-regexp.prototype.tostring if (NOT_GENERIC || INCORRECT_NAME) { redefine(RegExp.prototype, TO_STRING, function toString() { var R = anObject(this); var p = toString_1(R.source); var rf = R.flags; var f = toString_1(rf === undefined && objectIsPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf); return '/' + p + '/' + f; }, { unsafe: true }); } var arraySlice$1 = functionUncurryThis([].slice); var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice'); var SPECIES = wellKnownSymbol('species'); var Array$1 = global_1.Array; var max$1 = Math.max; // `Array.prototype.slice` method // https://tc39.es/ecma262/#sec-array.prototype.slice // fallback for not array-like ES3 strings and DOM objects _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, { 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$1 || isArray(Constructor.prototype))) { Constructor = undefined; } else if (isObject(Constructor)) { Constructor = Constructor[SPECIES]; if (Constructor === null) Constructor = undefined; } if (Constructor === Array$1 || Constructor === undefined) { return arraySlice$1(O, k, fin); } } result = new (Constructor === undefined ? Array$1 : Constructor)(max$1(fin - k, 0)); for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); result.length = n; return result; } }); var iterators = {}; var correctPrototypeGetter = !fails(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 IE_PROTO = sharedKey('IE_PROTO'); var Object$1 = global_1.Object; var ObjectPrototype = Object$1.prototype; // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof var objectGetPrototypeOf = correctPrototypeGetter ? Object$1.getPrototypeOf : function (O) { var object = toObject(O); if (hasOwnProperty_1(object, IE_PROTO)) return object[IE_PROTO]; var constructor = object.constructor; if (isCallable(constructor) && object instanceof constructor) { return constructor.prototype; } return object instanceof Object$1 ? ObjectPrototype : null; }; var ITERATOR$2 = wellKnownSymbol('iterator'); var BUGGY_SAFARI_ITERATORS$1 = false; // `%IteratorPrototype%` object // https://tc39.es/ecma262/#sec-%iteratorprototype%-object var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator; /* eslint-disable es/no-array-prototype-keys -- safe */ if ([].keys) { arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next` if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true; else { PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)); if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype; } } var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () { var test = {}; // FF44- legacy iterators case return IteratorPrototype$2[ITERATOR$2].call(test) !== test; }); if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {}; // `%IteratorPrototype%[@@iterator]()` method // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator if (!isCallable(IteratorPrototype$2[ITERATOR$2])) { redefine(IteratorPrototype$2, ITERATOR$2, function () { return this; }); } var iteratorsCore = { IteratorPrototype: IteratorPrototype$2, BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1 }; var defineProperty$2 = objectDefineProperty.f; var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); var setToStringTag = function (target, TAG, STATIC) { if (target && !STATIC) target = target.prototype; if (target && !hasOwnProperty_1(target, TO_STRING_TAG$1)) { defineProperty$2(target, TO_STRING_TAG$1, { configurable: true, value: TAG }); } }; var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; var returnThis$1 = function () { return this; }; var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { var TO_STRING_TAG = NAME + ' Iterator'; IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) }); setToStringTag(IteratorConstructor, TO_STRING_TAG, false); iterators[TO_STRING_TAG] = returnThis$1; return IteratorConstructor; }; 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$1 = wellKnownSymbol('iterator'); var KEYS = 'keys'; var VALUES = 'values'; var ENTRIES = 'entries'; var returnThis = function () { return this; }; var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { createIteratorConstructor(IteratorConstructor, NAME, next); 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 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 = objectGetPrototypeOf(anyNativeIterator.call(new Iterable())); if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { if (objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { if (objectSetPrototypeOf) { objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) { redefine(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 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { if (CONFIGURABLE_FUNCTION_NAME) { createNonEnumerableProperty(IterablePrototype, 'name', VALUES); } else { INCORRECT_VALUES_NAME = true; defaultIterator = function values() { return functionCall(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)) { redefine(IterablePrototype, KEY, methods[KEY]); } } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); } // define iterator if (IterablePrototype[ITERATOR$1] !== defaultIterator) { redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT }); } iterators[NAME] = defaultIterator; return methods; }; var defineProperty$1 = objectDefineProperty.f; var ARRAY_ITERATOR = 'Array Iterator'; var setInternalState = internalState.set; var getInternalState = internalState.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method // https://tc39.es/ecma262/#sec-array.prototype.entries // `Array.prototype.keys` method // https://tc39.es/ecma262/#sec-array.prototype.keys // `Array.prototype.values` method // https://tc39.es/ecma262/#sec-array.prototype.values // `Array.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-array.prototype-@@iterator // `CreateArrayIterator` internal method // https://tc39.es/ecma262/#sec-createarrayiterator var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) { setInternalState(this, { type: ARRAY_ITERATOR, target: toIndexedObject(iterated), // target index: 0, // next index kind: kind // kind }); // `%ArrayIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next }, function () { var state = getInternalState(this); var target = state.target; var kind = state.kind; var index = state.index++; if (!target || index >= target.length) { state.target = undefined; return { value: undefined, done: true }; } if (kind == 'keys') return { value: index, done: false }; if (kind == 'values') return { value: target[index], done: false }; return { value: [index, target[index]], done: false }; }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% // https://tc39.es/ecma262/#sec-createunmappedargumentsobject // https://tc39.es/ecma262/#sec-createmappedargumentsobject var values = iterators.Arguments = iterators.Array; // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); // V8 ~ Chrome 45- bug if (descriptors && values.name !== 'values') try { defineProperty$1(values, 'name', { value: 'values' }); } catch (error) { /* empty */ } var ITERATOR = wellKnownSymbol('iterator'); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var ArrayValues = es_array_iterator.values; var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) { if (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype[ITERATOR] !== ArrayValues) try { createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); } catch (error) { CollectionPrototype[ITERATOR] = ArrayValues; } if (!CollectionPrototype[TO_STRING_TAG]) { createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); } if (domIterables[COLLECTION_NAME]) for (var METHOD_NAME in es_array_iterator) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try { createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, es_array_iterator[METHOD_NAME]); } catch (error) { CollectionPrototype[METHOD_NAME] = es_array_iterator[METHOD_NAME]; } } } }; for (var COLLECTION_NAME in domIterables) { handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype, COLLECTION_NAME); } handlePrototype(domTokenListPrototype, 'DOMTokenList'); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice'); var TypeError$2 = global_1.TypeError; var max = Math.max; var min$2 = Math.min; var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; // `Array.prototype.splice` method // https://tc39.es/ecma262/#sec-array.prototype.splice // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { splice: function splice(start, deleteCount /* , ...items */) { var O = toObject(this); var len = lengthOfArrayLike(O); var actualStart = toAbsoluteIndex(start, len); var argumentsLength = arguments.length; var insertCount, actualDeleteCount, A, k, from, to; if (argumentsLength === 0) { insertCount = actualDeleteCount = 0; } else if (argumentsLength === 1) { insertCount = 0; actualDeleteCount = len - actualStart; } else { insertCount = argumentsLength - 2; actualDeleteCount = min$2(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart); } if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { throw TypeError$2(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); } A = arraySpeciesCreate(O, actualDeleteCount); for (k = 0; k < actualDeleteCount; k++) { from = actualStart + k; if (from in O) createProperty(A, k, O[from]); } A.length = actualDeleteCount; if (insertCount < actualDeleteCount) { for (k = actualStart; k < len - actualDeleteCount; k++) { from = k + actualDeleteCount; to = k + insertCount; if (from in O) O[to] = O[from]; else delete O[to]; } for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; } else if (insertCount > actualDeleteCount) { for (k = len - actualDeleteCount; k > actualStart; k--) { from = k + actualDeleteCount - 1; to = k + insertCount - 1; if (from in O) O[to] = O[from]; else delete O[to]; } } for (k = 0; k < insertCount; k++) { O[k + actualStart] = arguments[k + 2]; } O.length = len - actualDeleteCount + insertCount; return A; } }); // `thisNumberValue` abstract operation // https://tc39.es/ecma262/#sec-thisnumbervalue var thisNumberValue = functionUncurryThis(1.0.valueOf); var getOwnPropertyNames = objectGetOwnPropertyNames.f; var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; var defineProperty = objectDefineProperty.f; var trim = stringTrim.trim; var NUMBER = 'Number'; var NativeNumber = global_1[NUMBER]; var NumberPrototype = NativeNumber.prototype; var TypeError$1 = global_1.TypeError; var arraySlice = functionUncurryThis(''.slice); var charCodeAt = functionUncurryThis(''.charCodeAt); // `ToNumeric` abstract operation // https://tc39.es/ecma262/#sec-tonumeric var toNumeric = function (value) { var primValue = toPrimitive(value, 'number'); return typeof primValue == 'bigint' ? primValue : toNumber(primValue); }; // `ToNumber` abstract operation // https://tc39.es/ecma262/#sec-tonumber var toNumber = function (argument) { var it = toPrimitive(argument, 'number'); var first, third, radix, maxCode, digits, length, index, code; if (isSymbol(it)) throw TypeError$1('Cannot convert a Symbol value to a number'); if (typeof it == 'string' && it.length > 2) { it = trim(it); first = charCodeAt(it, 0); if (first === 43 || first === 45) { third = charCodeAt(it, 2); if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix } else if (first === 48) { switch (charCodeAt(it, 1)) { case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i default: return +it; } digits = arraySlice(it, 2); length = digits.length; for (index = 0; index < length; index++) { code = charCodeAt(digits, index); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if (code < 48 || code > maxCode) return NaN; } return parseInt(digits, radix); } } return +it; }; // `Number` constructor // https://tc39.es/ecma262/#sec-number-constructor if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { var NumberWrapper = function Number(value) { var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value)); var dummy = this; // check on 1..constructor(foo) case return objectIsPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); }) ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n; }; for (var keys = descriptors ? getOwnPropertyNames(NativeNumber) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES2015 (in case, if modules with ES2015 Number statics required before): 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' + // ESNext 'fromString,range' ).split(','), j = 0, key; keys.length > j; j++) { if (hasOwnProperty_1(NativeNumber, key = keys[j]) && !hasOwnProperty_1(NumberWrapper, key)) { defineProperty(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key)); } } NumberWrapper.prototype = NumberPrototype; NumberPrototype.constructor = NumberWrapper; redefine(global_1, NUMBER, NumberWrapper); } var un$Reverse = functionUncurryThis([].reverse); var test = [1, 2]; // `Array.prototype.reverse` method // https://tc39.es/ecma262/#sec-array.prototype.reverse // fix for Safari 12.0 bug // https://bugs.webkit.org/show_bug.cgi?id=188794 _export({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, { reverse: function reverse() { // eslint-disable-next-line no-self-assign -- dirty hack if (isArray(this)) this.length = this.length; return un$Reverse(this); } }); var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); }); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { keys: function keys(it) { return objectKeys(toObject(it)); } }); // @@match logic fixRegexpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) { return [ // `String.prototype.match` method // https://tc39.es/ecma262/#sec-string.prototype.match function match(regexp) { var O = requireObjectCoercible(this); var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH); return matcher ? functionCall(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(this); var S = toString_1(string); var res = maybeCallNative(nativeMatch, rx, S); if (res.done) return res.value; if (!rx.global) return regexpExecAbstract(rx, S); var fullUnicode = rx.unicode; rx.lastIndex = 0; var A = []; var n = 0; var result; while ((result = regexpExecAbstract(rx, S)) !== null) { var matchStr = toString_1(result[0]); A[n] = matchStr; if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); n++; } return n === 0 ? null : A; } ]; }); var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; // eslint-disable-next-line es/no-string-prototype-startswith -- safe var un$StartsWith = functionUncurryThis(''.startsWith); var stringSlice = functionUncurryThis(''.slice); var min$1 = Math.min; var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('startsWith'); // https://github.com/zloirock/core-js/pull/702 var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () { var descriptor = getOwnPropertyDescriptor$1(String.prototype, 'startsWith'); return descriptor && !descriptor.writable; }(); // `String.prototype.startsWith` method // https://tc39.es/ecma262/#sec-string.prototype.startswith _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, { startsWith: function startsWith(searchString /* , position = 0 */) { var that = toString_1(requireObjectCoercible(this)); notARegexp(searchString); var index = toLength(min$1(arguments.length > 1 ? arguments[1] : undefined, that.length)); var search = toString_1(searchString); return un$StartsWith ? un$StartsWith(that, search, index) : stringSlice(that, index, index + search.length) === search; } }); var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; // eslint-disable-next-line es/no-string-prototype-endswith -- safe var un$EndsWith = functionUncurryThis(''.endsWith); var slice = functionUncurryThis(''.slice); var min = Math.min; var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('endsWith'); // https://github.com/zloirock/core-js/pull/702 var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () { var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith'); return descriptor && !descriptor.writable; }(); // `String.prototype.endsWith` method // https://tc39.es/ecma262/#sec-string.prototype.endswith _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { endsWith: function endsWith(searchString /* , endPosition = @length */) { var that = toString_1(requireObjectCoercible(this)); notARegexp(searchString); var endPosition = arguments.length > 1 ? arguments[1] : undefined; var len = that.length; var end = endPosition === undefined ? len : min(toLength(endPosition), len); var search = toString_1(searchString); return un$EndsWith ? un$EndsWith(that, search, end) : slice(that, end - search.length, end) === search; } }); var Utils = { getBootstrapVersion: function getBootstrapVersion() { var bootstrapVersion = 5; try { var rawVersion = $__default["default"].fn.dropdown.Constructor.VERSION; // Only try to parse VERSION if it is defined. // It is undefined in older versions of Bootstrap (tested with 3.1.1). if (rawVersion !== undefined) { bootstrapVersion = parseInt(rawVersion, 10); } } catch (e) {// ignore } try { // eslint-disable-next-line no-undef var _rawVersion = bootstrap.Tooltip.VERSION; if (_rawVersion !== undefined) { bootstrapVersion = parseInt(_rawVersion, 10); } } catch (e) {// ignore } return bootstrapVersion; }, getIconsPrefix: function getIconsPrefix(theme) { return { bootstrap3: 'glyphicon', bootstrap4: 'fa', bootstrap5: 'bi', 'bootstrap-table': 'icon', bulma: 'fa', foundation: 'fa', materialize: 'material-icons', semantic: 'fa' }[theme] || 'fa'; }, getIcons: function getIcons(prefix) { return { glyphicon: { paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down', paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up', refresh: 'glyphicon-refresh icon-refresh', toggleOff: 'glyphicon-list-alt icon-list-alt', toggleOn: 'glyphicon-list-alt icon-list-alt', columns: 'glyphicon-th icon-th', detailOpen: 'glyphicon-plus icon-plus', detailClose: 'glyphicon-minus icon-minus', fullscreen: 'glyphicon-fullscreen', search: 'glyphicon-search', clearSearch: 'glyphicon-trash' }, fa: { paginationSwitchDown: 'fa-caret-square-down', paginationSwitchUp: 'fa-caret-square-up', refresh: 'fa-sync', toggleOff: 'fa-toggle-off', toggleOn: 'fa-toggle-on', columns: 'fa-th-list', detailOpen: 'fa-plus', detailClose: 'fa-minus', fullscreen: 'fa-arrows-alt', search: 'fa-search', clearSearch: 'fa-trash' }, bi: { paginationSwitchDown: 'bi-caret-down-square', paginationSwitchUp: 'bi-caret-up-square', refresh: 'bi-arrow-clockwise', toggleOff: 'bi-toggle-off', toggleOn: 'bi-toggle-on', columns: 'bi-list-ul', detailOpen: 'bi-plus', detailClose: 'bi-dash', fullscreen: 'bi-arrows-move', search: 'bi-search', clearSearch: 'bi-trash' }, icon: { paginationSwitchDown: 'icon-arrow-up-circle', paginationSwitchUp: 'icon-arrow-down-circle', refresh: 'icon-refresh-cw', toggleOff: 'icon-toggle-right', toggleOn: 'icon-toggle-right', columns: 'icon-list', detailOpen: 'icon-plus', detailClose: 'icon-minus', fullscreen: 'icon-maximize', search: 'icon-search', clearSearch: 'icon-trash-2' }, 'material-icons': { paginationSwitchDown: 'grid_on', paginationSwitchUp: 'grid_off', refresh: 'refresh', toggleOff: 'tablet', toggleOn: 'tablet_android', columns: 'view_list', detailOpen: 'add', detailClose: 'remove', fullscreen: 'fullscreen', sort: 'sort', search: 'search', clearSearch: 'delete' } }[prefix]; }, getSearchInput: function getSearchInput(that) { if (typeof that.options.searchSelector === 'string') { return $__default["default"](that.options.searchSelector); } return that.$toolbar.find('.search input'); }, // it only does '%s', and return '' when arguments are undefined sprintf: function sprintf(_str) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var flag = true; var i = 0; var str = _str.replace(/%s/g, function () { var arg = args[i++]; if (typeof arg === 'undefined') { flag = false; return ''; } return arg; }); return flag ? str : ''; }, isObject: function isObject(val) { return val instanceof Object && !Array.isArray(val); }, isEmptyObject: function isEmptyObject() { var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return Object.entries(obj).length === 0 && obj.constructor === Object; }, isNumeric: function isNumeric(n) { return !isNaN(parseFloat(n)) && isFinite(n); }, getFieldTitle: function getFieldTitle(list, value) { var _iterator = _createForOfIteratorHelper(list), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var item = _step.value; if (item.field === value) { return item.title; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } return ''; }, setFieldIndex: function setFieldIndex(columns) { var totalCol = 0; var flag = []; var _iterator2 = _createForOfIteratorHelper(columns[0]), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var column = _step2.value; totalCol += column.colspan || 1; } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } for (var i = 0; i < columns.length; i++) { flag[i] = []; for (var j = 0; j < totalCol; j++) { flag[i][j] = false; } } for (var _i = 0; _i < columns.length; _i++) { var _iterator3 = _createForOfIteratorHelper(columns[_i]), _step3; try { for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { var r = _step3.value; var rowspan = r.rowspan || 1; var colspan = r.colspan || 1; var index = flag[_i].indexOf(false); r.colspanIndex = index; if (colspan === 1) { r.fieldIndex = index; // when field is undefined, use index instead if (typeof r.field === 'undefined') { r.field = index; } } else { r.colspanGroup = r.colspan; } for (var _j = 0; _j < rowspan; _j++) { for (var k = 0; k < colspan; k++) { flag[_i + _j][index + k] = true; } } } } catch (err) { _iterator3.e(err); } finally { _iterator3.f(); } } }, normalizeAccent: function normalizeAccent(value) { if (typeof value !== 'string') { return value; } return value.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); }, updateFieldGroup: function updateFieldGroup(columns) { var _ref; var allColumns = (_ref = []).concat.apply(_ref, _toConsumableArray(columns)); var _iterator4 = _createForOfIteratorHelper(columns), _step4; try { for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { var c = _step4.value; var _iterator5 = _createForOfIteratorHelper(c), _step5; try { for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { var r = _step5.value; if (r.colspanGroup > 1) { var colspan = 0; var _loop = function _loop(i) { var column = allColumns.find(function (col) { return col.fieldIndex === i; }); if (column.visible) { colspan++; } }; for (var i = r.colspanIndex; i < r.colspanIndex + r.colspanGroup; i++) { _loop(i); } r.colspan = colspan; r.visible = colspan > 0; } } } catch (err) { _iterator5.e(err); } finally { _iterator5.f(); } } } catch (err) { _iterator4.e(err); } finally { _iterator4.f(); } }, getScrollBarWidth: function getScrollBarWidth() { if (this.cachedWidth === undefined) { var $inner = $__default["default"]('
').addClass('fixed-table-scroll-inner'); var $outer = $__default["default"]('
').addClass('fixed-table-scroll-outer'); $outer.append($inner); $__default["default"]('body').append($outer); var w1 = $inner[0].offsetWidth; $outer.css('overflow', 'scroll'); var w2 = $inner[0].offsetWidth; if (w1 === w2) { w2 = $outer[0].clientWidth; } $outer.remove(); this.cachedWidth = w1 - w2; } return this.cachedWidth; }, calculateObjectValue: function calculateObjectValue(self, name, args, defaultValue) { var func = name; if (typeof name === 'string') { // support obj.func1.func2 var names = name.split('.'); if (names.length > 1) { func = window; var _iterator6 = _createForOfIteratorHelper(names), _step6; try { for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { var f = _step6.value; func = func[f]; } } catch (err) { _iterator6.e(err); } finally { _iterator6.f(); } } else { func = window[name]; } } if (func !== null && _typeof(func) === 'object') { return func; } if (typeof func === 'function') { return func.apply(self, args || []); } if (!func && typeof name === 'string' && args && this.sprintf.apply(this, [name].concat(_toConsumableArray(args)))) { return this.sprintf.apply(this, [name].concat(_toConsumableArray(args))); } return defaultValue; }, compareObjects: function compareObjects(objectA, objectB, compareLength) { var aKeys = Object.keys(objectA); var bKeys = Object.keys(objectB); if (compareLength && aKeys.length !== bKeys.length) { return false; } for (var _i2 = 0, _aKeys = aKeys; _i2 < _aKeys.length; _i2++) { var key = _aKeys[_i2]; if (bKeys.includes(key) && objectA[key] !== objectB[key]) { return false; } } return true; }, regexCompare: function regexCompare(value, search) { try { var regexpParts = search.match(/^\/(.*?)\/([gim]*)$/); if (value.toString().search(regexpParts ? new RegExp(regexpParts[1], regexpParts[2]) : new RegExp(search, 'gim')) !== -1) { return true; } } catch (e) { return false; } }, escapeHTML: function escapeHTML(text) { if (!text) { return text; } return text.toString().replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, '''); }, unescapeHTML: function unescapeHTML(text) { if (typeof text !== 'string' || !text) { return text; } return text.toString().replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '\''); }, removeHTML: function removeHTML(text) { if (!text) { return text; } return text.toString().replace(/(<([^>]+)>)/ig, '').replace(/&[#A-Za-z0-9]+;/gi, '').trim(); }, getRealDataAttr: function getRealDataAttr(dataAttr) { for (var _i3 = 0, _Object$entries = Object.entries(dataAttr); _i3 < _Object$entries.length; _i3++) { var _Object$entries$_i = _slicedToArray(_Object$entries[_i3], 2), attr = _Object$entries$_i[0], value = _Object$entries$_i[1]; var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase(); if (auxAttr !== attr) { dataAttr[auxAttr] = value; delete dataAttr[attr]; } } return dataAttr; }, getItemField: function getItemField(item, field, escape) { var columnEscape = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined; var value = item; // use column escape if it is defined if (typeof columnEscape !== 'undefined') { escape = columnEscape; } if (typeof field !== 'string' || item.hasOwnProperty(field)) { return escape ? this.escapeHTML(item[field]) : item[field]; } var props = field.split('.'); var _iterator7 = _createForOfIteratorHelper(props), _step7; try { for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { var p = _step7.value; value = value && value[p]; } } catch (err) { _iterator7.e(err); } finally { _iterator7.f(); } return escape ? this.escapeHTML(value) : value; }, isIEBrowser: function isIEBrowser() { return navigator.userAgent.includes('MSIE ') || /Trident.*rv:11\./.test(navigator.userAgent); }, findIndex: function findIndex(items, item) { var _iterator8 = _createForOfIteratorHelper(items), _step8; try { for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { var it = _step8.value; if (JSON.stringify(it) === JSON.stringify(item)) { return items.indexOf(it); } } } catch (err) { _iterator8.e(err); } finally { _iterator8.f(); } return -1; }, trToData: function trToData(columns, $els) { var _this = this; var data = []; var m = []; $els.each(function (y, el) { var $el = $__default["default"](el); var row = {}; // save tr's id, class and data-* attributes row._id = $el.attr('id'); row._class = $el.attr('class'); row._data = _this.getRealDataAttr($el.data()); row._style = $el.attr('style'); $el.find('>td,>th').each(function (_x, el) { var $el = $__default["default"](el); var cspan = +$el.attr('colspan') || 1; var rspan = +$el.attr('rowspan') || 1; var x = _x; // skip already occupied cells in current row for (; m[y] && m[y][x]; x++) {// ignore } // mark matrix elements occupied by current cell with true for (var tx = x; tx < x + cspan; tx++) { for (var ty = y; ty < y + rspan; ty++) { if (!m[ty]) { // fill missing rows m[ty] = []; } m[ty][tx] = true; } } var field = columns[x].field; row[field] = $el.html().trim(); // save td's id, class and data-* attributes row["_".concat(field, "_id")] = $el.attr('id'); row["_".concat(field, "_class")] = $el.attr('class'); row["_".concat(field, "_rowspan")] = $el.attr('rowspan'); row["_".concat(field, "_colspan")] = $el.attr('colspan'); row["_".concat(field, "_title")] = $el.attr('title'); row["_".concat(field, "_data")] = _this.getRealDataAttr($el.data()); row["_".concat(field, "_style")] = $el.attr('style'); }); data.push(row); }); return data; }, sort: function sort(a, b, order, sortStable, aPosition, bPosition) { if (a === undefined || a === null) { a = ''; } if (b === undefined || b === null) { b = ''; } if (sortStable && a === b) { a = aPosition; b = bPosition; } // If both values are numeric, do a numeric comparison if (this.isNumeric(a) && this.isNumeric(b)) { // Convert numerical values form string to float. a = parseFloat(a); b = parseFloat(b); if (a < b) { return order * -1; } if (a > b) { return order; } return 0; } if (a === b) { return 0; } // If value is not a string, convert to string if (typeof a !== 'string') { a = a.toString(); } if (a.localeCompare(b) === -1) { return order * -1; } return order; }, getEventName: function getEventName(eventPrefix) { var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; id = id || "".concat(+new Date()).concat(~~(Math.random() * 1000000)); return "".concat(eventPrefix, "-").concat(id); }, hasDetailViewIcon: function hasDetailViewIcon(options) { return options.detailView && options.detailViewIcon && !options.cardView; }, getDetailViewIndexOffset: function getDetailViewIndexOffset(options) { return this.hasDetailViewIcon(options) && options.detailViewAlign !== 'right' ? 1 : 0; }, checkAutoMergeCells: function checkAutoMergeCells(data) { var _iterator9 = _createForOfIteratorHelper(data), _step9; try { for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { var row = _step9.value; for (var _i4 = 0, _Object$keys = Object.keys(row); _i4 < _Object$keys.length; _i4++) { var key = _Object$keys[_i4]; if (key.startsWith('_') && (key.endsWith('_rowspan') || key.endsWith('_colspan'))) { return true; } } } } catch (err) { _iterator9.e(err); } finally { _iterator9.f(); } return false; }, deepCopy: function deepCopy(arg) { if (arg === undefined) { return arg; } return $__default["default"].extend(true, Array.isArray(arg) ? [] : {}, arg); }, debounce: function debounce(func, wait, immediate) { var timeout; return function executedFunction() { var context = this; var args = arguments; var later = function later() { timeout = null; if (!immediate) func.apply(context, args); }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) func.apply(context, args); }; } }; var VERSION = '1.20.0'; var bootstrapVersion = Utils.getBootstrapVersion(); var CONSTANTS = { 3: { classes: { buttonsPrefix: 'btn', buttons: 'default', buttonsGroup: 'btn-group', buttonsDropdown: 'btn-group', pull: 'pull', inputGroup: 'input-group', inputPrefix: 'input-', input: 'form-control', select: 'form-control', paginationDropdown: 'btn-group dropdown', dropup: 'dropup', dropdownActive: 'active', paginationActive: 'active', buttonActive: 'active' }, html: { toolbarDropdown: [''], toolbarDropdownItem: '', toolbarDropdownSeparator: '
  • ', pageDropdown: [''], pageDropdownItem: '
    ', dropdownCaret: '', pagination: [''], paginationItem: '
  • %s
  • ', icon: '', inputGroup: '
    %s%s
    ', searchInput: '', searchButton: '', searchClearButton: '' } }, 4: { classes: { buttonsPrefix: 'btn', buttons: 'secondary', buttonsGroup: 'btn-group', buttonsDropdown: 'btn-group', pull: 'float', inputGroup: 'btn-group', inputPrefix: 'form-control-', input: 'form-control', select: 'form-control', paginationDropdown: 'btn-group dropdown', dropup: 'dropup', dropdownActive: 'active', paginationActive: 'active', buttonActive: 'active' }, html: { toolbarDropdown: [''], toolbarDropdownItem: '', pageDropdown: [''], pageDropdownItem: '%s', toolbarDropdownSeparator: '', dropdownCaret: '', pagination: [''], paginationItem: '
  • %s
  • ', icon: '', inputGroup: '
    %s
    %s
    ', searchInput: '', searchButton: '', searchClearButton: '' } }, 5: { classes: { buttonsPrefix: 'btn', buttons: 'secondary', buttonsGroup: 'btn-group', buttonsDropdown: 'btn-group', pull: 'float', inputGroup: 'btn-group', inputPrefix: 'form-control-', input: 'form-control', select: 'form-select', paginationDropdown: 'btn-group dropdown', dropup: 'dropup', dropdownActive: 'active', paginationActive: 'active', buttonActive: 'active' }, html: { dataToggle: 'data-bs-toggle', toolbarDropdown: [''], toolbarDropdownItem: '', pageDropdown: [''], pageDropdownItem: '%s', toolbarDropdownSeparator: '', dropdownCaret: '', pagination: [''], paginationItem: '
  • %s
  • ', icon: '', inputGroup: '
    %s%s
    ', searchInput: '', searchButton: '', searchClearButton: '' } } }[bootstrapVersion]; var DEFAULTS = { height: undefined, classes: 'table table-bordered table-hover', buttons: {}, theadClasses: '', headerStyle: function headerStyle(column) { return {}; }, rowStyle: function rowStyle(row, index) { return {}; }, rowAttributes: function rowAttributes(row, index) { return {}; }, undefinedText: '-', locale: undefined, virtualScroll: false, virtualScrollItemHeight: undefined, sortable: true, sortClass: undefined, silentSort: true, sortName: undefined, sortOrder: undefined, sortReset: false, sortStable: false, rememberOrder: false, serverSort: true, customSort: undefined, columns: [[]], data: [], url: undefined, method: 'get', cache: true, contentType: 'application/json', dataType: 'json', ajax: undefined, ajaxOptions: {}, queryParams: function queryParams(params) { return params; }, queryParamsType: 'limit', // 'limit', undefined responseHandler: function responseHandler(res) { return res; }, totalField: 'total', totalNotFilteredField: 'totalNotFiltered', dataField: 'rows', footerField: 'footer', pagination: false, paginationParts: ['pageInfo', 'pageSize', 'pageList'], showExtendedPagination: false, paginationLoop: true, sidePagination: 'client', // client or server totalRows: 0, totalNotFiltered: 0, pageNumber: 1, pageSize: 10, pageList: [10, 25, 50, 100], paginationHAlign: 'right', // right, left paginationVAlign: 'bottom', // bottom, top, both paginationDetailHAlign: 'left', // right, left paginationPreText: '‹', paginationNextText: '›', paginationSuccessivelySize: 5, // Maximum successively number of pages in a row paginationPagesBySide: 1, // Number of pages on each side (right, left) of the current page. paginationUseIntermediate: false, // Calculate intermediate pages for quick access search: false, searchHighlight: false, searchOnEnterKey: false, strictSearch: false, regexSearch: false, searchSelector: false, visibleSearch: false, showButtonIcons: true, showButtonText: false, showSearchButton: false, showSearchClearButton: false, trimOnSearch: true, searchAlign: 'right', searchTimeOut: 500, searchText: '', customSearch: undefined, showHeader: true, showFooter: false, footerStyle: function footerStyle(column) { return {}; }, searchAccentNeutralise: false, showColumns: false, showColumnsToggleAll: false, showColumnsSearch: false, minimumCountColumns: 1, showPaginationSwitch: false, showRefresh: false, showToggle: false, showFullscreen: false, smartDisplay: true, escape: false, filterOptions: { filterAlgorithm: 'and' }, idField: undefined, selectItemName: 'btSelectItem', clickToSelect: false, ignoreClickToSelectOn: function ignoreClickToSelectOn(_ref) { var tagName = _ref.tagName; return ['A', 'BUTTON'].includes(tagName); }, singleSelect: false, checkboxHeader: true, maintainMetaData: false, multipleSelectRow: false, uniqueId: undefined, cardView: false, detailView: false, detailViewIcon: true, detailViewByClick: false, detailViewAlign: 'left', detailFormatter: function detailFormatter(index, row) { return ''; }, detailFilter: function detailFilter(index, row) { return true; }, toolbar: undefined, toolbarAlign: 'left', buttonsToolbar: undefined, buttonsAlign: 'right', buttonsOrder: ['paginationSwitch', 'refresh', 'toggle', 'fullscreen', 'columns'], buttonsPrefix: CONSTANTS.classes.buttonsPrefix, buttonsClass: CONSTANTS.classes.buttons, iconsPrefix: undefined, // init in initConstants icons: {}, // init in initConstants iconSize: undefined, loadingFontSize: 'auto', loadingTemplate: function loadingTemplate(loadingMessage) { return "\n ".concat(loadingMessage, "\n \n \n "); }, onAll: function onAll(name, args) { return false; }, onClickCell: function onClickCell(field, value, row, $element) { return false; }, onDblClickCell: function onDblClickCell(field, value, row, $element) { return false; }, onClickRow: function onClickRow(item, $element) { return false; }, onDblClickRow: function onDblClickRow(item, $element) { return false; }, onSort: function onSort(name, order) { return false; }, onCheck: function onCheck(row) { return false; }, onUncheck: function onUncheck(row) { return false; }, onCheckAll: function onCheckAll(rows) { return false; }, onUncheckAll: function onUncheckAll(rows) { return false; }, onCheckSome: function onCheckSome(rows) { return false; }, onUncheckSome: function onUncheckSome(rows) { return false; }, onLoadSuccess: function onLoadSuccess(data) { return false; }, onLoadError: function onLoadError(status) { return false; }, onColumnSwitch: function onColumnSwitch(field, checked) { return false; }, onColumnSwitchAll: function onColumnSwitchAll(checked) { return false; }, onPageChange: function onPageChange(number, size) { return false; }, onSearch: function onSearch(text) { return false; }, onToggle: function onToggle(cardView) { return false; }, onPreBody: function onPreBody(data) { return false; }, onPostBody: function onPostBody() { return false; }, onPostHeader: function onPostHeader() { return false; }, onPostFooter: function onPostFooter() { return false; }, onExpandRow: function onExpandRow(index, row, $detail) { return false; }, onCollapseRow: function onCollapseRow(index, row) { return false; }, onRefreshOptions: function onRefreshOptions(options) { return false; }, onRefresh: function onRefresh(params) { return false; }, onResetView: function onResetView() { return false; }, onScrollBody: function onScrollBody() { return false; }, onTogglePagination: function onTogglePagination(newState) { return false; }, onVirtualScroll: function onVirtualScroll(startIndex, endIndex) { return false; } }; var EN = { formatLoadingMessage: function formatLoadingMessage() { return 'Loading, please wait'; }, formatRecordsPerPage: function formatRecordsPerPage(pageNumber) { return "".concat(pageNumber, " rows per page"); }, formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows, totalNotFiltered) { if (totalNotFiltered !== undefined && totalNotFiltered > 0 && totalNotFiltered > totalRows) { return "Showing ".concat(pageFrom, " to ").concat(pageTo, " of ").concat(totalRows, " rows (filtered from ").concat(totalNotFiltered, " total rows)"); } return "Showing ".concat(pageFrom, " to ").concat(pageTo, " of ").concat(totalRows, " rows"); }, formatSRPaginationPreText: function formatSRPaginationPreText() { return 'previous page'; }, formatSRPaginationPageText: function formatSRPaginationPageText(page) { return "to page ".concat(page); }, formatSRPaginationNextText: function formatSRPaginationNextText() { return 'next page'; }, formatDetailPagination: function formatDetailPagination(totalRows) { return "Showing ".concat(totalRows, " rows"); }, formatSearch: function formatSearch() { return 'Search'; }, formatClearSearch: function formatClearSearch() { return 'Clear Search'; }, formatNoMatches: function formatNoMatches() { return 'No matching records found'; }, formatPaginationSwitch: function formatPaginationSwitch() { return 'Hide/Show pagination'; }, formatPaginationSwitchDown: function formatPaginationSwitchDown() { return 'Show pagination'; }, formatPaginationSwitchUp: function formatPaginationSwitchUp() { return 'Hide pagination'; }, formatRefresh: function formatRefresh() { return 'Refresh'; }, formatToggle: function formatToggle() { return 'Toggle'; }, formatToggleOn: function formatToggleOn() { return 'Show card view'; }, formatToggleOff: function formatToggleOff() { return 'Hide card view'; }, formatColumns: function formatColumns() { return 'Columns'; }, formatColumnsToggleAll: function formatColumnsToggleAll() { return 'Toggle all'; }, formatFullscreen: function formatFullscreen() { return 'Fullscreen'; }, formatAllRows: function formatAllRows() { return 'All'; } }; var COLUMN_DEFAULTS = { field: undefined, title: undefined, titleTooltip: undefined, class: undefined, width: undefined, widthUnit: 'px', rowspan: undefined, colspan: undefined, align: undefined, // left, right, center halign: undefined, // left, right, center falign: undefined, // left, right, center valign: undefined, // top, middle, bottom cellStyle: undefined, radio: false, checkbox: false, checkboxEnabled: true, clickToSelect: true, showSelectTitle: false, sortable: false, sortName: undefined, order: 'asc', // asc, desc sorter: undefined, visible: true, switchable: true, cardVisible: true, searchable: true, formatter: undefined, footerFormatter: undefined, detailFormatter: undefined, searchFormatter: true, searchHighlightFormatter: false, escape: undefined, events: undefined }; var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandRowByUniqueId', 'collapseRowByUniqueId', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText']; var EVENTS = { 'all.bs.table': 'onAll', 'click-row.bs.table': 'onClickRow', 'dbl-click-row.bs.table': 'onDblClickRow', 'click-cell.bs.table': 'onClickCell', 'dbl-click-cell.bs.table': 'onDblClickCell', 'sort.bs.table': 'onSort', 'check.bs.table': 'onCheck', 'uncheck.bs.table': 'onUncheck', 'check-all.bs.table': 'onCheckAll', 'uncheck-all.bs.table': 'onUncheckAll', 'check-some.bs.table': 'onCheckSome', 'uncheck-some.bs.table': 'onUncheckSome', 'load-success.bs.table': 'onLoadSuccess', 'load-error.bs.table': 'onLoadError', 'column-switch.bs.table': 'onColumnSwitch', 'column-switch-all.bs.table': 'onColumnSwitchAll', 'page-change.bs.table': 'onPageChange', 'search.bs.table': 'onSearch', 'toggle.bs.table': 'onToggle', 'pre-body.bs.table': 'onPreBody', 'post-body.bs.table': 'onPostBody', 'post-header.bs.table': 'onPostHeader', 'post-footer.bs.table': 'onPostFooter', 'expand-row.bs.table': 'onExpandRow', 'collapse-row.bs.table': 'onCollapseRow', 'refresh-options.bs.table': 'onRefreshOptions', 'reset-view.bs.table': 'onResetView', 'refresh.bs.table': 'onRefresh', 'scroll-body.bs.table': 'onScrollBody', 'toggle-pagination.bs.table': 'onTogglePagination', 'virtual-scroll.bs.table': 'onVirtualScroll' }; Object.assign(DEFAULTS, EN); var Constants = { VERSION: VERSION, THEME: "bootstrap".concat(bootstrapVersion), CONSTANTS: CONSTANTS, DEFAULTS: DEFAULTS, COLUMN_DEFAULTS: COLUMN_DEFAULTS, METHODS: METHODS, EVENTS: EVENTS, LOCALES: { en: EN, 'en-US': EN } }; var BLOCK_ROWS = 50; var CLUSTER_BLOCKS = 4; var VirtualScroll = /*#__PURE__*/function () { function VirtualScroll(options) { var _this = this; _classCallCheck(this, VirtualScroll); this.rows = options.rows; this.scrollEl = options.scrollEl; this.contentEl = options.contentEl; this.callback = options.callback; this.itemHeight = options.itemHeight; this.cache = {}; this.scrollTop = this.scrollEl.scrollTop; this.initDOM(this.rows, options.fixedScroll); this.scrollEl.scrollTop = this.scrollTop; this.lastCluster = 0; var onScroll = function onScroll() { if (_this.lastCluster !== (_this.lastCluster = _this.getNum())) { _this.initDOM(_this.rows); _this.callback(_this.startIndex, _this.endIndex); } }; this.scrollEl.addEventListener('scroll', onScroll, false); this.destroy = function () { _this.contentEl.innerHtml = ''; _this.scrollEl.removeEventListener('scroll', onScroll, false); }; } _createClass(VirtualScroll, [{ key: "initDOM", value: function initDOM(rows, fixedScroll) { if (typeof this.clusterHeight === 'undefined') { this.cache.scrollTop = this.scrollEl.scrollTop; this.cache.data = this.contentEl.innerHTML = rows[0] + rows[0] + rows[0]; this.getRowsHeight(rows); } var data = this.initData(rows, this.getNum(fixedScroll)); var thisRows = data.rows.join(''); var dataChanged = this.checkChanges('data', thisRows); var topOffsetChanged = this.checkChanges('top', data.topOffset); var bottomOffsetChanged = this.checkChanges('bottom', data.bottomOffset); var html = []; if (dataChanged && topOffsetChanged) { if (data.topOffset) { html.push(this.getExtra('top', data.topOffset)); } html.push(thisRows); if (data.bottomOffset) { html.push(this.getExtra('bottom', data.bottomOffset)); } this.startIndex = data.start; this.endIndex = data.end; this.contentEl.innerHTML = html.join(''); if (fixedScroll) { this.contentEl.scrollTop = this.cache.scrollTop; } } else if (bottomOffsetChanged) { this.contentEl.lastChild.style.height = "".concat(data.bottomOffset, "px"); } } }, { key: "getRowsHeight", value: function getRowsHeight() { if (typeof this.itemHeight === 'undefined') { var nodes = this.contentEl.children; var node = nodes[Math.floor(nodes.length / 2)]; this.itemHeight = node.offsetHeight; } this.blockHeight = this.itemHeight * BLOCK_ROWS; this.clusterRows = BLOCK_ROWS * CLUSTER_BLOCKS; this.clusterHeight = this.blockHeight * CLUSTER_BLOCKS; } }, { key: "getNum", value: function getNum(fixedScroll) { this.scrollTop = fixedScroll ? this.cache.scrollTop : this.scrollEl.scrollTop; return Math.floor(this.scrollTop / (this.clusterHeight - this.blockHeight)) || 0; } }, { key: "initData", value: function initData(rows, num) { if (rows.length < BLOCK_ROWS) { return { topOffset: 0, bottomOffset: 0, rowsAbove: 0, rows: rows }; } var start = Math.max((this.clusterRows - BLOCK_ROWS) * num, 0); var end = start + this.clusterRows; var topOffset = Math.max(start * this.itemHeight, 0); var bottomOffset = Math.max((rows.length - end) * this.itemHeight, 0); var thisRows = []; var rowsAbove = start; if (topOffset < 1) { rowsAbove++; } for (var i = start; i < end; i++) { rows[i] && thisRows.push(rows[i]); } return { start: start, end: end, topOffset: topOffset, bottomOffset: bottomOffset, rowsAbove: rowsAbove, rows: thisRows }; } }, { key: "checkChanges", value: function checkChanges(type, value) { var changed = value !== this.cache[type]; this.cache[type] = value; return changed; } }, { key: "getExtra", value: function getExtra(className, height) { var tag = document.createElement('tr'); tag.className = "virtual-scroll-".concat(className); if (height) { tag.style.height = "".concat(height, "px"); } return tag.outerHTML; } }]); return VirtualScroll; }(); var BootstrapTable = /*#__PURE__*/function () { function BootstrapTable(el, options) { _classCallCheck(this, BootstrapTable); this.options = options; this.$el = $__default["default"](el); this.$el_ = this.$el.clone(); this.timeoutId_ = 0; this.timeoutFooter_ = 0; } _createClass(BootstrapTable, [{ key: "init", value: function init() { this.initConstants(); this.initLocale(); this.initContainer(); this.initTable(); this.initHeader(); this.initData(); this.initHiddenRows(); this.initToolbar(); this.initPagination(); this.initBody(); this.initSearchText(); this.initServer(); } }, { key: "initConstants", value: function initConstants() { var opts = this.options; this.constants = Constants.CONSTANTS; this.constants.theme = $__default["default"].fn.bootstrapTable.theme; this.constants.dataToggle = this.constants.html.dataToggle || 'data-toggle'; // init iconsPrefix and icons var iconsPrefix = Utils.getIconsPrefix($__default["default"].fn.bootstrapTable.theme); var icons = Utils.getIcons(iconsPrefix); opts.iconsPrefix = opts.iconsPrefix || $__default["default"].fn.bootstrapTable.defaults.iconsPrefix || iconsPrefix; opts.icons = Object.assign(icons, $__default["default"].fn.bootstrapTable.defaults.icons, opts.icons); // init buttons class var buttonsPrefix = opts.buttonsPrefix ? "".concat(opts.buttonsPrefix, "-") : ''; this.constants.buttonsClass = [opts.buttonsPrefix, buttonsPrefix + opts.buttonsClass, Utils.sprintf("".concat(buttonsPrefix, "%s"), opts.iconSize)].join(' ').trim(); this.buttons = Utils.calculateObjectValue(this, opts.buttons, [], {}); if (_typeof(this.buttons) !== 'object') { this.buttons = {}; } if (typeof opts.icons === 'string') { opts.icons = Utils.calculateObjectValue(null, opts.icons); } } }, { key: "initLocale", value: function initLocale() { if (this.options.locale) { var locales = $__default["default"].fn.bootstrapTable.locales; var parts = this.options.locale.split(/-|_/); parts[0] = parts[0].toLowerCase(); if (parts[1]) { parts[1] = parts[1].toUpperCase(); } var localesToExtend = {}; if (locales[this.options.locale]) { localesToExtend = locales[this.options.locale]; } else if (locales[parts.join('-')]) { localesToExtend = locales[parts.join('-')]; } else if (locales[parts[0]]) { localesToExtend = locales[parts[0]]; } for (var _i = 0, _Object$entries = Object.entries(localesToExtend); _i < _Object$entries.length; _i++) { var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), formatName = _Object$entries$_i[0], func = _Object$entries$_i[1]; if (this.options[formatName] !== BootstrapTable.DEFAULTS[formatName]) { continue; } this.options[formatName] = func; } } } }, { key: "initContainer", value: function initContainer() { var topPagination = ['top', 'both'].includes(this.options.paginationVAlign) ? '
    ' : ''; var bottomPagination = ['bottom', 'both'].includes(this.options.paginationVAlign) ? '
    ' : ''; var loadingTemplate = Utils.calculateObjectValue(this.options, this.options.loadingTemplate, [this.options.formatLoadingMessage()]); this.$container = $__default["default"]("\n
    \n
    \n ").concat(topPagination, "\n
    \n
    \n
    \n
    \n ").concat(loadingTemplate, "\n
    \n
    \n
    \n
    \n ").concat(bottomPagination, "\n
    \n ")); this.$container.insertAfter(this.$el); this.$tableContainer = this.$container.find('.fixed-table-container'); this.$tableHeader = this.$container.find('.fixed-table-header'); this.$tableBody = this.$container.find('.fixed-table-body'); this.$tableLoading = this.$container.find('.fixed-table-loading'); this.$tableFooter = this.$el.find('tfoot'); // checking if custom table-toolbar exists or not if (this.options.buttonsToolbar) { this.$toolbar = $__default["default"]('body').find(this.options.buttonsToolbar); } else { this.$toolbar = this.$container.find('.fixed-table-toolbar'); } this.$pagination = this.$container.find('.fixed-table-pagination'); this.$tableBody.append(this.$el); this.$container.after('
    '); this.$el.addClass(this.options.classes); this.$tableLoading.addClass(this.options.classes); if (this.options.height) { this.$tableContainer.addClass('fixed-height'); if (this.options.showFooter) { this.$tableContainer.addClass('has-footer'); } if (this.options.classes.split(' ').includes('table-bordered')) { this.$tableBody.append('
    '); this.$tableBorder = this.$tableBody.find('.fixed-table-border'); this.$tableLoading.addClass('fixed-table-border'); } this.$tableFooter = this.$container.find('.fixed-table-footer'); } } }, { key: "initTable", value: function initTable() { var _this = this; var columns = []; this.$header = this.$el.find('>thead'); if (!this.$header.length) { this.$header = $__default["default"]("")).appendTo(this.$el); } else if (this.options.theadClasses) { this.$header.addClass(this.options.theadClasses); } this._headerTrClasses = []; this._headerTrStyles = []; this.$header.find('tr').each(function (i, el) { var $tr = $__default["default"](el); var column = []; $tr.find('th').each(function (i, el) { var $th = $__default["default"](el); // #2014: getFieldIndex and elsewhere assume this is string, causes issues if not if (typeof $th.data('field') !== 'undefined') { $th.data('field', "".concat($th.data('field'))); } column.push($__default["default"].extend({}, { title: $th.html(), class: $th.attr('class'), titleTooltip: $th.attr('title'), rowspan: $th.attr('rowspan') ? +$th.attr('rowspan') : undefined, colspan: $th.attr('colspan') ? +$th.attr('colspan') : undefined }, $th.data())); }); columns.push(column); if ($tr.attr('class')) { _this._headerTrClasses.push($tr.attr('class')); } if ($tr.attr('style')) { _this._headerTrStyles.push($tr.attr('style')); } }); if (!Array.isArray(this.options.columns[0])) { this.options.columns = [this.options.columns]; } this.options.columns = $__default["default"].extend(true, [], columns, this.options.columns); this.columns = []; this.fieldsColumnsIndex = []; Utils.setFieldIndex(this.options.columns); this.options.columns.forEach(function (columns, i) { columns.forEach(function (_column, j) { var column = $__default["default"].extend({}, BootstrapTable.COLUMN_DEFAULTS, _column); if (typeof column.fieldIndex !== 'undefined') { _this.columns[column.fieldIndex] = column; _this.fieldsColumnsIndex[column.field] = column.fieldIndex; } _this.options.columns[i][j] = column; }); }); // if options.data is setting, do not process tbody and tfoot data if (!this.options.data.length) { var htmlData = Utils.trToData(this.columns, this.$el.find('>tbody>tr')); if (htmlData.length) { this.options.data = htmlData; this.fromHtml = true; } } if (!(this.options.pagination && this.options.sidePagination !== 'server')) { this.footerData = Utils.trToData(this.columns, this.$el.find('>tfoot>tr')); } if (this.footerData) { this.$el.find('tfoot').html(''); } if (!this.options.showFooter || this.options.cardView) { this.$tableFooter.hide(); } else { this.$tableFooter.show(); } } }, { key: "initHeader", value: function initHeader() { var _this2 = this; var visibleColumns = {}; var headerHtml = []; this.header = { fields: [], styles: [], classes: [], formatters: [], detailFormatters: [], events: [], sorters: [], sortNames: [], cellStyles: [], searchables: [] }; Utils.updateFieldGroup(this.options.columns); this.options.columns.forEach(function (columns, i) { var html = []; html.push("")); var detailViewTemplate = ''; if (i === 0 && Utils.hasDetailViewIcon(_this2.options)) { var rowspan = _this2.options.columns.length > 1 ? " rowspan=\"".concat(_this2.options.columns.length, "\"") : ''; detailViewTemplate = "\n
    \n "); } if (detailViewTemplate && _this2.options.detailViewAlign !== 'right') { html.push(detailViewTemplate); } columns.forEach(function (column, j) { var class_ = Utils.sprintf(' class="%s"', column['class']); var unitWidth = column.widthUnit; var width = parseFloat(column.width); var halign = Utils.sprintf('text-align: %s; ', column.halign ? column.halign : column.align); var align = Utils.sprintf('text-align: %s; ', column.align); var style = Utils.sprintf('vertical-align: %s; ', column.valign); style += Utils.sprintf('width: %s; ', (column.checkbox || column.radio) && !width ? !column.showSelectTitle ? '36px' : undefined : width ? width + unitWidth : undefined); if (typeof column.fieldIndex === 'undefined' && !column.visible) { return; } var headerStyle = Utils.calculateObjectValue(null, _this2.options.headerStyle, [column]); var csses = []; var classes = ''; if (headerStyle && headerStyle.css) { for (var _i2 = 0, _Object$entries2 = Object.entries(headerStyle.css); _i2 < _Object$entries2.length; _i2++) { var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2), key = _Object$entries2$_i[0], value = _Object$entries2$_i[1]; csses.push("".concat(key, ": ").concat(value)); } } if (headerStyle && headerStyle.classes) { classes = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], headerStyle.classes].join(' ') : headerStyle.classes); } if (typeof column.fieldIndex !== 'undefined') { _this2.header.fields[column.fieldIndex] = column.field; _this2.header.styles[column.fieldIndex] = align + style; _this2.header.classes[column.fieldIndex] = class_; _this2.header.formatters[column.fieldIndex] = column.formatter; _this2.header.detailFormatters[column.fieldIndex] = column.detailFormatter; _this2.header.events[column.fieldIndex] = column.events; _this2.header.sorters[column.fieldIndex] = column.sorter; _this2.header.sortNames[column.fieldIndex] = column.sortName; _this2.header.cellStyles[column.fieldIndex] = column.cellStyle; _this2.header.searchables[column.fieldIndex] = column.searchable; if (!column.visible) { return; } if (_this2.options.cardView && !column.cardVisible) { return; } visibleColumns[column.field] = column; } html.push(" 0 ? ' data-not-first-th' : '', '>'); html.push(Utils.sprintf('
    ', _this2.options.sortable && column.sortable ? 'sortable both' : '')); var text = _this2.options.escape ? Utils.escapeHTML(column.title) : column.title; var title = text; if (column.checkbox) { text = ''; if (!_this2.options.singleSelect && _this2.options.checkboxHeader) { text = ''; } _this2.header.stateField = column.field; } if (column.radio) { text = ''; _this2.header.stateField = column.field; } if (!text && column.showSelectTitle) { text += title; } html.push(text); html.push('
    '); html.push('
    '); html.push('
    '); html.push(''); }); if (detailViewTemplate && _this2.options.detailViewAlign === 'right') { html.push(detailViewTemplate); } html.push(''); if (html.length > 3) { headerHtml.push(html.join('')); } }); this.$header.html(headerHtml.join('')); this.$header.find('th[data-field]').each(function (i, el) { $__default["default"](el).data(visibleColumns[$__default["default"](el).data('field')]); }); this.$container.off('click', '.th-inner').on('click', '.th-inner', function (e) { var $this = $__default["default"](e.currentTarget); if (_this2.options.detailView && !$this.parent().hasClass('bs-checkbox')) { if ($this.closest('.bootstrap-table')[0] !== _this2.$container[0]) { return false; } } if (_this2.options.sortable && $this.parent().data().sortable) { _this2.onSort(e); } }); var resizeEvent = Utils.getEventName('resize.bootstrap-table', this.$el.attr('id')); $__default["default"](window).off(resizeEvent); if (!this.options.showHeader || this.options.cardView) { this.$header.hide(); this.$tableHeader.hide(); this.$tableLoading.css('top', 0); } else { this.$header.show(); this.$tableHeader.show(); this.$tableLoading.css('top', this.$header.outerHeight() + 1); // Assign the correct sortable arrow this.getCaret(); $__default["default"](window).on(resizeEvent, function () { return _this2.resetView(); }); } this.$selectAll = this.$header.find('[name="btSelectAll"]'); this.$selectAll.off('click').on('click', function (e) { e.stopPropagation(); var checked = $__default["default"](e.currentTarget).prop('checked'); _this2[checked ? 'checkAll' : 'uncheckAll'](); _this2.updateSelected(); }); } }, { key: "initData", value: function initData(data, type) { if (type === 'append') { this.options.data = this.options.data.concat(data); } else if (type === 'prepend') { this.options.data = [].concat(data).concat(this.options.data); } else { data = data || Utils.deepCopy(this.options.data); this.options.data = Array.isArray(data) ? data : data[this.options.dataField]; } this.data = _toConsumableArray(this.options.data); if (this.options.sortReset) { this.unsortedData = _toConsumableArray(this.data); } if (this.options.sidePagination === 'server') { return; } this.initSort(); } }, { key: "initSort", value: function initSort() { var _this3 = this; var name = this.options.sortName; var order = this.options.sortOrder === 'desc' ? -1 : 1; var index = this.header.fields.indexOf(this.options.sortName); var timeoutId = 0; if (index !== -1) { if (this.options.sortStable) { this.data.forEach(function (row, i) { if (!row.hasOwnProperty('_position')) { row._position = i; } }); } if (this.options.customSort) { Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]); } else { this.data.sort(function (a, b) { if (_this3.header.sortNames[index]) { name = _this3.header.sortNames[index]; } var aa = Utils.getItemField(a, name, _this3.options.escape); var bb = Utils.getItemField(b, name, _this3.options.escape); var value = Utils.calculateObjectValue(_this3.header, _this3.header.sorters[index], [aa, bb, a, b]); if (value !== undefined) { if (_this3.options.sortStable && value === 0) { return order * (a._position - b._position); } return order * value; } return Utils.sort(aa, bb, order, _this3.options.sortStable, a._position, b._position); }); } if (this.options.sortClass !== undefined) { clearTimeout(timeoutId); timeoutId = setTimeout(function () { _this3.$el.removeClass(_this3.options.sortClass); var index = _this3.$header.find("[data-field=\"".concat(_this3.options.sortName, "\"]")).index(); _this3.$el.find("tr td:nth-child(".concat(index + 1, ")")).addClass(_this3.options.sortClass); }, 250); } } else if (this.options.sortReset) { this.data = _toConsumableArray(this.unsortedData); } } }, { key: "onSort", value: function onSort(_ref) { var type = _ref.type, currentTarget = _ref.currentTarget; var $this = type === 'keypress' ? $__default["default"](currentTarget) : $__default["default"](currentTarget).parent(); var $this_ = this.$header.find('th').eq($this.index()); this.$header.add(this.$header_).find('span.order').remove(); if (this.options.sortName === $this.data('field')) { var currentSortOrder = this.options.sortOrder; if (currentSortOrder === undefined) { this.options.sortOrder = 'asc'; } else if (currentSortOrder === 'asc') { this.options.sortOrder = 'desc'; } else if (this.options.sortOrder === 'desc') { this.options.sortOrder = this.options.sortReset ? undefined : 'asc'; } if (this.options.sortOrder === undefined) { this.options.sortName = undefined; } } else { this.options.sortName = $this.data('field'); if (this.options.rememberOrder) { this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc'; } else { this.options.sortOrder = this.columns[this.fieldsColumnsIndex[$this.data('field')]].sortOrder || this.columns[this.fieldsColumnsIndex[$this.data('field')]].order; } } this.trigger('sort', this.options.sortName, this.options.sortOrder); $this.add($this_).data('order', this.options.sortOrder); // Assign the correct sortable arrow this.getCaret(); if (this.options.sidePagination === 'server' && this.options.serverSort) { this.options.pageNumber = 1; this.initServer(this.options.silentSort); return; } this.initSort(); this.initBody(); } }, { key: "initToolbar", value: function initToolbar() { var _this4 = this; var opts = this.options; var html = []; var timeoutId = 0; var $keepOpen; var switchableCount = 0; if (this.$toolbar.find('.bs-bars').children().length) { $__default["default"]('body').append($__default["default"](opts.toolbar)); } this.$toolbar.html(''); if (typeof opts.toolbar === 'string' || _typeof(opts.toolbar) === 'object') { $__default["default"](Utils.sprintf('
    ', this.constants.classes.pull, opts.toolbarAlign)).appendTo(this.$toolbar).append($__default["default"](opts.toolbar)); } // showColumns, showToggle, showRefresh html = ["
    ")]; if (typeof opts.buttonsOrder === 'string') { opts.buttonsOrder = opts.buttonsOrder.replace(/\[|\]| |'/g, '').split(','); } this.buttons = Object.assign(this.buttons, { paginationSwitch: { text: opts.pagination ? opts.formatPaginationSwitchUp() : opts.formatPaginationSwitchDown(), icon: opts.pagination ? opts.icons.paginationSwitchDown : opts.icons.paginationSwitchUp, render: false, event: this.togglePagination, attributes: { 'aria-label': opts.formatPaginationSwitch(), title: opts.formatPaginationSwitch() } }, refresh: { text: opts.formatRefresh(), icon: opts.icons.refresh, render: false, event: this.refresh, attributes: { 'aria-label': opts.formatRefresh(), title: opts.formatRefresh() } }, toggle: { text: opts.formatToggle(), icon: opts.icons.toggleOff, render: false, event: this.toggleView, attributes: { 'aria-label': opts.formatToggleOn(), title: opts.formatToggleOn() } }, fullscreen: { text: opts.formatFullscreen(), icon: opts.icons.fullscreen, render: false, event: this.toggleFullscreen, attributes: { 'aria-label': opts.formatFullscreen(), title: opts.formatFullscreen() } }, columns: { render: false, html: function html() { var html = []; html.push("
    \n \n ").concat(_this4.constants.html.toolbarDropdown[0])); if (opts.showColumnsSearch) { html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('', _this4.constants.classes.input, opts.formatSearch()))); html.push(_this4.constants.html.toolbarDropdownSeparator); } if (opts.showColumnsToggleAll) { var allFieldsVisible = _this4.getVisibleColumns().length === _this4.columns.filter(function (column) { return !_this4.isSelectionColumn(column); }).length; html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf(' %s', allFieldsVisible ? 'checked="checked"' : '', opts.formatColumnsToggleAll()))); html.push(_this4.constants.html.toolbarDropdownSeparator); } var visibleColumns = 0; _this4.columns.forEach(function (column) { if (column.visible) { visibleColumns++; } }); _this4.columns.forEach(function (column, i) { if (_this4.isSelectionColumn(column)) { return; } if (opts.cardView && !column.cardVisible) { return; } var checked = column.visible ? ' checked="checked"' : ''; var disabled = visibleColumns <= opts.minimumCountColumns && checked ? ' disabled="disabled"' : ''; if (column.switchable) { html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf(' %s', column.field, i, checked, disabled, column.title))); switchableCount++; } }); html.push(_this4.constants.html.toolbarDropdown[1], '
    '); return html.join(''); } } }); var buttonsHtml = {}; for (var _i3 = 0, _Object$entries3 = Object.entries(this.buttons); _i3 < _Object$entries3.length; _i3++) { var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2), buttonName = _Object$entries3$_i[0], buttonConfig = _Object$entries3$_i[1]; var buttonHtml = void 0; if (buttonConfig.hasOwnProperty('html')) { if (typeof buttonConfig.html === 'function') { buttonHtml = buttonConfig.html(); } else if (typeof buttonConfig.html === 'string') { buttonHtml = buttonConfig.html; } } else { buttonHtml = "\n ").concat(this.constants.html.pageDropdown[0])]; pageList.forEach(function (page, i) { if (!opts.smartDisplay || i === 0 || pageList[i - 1] < opts.totalRows || page === opts.formatAllRows()) { var active; if (allSelected) { active = page === opts.formatAllRows() ? _this6.constants.classes.dropdownActive : ''; } else { active = page === opts.pageSize ? _this6.constants.classes.dropdownActive : ''; } pageNumber.push(Utils.sprintf(_this6.constants.html.pageDropdownItem, active, page)); } }); pageNumber.push("".concat(this.constants.html.pageDropdown[1], "
    ")); html.push(opts.formatRecordsPerPage(pageNumber.join(''))); } if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort') || this.paginationParts.includes('pageSize')) { html.push('
    '); } if (this.paginationParts.includes('pageList')) { html.push("
    "), Utils.sprintf(this.constants.html.pagination[0], Utils.sprintf(' pagination-%s', opts.iconSize)), Utils.sprintf(this.constants.html.paginationItem, ' page-pre', opts.formatSRPaginationPreText(), opts.paginationPreText)); if (this.totalPages < opts.paginationSuccessivelySize) { from = 1; to = this.totalPages; } else { from = opts.pageNumber - opts.paginationPagesBySide; to = from + opts.paginationPagesBySide * 2; } if (opts.pageNumber < opts.paginationSuccessivelySize - 1) { to = opts.paginationSuccessivelySize; } if (opts.paginationSuccessivelySize > this.totalPages - from) { from = from - (opts.paginationSuccessivelySize - (this.totalPages - from)) + 1; } if (from < 1) { from = 1; } if (to > this.totalPages) { to = this.totalPages; } var middleSize = Math.round(opts.paginationPagesBySide / 2); var pageItem = function pageItem(i) { var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; return Utils.sprintf(_this6.constants.html.paginationItem, classes + (i === opts.pageNumber ? " ".concat(_this6.constants.classes.paginationActive) : ''), opts.formatSRPaginationPageText(i), i); }; if (from > 1) { var max = opts.paginationPagesBySide; if (max >= from) max = from - 1; for (i = 1; i <= max; i++) { html.push(pageItem(i)); } if (from - 1 === max + 1) { i = from - 1; html.push(pageItem(i)); } else if (from - 1 > max) { if (from - opts.paginationPagesBySide * 2 > opts.paginationPagesBySide && opts.paginationUseIntermediate) { i = Math.round((from - middleSize) / 2 + middleSize); html.push(pageItem(i, ' page-intermediate')); } else { html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-first-separator disabled', '', '...')); } } } for (i = from; i <= to; i++) { html.push(pageItem(i)); } if (this.totalPages > to) { var min = this.totalPages - (opts.paginationPagesBySide - 1); if (to >= min) min = to + 1; if (to + 1 === min - 1) { i = to + 1; html.push(pageItem(i)); } else if (min > to + 1) { if (this.totalPages - to > opts.paginationPagesBySide * 2 && opts.paginationUseIntermediate) { i = Math.round((this.totalPages - middleSize - to) / 2 + to); html.push(pageItem(i, ' page-intermediate')); } else { html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-last-separator disabled', '', '...')); } } for (i = min; i <= this.totalPages; i++) { html.push(pageItem(i)); } } html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-next', opts.formatSRPaginationNextText(), opts.paginationNextText)); html.push(this.constants.html.pagination[1], '
    '); } this.$pagination.html(html.join('')); var dropupClass = ['bottom', 'both'].includes(opts.paginationVAlign) ? " ".concat(this.constants.classes.dropup) : ''; this.$pagination.last().find('.page-list > div').addClass(dropupClass); if (!opts.onlyInfoPagination) { $pageList = this.$pagination.find('.page-list a'); $pre = this.$pagination.find('.page-pre'); $next = this.$pagination.find('.page-next'); $number = this.$pagination.find('.page-item').not('.page-next, .page-pre, .page-last-separator, .page-first-separator'); if (this.totalPages <= 1) { this.$pagination.find('div.pagination').hide(); } if (opts.smartDisplay) { if (pageList.length < 2 || opts.totalRows <= pageList[0]) { this.$pagination.find('div.page-list').hide(); } } // when data is empty, hide the pagination this.$pagination[this.getData().length ? 'show' : 'hide'](); if (!opts.paginationLoop) { if (opts.pageNumber === 1) { $pre.addClass('disabled'); } if (opts.pageNumber === this.totalPages) { $next.addClass('disabled'); } } if (allSelected) { opts.pageSize = opts.formatAllRows(); } // removed the events for last and first, onPageNumber executeds the same logic $pageList.off('click').on('click', function (e) { return _this6.onPageListChange(e); }); $pre.off('click').on('click', function (e) { return _this6.onPagePre(e); }); $next.off('click').on('click', function (e) { return _this6.onPageNext(e); }); $number.off('click').on('click', function (e) { return _this6.onPageNumber(e); }); } } }, { key: "updatePagination", value: function updatePagination(event) { // Fix #171: IE disabled button can be clicked bug. if (event && $__default["default"](event.currentTarget).hasClass('disabled')) { return; } if (!this.options.maintainMetaData) { this.resetRows(); } this.initPagination(); this.trigger('page-change', this.options.pageNumber, this.options.pageSize); if (this.options.sidePagination === 'server') { this.initServer(); } else { this.initBody(); } } }, { key: "onPageListChange", value: function onPageListChange(event) { event.preventDefault(); var $this = $__default["default"](event.currentTarget); $this.parent().addClass(this.constants.classes.dropdownActive).siblings().removeClass(this.constants.classes.dropdownActive); this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? this.options.formatAllRows() : +$this.text(); this.$toolbar.find('.page-size').text(this.options.pageSize); this.updatePagination(event); return false; } }, { key: "onPagePre", value: function onPagePre(event) { if ($__default["default"](event.target).hasClass('disabled')) { return; } event.preventDefault(); if (this.options.pageNumber - 1 === 0) { this.options.pageNumber = this.options.totalPages; } else { this.options.pageNumber--; } this.updatePagination(event); return false; } }, { key: "onPageNext", value: function onPageNext(event) { if ($__default["default"](event.target).hasClass('disabled')) { return; } event.preventDefault(); if (this.options.pageNumber + 1 > this.options.totalPages) { this.options.pageNumber = 1; } else { this.options.pageNumber++; } this.updatePagination(event); return false; } }, { key: "onPageNumber", value: function onPageNumber(event) { event.preventDefault(); if (this.options.pageNumber === +$__default["default"](event.currentTarget).text()) { return; } this.options.pageNumber = +$__default["default"](event.currentTarget).text(); this.updatePagination(event); return false; } // eslint-disable-next-line no-unused-vars }, { key: "initRow", value: function initRow(item, i, data, trFragments) { var _this7 = this; var html = []; var style = {}; var csses = []; var data_ = ''; var attributes = {}; var htmlAttributes = []; if (Utils.findIndex(this.hiddenRows, item) > -1) { return; } style = Utils.calculateObjectValue(this.options, this.options.rowStyle, [item, i], style); if (style && style.css) { for (var _i8 = 0, _Object$entries7 = Object.entries(style.css); _i8 < _Object$entries7.length; _i8++) { var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i8], 2), key = _Object$entries7$_i[0], value = _Object$entries7$_i[1]; csses.push("".concat(key, ": ").concat(value)); } } attributes = Utils.calculateObjectValue(this.options, this.options.rowAttributes, [item, i], attributes); if (attributes) { for (var _i9 = 0, _Object$entries8 = Object.entries(attributes); _i9 < _Object$entries8.length; _i9++) { var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2), _key2 = _Object$entries8$_i[0], _value = _Object$entries8$_i[1]; htmlAttributes.push("".concat(_key2, "=\"").concat(Utils.escapeHTML(_value), "\"")); } } if (item._data && !Utils.isEmptyObject(item._data)) { for (var _i10 = 0, _Object$entries9 = Object.entries(item._data); _i10 < _Object$entries9.length; _i10++) { var _Object$entries9$_i = _slicedToArray(_Object$entries9[_i10], 2), k = _Object$entries9$_i[0], v = _Object$entries9$_i[1]; // ignore data-index if (k === 'index') { return; } data_ += " data-".concat(k, "='").concat(_typeof(v) === 'object' ? JSON.stringify(v) : v, "'"); } } html.push(''); if (this.options.cardView) { html.push("
    ")); } var detailViewTemplate = ''; if (Utils.hasDetailViewIcon(this.options)) { detailViewTemplate = ''; if (Utils.calculateObjectValue(null, this.options.detailFilter, [i, item])) { detailViewTemplate += "\n \n ".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen), "\n \n "); } detailViewTemplate += ''; } if (detailViewTemplate && this.options.detailViewAlign !== 'right') { html.push(detailViewTemplate); } this.header.fields.forEach(function (field, j) { var column = _this7.columns[j]; var text = ''; var value_ = Utils.getItemField(item, field, _this7.options.escape, column.escape); var value = ''; var type = ''; var cellStyle = {}; var id_ = ''; var class_ = _this7.header.classes[j]; var style_ = ''; var styleToAdd_ = ''; var data_ = ''; var rowspan_ = ''; var colspan_ = ''; var title_ = ''; if ((_this7.fromHtml || _this7.autoMergeCells) && typeof value_ === 'undefined') { if (!column.checkbox && !column.radio) { return; } } if (!column.visible) { return; } if (_this7.options.cardView && !column.cardVisible) { return; } if (column.escape) { value_ = Utils.escapeHTML(value_); } // Style concat if (csses.concat([_this7.header.styles[j]]).length) { styleToAdd_ += "".concat(csses.concat([_this7.header.styles[j]]).join('; ')); } if (item["_".concat(field, "_style")]) { styleToAdd_ += "".concat(item["_".concat(field, "_style")]); } if (styleToAdd_) { style_ = " style=\"".concat(styleToAdd_, "\""); } // Style concat // handle id and class of td if (item["_".concat(field, "_id")]) { id_ = Utils.sprintf(' id="%s"', item["_".concat(field, "_id")]); } if (item["_".concat(field, "_class")]) { class_ = Utils.sprintf(' class="%s"', item["_".concat(field, "_class")]); } if (item["_".concat(field, "_rowspan")]) { rowspan_ = Utils.sprintf(' rowspan="%s"', item["_".concat(field, "_rowspan")]); } if (item["_".concat(field, "_colspan")]) { colspan_ = Utils.sprintf(' colspan="%s"', item["_".concat(field, "_colspan")]); } if (item["_".concat(field, "_title")]) { title_ = Utils.sprintf(' title="%s"', item["_".concat(field, "_title")]); } cellStyle = Utils.calculateObjectValue(_this7.header, _this7.header.cellStyles[j], [value_, item, i, field], cellStyle); if (cellStyle.classes) { class_ = " class=\"".concat(cellStyle.classes, "\""); } if (cellStyle.css) { var csses_ = []; for (var _i11 = 0, _Object$entries10 = Object.entries(cellStyle.css); _i11 < _Object$entries10.length; _i11++) { var _Object$entries10$_i = _slicedToArray(_Object$entries10[_i11], 2), _key3 = _Object$entries10$_i[0], _value2 = _Object$entries10$_i[1]; csses_.push("".concat(_key3, ": ").concat(_value2)); } style_ = " style=\"".concat(csses_.concat(_this7.header.styles[j]).join('; '), "\""); } value = Utils.calculateObjectValue(column, _this7.header.formatters[j], [value_, item, i, field], value_); if (!(column.checkbox || column.radio)) { value = typeof value === 'undefined' || value === null ? _this7.options.undefinedText : value; } if (column.searchable && _this7.searchText && _this7.options.searchHighlight && !(column.checkbox || column.radio)) { var defValue = ''; var regExp = new RegExp("(".concat(_this7.searchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), ")"), 'gim'); var marker = '$1'; var isHTML = value && /<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i.test(value); if (isHTML) { // value can contains a HTML tags var textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent; var textReplaced = textContent.replace(regExp, marker); textContent = textContent.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); defValue = value.replace(new RegExp("(>\\s*)(".concat(textContent, ")(\\s*)"), 'gm'), "$1".concat(textReplaced, "$3")); } else { // but usually not defValue = value.toString().replace(regExp, marker); } value = Utils.calculateObjectValue(column, column.searchHighlightFormatter, [value, _this7.searchText], defValue); } if (item["_".concat(field, "_data")] && !Utils.isEmptyObject(item["_".concat(field, "_data")])) { for (var _i12 = 0, _Object$entries11 = Object.entries(item["_".concat(field, "_data")]); _i12 < _Object$entries11.length; _i12++) { var _Object$entries11$_i = _slicedToArray(_Object$entries11[_i12], 2), _k = _Object$entries11$_i[0], _v = _Object$entries11$_i[1]; // ignore data-index if (_k === 'index') { return; } data_ += " data-".concat(_k, "=\"").concat(_v, "\""); } } if (column.checkbox || column.radio) { type = column.checkbox ? 'checkbox' : type; type = column.radio ? 'radio' : type; var c = column['class'] || ''; var isChecked = Utils.isObject(value) && value.hasOwnProperty('checked') ? value.checked : (value === true || value_) && value !== false; var isDisabled = !column.checkboxEnabled || value && value.disabled; text = [_this7.options.cardView ? "
    ") : ""), ""), _this7.header.formatters[j] && typeof value === 'string' ? value : '', _this7.options.cardView ? '
    ' : ''].join(''); item[_this7.header.stateField] = value === true || !!value_ || value && value.checked; } else if (_this7.options.cardView) { var cardTitle = _this7.options.showHeader ? "").concat(Utils.getFieldTitle(_this7.columns, field), "") : ''; text = "
    ".concat(cardTitle, "").concat(value, "
    "); if (_this7.options.smartDisplay && value === '') { text = '
    '; } } else { text = "").concat(value, ""); } html.push(text); }); if (detailViewTemplate && this.options.detailViewAlign === 'right') { html.push(detailViewTemplate); } if (this.options.cardView) { html.push('
    '); } html.push(''); return html.join(''); } }, { key: "initBody", value: function initBody(fixedScroll, updatedUid) { var _this8 = this; var data = this.getData(); this.trigger('pre-body', data); this.$body = this.$el.find('>tbody'); if (!this.$body.length) { this.$body = $__default["default"]('').appendTo(this.$el); } // Fix #389 Bootstrap-table-flatJSON is not working if (!this.options.pagination || this.options.sidePagination === 'server') { this.pageFrom = 1; this.pageTo = data.length; } var rows = []; var trFragments = $__default["default"](document.createDocumentFragment()); var hasTr = false; var toExpand = []; this.autoMergeCells = Utils.checkAutoMergeCells(data.slice(this.pageFrom - 1, this.pageTo)); for (var i = this.pageFrom - 1; i < this.pageTo; i++) { var item = data[i]; var tr = this.initRow(item, i, data, trFragments); hasTr = hasTr || !!tr; if (tr && typeof tr === 'string') { var uniqueId = this.options.uniqueId; if (uniqueId && item.hasOwnProperty(uniqueId)) { var itemUniqueId = item[uniqueId]; var oldTr = this.$body.find(Utils.sprintf('> tr[data-uniqueid="%s"][data-has-detail-view]', itemUniqueId)); var oldTrNext = oldTr.next(); if (oldTrNext.is('tr.detail-view')) { toExpand.push(i); if (!updatedUid || itemUniqueId !== updatedUid) { tr += oldTrNext[0].outerHTML; } } } if (!this.options.virtualScroll) { trFragments.append(tr); } else { rows.push(tr); } } } // show no records if (!hasTr) { this.$body.html("".concat(Utils.sprintf('%s', this.getVisibleFields().length + Utils.getDetailViewIndexOffset(this.options), this.options.formatNoMatches()), "")); } else if (!this.options.virtualScroll) { this.$body.html(trFragments); } else { if (this.virtualScroll) { this.virtualScroll.destroy(); } this.virtualScroll = new VirtualScroll({ rows: rows, fixedScroll: fixedScroll, scrollEl: this.$tableBody[0], contentEl: this.$body[0], itemHeight: this.options.virtualScrollItemHeight, callback: function callback(startIndex, endIndex) { _this8.fitHeader(); _this8.initBodyEvent(); _this8.trigger('virtual-scroll', startIndex, endIndex); } }); } toExpand.forEach(function (index) { _this8.expandRow(index); }); if (!fixedScroll) { this.scrollTo(0); } this.initBodyEvent(); this.initFooter(); this.resetView(); this.updateSelected(); if (this.options.sidePagination !== 'server') { this.options.totalRows = data.length; } this.trigger('post-body', data); } }, { key: "initBodyEvent", value: function initBodyEvent() { var _this9 = this; // click to select by column this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) { var $td = $__default["default"](e.currentTarget); var $tr = $td.parent(); var $cardViewArr = $__default["default"](e.target).parents('.card-views').children(); var $cardViewTarget = $__default["default"](e.target).parents('.card-view'); var rowIndex = $tr.data('index'); var item = _this9.data[rowIndex]; var index = _this9.options.cardView ? $cardViewArr.index($cardViewTarget) : $td[0].cellIndex; var fields = _this9.getVisibleFields(); var field = fields[index - Utils.getDetailViewIndexOffset(_this9.options)]; var column = _this9.columns[_this9.fieldsColumnsIndex[field]]; var value = Utils.getItemField(item, field, _this9.options.escape, column.escape); if ($td.find('.detail-icon').length) { return; } _this9.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td); _this9.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr, field); // if click to select - then trigger the checkbox/radio click if (e.type === 'click' && _this9.options.clickToSelect && column.clickToSelect && !Utils.calculateObjectValue(_this9.options, _this9.options.ignoreClickToSelectOn, [e.target])) { var $selectItem = $tr.find(Utils.sprintf('[name="%s"]', _this9.options.selectItemName)); if ($selectItem.length) { $selectItem[0].click(); } } if (e.type === 'click' && _this9.options.detailViewByClick) { _this9.toggleDetailView(rowIndex, _this9.header.detailFormatters[_this9.fieldsColumnsIndex[field]]); } }).off('mousedown').on('mousedown', function (e) { // https://github.com/jquery/jquery/issues/1741 _this9.multipleSelectRowCtrlKey = e.ctrlKey || e.metaKey; _this9.multipleSelectRowShiftKey = e.shiftKey; }); this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function (e) { e.preventDefault(); _this9.toggleDetailView($__default["default"](e.currentTarget).parent().parent().data('index')); return false; }); this.$selectItem = this.$body.find(Utils.sprintf('[name="%s"]', this.options.selectItemName)); this.$selectItem.off('click').on('click', function (e) { e.stopImmediatePropagation(); var $this = $__default["default"](e.currentTarget); _this9._toggleCheck($this.prop('checked'), $this.data('index')); }); this.header.events.forEach(function (_events, i) { var events = _events; if (!events) { return; } // fix bug, if events is defined with namespace if (typeof events === 'string') { events = Utils.calculateObjectValue(null, events); } if (!events) { throw new Error("Unknown event in the scope: ".concat(_events)); } var field = _this9.header.fields[i]; var fieldIndex = _this9.getVisibleFields().indexOf(field); if (fieldIndex === -1) { return; } fieldIndex += Utils.getDetailViewIndexOffset(_this9.options); var _loop2 = function _loop2(key) { if (!events.hasOwnProperty(key)) { return "continue"; } var event = events[key]; _this9.$body.find('>tr:not(.no-records-found)').each(function (i, tr) { var $tr = $__default["default"](tr); var $td = $tr.find(_this9.options.cardView ? '.card-views>.card-view' : '>td').eq(fieldIndex); var index = key.indexOf(' '); var name = key.substring(0, index); var el = key.substring(index + 1); $td.find(el).off(name).on(name, function (e) { var index = $tr.data('index'); var row = _this9.data[index]; var value = row[field]; event.apply(_this9, [e, value, row, index]); }); }); }; for (var key in events) { var _ret2 = _loop2(key); if (_ret2 === "continue") continue; } }); } }, { key: "initServer", value: function initServer(silent, query, url) { var _this10 = this; var data = {}; var index = this.header.fields.indexOf(this.options.sortName); var params = { searchText: this.searchText, sortName: this.options.sortName, sortOrder: this.options.sortOrder }; if (this.header.sortNames[index]) { params.sortName = this.header.sortNames[index]; } if (this.options.pagination && this.options.sidePagination === 'server') { params.pageSize = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize; params.pageNumber = this.options.pageNumber; } if (!(url || this.options.url) && !this.options.ajax) { return; } if (this.options.queryParamsType === 'limit') { params = { search: params.searchText, sort: params.sortName, order: params.sortOrder }; if (this.options.pagination && this.options.sidePagination === 'server') { params.offset = this.options.pageSize === this.options.formatAllRows() ? 0 : this.options.pageSize * (this.options.pageNumber - 1); params.limit = this.options.pageSize; if (params.limit === 0 || this.options.pageSize === this.options.formatAllRows()) { delete params.limit; } } } if (this.options.search && this.options.sidePagination === 'server' && this.columns.filter(function (column) { return !column.searchable; }).length) { params.searchable = []; var _iterator2 = _createForOfIteratorHelper(this.columns), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var column = _step2.value; if (!column.checkbox && column.searchable && (this.options.visibleSearch && column.visible || !this.options.visibleSearch)) { params.searchable.push(column.field); } } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } } if (!Utils.isEmptyObject(this.filterColumnsPartial)) { params.filter = JSON.stringify(this.filterColumnsPartial, null); } $__default["default"].extend(params, query || {}); data = Utils.calculateObjectValue(this.options, this.options.queryParams, [params], data); // false to stop request if (data === false) { return; } if (!silent) { this.showLoading(); } var request = $__default["default"].extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), { type: this.options.method, url: url || this.options.url, data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data, cache: this.options.cache, contentType: this.options.contentType, dataType: this.options.dataType, success: function success(_res, textStatus, jqXHR) { var res = Utils.calculateObjectValue(_this10.options, _this10.options.responseHandler, [_res, jqXHR], _res); _this10.load(res); _this10.trigger('load-success', res, jqXHR && jqXHR.status, jqXHR); if (!silent) { _this10.hideLoading(); } if (_this10.options.sidePagination === 'server' && _this10.options.pageNumber > 1 && res[_this10.options.totalField] > 0 && !res[_this10.options.dataField].length) { _this10.updatePagination(); } }, error: function error(jqXHR) { // abort ajax by multiple request if (jqXHR && jqXHR.status === 0 && _this10._xhrAbort) { _this10._xhrAbort = false; return; } var data = []; if (_this10.options.sidePagination === 'server') { data = {}; data[_this10.options.totalField] = 0; data[_this10.options.dataField] = []; } _this10.load(data); _this10.trigger('load-error', jqXHR && jqXHR.status, jqXHR); if (!silent) { _this10.hideLoading(); } } }); if (this.options.ajax) { Utils.calculateObjectValue(this, this.options.ajax, [request], null); } else { if (this._xhr && this._xhr.readyState !== 4) { this._xhrAbort = true; this._xhr.abort(); } this._xhr = $__default["default"].ajax(request); } return data; } }, { key: "initSearchText", value: function initSearchText() { if (this.options.search) { this.searchText = ''; if (this.options.searchText !== '') { var $search = Utils.getSearchInput(this); $search.val(this.options.searchText); this.onSearch({ currentTarget: $search, firedByInitSearchText: true }); } } } }, { key: "getCaret", value: function getCaret() { var _this11 = this; this.$header.find('th').each(function (i, th) { $__default["default"](th).find('.sortable').removeClass('desc asc').addClass($__default["default"](th).data('field') === _this11.options.sortName ? _this11.options.sortOrder : 'both'); }); } }, { key: "updateSelected", value: function updateSelected() { var checkAll = this.$selectItem.filter(':enabled').length && this.$selectItem.filter(':enabled').length === this.$selectItem.filter(':enabled').filter(':checked').length; this.$selectAll.add(this.$selectAll_).prop('checked', checkAll); this.$selectItem.each(function (i, el) { $__default["default"](el).closest('tr')[$__default["default"](el).prop('checked') ? 'addClass' : 'removeClass']('selected'); }); } }, { key: "updateRows", value: function updateRows() { var _this12 = this; this.$selectItem.each(function (i, el) { _this12.data[$__default["default"](el).data('index')][_this12.header.stateField] = $__default["default"](el).prop('checked'); }); } }, { key: "resetRows", value: function resetRows() { var _iterator3 = _createForOfIteratorHelper(this.data), _step3; try { for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { var row = _step3.value; this.$selectAll.prop('checked', false); this.$selectItem.prop('checked', false); if (this.header.stateField) { row[this.header.stateField] = false; } } } catch (err) { _iterator3.e(err); } finally { _iterator3.f(); } this.initHiddenRows(); } }, { key: "trigger", value: function trigger(_name) { var _this$options, _this$options2; var name = "".concat(_name, ".bs.table"); for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key4 = 1; _key4 < _len; _key4++) { args[_key4 - 1] = arguments[_key4]; } (_this$options = this.options)[BootstrapTable.EVENTS[name]].apply(_this$options, [].concat(args, [this])); this.$el.trigger($__default["default"].Event(name, { sender: this }), args); (_this$options2 = this.options).onAll.apply(_this$options2, [name].concat([].concat(args, [this]))); this.$el.trigger($__default["default"].Event('all.bs.table', { sender: this }), [name, args]); } }, { key: "resetHeader", value: function resetHeader() { var _this13 = this; // fix #61: the hidden table reset header bug. // fix bug: get $el.css('width') error sometime (height = 500) clearTimeout(this.timeoutId_); this.timeoutId_ = setTimeout(function () { return _this13.fitHeader(); }, this.$el.is(':hidden') ? 100 : 0); } }, { key: "fitHeader", value: function fitHeader() { var _this14 = this; if (this.$el.is(':hidden')) { this.timeoutId_ = setTimeout(function () { return _this14.fitHeader(); }, 100); return; } var fixedBody = this.$tableBody.get(0); var scrollWidth = this.hasScrollBar && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0; this.$el.css('margin-top', -this.$header.outerHeight()); var focused = $__default["default"](':focus'); if (focused.length > 0) { var $th = focused.parents('th'); if ($th.length > 0) { var dataField = $th.attr('data-field'); if (dataField !== undefined) { var $headerTh = this.$header.find("[data-field='".concat(dataField, "']")); if ($headerTh.length > 0) { $headerTh.find(':input').addClass('focus-temp'); } } } } this.$header_ = this.$header.clone(true, true); this.$selectAll_ = this.$header_.find('[name="btSelectAll"]'); this.$tableHeader.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).html('').attr('class', this.$el.attr('class')).append(this.$header_); this.$tableLoading.css('width', this.$el.outerWidth()); var focusedTemp = $__default["default"]('.focus-temp:visible:eq(0)'); if (focusedTemp.length > 0) { focusedTemp.focus(); this.$header.find('.focus-temp').removeClass('focus-temp'); } // fix bug: $.data() is not working as expected after $.append() this.$header.find('th[data-field]').each(function (i, el) { _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', $__default["default"](el).data('field'))).data($__default["default"](el).data()); }); var visibleFields = this.getVisibleFields(); var $ths = this.$header_.find('th'); var $tr = this.$body.find('>tr:not(.no-records-found,.virtual-scroll-top)').eq(0); while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) { $tr = $tr.next(); } var trLength = $tr.find('> *').length; $tr.find('> *').each(function (i, el) { var $this = $__default["default"](el); if (Utils.hasDetailViewIcon(_this14.options)) { if (i === 0 && _this14.options.detailViewAlign !== 'right' || i === trLength - 1 && _this14.options.detailViewAlign === 'right') { var $thDetail = $ths.filter('.detail'); var _zoomWidth = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width(); $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth); return; } } var index = i - Utils.getDetailViewIndexOffset(_this14.options); var $th = _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', visibleFields[index])); if ($th.length > 1) { $th = $__default["default"]($ths[$this[0].cellIndex]); } var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width(); $th.find('.fht-cell').width($this.innerWidth() - zoomWidth); }); this.horizontalScroll(); this.trigger('post-header'); } }, { key: "initFooter", value: function initFooter() { if (!this.options.showFooter || this.options.cardView) { // do nothing return; } var data = this.getData(); var html = []; var detailTemplate = ''; if (Utils.hasDetailViewIcon(this.options)) { detailTemplate = '
    '; } if (detailTemplate && this.options.detailViewAlign !== 'right') { html.push(detailTemplate); } var _iterator4 = _createForOfIteratorHelper(this.columns), _step4; try { for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { var column = _step4.value; var falign = ''; var valign = ''; var csses = []; var style = {}; var class_ = Utils.sprintf(' class="%s"', column['class']); if (!column.visible || this.footerData && this.footerData.length > 0 && !(column.field in this.footerData[0])) { continue; } if (this.options.cardView && !column.cardVisible) { return; } falign = Utils.sprintf('text-align: %s; ', column.falign ? column.falign : column.align); valign = Utils.sprintf('vertical-align: %s; ', column.valign); style = Utils.calculateObjectValue(null, this.options.footerStyle, [column]); if (style && style.css) { for (var _i13 = 0, _Object$entries12 = Object.entries(style.css); _i13 < _Object$entries12.length; _i13++) { var _Object$entries12$_i = _slicedToArray(_Object$entries12[_i13], 2), key = _Object$entries12$_i[0], _value3 = _Object$entries12$_i[1]; csses.push("".concat(key, ": ").concat(_value3)); } } if (style && style.classes) { class_ = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], style.classes].join(' ') : style.classes); } html.push(' 0) { colspan = this.footerData[0]["_".concat(column.field, "_colspan")] || 0; } if (colspan) { html.push(" colspan=\"".concat(colspan, "\" ")); } html.push('>'); html.push('
    '); var value = ''; if (this.footerData && this.footerData.length > 0) { value = this.footerData[0][column.field] || ''; } html.push(Utils.calculateObjectValue(column, column.footerFormatter, [data, value], value)); html.push('
    '); html.push('
    '); html.push(''); html.push(''); } } catch (err) { _iterator4.e(err); } finally { _iterator4.f(); } if (detailTemplate && this.options.detailViewAlign === 'right') { html.push(detailTemplate); } if (!this.options.height && !this.$tableFooter.length) { this.$el.append(''); this.$tableFooter = this.$el.find('tfoot'); } if (!this.$tableFooter.find('tr').length) { this.$tableFooter.html('
    '); } this.$tableFooter.find('tr').html(html.join('')); this.trigger('post-footer', this.$tableFooter); } }, { key: "fitFooter", value: function fitFooter() { var _this15 = this; if (this.$el.is(':hidden')) { setTimeout(function () { return _this15.fitFooter(); }, 100); return; } var fixedBody = this.$tableBody.get(0); var scrollWidth = this.hasScrollBar && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0; this.$tableFooter.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).attr('class', this.$el.attr('class')); var $ths = this.$tableFooter.find('th'); var $tr = this.$body.find('>tr:first-child:not(.no-records-found)'); $ths.find('.fht-cell').width('auto'); while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) { $tr = $tr.next(); } var trLength = $tr.find('> *').length; $tr.find('> *').each(function (i, el) { var $this = $__default["default"](el); if (Utils.hasDetailViewIcon(_this15.options)) { if (i === 0 && _this15.options.detailViewAlign === 'left' || i === trLength - 1 && _this15.options.detailViewAlign === 'right') { var $thDetail = $ths.filter('.detail'); var _zoomWidth2 = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width(); $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth2); return; } } var $th = $ths.eq(i); var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width(); $th.find('.fht-cell').width($this.innerWidth() - zoomWidth); }); this.horizontalScroll(); } }, { key: "horizontalScroll", value: function horizontalScroll() { var _this16 = this; // horizontal scroll event // TODO: it's probably better improving the layout than binding to scroll event this.$tableBody.off('scroll').on('scroll', function () { var scrollLeft = _this16.$tableBody.scrollLeft(); if (_this16.options.showHeader && _this16.options.height) { _this16.$tableHeader.scrollLeft(scrollLeft); } if (_this16.options.showFooter && !_this16.options.cardView) { _this16.$tableFooter.scrollLeft(scrollLeft); } _this16.trigger('scroll-body', _this16.$tableBody); }); } }, { key: "getVisibleFields", value: function getVisibleFields() { var visibleFields = []; var _iterator5 = _createForOfIteratorHelper(this.header.fields), _step5; try { for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { var field = _step5.value; var column = this.columns[this.fieldsColumnsIndex[field]]; if (!column || !column.visible || this.options.cardView && !column.cardVisible) { continue; } visibleFields.push(field); } } catch (err) { _iterator5.e(err); } finally { _iterator5.f(); } return visibleFields; } }, { key: "initHiddenRows", value: function initHiddenRows() { this.hiddenRows = []; } // PUBLIC FUNCTION DEFINITION // ======================= }, { key: "getOptions", value: function getOptions() { // deep copy and remove data var options = $__default["default"].extend({}, this.options); delete options.data; return $__default["default"].extend(true, {}, options); } }, { key: "refreshOptions", value: function refreshOptions(options) { // If the objects are equivalent then avoid the call of destroy / init methods if (Utils.compareObjects(this.options, options, true)) { return; } this.options = $__default["default"].extend(this.options, options); this.trigger('refresh-options', this.options); this.destroy(); this.init(); } }, { key: "getData", value: function getData(params) { var _this17 = this; var data = this.options.data; if ((this.searchText || this.options.customSearch || this.options.sortName !== undefined || this.enableCustomSort || // Fix #4616: this.enableCustomSort is for extensions !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) { data = this.data; } if (params && params.useCurrentPage) { data = data.slice(this.pageFrom - 1, this.pageTo); } if (params && !params.includeHiddenRows) { var hiddenRows = this.getHiddenRows(); data = data.filter(function (row) { return Utils.findIndex(hiddenRows, row) === -1; }); } if (params && params.formatted) { data.forEach(function (row) { for (var _i14 = 0, _Object$entries13 = Object.entries(row); _i14 < _Object$entries13.length; _i14++) { var _Object$entries13$_i = _slicedToArray(_Object$entries13[_i14], 2), key = _Object$entries13$_i[0], value = _Object$entries13$_i[1]; var column = _this17.columns[_this17.fieldsColumnsIndex[key]]; if (!column) { return; } row[key] = Utils.calculateObjectValue(column, _this17.header.formatters[column.fieldIndex], [value, row, row.index, column.field], value); } }); } return data; } }, { key: "getSelections", value: function getSelections() { var _this18 = this; return (this.options.maintainMetaData ? this.options.data : this.data).filter(function (row) { return row[_this18.header.stateField] === true; }); } }, { key: "load", value: function load(_data) { var fixedScroll = false; var data = _data; // #431: support pagination if (this.options.pagination && this.options.sidePagination === 'server') { this.options.totalRows = data[this.options.totalField]; this.options.totalNotFiltered = data[this.options.totalNotFilteredField]; this.footerData = data[this.options.footerField] ? [data[this.options.footerField]] : undefined; } fixedScroll = data.fixedScroll; data = Array.isArray(data) ? data : data[this.options.dataField]; this.initData(data); this.initSearch(); this.initPagination(); this.initBody(fixedScroll); } }, { key: "append", value: function append(data) { this.initData(data, 'append'); this.initSearch(); this.initPagination(); this.initSort(); this.initBody(true); } }, { key: "prepend", value: function prepend(data) { this.initData(data, 'prepend'); this.initSearch(); this.initPagination(); this.initSort(); this.initBody(true); } }, { key: "remove", value: function remove(params) { var removed = 0; for (var i = this.options.data.length - 1; i >= 0; i--) { var row = this.options.data[i]; if (!row.hasOwnProperty(params.field) && params.field !== '$index') { continue; } if (!row.hasOwnProperty(params.field) && params.field === '$index' && params.values.includes(i) || params.values.includes(row[params.field])) { removed++; this.options.data.splice(i, 1); } } if (!removed) { return; } if (this.options.sidePagination === 'server') { this.options.totalRows -= removed; this.data = _toConsumableArray(this.options.data); } this.initSearch(); this.initPagination(); this.initSort(); this.initBody(true); } }, { key: "removeAll", value: function removeAll() { if (this.options.data.length > 0) { this.options.data.splice(0, this.options.data.length); this.initSearch(); this.initPagination(); this.initBody(true); } } }, { key: "insertRow", value: function insertRow(params) { if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) { return; } this.options.data.splice(params.index, 0, params.row); this.initSearch(); this.initPagination(); this.initSort(); this.initBody(true); } }, { key: "updateRow", value: function updateRow(params) { var allParams = Array.isArray(params) ? params : [params]; var _iterator6 = _createForOfIteratorHelper(allParams), _step6; try { for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { var _params = _step6.value; if (!_params.hasOwnProperty('index') || !_params.hasOwnProperty('row')) { continue; } if (_params.hasOwnProperty('replace') && _params.replace) { this.options.data[_params.index] = _params.row; } else { $__default["default"].extend(this.options.data[_params.index], _params.row); } } } catch (err) { _iterator6.e(err); } finally { _iterator6.f(); } this.initSearch(); this.initPagination(); this.initSort(); this.initBody(true); } }, { key: "getRowByUniqueId", value: function getRowByUniqueId(_id) { var uniqueId = this.options.uniqueId; var len = this.options.data.length; var id = _id; var dataRow = null; var i; var row; var rowUniqueId; for (i = len - 1; i >= 0; i--) { row = this.options.data[i]; if (row.hasOwnProperty(uniqueId)) { // uniqueId is a column rowUniqueId = row[uniqueId]; } else if (row._data && row._data.hasOwnProperty(uniqueId)) { // uniqueId is a row data property rowUniqueId = row._data[uniqueId]; } else { continue; } if (typeof rowUniqueId === 'string') { id = id.toString(); } else if (typeof rowUniqueId === 'number') { if (Number(rowUniqueId) === rowUniqueId && rowUniqueId % 1 === 0) { id = parseInt(id, 10); } else if (rowUniqueId === Number(rowUniqueId) && rowUniqueId !== 0) { id = parseFloat(id); } } if (rowUniqueId === id) { dataRow = row; break; } } return dataRow; } }, { key: "updateByUniqueId", value: function updateByUniqueId(params) { var allParams = Array.isArray(params) ? params : [params]; var updatedUid = null; var _iterator7 = _createForOfIteratorHelper(allParams), _step7; try { for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { var _params2 = _step7.value; if (!_params2.hasOwnProperty('id') || !_params2.hasOwnProperty('row')) { continue; } var rowId = this.options.data.indexOf(this.getRowByUniqueId(_params2.id)); if (rowId === -1) { continue; } if (_params2.hasOwnProperty('replace') && _params2.replace) { this.options.data[rowId] = _params2.row; } else { $__default["default"].extend(this.options.data[rowId], _params2.row); } updatedUid = _params2.id; } } catch (err) { _iterator7.e(err); } finally { _iterator7.f(); } this.initSearch(); this.initPagination(); this.initSort(); this.initBody(true, updatedUid); } }, { key: "removeByUniqueId", value: function removeByUniqueId(id) { var len = this.options.data.length; var row = this.getRowByUniqueId(id); if (row) { this.options.data.splice(this.options.data.indexOf(row), 1); } if (len === this.options.data.length) { return; } if (this.options.sidePagination === 'server') { this.options.totalRows -= 1; this.data = _toConsumableArray(this.options.data); } this.initSearch(); this.initPagination(); this.initBody(true); } }, { key: "updateCell", value: function updateCell(params) { if (!params.hasOwnProperty('index') || !params.hasOwnProperty('field') || !params.hasOwnProperty('value')) { return; } this.data[params.index][params.field] = params.value; if (params.reinit === false) { return; } this.initSort(); this.initBody(true); } }, { key: "updateCellByUniqueId", value: function updateCellByUniqueId(params) { var _this19 = this; var allParams = Array.isArray(params) ? params : [params]; allParams.forEach(function (_ref6) { var id = _ref6.id, field = _ref6.field, value = _ref6.value; var rowId = _this19.options.data.indexOf(_this19.getRowByUniqueId(id)); if (rowId === -1) { return; } _this19.options.data[rowId][field] = value; }); if (params.reinit === false) { return; } this.initSort(); this.initBody(true); } }, { key: "showRow", value: function showRow(params) { this._toggleRow(params, true); } }, { key: "hideRow", value: function hideRow(params) { this._toggleRow(params, false); } }, { key: "_toggleRow", value: function _toggleRow(params, visible) { var row; if (params.hasOwnProperty('index')) { row = this.getData()[params.index]; } else if (params.hasOwnProperty('uniqueId')) { row = this.getRowByUniqueId(params.uniqueId); } if (!row) { return; } var index = Utils.findIndex(this.hiddenRows, row); if (!visible && index === -1) { this.hiddenRows.push(row); } else if (visible && index > -1) { this.hiddenRows.splice(index, 1); } this.initBody(true); this.initPagination(); } }, { key: "getHiddenRows", value: function getHiddenRows(show) { if (show) { this.initHiddenRows(); this.initBody(true); this.initPagination(); return; } var data = this.getData(); var rows = []; var _iterator8 = _createForOfIteratorHelper(data), _step8; try { for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { var row = _step8.value; if (this.hiddenRows.includes(row)) { rows.push(row); } } } catch (err) { _iterator8.e(err); } finally { _iterator8.f(); } this.hiddenRows = rows; return rows; } }, { key: "showColumn", value: function showColumn(field) { var _this20 = this; var fields = Array.isArray(field) ? field : [field]; fields.forEach(function (field) { _this20._toggleColumn(_this20.fieldsColumnsIndex[field], true, true); }); } }, { key: "hideColumn", value: function hideColumn(field) { var _this21 = this; var fields = Array.isArray(field) ? field : [field]; fields.forEach(function (field) { _this21._toggleColumn(_this21.fieldsColumnsIndex[field], false, true); }); } }, { key: "_toggleColumn", value: function _toggleColumn(index, checked, needUpdate) { if (index === -1 || this.columns[index].visible === checked) { return; } this.columns[index].visible = checked; this.initHeader(); this.initSearch(); this.initPagination(); this.initBody(); if (this.options.showColumns) { var $items = this.$toolbar.find('.keep-open input:not(".toggle-all")').prop('disabled', false); if (needUpdate) { $items.filter(Utils.sprintf('[value="%s"]', index)).prop('checked', checked); } if ($items.filter(':checked').length <= this.options.minimumCountColumns) { $items.filter(':checked').prop('disabled', true); } } } }, { key: "getVisibleColumns", value: function getVisibleColumns() { var _this22 = this; return this.columns.filter(function (column) { return column.visible && !_this22.isSelectionColumn(column); }); } }, { key: "getHiddenColumns", value: function getHiddenColumns() { return this.columns.filter(function (_ref7) { var visible = _ref7.visible; return !visible; }); } }, { key: "isSelectionColumn", value: function isSelectionColumn(column) { return column.radio || column.checkbox; } }, { key: "showAllColumns", value: function showAllColumns() { this._toggleAllColumns(true); } }, { key: "hideAllColumns", value: function hideAllColumns() { this._toggleAllColumns(false); } }, { key: "_toggleAllColumns", value: function _toggleAllColumns(visible) { var _this23 = this; var _iterator9 = _createForOfIteratorHelper(this.columns.slice().reverse()), _step9; try { for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { var column = _step9.value; if (column.switchable) { if (!visible && this.options.showColumns && this.getVisibleColumns().filter(function (it) { return it.switchable; }).length === this.options.minimumCountColumns) { continue; } column.visible = visible; } } } catch (err) { _iterator9.e(err); } finally { _iterator9.f(); } this.initHeader(); this.initSearch(); this.initPagination(); this.initBody(); if (this.options.showColumns) { var $items = this.$toolbar.find('.keep-open input[type="checkbox"]:not(".toggle-all")').prop('disabled', false); if (visible) { $items.prop('checked', visible); } else { $items.get().reverse().forEach(function (item) { if ($items.filter(':checked').length > _this23.options.minimumCountColumns) { $__default["default"](item).prop('checked', visible); } }); } if ($items.filter(':checked').length <= this.options.minimumCountColumns) { $items.filter(':checked').prop('disabled', true); } } } }, { key: "mergeCells", value: function mergeCells(options) { var row = options.index; var col = this.getVisibleFields().indexOf(options.field); var rowspan = options.rowspan || 1; var colspan = options.colspan || 1; var i; var j; var $tr = this.$body.find('>tr[data-index]'); col += Utils.getDetailViewIndexOffset(this.options); var $td = $tr.eq(row).find('>td').eq(col); if (row < 0 || col < 0 || row >= this.data.length) { return; } for (i = row; i < row + rowspan; i++) { for (j = col; j < col + colspan; j++) { $tr.eq(i).find('>td').eq(j).hide(); } } $td.attr('rowspan', rowspan).attr('colspan', colspan).show(); } }, { key: "checkAll", value: function checkAll() { this._toggleCheckAll(true); } }, { key: "uncheckAll", value: function uncheckAll() { this._toggleCheckAll(false); } }, { key: "_toggleCheckAll", value: function _toggleCheckAll(checked) { var rowsBefore = this.getSelections(); this.$selectAll.add(this.$selectAll_).prop('checked', checked); this.$selectItem.filter(':enabled').prop('checked', checked); this.updateRows(); this.updateSelected(); var rowsAfter = this.getSelections(); if (checked) { this.trigger('check-all', rowsAfter, rowsBefore); return; } this.trigger('uncheck-all', rowsAfter, rowsBefore); } }, { key: "checkInvert", value: function checkInvert() { var $items = this.$selectItem.filter(':enabled'); var checked = $items.filter(':checked'); $items.each(function (i, el) { $__default["default"](el).prop('checked', !$__default["default"](el).prop('checked')); }); this.updateRows(); this.updateSelected(); this.trigger('uncheck-some', checked); checked = this.getSelections(); this.trigger('check-some', checked); } }, { key: "check", value: function check(index) { this._toggleCheck(true, index); } }, { key: "uncheck", value: function uncheck(index) { this._toggleCheck(false, index); } }, { key: "_toggleCheck", value: function _toggleCheck(checked, index) { var $el = this.$selectItem.filter("[data-index=\"".concat(index, "\"]")); var row = this.data[index]; if ($el.is(':radio') || this.options.singleSelect || this.options.multipleSelectRow && !this.multipleSelectRowCtrlKey && !this.multipleSelectRowShiftKey) { var _iterator10 = _createForOfIteratorHelper(this.options.data), _step10; try { for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) { var r = _step10.value; r[this.header.stateField] = false; } } catch (err) { _iterator10.e(err); } finally { _iterator10.f(); } this.$selectItem.filter(':checked').not($el).prop('checked', false); } row[this.header.stateField] = checked; if (this.options.multipleSelectRow) { if (this.multipleSelectRowShiftKey && this.multipleSelectRowLastSelectedIndex >= 0) { var _ref8 = this.multipleSelectRowLastSelectedIndex < index ? [this.multipleSelectRowLastSelectedIndex, index] : [index, this.multipleSelectRowLastSelectedIndex], _ref9 = _slicedToArray(_ref8, 2), fromIndex = _ref9[0], toIndex = _ref9[1]; for (var i = fromIndex + 1; i < toIndex; i++) { this.data[i][this.header.stateField] = true; this.$selectItem.filter("[data-index=\"".concat(i, "\"]")).prop('checked', true); } } this.multipleSelectRowCtrlKey = false; this.multipleSelectRowShiftKey = false; this.multipleSelectRowLastSelectedIndex = checked ? index : -1; } $el.prop('checked', checked); this.updateSelected(); this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el); } }, { key: "checkBy", value: function checkBy(obj) { this._toggleCheckBy(true, obj); } }, { key: "uncheckBy", value: function uncheckBy(obj) { this._toggleCheckBy(false, obj); } }, { key: "_toggleCheckBy", value: function _toggleCheckBy(checked, obj) { var _this24 = this; if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) { return; } var rows = []; this.data.forEach(function (row, i) { if (!row.hasOwnProperty(obj.field)) { return false; } if (obj.values.includes(row[obj.field])) { var $el = _this24.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i)); var onlyCurrentPage = obj.hasOwnProperty('onlyCurrentPage') ? obj.onlyCurrentPage : false; $el = checked ? $el.not(':checked') : $el.filter(':checked'); if (!$el.length && onlyCurrentPage) { return; } $el.prop('checked', checked); row[_this24.header.stateField] = checked; rows.push(row); _this24.trigger(checked ? 'check' : 'uncheck', row, $el); } }); this.updateSelected(); this.trigger(checked ? 'check-some' : 'uncheck-some', rows); } }, { key: "refresh", value: function refresh(params) { if (params && params.url) { this.options.url = params.url; } if (params && params.pageNumber) { this.options.pageNumber = params.pageNumber; } if (params && params.pageSize) { this.options.pageSize = params.pageSize; } this.trigger('refresh', this.initServer(params && params.silent, params && params.query, params && params.url)); } }, { key: "destroy", value: function destroy() { this.$el.insertBefore(this.$container); $__default["default"](this.options.toolbar).insertBefore(this.$el); this.$container.next().remove(); this.$container.remove(); this.$el.html(this.$el_.html()).css('margin-top', '0').attr('class', this.$el_.attr('class') || ''); // reset the class } }, { key: "resetView", value: function resetView(params) { var padding = 0; if (params && params.height) { this.options.height = params.height; } this.$tableContainer.toggleClass('has-card-view', this.options.cardView); if (this.options.height) { var fixedBody = this.$tableBody.get(0); this.hasScrollBar = fixedBody.scrollWidth > fixedBody.clientWidth; } if (!this.options.cardView && this.options.showHeader && this.options.height) { this.$tableHeader.show(); this.resetHeader(); padding += this.$header.outerHeight(true) + 1; } else { this.$tableHeader.hide(); this.trigger('post-header'); } if (!this.options.cardView && this.options.showFooter) { this.$tableFooter.show(); this.fitFooter(); if (this.options.height) { padding += this.$tableFooter.outerHeight(true); } } if (this.$container.hasClass('fullscreen')) { this.$tableContainer.css('height', ''); this.$tableContainer.css('width', ''); } else if (this.options.height) { if (this.$tableBorder) { this.$tableBorder.css('width', ''); this.$tableBorder.css('height', ''); } var toolbarHeight = this.$toolbar.outerHeight(true); var paginationHeight = this.$pagination.outerHeight(true); var height = this.options.height - toolbarHeight - paginationHeight; var $bodyTable = this.$tableBody.find('>table'); var tableHeight = $bodyTable.outerHeight(); this.$tableContainer.css('height', "".concat(height, "px")); if (this.$tableBorder && $bodyTable.is(':visible')) { var tableBorderHeight = height - tableHeight - 2; if (this.hasScrollBar) { tableBorderHeight -= Utils.getScrollBarWidth(); } this.$tableBorder.css('width', "".concat($bodyTable.outerWidth(), "px")); this.$tableBorder.css('height', "".concat(tableBorderHeight, "px")); } } if (this.options.cardView) { // remove the element css this.$el.css('margin-top', '0'); this.$tableContainer.css('padding-bottom', '0'); this.$tableFooter.hide(); } else { // Assign the correct sortable arrow this.getCaret(); this.$tableContainer.css('padding-bottom', "".concat(padding, "px")); } this.trigger('reset-view'); } }, { key: "showLoading", value: function showLoading() { this.$tableLoading.toggleClass('open', true); var fontSize = this.options.loadingFontSize; if (this.options.loadingFontSize === 'auto') { fontSize = this.$tableLoading.width() * 0.04; fontSize = Math.max(12, fontSize); fontSize = Math.min(32, fontSize); fontSize = "".concat(fontSize, "px"); } this.$tableLoading.find('.loading-text').css('font-size', fontSize); } }, { key: "hideLoading", value: function hideLoading() { this.$tableLoading.toggleClass('open', false); } }, { key: "togglePagination", value: function togglePagination() { this.options.pagination = !this.options.pagination; var icon = this.options.showButtonIcons ? this.options.pagination ? this.options.icons.paginationSwitchDown : this.options.icons.paginationSwitchUp : ''; var text = this.options.showButtonText ? this.options.pagination ? this.options.formatPaginationSwitchUp() : this.options.formatPaginationSwitchDown() : ''; this.$toolbar.find('button[name="paginationSwitch"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text)); this.updatePagination(); this.trigger('toggle-pagination', this.options.pagination); } }, { key: "toggleFullscreen", value: function toggleFullscreen() { this.$el.closest('.bootstrap-table').toggleClass('fullscreen'); this.resetView(); } }, { key: "toggleView", value: function toggleView() { this.options.cardView = !this.options.cardView; this.initHeader(); var icon = this.options.showButtonIcons ? this.options.cardView ? this.options.icons.toggleOn : this.options.icons.toggleOff : ''; var text = this.options.showButtonText ? this.options.cardView ? this.options.formatToggleOff() : this.options.formatToggleOn() : ''; this.$toolbar.find('button[name="toggle"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text)); this.initBody(); this.trigger('toggle', this.options.cardView); } }, { key: "resetSearch", value: function resetSearch(text) { var $search = Utils.getSearchInput(this); var textToUse = text || ''; $search.val(textToUse); this.searchText = textToUse; this.onSearch({ currentTarget: $search }, false); } }, { key: "filterBy", value: function filterBy(columns, options) { this.filterOptions = Utils.isEmptyObject(options) ? this.options.filterOptions : $__default["default"].extend(this.options.filterOptions, options); this.filterColumns = Utils.isEmptyObject(columns) ? {} : columns; this.options.pageNumber = 1; this.initSearch(); this.updatePagination(); } }, { key: "scrollTo", value: function scrollTo(params) { var options = { unit: 'px', value: 0 }; if (_typeof(params) === 'object') { options = Object.assign(options, params); } else if (typeof params === 'string' && params === 'bottom') { options.value = this.$tableBody[0].scrollHeight; } else if (typeof params === 'string' || typeof params === 'number') { options.value = params; } var scrollTo = options.value; if (options.unit === 'rows') { scrollTo = 0; this.$body.find("> tr:lt(".concat(options.value, ")")).each(function (i, el) { scrollTo += $__default["default"](el).outerHeight(true); }); } this.$tableBody.scrollTop(scrollTo); } }, { key: "getScrollPosition", value: function getScrollPosition() { return this.$tableBody.scrollTop(); } }, { key: "selectPage", value: function selectPage(page) { if (page > 0 && page <= this.options.totalPages) { this.options.pageNumber = page; this.updatePagination(); } } }, { key: "prevPage", value: function prevPage() { if (this.options.pageNumber > 1) { this.options.pageNumber--; this.updatePagination(); } } }, { key: "nextPage", value: function nextPage() { if (this.options.pageNumber < this.options.totalPages) { this.options.pageNumber++; this.updatePagination(); } } }, { key: "toggleDetailView", value: function toggleDetailView(index, _columnDetailFormatter) { var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"]', index)); if ($tr.next().is('tr.detail-view')) { this.collapseRow(index); } else { this.expandRow(index, _columnDetailFormatter); } this.resetView(); } }, { key: "expandRow", value: function expandRow(index, _columnDetailFormatter) { var row = this.data[index]; var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"][data-has-detail-view]', index)); if (this.options.detailViewIcon) { $tr.find('a.detail-icon').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailClose)); } if ($tr.next().is('tr.detail-view')) { return; } $tr.after(Utils.sprintf('', $tr.children('td').length)); var $element = $tr.next().find('td'); var detailFormatter = _columnDetailFormatter || this.options.detailFormatter; var content = Utils.calculateObjectValue(this.options, detailFormatter, [index, row, $element], ''); if ($element.length === 1) { $element.append(content); } this.trigger('expand-row', index, row, $element); } }, { key: "expandRowByUniqueId", value: function expandRowByUniqueId(uniqueId) { var row = this.getRowByUniqueId(uniqueId); if (!row) { return; } this.expandRow(this.data.indexOf(row)); } }, { key: "collapseRow", value: function collapseRow(index) { var row = this.data[index]; var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"][data-has-detail-view]', index)); if (!$tr.next().is('tr.detail-view')) { return; } if (this.options.detailViewIcon) { $tr.find('a.detail-icon').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen)); } this.trigger('collapse-row', index, row, $tr.next()); $tr.next().remove(); } }, { key: "collapseRowByUniqueId", value: function collapseRowByUniqueId(uniqueId) { var row = this.getRowByUniqueId(uniqueId); if (!row) { return; } this.collapseRow(this.data.indexOf(row)); } }, { key: "expandAllRows", value: function expandAllRows() { var trs = this.$body.find('> tr[data-index][data-has-detail-view]'); for (var i = 0; i < trs.length; i++) { this.expandRow($__default["default"](trs[i]).data('index')); } } }, { key: "collapseAllRows", value: function collapseAllRows() { var trs = this.$body.find('> tr[data-index][data-has-detail-view]'); for (var i = 0; i < trs.length; i++) { this.collapseRow($__default["default"](trs[i]).data('index')); } } }, { key: "updateColumnTitle", value: function updateColumnTitle(params) { if (!params.hasOwnProperty('field') || !params.hasOwnProperty('title')) { return; } this.columns[this.fieldsColumnsIndex[params.field]].title = this.options.escape ? Utils.escapeHTML(params.title) : params.title; if (this.columns[this.fieldsColumnsIndex[params.field]].visible) { this.$header.find('th[data-field]').each(function (i, el) { if ($__default["default"](el).data('field') === params.field) { $__default["default"]($__default["default"](el).find('.th-inner')[0]).text(params.title); return false; } }); this.resetView(); } } }, { key: "updateFormatText", value: function updateFormatText(formatName, text) { if (!/^format/.test(formatName) || !this.options[formatName]) { return; } if (typeof text === 'string') { this.options[formatName] = function () { return text; }; } else if (typeof text === 'function') { this.options[formatName] = text; } this.initToolbar(); this.initPagination(); this.initBody(); } }]); return BootstrapTable; }(); BootstrapTable.VERSION = Constants.VERSION; BootstrapTable.DEFAULTS = Constants.DEFAULTS; BootstrapTable.LOCALES = Constants.LOCALES; BootstrapTable.COLUMN_DEFAULTS = Constants.COLUMN_DEFAULTS; BootstrapTable.METHODS = Constants.METHODS; BootstrapTable.EVENTS = Constants.EVENTS; // BOOTSTRAP TABLE PLUGIN DEFINITION // ======================= $__default["default"].BootstrapTable = BootstrapTable; $__default["default"].fn.bootstrapTable = function (option) { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key5 = 1; _key5 < _len2; _key5++) { args[_key5 - 1] = arguments[_key5]; } var value; this.each(function (i, el) { var data = $__default["default"](el).data('bootstrap.table'); var options = $__default["default"].extend({}, BootstrapTable.DEFAULTS, $__default["default"](el).data(), _typeof(option) === 'object' && option); if (typeof option === 'string') { var _data2; if (!Constants.METHODS.includes(option)) { throw new Error("Unknown method: ".concat(option)); } if (!data) { return; } value = (_data2 = data)[option].apply(_data2, args); if (option === 'destroy') { $__default["default"](el).removeData('bootstrap.table'); } } if (!data) { data = new $__default["default"].BootstrapTable(el, options); $__default["default"](el).data('bootstrap.table', data); data.init(); } }); return typeof value === 'undefined' ? this : value; }; $__default["default"].fn.bootstrapTable.Constructor = BootstrapTable; $__default["default"].fn.bootstrapTable.theme = Constants.THEME; $__default["default"].fn.bootstrapTable.VERSION = Constants.VERSION; $__default["default"].fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS; $__default["default"].fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS; $__default["default"].fn.bootstrapTable.events = BootstrapTable.EVENTS; $__default["default"].fn.bootstrapTable.locales = BootstrapTable.LOCALES; $__default["default"].fn.bootstrapTable.methods = BootstrapTable.METHODS; $__default["default"].fn.bootstrapTable.utils = Utils; // BOOTSTRAP TABLE INIT // ======================= $__default["default"](function () { $__default["default"]('[data-toggle="table"]').bootstrapTable(); }); return BootstrapTable; })); (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); })(this, (function ($) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var $__default = /*#__PURE__*/_interopDefaultLegacy($); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { 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, descriptor.key, descriptor); } } 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 _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global_1 = // 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) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); var fails = function (exec) { try { return !!exec(); } catch (error) { return true; } }; // Detect IE8's incomplete defineProperty implementation var descriptors = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; }); var functionBindNative = !fails(function () { var test = (function () { /* empty */ }).bind(); // eslint-disable-next-line no-prototype-builtins -- safe return typeof test != 'function' || test.hasOwnProperty('prototype'); }); var call$1 = Function.prototype.call; var functionCall = functionBindNative ? call$1.bind(call$1) : function () { return call$1.apply(call$1, arguments); }; var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor$1(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable; var objectPropertyIsEnumerable = { f: f$5 }; var createPropertyDescriptor = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var FunctionPrototype$1 = Function.prototype; var bind$1 = FunctionPrototype$1.bind; var call = FunctionPrototype$1.call; var uncurryThis = functionBindNative && bind$1.bind(call, call); var functionUncurryThis = functionBindNative ? function (fn) { return fn && uncurryThis(fn); } : function (fn) { return fn && function () { return call.apply(fn, arguments); }; }; var toString$1 = functionUncurryThis({}.toString); var stringSlice = functionUncurryThis(''.slice); var classofRaw = function (it) { return stringSlice(toString$1(it), 8, -1); }; var Object$4 = global_1.Object; var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !Object$4('z').propertyIsEnumerable(0); }) ? function (it) { return classofRaw(it) == 'String' ? split(it, '') : Object$4(it); } : Object$4; var TypeError$9 = global_1.TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible = function (it) { if (it == undefined) throw TypeError$9("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var toIndexedObject = function (it) { return indexedObject(requireObjectCoercible(it)); }; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable var isCallable = function (argument) { return typeof argument == 'function'; }; var isObject = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; var aFunction = function (argument) { return isCallable(argument) ? argument : undefined; }; var getBuiltIn = function (namespace, method) { return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method]; }; var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf); var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; var process = global_1.process; var Deno = global_1.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && engineUserAgent) { match = engineUserAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = engineUserAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } var engineV8Version = version; /* eslint-disable es/no-symbol -- required for testing */ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol(); // 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) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && engineV8Version && engineV8Version < 41; }); /* eslint-disable es/no-symbol -- required for testing */ var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol'; var Object$3 = global_1.Object; var isSymbol = useSymbolAsUid ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it)); }; var String$3 = global_1.String; var tryToString = function (argument) { try { return String$3(argument); } catch (error) { return 'Object'; } }; var TypeError$8 = global_1.TypeError; // `Assert: IsCallable(argument) is true` var aCallable = function (argument) { if (isCallable(argument)) return argument; throw TypeError$8(tryToString(argument) + ' is not a function'); }; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod = function (V, P) { var func = V[P]; return func == null ? undefined : aCallable(func); }; var TypeError$7 = global_1.TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val; throw TypeError$7("Can't convert object to primitive value"); }; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty = Object.defineProperty; var setGlobal = function (key, value) { try { defineProperty(global_1, key, { value: value, configurable: true, writable: true }); } catch (error) { global_1[key] = value; } return value; }; var SHARED = '__core-js_shared__'; var store$1 = global_1[SHARED] || setGlobal(SHARED, {}); var sharedStore = store$1; var shared = createCommonjsModule(function (module) { (module.exports = function (key, value) { return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.21.1', mode: 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); }); var Object$2 = global_1.Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject = function (argument) { return Object$2(requireObjectCoercible(argument)); }; var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; var id = 0; var postfix = Math.random(); var toString = functionUncurryThis(1.0.toString); var uid = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); }; var WellKnownSymbolsStore = shared('wks'); var Symbol$1 = global_1.Symbol; var symbolFor = Symbol$1 && Symbol$1['for']; var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; var wellKnownSymbol = function (name) { if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { var description = 'Symbol.' + name; if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) { WellKnownSymbolsStore[name] = Symbol$1[name]; } else if (useSymbolAsUid && symbolFor) { WellKnownSymbolsStore[name] = symbolFor(description); } else { WellKnownSymbolsStore[name] = createWellKnownSymbol(description); } } return WellKnownSymbolsStore[name]; }; var TypeError$6 = global_1.TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = functionCall(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw TypeError$6("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey var toPropertyKey = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement); var documentCreateElement = function (it) { return EXISTS$1 ? document$1.createElement(it) : {}; }; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !descriptors && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(documentCreateElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey(P); if (ie8DomDefine) try { return $getOwnPropertyDescriptor$1(O, P); } catch (error) { /* empty */ } if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]); }; var objectGetOwnPropertyDescriptor = { f: f$4 }; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = descriptors && fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false }).prototype != 42; }); var String$2 = global_1.String; var TypeError$5 = global_1.TypeError; // `Assert: Type(argument) is Object` var anObject = function (argument) { if (isObject(argument)) return argument; throw TypeError$5(String$2(argument) + ' is not an object'); }; var TypeError$4 = global_1.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE$1 = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor(O, P); if (current && current[WRITABLE]) { O[P] = Attributes.value; Attributes = { configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1], enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], writable: false }; } } return $defineProperty(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (ie8DomDefine) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var objectDefineProperty = { f: f$3 }; var createNonEnumerableProperty = descriptors ? function (object, key, value) { return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable(sharedStore.inspectSource)) { sharedStore.inspectSource = function (it) { return functionToString(it); }; } var inspectSource = sharedStore.inspectSource; var WeakMap$1 = global_1.WeakMap; var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1)); var keys = shared('keys'); var sharedKey = function (key) { return keys[key] || (keys[key] = uid(key)); }; var hiddenKeys$1 = {}; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$3 = global_1.TypeError; var WeakMap = global_1.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError$3('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (nativeWeakMap || sharedStore.state) { var store = sharedStore.state || (sharedStore.state = new WeakMap()); var wmget = functionUncurryThis(store.get); var wmhas = functionUncurryThis(store.has); var wmset = functionUncurryThis(store.set); set = function (it, metadata) { if (wmhas(store, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; wmset(store, it, metadata); return metadata; }; get = function (it) { return wmget(store, it) || {}; }; has = function (it) { return wmhas(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys$1[STATE] = true; set = function (it, metadata) { if (hasOwnProperty_1(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwnProperty_1(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwnProperty_1(it, STATE); }; } var internalState = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = descriptors && Object.getOwnPropertyDescriptor; var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable)); var functionName = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; var redefine = createCommonjsModule(function (module) { var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE; var getInternalState = internalState.get; var enforceInternalState = internalState.enforce; var TEMPLATE = String(String).split('String'); (module.exports = function (O, key, value, options) { var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; var name = options && options.name !== undefined ? options.name : key; var state; if (isCallable(value)) { if (String(name).slice(0, 7) === 'Symbol(') { name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; } if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { createNonEnumerableProperty(value, 'name', name); } state = enforceInternalState(value); if (!state.source) { state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); } } if (O === global_1) { if (simple) O[key] = value; else setGlobal(key, value); return; } else if (!unsafe) { delete O[key]; } else if (!noTargetGet && O[key]) { simple = true; } if (simple) O[key] = value; else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, 'toString', function toString() { return isCallable(this) && getInternalState(this).source || inspectSource(this); }); }); var ceil = Math.ceil; var floor = Math.floor; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity var toIntegerOrInfinity = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- safe return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number); }; var max = Math.max; var min$1 = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). var toAbsoluteIndex = function (index, length) { var integer = toIntegerOrInfinity(index); return integer < 0 ? max(integer + length, 0) : min$1(integer, length); }; var min = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength = function (argument) { return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike var lengthOfArrayLike = function (obj) { return toLength(obj.length); }; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod$1 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); var index = toAbsoluteIndex(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) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check 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; } return !IS_INCLUDES && -1; }; }; var arrayIncludes = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod$1(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod$1(false) }; var indexOf = arrayIncludes.indexOf; var push$1 = functionUncurryThis([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$1(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) { ~indexOf(result, key) || push$1(result, key); } return result; }; // IE8- don't enum bug keys var enumBugKeys = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return objectKeysInternal(O, hiddenKeys); }; var objectGetOwnPropertyNames = { f: f$2 }; // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe var f$1 = Object.getOwnPropertySymbols; var objectGetOwnPropertySymbols = { f: f$1 }; var concat = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = objectGetOwnPropertyNames.f(anObject(it)); var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; }; var copyConstructorProperties = function (target, source, exceptions) { var keys = ownKeys(source); var defineProperty = objectDefineProperty.f; var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) { defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } } }; var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; var isForced_1 = isForced; var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target options.name - the .name of the function if it does not match the key */ var _export = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global_1; } else if (STATIC) { target = global_1[TARGET] || setGlobal(TARGET, {}); } else { target = (global_1[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe var isArray = Array.isArray || function isArray(argument) { return classofRaw(argument) == 'Array'; }; var createProperty = function (object, key, value) { var propertyKey = toPropertyKey(key); if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); else object[propertyKey] = value; }; var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG$1] = 'z'; var toStringTagSupport = String(test) === '[object z]'; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var Object$1 = global_1.Object; // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` var classof = toStringTagSupport ? 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)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; var noop = function () { /* empty */ }; var empty = []; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec = functionUncurryThis(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); var isConstructorModern = function isConstructor(argument) { if (!isCallable(argument)) return false; try { construct(noop, empty, argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function isConstructor(argument) { if (!isCallable(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; } }; isConstructorLegacy.sham = true; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor var isConstructor = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; var SPECIES$1 = wellKnownSymbol('species'); var Array$1 = global_1.Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesConstructor = function (originalArray) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES$1]; if (C === null) C = undefined; } } return C === undefined ? Array$1 : C; }; // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesCreate = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; var SPECIES = wellKnownSymbol('species'); var arrayMethodHasSpeciesSupport = 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 engineV8Version >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; var TypeError$2 = global_1.TypeError; // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species _export({ target: 'Array', proto: true, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); if (n + len > MAX_SAFE_INTEGER) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { if (n >= MAX_SAFE_INTEGER) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED); createProperty(A, n++, E); } } A.length = n; return A; } }); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe var objectKeys = Object.keys || function keys(O) { return objectKeysInternal(O, enumBugKeys); }; // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var props = toIndexedObject(Properties); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]); return O; }; var objectDefineProperties = { f: f }; var html = getBuiltIn('document', 'documentElement'); /* global ActiveXObject -- old IE, WSH */ var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // 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; }; // 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('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(); }; hiddenKeys$1[IE_PROTO] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create var objectCreate = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = NullProtoObject(); return Properties === undefined ? result : objectDefineProperties.f(result, Properties); }; var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] == undefined) { objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { configurable: true, value: objectCreate(null) }); } // add a key to Array.prototype[@@unscopables] var addToUnscopables = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; var $includes = arrayIncludes.includes; // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes _export({ target: 'Array', proto: true }, { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('includes'); // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring var objectToString = toStringTagSupport ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; // `Object.prototype.toString` method // https://tc39.es/ecma262/#sec-object.prototype.tostring if (!toStringTagSupport) { redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); } // 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 }; // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` var classList = documentCreateElement('span').classList; var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype; var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype; var bind = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding var functionBindContext = function (fn, that) { aCallable(fn); return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; var push = functionUncurryThis([].push); // `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($this); var self = indexedObject(O); var boundFunction = functionBindContext(callbackfn, that); var length = lengthOfArrayLike(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 } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; 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) }; var arrayMethodIsStrict = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call -- required for testing method.call(null, argument || function () { return 1; }, 1); }); }; var $forEach = arrayIteration.forEach; var STRICT_METHOD = arrayMethodIsStrict('forEach'); // `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 handlePrototype = function (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach); } catch (error) { CollectionPrototype.forEach = arrayForEach; } }; for (var COLLECTION_NAME in domIterables) { if (domIterables[COLLECTION_NAME]) { handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype); } } handlePrototype(domTokenListPrototype); var MATCH$1 = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.es/ecma262/#sec-isregexp var isRegexp = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); }; var TypeError$1 = global_1.TypeError; var notARegexp = function (it) { if (isRegexp(it)) { throw TypeError$1("The method doesn't accept regular expressions"); } return it; }; var String$1 = global_1.String; var toString_1 = function (argument) { if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); return String$1(argument); }; var MATCH = wellKnownSymbol('match'); var correctIsRegexpLogic = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); } catch (error1) { try { regexp[MATCH] = false; return '/./'[METHOD_NAME](regexp); } catch (error2) { /* empty */ } } return false; }; var stringIndexOf = functionUncurryThis(''.indexOf); // `String.prototype.includes` method // https://tc39.es/ecma262/#sec-string.prototype.includes _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */) { return !!~stringIndexOf( toString_1(requireObjectCoercible(this)), toString_1(notARegexp(searchString)), arguments.length > 1 ? arguments[1] : undefined ); } }); /** * @author: Dennis Hernández * @webSite: http://djhvscf.github.io/Blog * @update zhixin wen */ var debounce = function debounce(func, wait) { var timeout = 0; return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var later = function later() { timeout = 0; func.apply(void 0, args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); }; }; $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, { mobileResponsive: false, minWidth: 562, minHeight: undefined, heightThreshold: 100, // just slightly larger than mobile chrome's auto-hiding toolbar checkOnInit: true, columnsHidden: [] }); $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { _inherits(_class, _$$BootstrapTable); var _super = _createSuper(_class); function _class() { _classCallCheck(this, _class); return _super.apply(this, arguments); } _createClass(_class, [{ key: "init", value: function init() { var _get2, _this = this; for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args)); if (!this.options.mobileResponsive || !this.options.minWidth) { return; } if (this.options.minWidth < 100 && this.options.resizable) { console.warn('The minWidth when the resizable extension is active should be greater or equal than 100'); this.options.minWidth = 100; } var old = { width: $__default["default"](window).width(), height: $__default["default"](window).height() }; $__default["default"](window).on('resize orientationchange', debounce(function () { // reset view if height has only changed by at least the threshold. var width = $__default["default"](window).width(); var height = $__default["default"](window).height(); var $activeElement = $__default["default"](document.activeElement); if ($activeElement.length && ['INPUT', 'SELECT', 'TEXTAREA'].includes($activeElement.prop('nodeName'))) { return; } if (Math.abs(old.height - height) > _this.options.heightThreshold || old.width !== width) { _this.changeView(width, height); old = { width: width, height: height }; } }, 200)); if (this.options.checkOnInit) { var width = $__default["default"](window).width(); var height = $__default["default"](window).height(); this.changeView(width, height); old = { width: width, height: height }; } } }, { key: "conditionCardView", value: function conditionCardView() { this.changeTableView(false); this.showHideColumns(false); } }, { key: "conditionFullView", value: function conditionFullView() { this.changeTableView(true); this.showHideColumns(true); } }, { key: "changeTableView", value: function changeTableView(cardViewState) { this.options.cardView = cardViewState; this.toggleView(); } }, { key: "showHideColumns", value: function showHideColumns(checked) { var _this2 = this; if (this.options.columnsHidden.length > 0) { this.columns.forEach(function (column) { if (_this2.options.columnsHidden.includes(column.field)) { if (column.visible !== checked) { _this2._toggleColumn(_this2.fieldsColumnsIndex[column.field], checked, true); } } }); } } }, { key: "changeView", value: function changeView(width, height) { if (this.options.minHeight) { if (width <= this.options.minWidth && height <= this.options.minHeight) { this.conditionCardView(); } else if (width > this.options.minWidth && height > this.options.minHeight) { this.conditionFullView(); } } else if (width <= this.options.minWidth) { this.conditionCardView(); } else if (width > this.options.minWidth) { this.conditionFullView(); } this.resetView(); } }]); return _class; }($__default["default"].BootstrapTable); })); (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); })(this, (function ($) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var $__default = /*#__PURE__*/_interopDefaultLegacy($); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { 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, descriptor.key, descriptor); } } 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 _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function () {}; return { s: F, n: function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (e) { throw e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function () { it = it.call(o); }, n: function () { var step = it.next(); normalCompletion = step.done; return step; }, e: function (e) { didErr = true; err = e; }, f: function () { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global_1 = // 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) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); var fails = function (exec) { try { return !!exec(); } catch (error) { return true; } }; // Detect IE8's incomplete defineProperty implementation var descriptors = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; }); var functionBindNative = !fails(function () { var test = (function () { /* empty */ }).bind(); // eslint-disable-next-line no-prototype-builtins -- safe return typeof test != 'function' || test.hasOwnProperty('prototype'); }); var call$2 = Function.prototype.call; var functionCall = functionBindNative ? call$2.bind(call$2) : function () { return call$2.apply(call$2, arguments); }; var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor$1(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable; var objectPropertyIsEnumerable = { f: f$5 }; var createPropertyDescriptor = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var FunctionPrototype$2 = Function.prototype; var bind$1 = FunctionPrototype$2.bind; var call$1 = FunctionPrototype$2.call; var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1); var functionUncurryThis = functionBindNative ? function (fn) { return fn && uncurryThis(fn); } : function (fn) { return fn && function () { return call$1.apply(fn, arguments); }; }; var toString$1 = functionUncurryThis({}.toString); var stringSlice$5 = functionUncurryThis(''.slice); var classofRaw = function (it) { return stringSlice$5(toString$1(it), 8, -1); }; var Object$4 = global_1.Object; var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !Object$4('z').propertyIsEnumerable(0); }) ? function (it) { return classofRaw(it) == 'String' ? split(it, '') : Object$4(it); } : Object$4; var TypeError$a = global_1.TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible = function (it) { if (it == undefined) throw TypeError$a("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var toIndexedObject = function (it) { return indexedObject(requireObjectCoercible(it)); }; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable var isCallable = function (argument) { return typeof argument == 'function'; }; var isObject = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; var aFunction = function (argument) { return isCallable(argument) ? argument : undefined; }; var getBuiltIn = function (namespace, method) { return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method]; }; var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf); var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; var process = global_1.process; var Deno = global_1.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && engineUserAgent) { match = engineUserAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = engineUserAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } var engineV8Version = version; /* eslint-disable es/no-symbol -- required for testing */ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol(); // 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) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && engineV8Version && engineV8Version < 41; }); /* eslint-disable es/no-symbol -- required for testing */ var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol'; var Object$3 = global_1.Object; var isSymbol = useSymbolAsUid ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it)); }; var String$3 = global_1.String; var tryToString = function (argument) { try { return String$3(argument); } catch (error) { return 'Object'; } }; var TypeError$9 = global_1.TypeError; // `Assert: IsCallable(argument) is true` var aCallable = function (argument) { if (isCallable(argument)) return argument; throw TypeError$9(tryToString(argument) + ' is not a function'); }; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod = function (V, P) { var func = V[P]; return func == null ? undefined : aCallable(func); }; var TypeError$8 = global_1.TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val; throw TypeError$8("Can't convert object to primitive value"); }; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$1 = Object.defineProperty; var setGlobal = function (key, value) { try { defineProperty$1(global_1, key, { value: value, configurable: true, writable: true }); } catch (error) { global_1[key] = value; } return value; }; var SHARED = '__core-js_shared__'; var store$1 = global_1[SHARED] || setGlobal(SHARED, {}); var sharedStore = store$1; var shared = createCommonjsModule(function (module) { (module.exports = function (key, value) { return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.21.1', mode: 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); }); var Object$2 = global_1.Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject = function (argument) { return Object$2(requireObjectCoercible(argument)); }; var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; var id = 0; var postfix = Math.random(); var toString = functionUncurryThis(1.0.toString); var uid = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); }; var WellKnownSymbolsStore = shared('wks'); var Symbol$1 = global_1.Symbol; var symbolFor = Symbol$1 && Symbol$1['for']; var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; var wellKnownSymbol = function (name) { if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { var description = 'Symbol.' + name; if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) { WellKnownSymbolsStore[name] = Symbol$1[name]; } else if (useSymbolAsUid && symbolFor) { WellKnownSymbolsStore[name] = symbolFor(description); } else { WellKnownSymbolsStore[name] = createWellKnownSymbol(description); } } return WellKnownSymbolsStore[name]; }; var TypeError$7 = global_1.TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = functionCall(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw TypeError$7("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey var toPropertyKey = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement); var documentCreateElement = function (it) { return EXISTS$1 ? document$1.createElement(it) : {}; }; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !descriptors && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(documentCreateElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey(P); if (ie8DomDefine) try { return $getOwnPropertyDescriptor$1(O, P); } catch (error) { /* empty */ } if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]); }; var objectGetOwnPropertyDescriptor = { f: f$4 }; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = descriptors && fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false }).prototype != 42; }); var String$2 = global_1.String; var TypeError$6 = global_1.TypeError; // `Assert: Type(argument) is Object` var anObject = function (argument) { if (isObject(argument)) return argument; throw TypeError$6(String$2(argument) + ' is not an object'); }; var TypeError$5 = global_1.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE$1 = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor(O, P); if (current && current[WRITABLE]) { O[P] = Attributes.value; Attributes = { configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1], enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], writable: false }; } } return $defineProperty(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (ie8DomDefine) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError$5('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var objectDefineProperty = { f: f$3 }; var createNonEnumerableProperty = descriptors ? function (object, key, value) { return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable(sharedStore.inspectSource)) { sharedStore.inspectSource = function (it) { return functionToString(it); }; } var inspectSource = sharedStore.inspectSource; var WeakMap$1 = global_1.WeakMap; var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1)); var keys = shared('keys'); var sharedKey = function (key) { return keys[key] || (keys[key] = uid(key)); }; var hiddenKeys$1 = {}; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$4 = global_1.TypeError; var WeakMap = global_1.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError$4('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (nativeWeakMap || sharedStore.state) { var store = sharedStore.state || (sharedStore.state = new WeakMap()); var wmget = functionUncurryThis(store.get); var wmhas = functionUncurryThis(store.has); var wmset = functionUncurryThis(store.set); set = function (it, metadata) { if (wmhas(store, it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; wmset(store, it, metadata); return metadata; }; get = function (it) { return wmget(store, it) || {}; }; has = function (it) { return wmhas(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys$1[STATE] = true; set = function (it, metadata) { if (hasOwnProperty_1(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwnProperty_1(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwnProperty_1(it, STATE); }; } var internalState = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = descriptors && Object.getOwnPropertyDescriptor; var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable)); var functionName = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; var redefine = createCommonjsModule(function (module) { var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE; var getInternalState = internalState.get; var enforceInternalState = internalState.enforce; var TEMPLATE = String(String).split('String'); (module.exports = function (O, key, value, options) { var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; var name = options && options.name !== undefined ? options.name : key; var state; if (isCallable(value)) { if (String(name).slice(0, 7) === 'Symbol(') { name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; } if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { createNonEnumerableProperty(value, 'name', name); } state = enforceInternalState(value); if (!state.source) { state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); } } if (O === global_1) { if (simple) O[key] = value; else setGlobal(key, value); return; } else if (!unsafe) { delete O[key]; } else if (!noTargetGet && O[key]) { simple = true; } if (simple) O[key] = value; else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, 'toString', function toString() { return isCallable(this) && getInternalState(this).source || inspectSource(this); }); }); var ceil = Math.ceil; var floor$1 = Math.floor; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity var toIntegerOrInfinity = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- safe return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number); }; var max$3 = Math.max; var min$3 = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). var toAbsoluteIndex = function (index, length) { var integer = toIntegerOrInfinity(index); return integer < 0 ? max$3(integer + length, 0) : min$3(integer, length); }; var min$2 = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength = function (argument) { return argument > 0 ? min$2(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike var lengthOfArrayLike = function (obj) { return toLength(obj.length); }; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod$2 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); var index = toAbsoluteIndex(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) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check 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; } return !IS_INCLUDES && -1; }; }; var arrayIncludes = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod$2(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod$2(false) }; var indexOf$1 = arrayIncludes.indexOf; var push$3 = functionUncurryThis([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$3(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) { ~indexOf$1(result, key) || push$3(result, key); } return result; }; // IE8- don't enum bug keys var enumBugKeys = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return objectKeysInternal(O, hiddenKeys); }; var objectGetOwnPropertyNames = { f: f$2 }; // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe var f$1 = Object.getOwnPropertySymbols; var objectGetOwnPropertySymbols = { f: f$1 }; var concat$2 = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = objectGetOwnPropertyNames.f(anObject(it)); var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys; }; var copyConstructorProperties = function (target, source, exceptions) { var keys = ownKeys(source); var defineProperty = objectDefineProperty.f; var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) { defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } } }; var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; var isForced_1 = isForced; var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target options.name - the .name of the function if it does not match the key */ var _export = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global_1; } else if (STATIC) { target = global_1[TARGET] || setGlobal(TARGET, {}); } else { target = (global_1[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; var bind = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding var functionBindContext = function (fn, that) { aCallable(fn); return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe var isArray = Array.isArray || function isArray(argument) { return classofRaw(argument) == 'Array'; }; var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG$1] = 'z'; var toStringTagSupport = String(test) === '[object z]'; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var Object$1 = global_1.Object; // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` var classof = toStringTagSupport ? 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)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; var noop = function () { /* empty */ }; var empty = []; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec$1 = functionUncurryThis(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); var isConstructorModern = function isConstructor(argument) { if (!isCallable(argument)) return false; try { construct(noop, empty, argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function isConstructor(argument) { if (!isCallable(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$1(constructorRegExp, inspectSource(argument)); } catch (error) { return true; } }; isConstructorLegacy.sham = true; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor var isConstructor = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; var SPECIES$4 = wellKnownSymbol('species'); var Array$3 = global_1.Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesConstructor = function (originalArray) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === Array$3 || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES$4]; if (C === null) C = undefined; } } return C === undefined ? Array$3 : C; }; // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesCreate = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; var push$2 = functionUncurryThis([].push); // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation var createMethod$1 = function (TYPE) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var IS_FILTER_REJECT = TYPE == 7; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; return function ($this, callbackfn, that, specificCreate) { var O = toObject($this); var self = indexedObject(O); var boundFunction = functionBindContext(callbackfn, that); var length = lengthOfArrayLike(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$2(target, value); // filter } else switch (TYPE) { case 4: return false; // every case 7: push$2(target, value); // filterReject } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; var arrayIteration = { // `Array.prototype.forEach` method // https://tc39.es/ecma262/#sec-array.prototype.foreach forEach: createMethod$1(0), // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map map: createMethod$1(1), // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter filter: createMethod$1(2), // `Array.prototype.some` method // https://tc39.es/ecma262/#sec-array.prototype.some some: createMethod$1(3), // `Array.prototype.every` method // https://tc39.es/ecma262/#sec-array.prototype.every every: createMethod$1(4), // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find find: createMethod$1(5), // `Array.prototype.findIndex` method // https://tc39.es/ecma262/#sec-array.prototype.findIndex findIndex: createMethod$1(6), // `Array.prototype.filterReject` method // https://github.com/tc39/proposal-array-filtering filterReject: createMethod$1(7) }; // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe var objectKeys = Object.keys || function keys(O) { return objectKeysInternal(O, enumBugKeys); }; // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var props = toIndexedObject(Properties); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]); return O; }; var objectDefineProperties = { f: f }; var html = getBuiltIn('document', 'documentElement'); /* global ActiveXObject -- old IE, WSH */ var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // 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; }; // 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('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(); }; hiddenKeys$1[IE_PROTO] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create var objectCreate = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = NullProtoObject(); return Properties === undefined ? result : objectDefineProperties.f(result, Properties); }; var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] == undefined) { objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { configurable: true, value: objectCreate(null) }); } // add a key to Array.prototype[@@unscopables] var addToUnscopables = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; var $find = arrayIteration.find; var FIND = 'find'; var SKIPS_HOLES = true; // Shouldn't skip holes if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { find: function find(callbackfn /* , that = undefined */) { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables(FIND); // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring var objectToString = toStringTagSupport ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; // `Object.prototype.toString` method // https://tc39.es/ecma262/#sec-object.prototype.tostring if (!toStringTagSupport) { redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); } var String$1 = global_1.String; var toString_1 = function (argument) { if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); return String$1(argument); }; // `RegExp.prototype.flags` getter implementation // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags var regexpFlags = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.dotAll) result += 's'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError var $RegExp$2 = global_1.RegExp; var UNSUPPORTED_Y$2 = fails(function () { var re = $RegExp$2('a', 'y'); re.lastIndex = 2; return re.exec('abcd') != null; }); // UC Browser bug // https://github.com/zloirock/core-js/issues/1008 var MISSED_STICKY = UNSUPPORTED_Y$2 || fails(function () { return !$RegExp$2('a', 'y').sticky; }); var BROKEN_CARET = UNSUPPORTED_Y$2 || fails(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 regexpStickyHelpers = { BROKEN_CARET: BROKEN_CARET, MISSED_STICKY: MISSED_STICKY, UNSUPPORTED_Y: UNSUPPORTED_Y$2 }; // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError var $RegExp$1 = global_1.RegExp; var regexpUnsupportedDotAll = fails(function () { var re = $RegExp$1('.', 's'); return !(re.dotAll && re.exec('\n') && re.flags === 's'); }); // babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError var $RegExp = global_1.RegExp; var regexpUnsupportedNcg = fails(function () { var re = $RegExp('(?b)', 'g'); return re.exec('b').groups.a !== 'b' || 'b'.replace(re, '$c') !== 'bc'; }); /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ /* eslint-disable regexp/no-useless-quantifier -- testing */ var getInternalState = internalState.get; var nativeReplace = shared('native-string-replace', String.prototype.replace); var nativeExec = RegExp.prototype.exec; var patchedExec = nativeExec; var charAt$3 = functionUncurryThis(''.charAt); var indexOf = functionUncurryThis(''.indexOf); var replace$1 = functionUncurryThis(''.replace); var stringSlice$4 = functionUncurryThis(''.slice); var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/; var re2 = /b*/g; functionCall(nativeExec, re1, 'a'); functionCall(nativeExec, re2, 'a'); return re1.lastIndex !== 0 || re2.lastIndex !== 0; })(); var UNSUPPORTED_Y$1 = regexpStickyHelpers.BROKEN_CARET; // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || regexpUnsupportedDotAll || regexpUnsupportedNcg; if (PATCH) { patchedExec = function exec(string) { var re = this; var state = getInternalState(re); var str = toString_1(string); var raw = state.raw; var result, reCopy, lastIndex, match, i, object, group; if (raw) { raw.lastIndex = re.lastIndex; result = functionCall(patchedExec, raw, str); re.lastIndex = raw.lastIndex; return result; } var groups = state.groups; var sticky = UNSUPPORTED_Y$1 && re.sticky; var flags = functionCall(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'; } strCopy = stringSlice$4(str, re.lastIndex); // Support anchored sticky behavior. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(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); } if (NPCG_INCLUDED) { reCopy = new RegExp('^' + source + '$(?!\\s)', flags); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; match = functionCall(nativeExec, sticky ? reCopy : re, strCopy); if (sticky) { if (match) { match.input = stringSlice$4(match.input, charsAdded); match[0] = stringSlice$4(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' work for /(.?)?/ functionCall(nativeReplace, match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (match && groups) { match.groups = object = objectCreate(null); for (i = 0; i < groups.length; i++) { group = groups[i]; object[group[0]] = match[group[1]]; } } return match; }; } var regexpExec = patchedExec; // `RegExp.prototype.exec` method // https://tc39.es/ecma262/#sec-regexp.prototype.exec _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { exec: regexpExec }); var FunctionPrototype = Function.prototype; var apply = FunctionPrototype.apply; var call = FunctionPrototype.call; // eslint-disable-next-line es/no-reflect -- safe var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () { return call.apply(apply, arguments); }); // TODO: Remove from `core-js@4` since it's moved to entry points var SPECIES$3 = wellKnownSymbol('species'); var RegExpPrototype = RegExp.prototype; var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) { var SYMBOL = wellKnownSymbol(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(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$3] = function () { return re; }; re.flags = ''; re[SYMBOL] = /./[SYMBOL]; } re.exec = function () { execCalled = true; return null; }; re[SYMBOL](''); return !execCalled; }); if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || FORCED ) { var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]); var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { var uncurriedNativeMethod = functionUncurryThis(nativeMethod); var $exec = regexp.exec; if ($exec === regexpExec || $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) }; } return { done: false }; }); redefine(String.prototype, KEY, methods[0]); redefine(RegExpPrototype, SYMBOL, methods[1]); } if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true); }; var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.es/ecma262/#sec-isregexp var isRegexp = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); }; var TypeError$3 = global_1.TypeError; // `Assert: IsConstructor(argument) is true` var aConstructor = function (argument) { if (isConstructor(argument)) return argument; throw TypeError$3(tryToString(argument) + ' is not a constructor'); }; var SPECIES$2 = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.es/ecma262/#sec-speciesconstructor var speciesConstructor = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S); }; var charAt$2 = functionUncurryThis(''.charAt); var charCodeAt = functionUncurryThis(''.charCodeAt); var stringSlice$3 = functionUncurryThis(''.slice); var createMethod = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = toString_1(requireObjectCoercible($this)); var position = toIntegerOrInfinity(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$2(S, position) : first : CONVERT_TO_STRING ? stringSlice$3(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; var stringMultibyte = { // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat codeAt: createMethod(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at charAt: createMethod(true) }; var charAt$1 = stringMultibyte.charAt; // `AdvanceStringIndex` abstract operation // https://tc39.es/ecma262/#sec-advancestringindex var advanceStringIndex = function (S, index, unicode) { return index + (unicode ? charAt$1(S, index).length : 1); }; var createProperty = function (object, key, value) { var propertyKey = toPropertyKey(key); if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); else object[propertyKey] = value; }; var Array$2 = global_1.Array; var max$2 = Math.max; var arraySliceSimple = function (O, start, end) { var length = lengthOfArrayLike(O); var k = toAbsoluteIndex(start, length); var fin = toAbsoluteIndex(end === undefined ? length : end, length); var result = Array$2(max$2(fin - k, 0)); for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]); result.length = n; return result; }; var TypeError$2 = global_1.TypeError; // `RegExpExec` abstract operation // https://tc39.es/ecma262/#sec-regexpexec var regexpExecAbstract = function (R, S) { var exec = R.exec; if (isCallable(exec)) { var result = functionCall(exec, R, S); if (result !== null) anObject(result); return result; } if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S); throw TypeError$2('RegExp#exec called on incompatible receiver'); }; var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y; var MAX_UINT32 = 0xFFFFFFFF; var min$1 = Math.min; var $push = [].push; var exec = functionUncurryThis(/./.exec); var push$1 = functionUncurryThis($push); var stringSlice$2 = functionUncurryThis(''.slice); // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec // Weex JS has frozen built-in prototypes, so use try / catch wrapper var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { // eslint-disable-next-line regexp/no-empty-group -- required for testing var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; }); // @@split logic fixRegexpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) { var internalSplit; if ( 'abbc'.split(/(b)*/)[1] == 'c' || // eslint-disable-next-line regexp/no-empty-group -- required for testing 'test'.split(/(?:)/, -1).length != 4 || 'ab'.split(/(?:ab)*/).length != 2 || '.'.split(/(.?)(.?)/).length != 4 || // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing '.'.split(/()()/).length > 1 || ''.split(/.?/).length ) { // based on es5-shim implementation, need to rework it internalSplit = function (separator, limit) { var string = toString_1(requireObjectCoercible(this)); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (separator === undefined) return [string]; // If `separator` is not a regex, use native split if (!isRegexp(separator)) { return functionCall(nativeSplit, string, separator, lim); } var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var match, lastIndex, lastLength; while (match = functionCall(regexpExec, separatorCopy, string)) { lastIndex = separatorCopy.lastIndex; if (lastIndex > lastLastIndex) { push$1(output, stringSlice$2(string, lastLastIndex, match.index)); if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySliceSimple(match, 1)); lastLength = match[0].length; lastLastIndex = lastIndex; if (output.length >= lim) break; } if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop } if (lastLastIndex === string.length) { if (lastLength || !exec(separatorCopy, '')) push$1(output, ''); } else push$1(output, stringSlice$2(string, lastLastIndex)); return output.length > lim ? arraySliceSimple(output, 0, lim) : output; }; // Chakra, V8 } else if ('0'.split(undefined, 0).length) { internalSplit = function (separator, limit) { return separator === undefined && limit === 0 ? [] : functionCall(nativeSplit, this, separator, limit); }; } else internalSplit = nativeSplit; return [ // `String.prototype.split` method // https://tc39.es/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = requireObjectCoercible(this); var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT); return splitter ? functionCall(splitter, separator, O, limit) : functionCall(internalSplit, toString_1(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (string, limit) { var rx = anObject(this); var S = toString_1(string); var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit); if (res.done) return res.value; var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (UNSUPPORTED_Y ? 'g' : 'y'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = UNSUPPORTED_Y ? 0 : q; var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? stringSlice$2(S, q) : S); var e; if ( z === null || (e = min$1(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p ) { q = advanceStringIndex(S, q, unicodeMatching); } else { push$1(A, stringSlice$2(S, p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { push$1(A, z[i]); if (A.length === lim) return A; } q = p = e; } } push$1(A, stringSlice$2(S, p)); return A; } ]; }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y); var floor = Math.floor; var charAt = functionUncurryThis(''.charAt); var replace = functionUncurryThis(''.replace); var stringSlice$1 = functionUncurryThis(''.slice); var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; // `GetSubstitution` abstract operation // https://tc39.es/ecma262/#sec-getsubstitution var getSubstitution = 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 REPLACE = wellKnownSymbol('replace'); var max$1 = Math.max; var min = Math.min; var concat$1 = functionUncurryThis([].concat); var push = functionUncurryThis([].push); var stringIndexOf = functionUncurryThis(''.indexOf); var stringSlice = functionUncurryThis(''.slice); var maybeToString = function (it) { return it === undefined ? it : String(it); }; // 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(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'; }); // @@replace logic fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; return [ // `String.prototype.replace` method // https://tc39.es/ecma262/#sec-string.prototype.replace function replace(searchValue, replaceValue) { var O = requireObjectCoercible(this); var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE); return replacer ? functionCall(replacer, searchValue, O, replaceValue) : functionCall(nativeReplace, toString_1(O), searchValue, replaceValue); }, // `RegExp.prototype[@@replace]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace function (string, replaceValue) { var rx = anObject(this); var S = toString_1(string); 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 functionalReplace = isCallable(replaceValue); if (!functionalReplace) replaceValue = toString_1(replaceValue); var global = rx.global; if (global) { var fullUnicode = rx.unicode; rx.lastIndex = 0; } var results = []; while (true) { var result = regexpExecAbstract(rx, S); if (result === null) break; push(results, result); if (!global) break; var matchStr = toString_1(result[0]); if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); } var accumulatedResult = ''; var nextSourcePosition = 0; for (var i = 0; i < results.length; i++) { result = results[i]; var matched = toString_1(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(captures, maybeToString(result[j])); var namedCaptures = result.groups; if (functionalReplace) { var replacerArgs = concat$1([matched], captures, position, S); if (namedCaptures !== undefined) push(replacerArgs, namedCaptures); var replacement = toString_1(functionApply(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 SPECIES$1 = wellKnownSymbol('species'); var arrayMethodHasSpeciesSupport = 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 engineV8Version >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES$1] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; var arraySlice = functionUncurryThis([].slice); var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice'); var SPECIES = wellKnownSymbol('species'); var Array$1 = global_1.Array; var max = Math.max; // `Array.prototype.slice` method // https://tc39.es/ecma262/#sec-array.prototype.slice // fallback for not array-like ES3 strings and DOM objects _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, { 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$1 || isArray(Constructor.prototype))) { Constructor = undefined; } else if (isObject(Constructor)) { Constructor = Constructor[SPECIES]; if (Constructor === null) Constructor = undefined; } if (Constructor === Array$1 || Constructor === undefined) { return arraySlice(O, k, fin); } } result = new (Constructor === undefined ? Array$1 : 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; } }); var $map = arrayIteration.map; var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // eslint-disable-next-line es/no-object-assign -- safe var $assign = Object.assign; // eslint-disable-next-line es/no-object-defineproperty -- required for testing var defineProperty = Object.defineProperty; var concat = functionUncurryThis([].concat); // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign var objectAssign = !$assign || fails(function () { // should have correct order of operations (Edge bug) if (descriptors && $assign({ b: 1 }, $assign(defineProperty({}, 'a', { enumerable: true, get: function () { defineProperty(this, 'b', { value: 3, enumerable: false }); } }), { b: 2 })).b !== 1) return true; // should work with symbols and should have deterministic property order (V8 bug) var A = {}; var B = {}; // eslint-disable-next-line es/no-symbol -- safe var symbol = Symbol(); var alphabet = 'abcdefghijklmnopqrst'; A[symbol] = 7; alphabet.split('').forEach(function (chr) { B[chr] = chr; }); return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` var T = toObject(target); var argumentsLength = arguments.length; var index = 1; var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; var propertyIsEnumerable = objectPropertyIsEnumerable.f; while (argumentsLength > index) { var S = indexedObject(arguments[index++]); var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key]; } } return T; } : $assign; // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign // eslint-disable-next-line es/no-object-assign -- required for testing _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { assign: objectAssign }); var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; var TypeError$1 = global_1.TypeError; // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species _export({ target: 'Array', proto: true, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED); createProperty(A, n++, E); } } A.length = n; return A; } }); var arrayMethodIsStrict = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call -- required for testing method.call(null, argument || function () { return 1; }, 1); }); }; var un$Join = functionUncurryThis([].join); var ES3_STRINGS = indexedObject != Object; var STRICT_METHOD$1 = arrayMethodIsStrict('join', ','); // `Array.prototype.join` method // https://tc39.es/ecma262/#sec-array.prototype.join _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, { join: function join(separator) { return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator); } }); // 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 }; // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` var classList = documentCreateElement('span').classList; var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype; var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype; var $forEach = arrayIteration.forEach; var STRICT_METHOD = arrayMethodIsStrict('forEach'); // `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 handlePrototype = function (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach); } catch (error) { CollectionPrototype.forEach = arrayForEach; } }; for (var COLLECTION_NAME in domIterables) { if (domIterables[COLLECTION_NAME]) { handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype); } } handlePrototype(domTokenListPrototype); /** * @author zhixin wen * extensions: https://github.com/hhurz/tableExport.jquery.plugin */ var Utils = $__default["default"].fn.bootstrapTable.utils; var TYPE_NAME = { json: 'JSON', xml: 'XML', png: 'PNG', csv: 'CSV', txt: 'TXT', sql: 'SQL', doc: 'MS-Word', excel: 'MS-Excel', xlsx: 'MS-Excel (OpenXML)', powerpoint: 'MS-Powerpoint', pdf: 'PDF' }; $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, { showExport: false, exportDataType: 'basic', // basic, all, selected exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'], exportOptions: { onCellHtmlData: function onCellHtmlData(cell, rowIndex, colIndex, htmlData) { if (cell.is('th')) { return cell.find('.th-inner').text(); } return htmlData; } }, exportFooter: false }); $__default["default"].extend($__default["default"].fn.bootstrapTable.columnDefaults, { forceExport: false, forceHide: false }); $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, { export: { bootstrap3: 'glyphicon-export icon-share', bootstrap5: 'bi-download', materialize: 'file_download', 'bootstrap-table': 'icon-download' }[$__default["default"].fn.bootstrapTable.theme] || 'fa-download' }); $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, { formatExport: function formatExport() { return 'Export data'; } }); $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales); $__default["default"].fn.bootstrapTable.methods.push('exportTable'); $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, { // eslint-disable-next-line no-unused-vars onExportSaved: function onExportSaved(exportedRows) { return false; } }); $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, { 'export-saved.bs.table': 'onExportSaved' }); $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { _inherits(_class, _$$BootstrapTable); var _super = _createSuper(_class); function _class() { _classCallCheck(this, _class); return _super.apply(this, arguments); } _createClass(_class, [{ key: "initToolbar", value: function initToolbar() { var _this = this, _get2; var o = this.options; var exportTypes = o.exportTypes; this.showToolbar = this.showToolbar || o.showExport; if (this.options.showExport) { if (typeof exportTypes === 'string') { var types = exportTypes.slice(1, -1).replace(/ /g, '').split(','); exportTypes = types.map(function (t) { return t.slice(1, -1); }); } this.$export = this.$toolbar.find('>.columns div.export'); if (this.$export.length) { this.updateExportButton(); return; } this.buttons = Object.assign(this.buttons, { export: { html: function html() { if (exportTypes.length === 1) { return "\n
    \n \n
    \n "); } var html = []; html.push("\n
    \n \n ").concat(_this.constants.html.toolbarDropdown[0], "\n ")); var _iterator = _createForOfIteratorHelper(exportTypes), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var type = _step.value; if (TYPE_NAME.hasOwnProperty(type)) { var $item = $__default["default"](Utils.sprintf(_this.constants.html.pageDropdownItem, '', TYPE_NAME[type])); $item.attr('data-type', type); html.push($item.prop('outerHTML')); } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } html.push(_this.constants.html.toolbarDropdown[1], '
    '); return html.join(''); } } }); } for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } (_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args)); this.$export = this.$toolbar.find('>.columns div.export'); if (!this.options.showExport) { return; } this.updateExportButton(); var $exportButtons = this.$export.find('[data-type]'); if (exportTypes.length === 1) { $exportButtons = this.$export; } $exportButtons.click(function (e) { e.preventDefault(); var type = $__default["default"](e.currentTarget).data('type'); var exportOptions = { type: type, escape: false }; _this.exportTable(exportOptions); }); this.handleToolbar(); } }, { key: "handleToolbar", value: function handleToolbar() { if (!this.$export) { return; } if (_get(_getPrototypeOf(_class.prototype), "handleToolbar", this)) { _get(_getPrototypeOf(_class.prototype), "handleToolbar", this).call(this); } } }, { key: "exportTable", value: function exportTable(options) { var _this2 = this; var o = this.options; var stateField = this.header.stateField; var isCardView = o.cardView; var doExport = function doExport(callback) { if (stateField) { _this2.hideColumn(stateField); } if (isCardView) { _this2.toggleView(); } _this2.columns.forEach(function (row) { if (row.forceHide) { _this2.hideColumn(row.field); } }); var data = _this2.getData(); if (o.detailView && o.detailViewIcon) { var detailViewIndex = o.detailViewAlign === 'left' ? 0 : _this2.getVisibleFields().length + Utils.getDetailViewIndexOffset(_this2.options); o.exportOptions.ignoreColumn = [detailViewIndex].concat(o.exportOptions.ignoreColumn || []); } if (o.exportFooter) { var $footerRow = _this2.$tableFooter.find('tr').first(); var footerData = {}; var footerHtml = []; $__default["default"].each($footerRow.children(), function (index, footerCell) { var footerCellHtml = $__default["default"](footerCell).children('.th-inner').first().html(); footerData[_this2.columns[index].field] = footerCellHtml === ' ' ? null : footerCellHtml; // grab footer cell text into cell index-based array footerHtml.push(footerCellHtml); }); _this2.$body.append(_this2.$body.children().last()[0].outerHTML); var $lastTableRow = _this2.$body.children().last(); $__default["default"].each($lastTableRow.children(), function (index, lastTableRowCell) { $__default["default"](lastTableRowCell).html(footerHtml[index]); }); } var hiddenColumns = _this2.getHiddenColumns(); hiddenColumns.forEach(function (row) { if (row.forceExport) { _this2.showColumn(row.field); } }); if (typeof o.exportOptions.fileName === 'function') { options.fileName = o.exportOptions.fileName(); } _this2.$el.tableExport($__default["default"].extend({ onAfterSaveToFile: function onAfterSaveToFile() { if (o.exportFooter) { _this2.load(data); } if (stateField) { _this2.showColumn(stateField); } if (isCardView) { _this2.toggleView(); } hiddenColumns.forEach(function (row) { if (row.forceExport) { _this2.hideColumn(row.field); } }); _this2.columns.forEach(function (row) { if (row.forceHide) { _this2.showColumn(row.field); } }); if (callback) callback(); } }, o.exportOptions, options)); }; if (o.exportDataType === 'all' && o.pagination) { var eventName = o.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table'; var virtualScroll = this.options.virtualScroll; this.$el.one(eventName, function () { setTimeout(function () { doExport(function () { _this2.options.virtualScroll = virtualScroll; _this2.togglePagination(); }); }, 0); }); this.options.virtualScroll = false; this.togglePagination(); this.trigger('export-saved', this.getData()); } else if (o.exportDataType === 'selected') { var data = this.getData(); var selectedData = this.getSelections(); var pagination = o.pagination; if (!selectedData.length) { return; } if (o.sidePagination === 'server') { data = _defineProperty({ total: o.totalRows }, this.options.dataField, data); selectedData = _defineProperty({ total: selectedData.length }, this.options.dataField, selectedData); } this.load(selectedData); if (pagination) { this.togglePagination(); } doExport(function () { if (pagination) { _this2.togglePagination(); } _this2.load(data); }); this.trigger('export-saved', selectedData); } else { doExport(); this.trigger('export-saved', this.getData(true)); } } }, { key: "updateSelected", value: function updateSelected() { _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this); this.updateExportButton(); } }, { key: "updateExportButton", value: function updateExportButton() { if (this.options.exportDataType === 'selected') { this.$export.find('> button').prop('disabled', !this.getSelections().length); } } }]); return _class; }($__default["default"].BootstrapTable); })); (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); })(this, (function ($) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var $__default = /*#__PURE__*/_interopDefaultLegacy($); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { 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, descriptor.key, descriptor); } } 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 _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function () {}; return { s: F, n: function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (e) { throw e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function () { it = it.call(o); }, n: function () { var step = it.next(); normalCompletion = step.done; return step; }, e: function (e) { didErr = true; err = e; }, f: function () { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global_1 = // 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) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); var fails = function (exec) { try { return !!exec(); } catch (error) { return true; } }; // Detect IE8's incomplete defineProperty implementation var descriptors = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; }); var functionBindNative = !fails(function () { var test = (function () { /* empty */ }).bind(); // eslint-disable-next-line no-prototype-builtins -- safe return typeof test != 'function' || test.hasOwnProperty('prototype'); }); var call$2 = Function.prototype.call; var functionCall = functionBindNative ? call$2.bind(call$2) : function () { return call$2.apply(call$2, arguments); }; var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor$1(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable; var objectPropertyIsEnumerable = { f: f$5 }; var createPropertyDescriptor = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var FunctionPrototype$2 = Function.prototype; var bind$1 = FunctionPrototype$2.bind; var call$1 = FunctionPrototype$2.call; var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1); var functionUncurryThis = functionBindNative ? function (fn) { return fn && uncurryThis(fn); } : function (fn) { return fn && function () { return call$1.apply(fn, arguments); }; }; var toString$1 = functionUncurryThis({}.toString); var stringSlice$5 = functionUncurryThis(''.slice); var classofRaw = function (it) { return stringSlice$5(toString$1(it), 8, -1); }; var Object$4 = global_1.Object; var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !Object$4('z').propertyIsEnumerable(0); }) ? function (it) { return classofRaw(it) == 'String' ? split(it, '') : Object$4(it); } : Object$4; var TypeError$b = global_1.TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible = function (it) { if (it == undefined) throw TypeError$b("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var toIndexedObject = function (it) { return indexedObject(requireObjectCoercible(it)); }; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable var isCallable = function (argument) { return typeof argument == 'function'; }; var isObject = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; var aFunction = function (argument) { return isCallable(argument) ? argument : undefined; }; var getBuiltIn = function (namespace, method) { return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method]; }; var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf); var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; var process = global_1.process; var Deno = global_1.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && engineUserAgent) { match = engineUserAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = engineUserAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } var engineV8Version = version; /* eslint-disable es/no-symbol -- required for testing */ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol(); // 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) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && engineV8Version && engineV8Version < 41; }); /* eslint-disable es/no-symbol -- required for testing */ var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol'; var Object$3 = global_1.Object; var isSymbol = useSymbolAsUid ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it)); }; var String$3 = global_1.String; var tryToString = function (argument) { try { return String$3(argument); } catch (error) { return 'Object'; } }; var TypeError$a = global_1.TypeError; // `Assert: IsCallable(argument) is true` var aCallable = function (argument) { if (isCallable(argument)) return argument; throw TypeError$a(tryToString(argument) + ' is not a function'); }; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod = function (V, P) { var func = V[P]; return func == null ? undefined : aCallable(func); }; var TypeError$9 = global_1.TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val; throw TypeError$9("Can't convert object to primitive value"); }; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty = Object.defineProperty; var setGlobal = function (key, value) { try { defineProperty(global_1, key, { value: value, configurable: true, writable: true }); } catch (error) { global_1[key] = value; } return value; }; var SHARED = '__core-js_shared__'; var store$1 = global_1[SHARED] || setGlobal(SHARED, {}); var sharedStore = store$1; var shared = createCommonjsModule(function (module) { (module.exports = function (key, value) { return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.21.1', mode: 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); }); var Object$2 = global_1.Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject = function (argument) { return Object$2(requireObjectCoercible(argument)); }; var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; var id = 0; var postfix = Math.random(); var toString = functionUncurryThis(1.0.toString); var uid = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); }; var WellKnownSymbolsStore = shared('wks'); var Symbol$1 = global_1.Symbol; var symbolFor = Symbol$1 && Symbol$1['for']; var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; var wellKnownSymbol = function (name) { if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { var description = 'Symbol.' + name; if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) { WellKnownSymbolsStore[name] = Symbol$1[name]; } else if (useSymbolAsUid && symbolFor) { WellKnownSymbolsStore[name] = symbolFor(description); } else { WellKnownSymbolsStore[name] = createWellKnownSymbol(description); } } return WellKnownSymbolsStore[name]; }; var TypeError$8 = global_1.TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = functionCall(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw TypeError$8("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey var toPropertyKey = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement); var documentCreateElement = function (it) { return EXISTS$1 ? document$1.createElement(it) : {}; }; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !descriptors && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(documentCreateElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey(P); if (ie8DomDefine) try { return $getOwnPropertyDescriptor$1(O, P); } catch (error) { /* empty */ } if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]); }; var objectGetOwnPropertyDescriptor = { f: f$4 }; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = descriptors && fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false }).prototype != 42; }); var String$2 = global_1.String; var TypeError$7 = global_1.TypeError; // `Assert: Type(argument) is Object` var anObject = function (argument) { if (isObject(argument)) return argument; throw TypeError$7(String$2(argument) + ' is not an object'); }; var TypeError$6 = global_1.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE$1 = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor(O, P); if (current && current[WRITABLE]) { O[P] = Attributes.value; Attributes = { configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1], enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], writable: false }; } } return $defineProperty(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (ie8DomDefine) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var objectDefineProperty = { f: f$3 }; var createNonEnumerableProperty = descriptors ? function (object, key, value) { return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable(sharedStore.inspectSource)) { sharedStore.inspectSource = function (it) { return functionToString(it); }; } var inspectSource = sharedStore.inspectSource; var WeakMap$1 = global_1.WeakMap; var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1)); var keys = shared('keys'); var sharedKey = function (key) { return keys[key] || (keys[key] = uid(key)); }; var hiddenKeys$1 = {}; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$5 = global_1.TypeError; var WeakMap = global_1.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError$5('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (nativeWeakMap || sharedStore.state) { var store = sharedStore.state || (sharedStore.state = new WeakMap()); var wmget = functionUncurryThis(store.get); var wmhas = functionUncurryThis(store.has); var wmset = functionUncurryThis(store.set); set = function (it, metadata) { if (wmhas(store, it)) throw new TypeError$5(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; wmset(store, it, metadata); return metadata; }; get = function (it) { return wmget(store, it) || {}; }; has = function (it) { return wmhas(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys$1[STATE] = true; set = function (it, metadata) { if (hasOwnProperty_1(it, STATE)) throw new TypeError$5(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwnProperty_1(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwnProperty_1(it, STATE); }; } var internalState = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = descriptors && Object.getOwnPropertyDescriptor; var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable)); var functionName = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; var redefine = createCommonjsModule(function (module) { var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE; var getInternalState = internalState.get; var enforceInternalState = internalState.enforce; var TEMPLATE = String(String).split('String'); (module.exports = function (O, key, value, options) { var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; var name = options && options.name !== undefined ? options.name : key; var state; if (isCallable(value)) { if (String(name).slice(0, 7) === 'Symbol(') { name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; } if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { createNonEnumerableProperty(value, 'name', name); } state = enforceInternalState(value); if (!state.source) { state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); } } if (O === global_1) { if (simple) O[key] = value; else setGlobal(key, value); return; } else if (!unsafe) { delete O[key]; } else if (!noTargetGet && O[key]) { simple = true; } if (simple) O[key] = value; else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, 'toString', function toString() { return isCallable(this) && getInternalState(this).source || inspectSource(this); }); }); var ceil = Math.ceil; var floor$1 = Math.floor; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity var toIntegerOrInfinity = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- safe return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number); }; var max$2 = Math.max; var min$3 = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). var toAbsoluteIndex = function (index, length) { var integer = toIntegerOrInfinity(index); return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length); }; var min$2 = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength = function (argument) { return argument > 0 ? min$2(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike var lengthOfArrayLike = function (obj) { return toLength(obj.length); }; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod$2 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); var index = toAbsoluteIndex(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) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check 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; } return !IS_INCLUDES && -1; }; }; var arrayIncludes = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod$2(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod$2(false) }; var indexOf$1 = arrayIncludes.indexOf; var push$3 = functionUncurryThis([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$3(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) { ~indexOf$1(result, key) || push$3(result, key); } return result; }; // IE8- don't enum bug keys var enumBugKeys = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return objectKeysInternal(O, hiddenKeys); }; var objectGetOwnPropertyNames = { f: f$2 }; // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe var f$1 = Object.getOwnPropertySymbols; var objectGetOwnPropertySymbols = { f: f$1 }; var concat$1 = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = objectGetOwnPropertyNames.f(anObject(it)); var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys; }; var copyConstructorProperties = function (target, source, exceptions) { var keys = ownKeys(source); var defineProperty = objectDefineProperty.f; var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) { defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } } }; var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; var isForced_1 = isForced; var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target options.name - the .name of the function if it does not match the key */ var _export = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global_1; } else if (STATIC) { target = global_1[TARGET] || setGlobal(TARGET, {}); } else { target = (global_1[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe var objectKeys = Object.keys || function keys(O) { return objectKeysInternal(O, enumBugKeys); }; // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var props = toIndexedObject(Properties); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]); return O; }; var objectDefineProperties = { f: f }; var html = getBuiltIn('document', 'documentElement'); /* global ActiveXObject -- old IE, WSH */ var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // 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; }; // 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('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(); }; hiddenKeys$1[IE_PROTO] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create var objectCreate = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = NullProtoObject(); return Properties === undefined ? result : objectDefineProperties.f(result, Properties); }; var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] == undefined) { objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { configurable: true, value: objectCreate(null) }); } // add a key to Array.prototype[@@unscopables] var addToUnscopables = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; var $includes = arrayIncludes.includes; // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes _export({ target: 'Array', proto: true }, { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('includes'); var MATCH$1 = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.es/ecma262/#sec-isregexp var isRegexp = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); }; var TypeError$4 = global_1.TypeError; var notARegexp = function (it) { if (isRegexp(it)) { throw TypeError$4("The method doesn't accept regular expressions"); } return it; }; var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG$1] = 'z'; var toStringTagSupport = String(test) === '[object z]'; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var Object$1 = global_1.Object; // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` var classof = toStringTagSupport ? 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)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; var String$1 = global_1.String; var toString_1 = function (argument) { if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); return String$1(argument); }; var MATCH = wellKnownSymbol('match'); var correctIsRegexpLogic = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); } catch (error1) { try { regexp[MATCH] = false; return '/./'[METHOD_NAME](regexp); } catch (error2) { /* empty */ } } return false; }; var stringIndexOf$1 = functionUncurryThis(''.indexOf); // `String.prototype.includes` method // https://tc39.es/ecma262/#sec-string.prototype.includes _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */) { return !!~stringIndexOf$1( toString_1(requireObjectCoercible(this)), toString_1(notARegexp(searchString)), arguments.length > 1 ? arguments[1] : undefined ); } }); // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe var isArray = Array.isArray || function isArray(argument) { return classofRaw(argument) == 'Array'; }; var createProperty = function (object, key, value) { var propertyKey = toPropertyKey(key); if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); else object[propertyKey] = value; }; var noop = function () { /* empty */ }; var empty = []; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec$1 = functionUncurryThis(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); var isConstructorModern = function isConstructor(argument) { if (!isCallable(argument)) return false; try { construct(noop, empty, argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function isConstructor(argument) { if (!isCallable(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$1(constructorRegExp, inspectSource(argument)); } catch (error) { return true; } }; isConstructorLegacy.sham = true; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor var isConstructor = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; var SPECIES$3 = wellKnownSymbol('species'); var Array$2 = global_1.Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesConstructor = function (originalArray) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === Array$2 || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES$3]; if (C === null) C = undefined; } } return C === undefined ? Array$2 : C; }; // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesCreate = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; var SPECIES$2 = wellKnownSymbol('species'); var arrayMethodHasSpeciesSupport = 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 engineV8Version >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES$2] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; var TypeError$3 = global_1.TypeError; // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species _export({ target: 'Array', proto: true, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); if (n + len > MAX_SAFE_INTEGER) throw TypeError$3(MAXIMUM_ALLOWED_INDEX_EXCEEDED); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { if (n >= MAX_SAFE_INTEGER) throw TypeError$3(MAXIMUM_ALLOWED_INDEX_EXCEEDED); createProperty(A, n++, E); } } A.length = n; return A; } }); // `RegExp.prototype.flags` getter implementation // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags var regexpFlags = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.dotAll) result += 's'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError var $RegExp$2 = global_1.RegExp; var UNSUPPORTED_Y$2 = fails(function () { var re = $RegExp$2('a', 'y'); re.lastIndex = 2; return re.exec('abcd') != null; }); // UC Browser bug // https://github.com/zloirock/core-js/issues/1008 var MISSED_STICKY = UNSUPPORTED_Y$2 || fails(function () { return !$RegExp$2('a', 'y').sticky; }); var BROKEN_CARET = UNSUPPORTED_Y$2 || fails(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 regexpStickyHelpers = { BROKEN_CARET: BROKEN_CARET, MISSED_STICKY: MISSED_STICKY, UNSUPPORTED_Y: UNSUPPORTED_Y$2 }; // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError var $RegExp$1 = global_1.RegExp; var regexpUnsupportedDotAll = fails(function () { var re = $RegExp$1('.', 's'); return !(re.dotAll && re.exec('\n') && re.flags === 's'); }); // babel-minify and Closure Compiler transpiles RegExp('(?
    b)', 'g') -> /(?b)/g and it causes SyntaxError var $RegExp = global_1.RegExp; var regexpUnsupportedNcg = fails(function () { var re = $RegExp('(?b)', 'g'); return re.exec('b').groups.a !== 'b' || 'b'.replace(re, '$c') !== 'bc'; }); /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ /* eslint-disable regexp/no-useless-quantifier -- testing */ var getInternalState = internalState.get; var nativeReplace = shared('native-string-replace', String.prototype.replace); var nativeExec = RegExp.prototype.exec; var patchedExec = nativeExec; var charAt$3 = functionUncurryThis(''.charAt); var indexOf = functionUncurryThis(''.indexOf); var replace$1 = functionUncurryThis(''.replace); var stringSlice$4 = functionUncurryThis(''.slice); var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/; var re2 = /b*/g; functionCall(nativeExec, re1, 'a'); functionCall(nativeExec, re2, 'a'); return re1.lastIndex !== 0 || re2.lastIndex !== 0; })(); var UNSUPPORTED_Y$1 = regexpStickyHelpers.BROKEN_CARET; // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || regexpUnsupportedDotAll || regexpUnsupportedNcg; if (PATCH) { patchedExec = function exec(string) { var re = this; var state = getInternalState(re); var str = toString_1(string); var raw = state.raw; var result, reCopy, lastIndex, match, i, object, group; if (raw) { raw.lastIndex = re.lastIndex; result = functionCall(patchedExec, raw, str); re.lastIndex = raw.lastIndex; return result; } var groups = state.groups; var sticky = UNSUPPORTED_Y$1 && re.sticky; var flags = functionCall(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'; } strCopy = stringSlice$4(str, re.lastIndex); // Support anchored sticky behavior. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(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); } if (NPCG_INCLUDED) { reCopy = new RegExp('^' + source + '$(?!\\s)', flags); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; match = functionCall(nativeExec, sticky ? reCopy : re, strCopy); if (sticky) { if (match) { match.input = stringSlice$4(match.input, charsAdded); match[0] = stringSlice$4(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' work for /(.?)?/ functionCall(nativeReplace, match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (match && groups) { match.groups = object = objectCreate(null); for (i = 0; i < groups.length; i++) { group = groups[i]; object[group[0]] = match[group[1]]; } } return match; }; } var regexpExec = patchedExec; // `RegExp.prototype.exec` method // https://tc39.es/ecma262/#sec-regexp.prototype.exec _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { exec: regexpExec }); var FunctionPrototype = Function.prototype; var apply = FunctionPrototype.apply; var call = FunctionPrototype.call; // eslint-disable-next-line es/no-reflect -- safe var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () { return call.apply(apply, arguments); }); // TODO: Remove from `core-js@4` since it's moved to entry points var SPECIES$1 = wellKnownSymbol('species'); var RegExpPrototype$1 = RegExp.prototype; var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) { var SYMBOL = wellKnownSymbol(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(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$1] = function () { return re; }; re.flags = ''; re[SYMBOL] = /./[SYMBOL]; } re.exec = function () { execCalled = true; return null; }; re[SYMBOL](''); return !execCalled; }); if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || FORCED ) { var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]); var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { var uncurriedNativeMethod = functionUncurryThis(nativeMethod); var $exec = regexp.exec; if ($exec === regexpExec || $exec === RegExpPrototype$1.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) }; } return { done: false }; }); redefine(String.prototype, KEY, methods[0]); redefine(RegExpPrototype$1, SYMBOL, methods[1]); } if (SHAM) createNonEnumerableProperty(RegExpPrototype$1[SYMBOL], 'sham', true); }; var charAt$2 = functionUncurryThis(''.charAt); var charCodeAt = functionUncurryThis(''.charCodeAt); var stringSlice$3 = functionUncurryThis(''.slice); var createMethod$1 = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = toString_1(requireObjectCoercible($this)); var position = toIntegerOrInfinity(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$2(S, position) : first : CONVERT_TO_STRING ? stringSlice$3(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; 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 charAt$1 = stringMultibyte.charAt; // `AdvanceStringIndex` abstract operation // https://tc39.es/ecma262/#sec-advancestringindex var advanceStringIndex = function (S, index, unicode) { return index + (unicode ? charAt$1(S, index).length : 1); }; var floor = Math.floor; var charAt = functionUncurryThis(''.charAt); var replace = functionUncurryThis(''.replace); var stringSlice$2 = functionUncurryThis(''.slice); var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; // `GetSubstitution` abstract operation // https://tc39.es/ecma262/#sec-getsubstitution var getSubstitution = 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$2(str, 0, position); case "'": return stringSlice$2(str, tailPos); case '<': capture = namedCaptures[stringSlice$2(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 TypeError$2 = global_1.TypeError; // `RegExpExec` abstract operation // https://tc39.es/ecma262/#sec-regexpexec var regexpExecAbstract = function (R, S) { var exec = R.exec; if (isCallable(exec)) { var result = functionCall(exec, R, S); if (result !== null) anObject(result); return result; } if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S); throw TypeError$2('RegExp#exec called on incompatible receiver'); }; var REPLACE = wellKnownSymbol('replace'); var max$1 = Math.max; var min$1 = Math.min; var concat = functionUncurryThis([].concat); var push$2 = functionUncurryThis([].push); var stringIndexOf = functionUncurryThis(''.indexOf); var stringSlice$1 = functionUncurryThis(''.slice); var maybeToString = function (it) { return it === undefined ? it : String(it); }; // 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(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'; }); // @@replace logic fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; return [ // `String.prototype.replace` method // https://tc39.es/ecma262/#sec-string.prototype.replace function replace(searchValue, replaceValue) { var O = requireObjectCoercible(this); var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE); return replacer ? functionCall(replacer, searchValue, O, replaceValue) : functionCall(nativeReplace, toString_1(O), searchValue, replaceValue); }, // `RegExp.prototype[@@replace]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace function (string, replaceValue) { var rx = anObject(this); var S = toString_1(string); 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 functionalReplace = isCallable(replaceValue); if (!functionalReplace) replaceValue = toString_1(replaceValue); var global = rx.global; if (global) { var fullUnicode = rx.unicode; rx.lastIndex = 0; } var results = []; while (true) { var result = regexpExecAbstract(rx, S); if (result === null) break; push$2(results, result); if (!global) break; var matchStr = toString_1(result[0]); if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); } var accumulatedResult = ''; var nextSourcePosition = 0; for (var i = 0; i < results.length; i++) { result = results[i]; var matched = toString_1(result[0]); var position = max$1(min$1(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$2(captures, maybeToString(result[j])); var namedCaptures = result.groups; if (functionalReplace) { var replacerArgs = concat([matched], captures, position, S); if (namedCaptures !== undefined) push$2(replacerArgs, namedCaptures); var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs)); } else { replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); } if (position >= nextSourcePosition) { accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement; nextSourcePosition = position + matched.length; } } return accumulatedResult + stringSlice$1(S, nextSourcePosition); } ]; }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE); // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring var objectToString = toStringTagSupport ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; // `Object.prototype.toString` method // https://tc39.es/ecma262/#sec-object.prototype.tostring if (!toStringTagSupport) { redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); } // 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 }; // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` var classList = documentCreateElement('span').classList; var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype; var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype; var bind = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding var functionBindContext = function (fn, that) { aCallable(fn); return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; var push$1 = functionUncurryThis([].push); // `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($this); var self = indexedObject(O); var boundFunction = functionBindContext(callbackfn, that); var length = lengthOfArrayLike(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$1(target, value); // filter } else switch (TYPE) { case 4: return false; // every case 7: push$1(target, value); // filterReject } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; 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) }; var arrayMethodIsStrict = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call -- required for testing method.call(null, argument || function () { return 1; }, 1); }); }; var $forEach = arrayIteration.forEach; var STRICT_METHOD$1 = arrayMethodIsStrict('forEach'); // `Array.prototype.forEach` method implementation // https://tc39.es/ecma262/#sec-array.prototype.foreach var arrayForEach = !STRICT_METHOD$1 ? 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 handlePrototype = function (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach); } catch (error) { CollectionPrototype.forEach = arrayForEach; } }; for (var COLLECTION_NAME in domIterables) { if (domIterables[COLLECTION_NAME]) { handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype); } } handlePrototype(domTokenListPrototype); var PROPER_FUNCTION_NAME = functionName.PROPER; var TO_STRING = 'toString'; var RegExpPrototype = RegExp.prototype; var n$ToString = RegExpPrototype[TO_STRING]; var getFlags = functionUncurryThis(regexpFlags); var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); // FF44- RegExp#toString has a wrong name var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING; // `RegExp.prototype.toString` method // https://tc39.es/ecma262/#sec-regexp.prototype.tostring if (NOT_GENERIC || INCORRECT_NAME) { redefine(RegExp.prototype, TO_STRING, function toString() { var R = anObject(this); var p = toString_1(R.source); var rf = R.flags; var f = toString_1(rf === undefined && objectIsPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf); return '/' + p + '/' + f; }, { unsafe: true }); } var $find = arrayIteration.find; var FIND = 'find'; var SKIPS_HOLES = true; // Shouldn't skip holes if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { find: function find(callbackfn /* , that = undefined */) { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables(FIND); var $filter = arrayIteration.filter; var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('filter'); // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, { filter: function filter(callbackfn /* , thisArg */) { return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); var TypeError$1 = global_1.TypeError; // `Assert: IsConstructor(argument) is true` var aConstructor = function (argument) { if (isConstructor(argument)) return argument; throw TypeError$1(tryToString(argument) + ' is not a constructor'); }; var SPECIES = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.es/ecma262/#sec-speciesconstructor var speciesConstructor = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S); }; var Array$1 = global_1.Array; var max = Math.max; var arraySliceSimple = function (O, start, end) { var length = lengthOfArrayLike(O); var k = toAbsoluteIndex(start, length); var fin = toAbsoluteIndex(end === undefined ? length : end, length); var result = Array$1(max(fin - k, 0)); for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]); result.length = n; return result; }; var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y; var MAX_UINT32 = 0xFFFFFFFF; var min = Math.min; var $push = [].push; var exec = functionUncurryThis(/./.exec); var push = functionUncurryThis($push); var stringSlice = functionUncurryThis(''.slice); // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec // Weex JS has frozen built-in prototypes, so use try / catch wrapper var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { // eslint-disable-next-line regexp/no-empty-group -- required for testing var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; }); // @@split logic fixRegexpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) { var internalSplit; if ( 'abbc'.split(/(b)*/)[1] == 'c' || // eslint-disable-next-line regexp/no-empty-group -- required for testing 'test'.split(/(?:)/, -1).length != 4 || 'ab'.split(/(?:ab)*/).length != 2 || '.'.split(/(.?)(.?)/).length != 4 || // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing '.'.split(/()()/).length > 1 || ''.split(/.?/).length ) { // based on es5-shim implementation, need to rework it internalSplit = function (separator, limit) { var string = toString_1(requireObjectCoercible(this)); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (separator === undefined) return [string]; // If `separator` is not a regex, use native split if (!isRegexp(separator)) { return functionCall(nativeSplit, string, separator, lim); } var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var match, lastIndex, lastLength; while (match = functionCall(regexpExec, separatorCopy, string)) { lastIndex = separatorCopy.lastIndex; if (lastIndex > lastLastIndex) { push(output, stringSlice(string, lastLastIndex, match.index)); if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySliceSimple(match, 1)); lastLength = match[0].length; lastLastIndex = lastIndex; if (output.length >= lim) break; } if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop } if (lastLastIndex === string.length) { if (lastLength || !exec(separatorCopy, '')) push(output, ''); } else push(output, stringSlice(string, lastLastIndex)); return output.length > lim ? arraySliceSimple(output, 0, lim) : output; }; // Chakra, V8 } else if ('0'.split(undefined, 0).length) { internalSplit = function (separator, limit) { return separator === undefined && limit === 0 ? [] : functionCall(nativeSplit, this, separator, limit); }; } else internalSplit = nativeSplit; return [ // `String.prototype.split` method // https://tc39.es/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = requireObjectCoercible(this); var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT); return splitter ? functionCall(splitter, separator, O, limit) : functionCall(internalSplit, toString_1(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (string, limit) { var rx = anObject(this); var S = toString_1(string); var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit); if (res.done) return res.value; var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (UNSUPPORTED_Y ? 'g' : 'y'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = UNSUPPORTED_Y ? 0 : q; var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S); var e; if ( z === null || (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p ) { q = advanceStringIndex(S, q, unicodeMatching); } else { push(A, stringSlice(S, p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { push(A, z[i]); if (A.length === lim) return A; } q = p = e; } } push(A, stringSlice(S, p)); return A; } ]; }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y); var $map = arrayIteration.map; var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // `SameValue` abstract operation // https://tc39.es/ecma262/#sec-samevalue // eslint-disable-next-line es/no-object-is -- safe var sameValue = Object.is || function is(x, y) { // eslint-disable-next-line no-self-compare -- NaN check return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; // @@search logic fixRegexpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) { return [ // `String.prototype.search` method // https://tc39.es/ecma262/#sec-string.prototype.search function search(regexp) { var O = requireObjectCoercible(this); var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH); return searcher ? functionCall(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString_1(O)); }, // `RegExp.prototype[@@search]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@search function (string) { var rx = anObject(this); var S = toString_1(string); var res = maybeCallNative(nativeSearch, rx, S); if (res.done) return res.value; var previousLastIndex = rx.lastIndex; if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; var result = regexpExecAbstract(rx, S); if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; return result === null ? -1 : result.index; } ]; }); var un$Join = functionUncurryThis([].join); var ES3_STRINGS = indexedObject != Object; var STRICT_METHOD = arrayMethodIsStrict('join', ','); // `Array.prototype.join` method // https://tc39.es/ecma262/#sec-array.prototype.join _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, { join: function join(separator) { return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator); } }); /** * @author: Dennis Hernández * @webSite: http://djhvscf.github.io/Blog * @update zhixin wen */ var Utils = $__default["default"].fn.bootstrapTable.utils; var UtilsCookie = { cookieIds: { sortOrder: 'bs.table.sortOrder', sortName: 'bs.table.sortName', sortPriority: 'bs.table.sortPriority', pageNumber: 'bs.table.pageNumber', pageList: 'bs.table.pageList', columns: 'bs.table.columns', cardView: 'bs.table.cardView', searchText: 'bs.table.searchText', reorderColumns: 'bs.table.reorderColumns', filterControl: 'bs.table.filterControl', filterBy: 'bs.table.filterBy' }, getCurrentHeader: function getCurrentHeader(that) { return that.options.height ? that.$tableHeader : that.$header; }, getCurrentSearchControls: function getCurrentSearchControls(that) { return that.options.height ? 'table select, table input' : 'select, input'; }, isCookieSupportedByBrowser: function isCookieSupportedByBrowser() { return navigator.cookieEnabled; }, isCookieEnabled: function isCookieEnabled(that, cookieName) { return that.options.cookiesEnabled.includes(cookieName); }, setCookie: function setCookie(that, cookieName, cookieValue) { if (!that.options.cookie || !UtilsCookie.isCookieEnabled(that, cookieName)) { return; } return that._storage.setItem("".concat(that.options.cookieIdTable, ".").concat(cookieName), cookieValue); }, getCookie: function getCookie(that, cookieName) { if (!cookieName || !UtilsCookie.isCookieEnabled(that, cookieName)) { return null; } return that._storage.getItem("".concat(that.options.cookieIdTable, ".").concat(cookieName)); }, deleteCookie: function deleteCookie(that, cookieName) { return that._storage.removeItem("".concat(that.options.cookieIdTable, ".").concat(cookieName)); }, calculateExpiration: function calculateExpiration(cookieExpire) { var time = cookieExpire.replace(/[0-9]*/, ''); // s,mi,h,d,m,y cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); // number switch (time.toLowerCase()) { case 's': cookieExpire = +cookieExpire; break; case 'mi': cookieExpire *= 60; break; case 'h': cookieExpire = cookieExpire * 60 * 60; break; case 'd': cookieExpire = cookieExpire * 24 * 60 * 60; break; case 'm': cookieExpire = cookieExpire * 30 * 24 * 60 * 60; break; case 'y': cookieExpire = cookieExpire * 365 * 24 * 60 * 60; break; default: cookieExpire = undefined; break; } if (!cookieExpire) { return ''; } var d = new Date(); d.setTime(d.getTime() + cookieExpire * 1000); return d.toGMTString(); }, initCookieFilters: function initCookieFilters(bootstrapTable) { setTimeout(function () { var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(bootstrapTable, UtilsCookie.cookieIds.filterControl)); if (!bootstrapTable._filterControlValuesLoaded && parsedCookieFilters) { var cachedFilters = {}; var header = UtilsCookie.getCurrentHeader(bootstrapTable); var searchControls = UtilsCookie.getCurrentSearchControls(bootstrapTable); var applyCookieFilters = function applyCookieFilters(element, filteredCookies) { filteredCookies.forEach(function (cookie) { var value = element.value.toString(); var text = cookie.text; if (text === '' || element.type === 'radio' && value !== text) { return; } if (element.tagName === 'INPUT' && element.type === 'radio' && value === text) { element.checked = true; cachedFilters[cookie.field] = text; } else if (element.tagName === 'INPUT') { element.value = text; cachedFilters[cookie.field] = text; } else if (element.tagName === 'SELECT' && bootstrapTable.options.filterControlContainer) { element.value = text; cachedFilters[cookie.field] = text; } else if (text !== '' && element.tagName === 'SELECT') { cachedFilters[cookie.field] = text; var _iterator = _createForOfIteratorHelper(element), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var currentElement = _step.value; if (currentElement.value === text) { currentElement.selected = true; return; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } var option = document.createElement('option'); option.value = text; option.text = text; element.add(option, element[1]); element.selectedIndex = 1; } }); }; var filterContainer = header; if (bootstrapTable.options.filterControlContainer) { filterContainer = $__default["default"]("".concat(bootstrapTable.options.filterControlContainer)); } filterContainer.find(searchControls).each(function () { var field = $__default["default"](this).closest('[data-field]').data('field'); var filteredCookies = parsedCookieFilters.filter(function (cookie) { return cookie.field === field; }); applyCookieFilters(this, filteredCookies); }); bootstrapTable.initColumnSearch(cachedFilters); bootstrapTable._filterControlValuesLoaded = true; bootstrapTable.initServer(); } }, 250); } }; $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, { cookie: false, cookieExpire: '2h', cookiePath: null, cookieDomain: null, cookieSecure: null, cookieSameSite: 'Lax', cookieIdTable: '', cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.sortPriority', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy', 'bs.table.reorderColumns', 'bs.table.cardView'], cookieStorage: 'cookieStorage', // localStorage, sessionStorage, customStorage cookieCustomStorageGet: null, cookieCustomStorageSet: null, cookieCustomStorageDelete: null, // internal variable _filterControls: [], _filterControlValuesLoaded: false, _storage: { setItem: undefined, getItem: undefined, removeItem: undefined } }); $__default["default"].fn.bootstrapTable.methods.push('getCookies'); $__default["default"].fn.bootstrapTable.methods.push('deleteCookie'); $__default["default"].extend($__default["default"].fn.bootstrapTable.utils, { setCookie: UtilsCookie.setCookie, getCookie: UtilsCookie.getCookie }); $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { _inherits(_class, _$$BootstrapTable); var _super = _createSuper(_class); function _class() { _classCallCheck(this, _class); return _super.apply(this, arguments); } _createClass(_class, [{ key: "init", value: function init() { if (this.options.cookie) { if (this.options.cookieStorage === 'cookieStorage' && !UtilsCookie.isCookieSupportedByBrowser()) { throw new Error('Cookies are not enabled in this browser.'); } this.configureStorage(); // FilterBy logic var filterByCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterBy); if (typeof filterByCookieValue === 'boolean' && !filterByCookieValue) { throw new Error('The cookie value of filterBy must be a json!'); } var filterByCookie = {}; try { filterByCookie = JSON.parse(filterByCookieValue); } catch (e) { throw new Error('Could not parse the json of the filterBy cookie!'); } this.filterColumns = filterByCookie ? filterByCookie : {}; // FilterControl logic this._filterControls = []; this._filterControlValuesLoaded = false; this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/'/g, '').replace(/ /g, '').toLowerCase().split(',') : this.options.cookiesEnabled; if (this.options.filterControl) { var that = this; this.$el.on('column-search.bs.table', function (e, field, text) { var isNewField = true; for (var i = 0; i < that._filterControls.length; i++) { if (that._filterControls[i].field === field) { that._filterControls[i].text = text; isNewField = false; break; } } if (isNewField) { that._filterControls.push({ field: field, text: text }); } UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that._filterControls)); }).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that)); } } _get(_getPrototypeOf(_class.prototype), "init", this).call(this); } }, { key: "initServer", value: function initServer() { var _get2; if (this.options.cookie && this.options.filterControl && !this._filterControlValuesLoaded) { var cookie = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterControl)); if (cookie) { return; } } for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } (_get2 = _get(_getPrototypeOf(_class.prototype), "initServer", this)).call.apply(_get2, [this].concat(args)); } }, { key: "initTable", value: function initTable() { var _get3; for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } (_get3 = _get(_getPrototypeOf(_class.prototype), "initTable", this)).call.apply(_get3, [this].concat(args)); this.initCookie(); } }, { key: "onSort", value: function onSort() { var _get4; for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } (_get4 = _get(_getPrototypeOf(_class.prototype), "onSort", this)).call.apply(_get4, [this].concat(args)); if (!this.options.cookie) { return; } if (this.options.sortName === undefined || this.options.sortOrder === undefined) { UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName); UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder); } else { this.options.sortPriority = null; UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority); UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder); UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName); } } }, { key: "onMultipleSort", value: function onMultipleSort() { var _get5; for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args[_key4] = arguments[_key4]; } (_get5 = _get(_getPrototypeOf(_class.prototype), "onMultipleSort", this)).call.apply(_get5, [this].concat(args)); if (this.options.sortPriority === undefined) { UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority); } else { this.options.sortName = undefined; this.options.sortOrder = undefined; UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName); UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder); UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortPriority, JSON.stringify(this.options.sortPriority)); } } }, { key: "onPageNumber", value: function onPageNumber() { var _get6; for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { args[_key5] = arguments[_key5]; } (_get6 = _get(_getPrototypeOf(_class.prototype), "onPageNumber", this)).call.apply(_get6, [this].concat(args)); if (!this.options.cookie) { return; } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); } }, { key: "onPageListChange", value: function onPageListChange() { var _get7; for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { args[_key6] = arguments[_key6]; } (_get7 = _get(_getPrototypeOf(_class.prototype), "onPageListChange", this)).call.apply(_get7, [this].concat(args)); if (!this.options.cookie) { return; } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize); UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); } }, { key: "onPagePre", value: function onPagePre() { var _get8; for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { args[_key7] = arguments[_key7]; } (_get8 = _get(_getPrototypeOf(_class.prototype), "onPagePre", this)).call.apply(_get8, [this].concat(args)); if (!this.options.cookie) { return; } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); } }, { key: "onPageNext", value: function onPageNext() { var _get9; for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { args[_key8] = arguments[_key8]; } (_get9 = _get(_getPrototypeOf(_class.prototype), "onPageNext", this)).call.apply(_get9, [this].concat(args)); if (!this.options.cookie) { return; } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); } }, { key: "_toggleColumn", value: function _toggleColumn() { var _get10; for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { args[_key9] = arguments[_key9]; } (_get10 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get10, [this].concat(args)); if (!this.options.cookie) { return; } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.columns, JSON.stringify(this.getVisibleColumns().map(function (column) { return column.field; }))); } }, { key: "_toggleAllColumns", value: function _toggleAllColumns() { var _get11; for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { args[_key10] = arguments[_key10]; } (_get11 = _get(_getPrototypeOf(_class.prototype), "_toggleAllColumns", this)).call.apply(_get11, [this].concat(args)); if (!this.options.cookie) { return; } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.columns, JSON.stringify(this.getVisibleColumns().map(function (column) { return column.field; }))); } }, { key: "toggleView", value: function toggleView() { _get(_getPrototypeOf(_class.prototype), "toggleView", this).call(this); UtilsCookie.setCookie(this, UtilsCookie.cookieIds.cardView, this.options.cardView); } }, { key: "selectPage", value: function selectPage(page) { _get(_getPrototypeOf(_class.prototype), "selectPage", this).call(this, page); if (!this.options.cookie) { return; } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page); } }, { key: "onSearch", value: function onSearch(event) { _get(_getPrototypeOf(_class.prototype), "onSearch", this).call(this, event, arguments.length > 1 ? arguments[1] : true); if (!this.options.cookie) { return; } if (this.options.search) { UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText); } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); } }, { key: "initHeader", value: function initHeader() { var _get12; if (this.options.reorderableColumns && this.options.cookie) { this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.reorderColumns)); } for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) { args[_key11] = arguments[_key11]; } (_get12 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get12, [this].concat(args)); } }, { key: "persistReorderColumnsState", value: function persistReorderColumnsState(that) { UtilsCookie.setCookie(that, UtilsCookie.cookieIds.reorderColumns, JSON.stringify(that.columnsSortOrder)); } }, { key: "filterBy", value: function filterBy() { var _get13; for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) { args[_key12] = arguments[_key12]; } (_get13 = _get(_getPrototypeOf(_class.prototype), "filterBy", this)).call.apply(_get13, [this].concat(args)); if (!this.options.cookie) { return; } UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns)); } }, { key: "initCookie", value: function initCookie() { var _this = this; if (!this.options.cookie) { return; } if (this.options.cookieIdTable === '' || this.options.cookieExpire === '') { console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.'); this.options.cookie = false; // Make sure that the cookie extension is disabled return; } var sortOrderCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortOrder); var sortOrderNameCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortName); var sortPriorityCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortPriority); var pageNumberCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageNumber); var pageListCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageList); var searchTextCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.searchText); var cardViewCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.cardView); var columnsCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.columns); if (typeof columnsCookieValue === 'boolean' && !columnsCookieValue) { throw new Error('The cookie value of filterBy must be a json!'); } var columnsCookie = {}; try { columnsCookie = JSON.parse(columnsCookieValue); } catch (e) { throw new Error('Could not parse the json of the columns cookie!', columnsCookieValue); } try { sortPriorityCookie = JSON.parse(sortPriorityCookie); } catch (e) { throw new Error('Could not parse the json of the sortPriority cookie!', sortPriorityCookie); } if (!sortPriorityCookie) { // sortOrder this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder; // sortName this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName; } else { this.options.sortOrder = undefined; this.options.sortName = undefined; } // sortPriority this.options.sortPriority = sortPriorityCookie ? sortPriorityCookie : this.options.sortPriority; if (this.options.sortOrder || this.options.sortName) { // sortPriority this.options.sortPriority = null; } // pageNumber this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber; // pageSize this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize; // searchText if (UtilsCookie.isCookieEnabled(this, 'bs.table.searchText') && this.options.searchText === '') { this.options.searchText = searchTextCookie ? searchTextCookie : ''; } // cardView this.options.cardView = cardViewCookie === 'true' ? cardViewCookie : false; if (columnsCookie) { var _iterator2 = _createForOfIteratorHelper(this.columns), _step2; try { var _loop = function _loop() { var column = _step2.value; if (!column.switchable) { return "continue"; } column.visible = columnsCookie.filter(function (columnField) { if (_this.isSelectionColumn(column)) { return true; } /** * This is needed for the old saved cookies or the table will show no columns! * It can be removed in 2-3 Versions Later!! * TODO: Remove this part some versions later e.g. 1.17.3 */ if (columnField instanceof Object) { return columnField.field === column.field; } return columnField === column.field; }).length > 0; }; for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var _ret = _loop(); if (_ret === "continue") continue; } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } } } }, { key: "getCookies", value: function getCookies() { var bootstrapTable = this; var cookies = {}; $__default["default"].each(UtilsCookie.cookieIds, function (key, value) { cookies[key] = UtilsCookie.getCookie(bootstrapTable, value); if (key === 'columns') { cookies[key] = JSON.parse(cookies[key]); } }); return cookies; } }, { key: "deleteCookie", value: function deleteCookie(cookieName) { if (!cookieName) { return; } UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds[cookieName]); } }, { key: "configureStorage", value: function configureStorage() { var that = this; this._storage = {}; switch (this.options.cookieStorage) { case 'cookieStorage': this._storage.setItem = function (cookieName, cookieValue) { document.cookie = [cookieName, '=', encodeURIComponent(cookieValue), "; expires=".concat(UtilsCookie.calculateExpiration(that.options.cookieExpire)), that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', that.options.cookieSecure ? '; secure' : '', ";SameSite=".concat(that.options.cookieSameSite)].join(''); }; this._storage.getItem = function (cookieName) { var value = "; ".concat(document.cookie); var parts = value.split("; ".concat(cookieName, "=")); return parts.length === 2 ? decodeURIComponent(parts.pop().split(';').shift()) : null; }; this._storage.removeItem = function (cookieName) { document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join(''); }; break; case 'localStorage': this._storage.setItem = function (cookieName, cookieValue) { localStorage.setItem(cookieName, cookieValue); }; this._storage.getItem = function (cookieName) { return localStorage.getItem(cookieName); }; this._storage.removeItem = function (cookieName) { localStorage.removeItem(cookieName); }; break; case 'sessionStorage': this._storage.setItem = function (cookieName, cookieValue) { sessionStorage.setItem(cookieName, cookieValue); }; this._storage.getItem = function (cookieName) { return sessionStorage.getItem(cookieName); }; this._storage.removeItem = function (cookieName) { sessionStorage.removeItem(cookieName); }; break; case 'customStorage': if (!this.options.cookieCustomStorageSet || !this.options.cookieCustomStorageGet || !this.options.cookieCustomStorageDelete) { throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete'); } this._storage.setItem = function (cookieName, cookieValue) { Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], ''); }; this._storage.getItem = function (cookieName) { return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], ''); }; this._storage.removeItem = function (cookieName) { Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], ''); }; break; default: throw new Error('Storage method not supported.'); } } }]); return _class; }($__default["default"].BootstrapTable); })); jQuery.base64 = (function($) { // private property var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; // private method for UTF-8 encoding function utf8Encode(string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; } function encode(input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = utf8Encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4); } return output; } return { encode: function (str) { return encode(str); } }; }(jQuery)); /** * @preserve tableExport.jquery.plugin * * Version 1.26.0 * * Copyright (c) 2015-2022 hhurz, * https://github.com/hhurz/tableExport.jquery.plugin * * Based on https://github.com/kayalshri/tableExport.jquery.plugin * * Licensed under the MIT License **/ "use strict";(function($){$.fn.tableExport=function(options){let docData;const defaults={csvEnclosure:'"',csvSeparator:",",csvUseBOM:true,date:{html:"dd/mm/yyyy"},displayTableName:false,escape:false,exportHiddenCells:false,fileName:"tableExport",htmlContent:false,htmlHyperlink:"content",ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"inherit",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"inherit",valign:"middle"},alternateRowStyles:{fillColor:245},tableExport:{doc:null,onAfterAutotable:null,onBeforeAutotable:null,onAutotableText:null,onTable:null,outputImages:true}}},mso:{fileFormat:"xlshtml",onMsoNumberFormat:null,pageFormat:"a4",pageOrientation:"portrait",rtl:false,styles:[],worksheetName:"",xlsx:{formatId:{date:14,numbers:2,currency:164},format:{currency:"$#,##0.00;[Red]-$#,##0.00"},onHyperlink:null}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onAfterSaveToFile:null,onBeforeSaveToFile:null,onCellData:null,onCellHtmlData:null,onCellHtmlHyperlink:null,onIgnoreRow:null,onTableExportBegin:null,onTableExportEnd:null,outputMode:"file",pdfmake:{enabled:false,docDefinition:{pageSize:"A4",pageOrientation:"portrait",styles:{header:{background:"#34495E",color:"#FFFFFF",bold:true,alignment:"center",fillColor:"#34495E"},alternateRow:{fillColor:"#f5f5f5"}},defaultStyle:{color:"#000000",fontSize:8,font:"Roboto"}},fonts:{}},preserve:{leadingWS:false,trailingWS:false},preventInjection:true,sql:{tableEnclosure:"`",columnEnclosure:"`"},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv"};const pageFormats={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};const jsPdfThemes={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal",fillStyle:"F"},header:{textColor:255,fillColor:[41,128,185],rowHeight:23,fontStyle:"bold"},body:{},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1,fillStyle:"DF"},header:{textColor:255,fillColor:[26,188,156],rowHeight:23,fillStyle:"F",fontStyle:"bold"},body:{},alternateRow:{}},plain:{header:{fontStyle:"bold"}}};const jsPdfDefaultStyles={cellPadding:5,fontSize:10,font:"helvetica",lineColor:200,lineWidth:.1,fontStyle:"normal",overflow:"ellipsize",fillColor:255,textColor:20,halign:"left",valign:"top",fillStyle:"F",rowHeight:20,columnWidth:"auto"};const FONT_ROW_RATIO=1.15;const el=this;let DownloadEvt=null;let $head_rows=[];let $rows=[];let rowIndex=0;let trData="";let colNames=[];let ranges=[];let blob;let $hiddenTableElements=[];let checkCellVisibility=false;$.extend(true,defaults,options);if(defaults.type==="xlsx"){defaults.mso.fileFormat=defaults.type;defaults.type="excel"}if(typeof defaults.excelFileFormat!=="undefined"&&typeof defaults.mso.fileFormat==="undefined")defaults.mso.fileFormat=defaults.excelFileFormat;if(typeof defaults.excelPageFormat!=="undefined"&&typeof defaults.mso.pageFormat==="undefined")defaults.mso.pageFormat=defaults.excelPageFormat;if(typeof defaults.excelPageOrientation!=="undefined"&&typeof defaults.mso.pageOrientation==="undefined")defaults.mso.pageOrientation=defaults.excelPageOrientation;if(typeof defaults.excelRTL!=="undefined"&&typeof defaults.mso.rtl==="undefined")defaults.mso.rtl=defaults.excelRTL;if(typeof defaults.excelstyles!=="undefined"&&typeof defaults.mso.styles==="undefined")defaults.mso.styles=defaults.excelstyles;if(typeof defaults.onMsoNumberFormat!=="undefined"&&typeof defaults.mso.onMsoNumberFormat==="undefined")defaults.mso.onMsoNumberFormat=defaults.onMsoNumberFormat;if(typeof defaults.worksheetName!=="undefined"&&typeof defaults.mso.worksheetName==="undefined")defaults.mso.worksheetName=defaults.worksheetName;if(typeof defaults.mso.xslx!=="undefined"&&typeof defaults.mso.xlsx==="undefined")defaults.mso.xlsx=defaults.mso.xslx;defaults.mso.pageOrientation=defaults.mso.pageOrientation.substr(0,1)==="l"?"landscape":"portrait";defaults.date.html=defaults.date.html||"";if(defaults.date.html.length){const patt=[];patt["dd"]="(3[01]|[12][0-9]|0?[1-9])";patt["mm"]="(1[012]|0?[1-9])";patt["yyyy"]="((?:1[6-9]|2[0-2])\\d{2})";patt["yy"]="(\\d{2})";const separator=defaults.date.html.match(/[^a-zA-Z0-9]/)[0];const formatItems=defaults.date.html.toLowerCase().split(separator);defaults.date.regex="^\\s*";defaults.date.regex+=patt[formatItems[0]];defaults.date.regex+="(.)";defaults.date.regex+=patt[formatItems[1]];defaults.date.regex+="\\2";defaults.date.regex+=patt[formatItems[2]];defaults.date.regex+="\\s*$";defaults.date.pattern=new RegExp(defaults.date.regex,"g");let f=formatItems.indexOf("dd")+1;defaults.date.match_d=f+(f>1?1:0);f=formatItems.indexOf("mm")+1;defaults.date.match_m=f+(f>1?1:0);f=(formatItems.indexOf("yyyy")>=0?formatItems.indexOf("yyyy"):formatItems.indexOf("yy"))+1;defaults.date.match_y=f+(f>1?1:0)}colNames=GetColumnNames(el);if(typeof defaults.onTableExportBegin==="function")defaults.onTableExportBegin();if(defaults.type==="csv"||defaults.type==="tsv"||defaults.type==="txt"){let csvData="";let rowLength=0;ranges=[];rowIndex=0;const csvString=function(cell,rowIndex,colIndex){let result="";if(cell!==null){const dataString=parseString(cell,rowIndex,colIndex);const csvValue=dataString===null||dataString===""?"":dataString.toString();if(defaults.type==="tsv"){if(dataString instanceof Date)dataString.toLocaleString();result=replaceAll(csvValue,"\t"," ")}else{if(dataString instanceof Date)result=defaults.csvEnclosure+dataString.toLocaleString()+defaults.csvEnclosure;else{result=preventInjection(csvValue);result=replaceAll(result,defaults.csvEnclosure,defaults.csvEnclosure+defaults.csvEnclosure);if(result.indexOf(defaults.csvSeparator)>=0||/[\r\n ]/g.test(result))result=defaults.csvEnclosure+result+defaults.csvEnclosure}}}return result};const CollectCsvData=function($rows,rowselector,length){$rows.each(function(){trData="";ForEachVisibleCell(this,rowselector,rowIndex,length+$rows.length,function(cell,row,col){trData+=csvString(cell,row,col)+(defaults.type==="tsv"?"\t":defaults.csvSeparator)});trData=$.trim(trData).substring(0,trData.length-1);if(trData.length>0){if(csvData.length>0)csvData+="\n";csvData+=trData}rowIndex++});return $rows.length};rowLength+=CollectCsvData($(el).find("thead").first().find(defaults.theadSelector),"th,td",rowLength);findTableElements($(el),"tbody").each(function(){rowLength+=CollectCsvData(findTableElements($(this),defaults.tbodySelector),"td,th",rowLength)});if(defaults.tfootSelector.length)CollectCsvData($(el).find("tfoot").first().find(defaults.tfootSelector),"td,th",rowLength);csvData+="\n";if(defaults.outputMode==="string")return csvData;if(defaults.outputMode==="base64")return base64encode(csvData);if(defaults.outputMode==="window"){downloadFile(false,"data:text/"+(defaults.type==="csv"?"csv":"plain")+";charset=utf-8,",csvData);return}saveToFile(csvData,defaults.fileName+"."+defaults.type,"text/"+(defaults.type==="csv"?"csv":"plain"),"utf-8","",defaults.type==="csv"&&defaults.csvUseBOM)}else if(defaults.type==="sql"){rowIndex=0;ranges=[];let tdData="INSERT INTO "+defaults.sql.tableEnclosure+defaults.tableName+defaults.sql.tableEnclosure+" (";$head_rows=collectHeadRows($(el));$($head_rows).each(function(){ForEachVisibleCell(this,"th,td",rowIndex,$head_rows.length,function(cell,row,col){let colName=parseString(cell,row,col)||"";if(colName.indexOf(defaults.sql.columnEnclosure)>-1)colName=replaceAll(colName.toString(),defaults.sql.columnEnclosure,defaults.sql.columnEnclosure+defaults.sql.columnEnclosure);tdData+=defaults.sql.columnEnclosure+colName+defaults.sql.columnEnclosure+","});rowIndex++;tdData=$.trim(tdData).substring(0,tdData.length-1)});tdData+=") VALUES ";$rows=collectRows($(el));$($rows).each(function(){trData="";ForEachVisibleCell(this,"td,th",rowIndex,$head_rows.length+$rows.length,function(cell,row,col){let dataString=parseString(cell,row,col)||"";if(dataString.indexOf("'")>-1)dataString=replaceAll(dataString.toString(),"'","''");trData+="'"+dataString+"',"});if(trData.length>3){tdData+="("+trData;tdData=$.trim(tdData).substring(0,tdData.length-1);tdData+="),"}rowIndex++});tdData=$.trim(tdData).substring(0,tdData.length-1);tdData+=";";if(defaults.outputMode==="string")return tdData;if(defaults.outputMode==="base64")return base64encode(tdData);saveToFile(tdData,defaults.fileName+".sql","application/sql","utf-8","",false)}else if(defaults.type==="json"){const jsonHeaderArray=[];ranges=[];$head_rows=collectHeadRows($(el));$($head_rows).each(function(){const jsonArrayTd=[];ForEachVisibleCell(this,"th,td",rowIndex,$head_rows.length,function(cell,row,col){jsonArrayTd.push(parseString(cell,row,col))});jsonHeaderArray.push(jsonArrayTd)});const jsonArray=[];$rows=collectRows($(el));$($rows).each(function(){const jsonObjectTd={};let colIndex=0;ForEachVisibleCell(this,"td,th",rowIndex,$head_rows.length+$rows.length,function(cell,row,col){if(jsonHeaderArray.length){jsonObjectTd[jsonHeaderArray[jsonHeaderArray.length-1][colIndex]]=parseString(cell,row,col)}else{jsonObjectTd[colIndex]=parseString(cell,row,col)}colIndex++});if($.isEmptyObject(jsonObjectTd)===false)jsonArray.push(jsonObjectTd);rowIndex++});let save_data;if(defaults.jsonScope==="head")save_data=JSON.stringify(jsonHeaderArray);else if(defaults.jsonScope==="data")save_data=JSON.stringify(jsonArray);else save_data=JSON.stringify({header:jsonHeaderArray,data:jsonArray});if(defaults.outputMode==="string")return save_data;if(defaults.outputMode==="base64")return base64encode(save_data);saveToFile(save_data,defaults.fileName+".json","application/json","utf-8","base64",false)}else if(defaults.type==="xml"){rowIndex=0;ranges=[];let xml='';xml+="";$head_rows=collectHeadRows($(el));$($head_rows).each(function(){ForEachVisibleCell(this,"th,td",rowIndex,$head_rows.length,function(cell,row,col){xml+=""+parseString(cell,row,col)+""});rowIndex++});xml+="";let rowCount=1;$rows=collectRows($(el));$($rows).each(function(){let colCount=1;trData="";ForEachVisibleCell(this,"td,th",rowIndex,$head_rows.length+$rows.length,function(cell,row,col){trData+=""+parseString(cell,row,col)+"";colCount++});if(trData.length>0&&trData!==""){xml+=''+trData+"";rowCount++}rowIndex++});xml+="";if(defaults.outputMode==="string")return xml;if(defaults.outputMode==="base64")return base64encode(xml);saveToFile(xml,defaults.fileName+".xml","application/xml","utf-8","base64",false)}else if(defaults.type==="excel"&&defaults.mso.fileFormat==="xmlss"){const sheetData=[];const docNames=[];$(el).filter(function(){return isVisible($(this))}).each(function(){const $table=$(this);let ssName="";if(typeof defaults.mso.worksheetName==="string"&&defaults.mso.worksheetName.length)ssName=defaults.mso.worksheetName+" "+(docNames.length+1);else if(typeof defaults.mso.worksheetName[docNames.length]!=="undefined")ssName=defaults.mso.worksheetName[docNames.length];if(!ssName.length)ssName=$table.find("caption").text()||"";if(!ssName.length)ssName="Table "+(docNames.length+1);ssName=$.trim(ssName.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));docNames.push($("
    ").text(ssName).html());if(defaults.exportHiddenCells===false){$hiddenTableElements=$table.find("tr, th, td").filter(":hidden");checkCellVisibility=$hiddenTableElements.length>0}rowIndex=0;colNames=GetColumnNames(this);docData="\r";function CollectXmlssData($rows,rowselector,length){const spans=[];$($rows).each(function(){let ssIndex=0;let nCols=0;trData="";ForEachVisibleCell(this,"td,th",rowIndex,length+$rows.length,function(cell,row,col){if(cell!==null){let style="";let data=parseString(cell,row,col);let type="String";if(jQuery.isNumeric(data)!==false){type="Number"}else{const number=parsePercent(data);if(number!==false){data=number;type="Number";style+=' ss:StyleID="pct1"'}}if(type!=="Number")data=data.replace(/\n/g,"
    ");let colspan=getColspan(cell);let rowspan=getRowspan(cell);$.each(spans,function(){const range=this;if(rowIndex>=range.s.r&&rowIndex<=range.e.r&&nCols>=range.s.c&&nCols<=range.e.c){for(let i=0;i<=range.e.c-range.s.c;++i){nCols++;ssIndex++}}});if(rowspan||colspan){rowspan=rowspan||1;colspan=colspan||1;spans.push({s:{r:rowIndex,c:nCols},e:{r:rowIndex+rowspan-1,c:nCols+colspan-1}})}if(colspan>1){style+=' ss:MergeAcross="'+(colspan-1)+'"';nCols+=colspan-1}if(rowspan>1){style+=' ss:MergeDown="'+(rowspan-1)+'" ss:StyleID="rsp1"'}if(ssIndex>0){style+=' ss:Index="'+(nCols+1)+'"';ssIndex=0}trData+="'+$("
    ").text(data).html()+"\r";nCols++}});if(trData.length>0)docData+='\r'+trData+"\r";rowIndex++});return $rows.length}const rowLength=CollectXmlssData(collectHeadRows($table),"th,td",0);CollectXmlssData(collectRows($table),"td,th",rowLength);docData+="
    \r";sheetData.push(docData)});const count={};const firstOccurrences={};let item,itemCount;for(let n=0,c=docNames.length;n1)docNames[n]=docNames[n].substring(0,29)+"-"+count[item];else firstOccurrences[item]=n}const CreationDate=(new Date).toISOString();let xmlssDocFile='\r'+'\r'+'\r'+'\r'+" "+CreationDate+"\r"+"\r"+'\r'+" \r"+"\r"+'\r'+" 9000\r"+" 13860\r"+" 0\r"+" 0\r"+" False\r"+" False\r"+"\r"+"\r"+' \r"+' \r"+' \r"+"\r";for(let j=0;j\r'+sheetData[j];if(defaults.mso.rtl){xmlssDocFile+='\r'+"\r"+"\r"}else xmlssDocFile+='\r';xmlssDocFile+="\r"}xmlssDocFile+="\r";if(defaults.outputMode==="string")return xmlssDocFile;if(defaults.outputMode==="base64")return base64encode(xmlssDocFile);saveToFile(xmlssDocFile,defaults.fileName+".xml","application/xml","utf-8","base64",false)}else if(defaults.type==="excel"&&defaults.mso.fileFormat==="xlsx"){const sheetNames=[];const workbook=XLSX.utils.book_new();$(el).filter(function(){return isVisible($(this))}).each(function(){const $table=$(this);const ws=xlsxTableToSheet(this);let sheetName="";if(typeof defaults.mso.worksheetName==="string"&&defaults.mso.worksheetName.length)sheetName=defaults.mso.worksheetName+" "+(sheetNames.length+1);else if(typeof defaults.mso.worksheetName[sheetNames.length]!=="undefined")sheetName=defaults.mso.worksheetName[sheetNames.length];if(!sheetName.length)sheetName=$table.find("caption").text()||"";if(!sheetName.length)sheetName="Table "+(sheetNames.length+1);sheetName=$.trim(sheetName.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));sheetNames.push(sheetName);XLSX.utils.book_append_sheet(workbook,ws,sheetName)});const wbData=XLSX.write(workbook,{type:"binary",bookType:defaults.mso.fileFormat,bookSST:false});saveToFile(xlsxWorkbookToArrayBuffer(wbData),defaults.fileName+"."+defaults.mso.fileFormat,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","UTF-8","",false)}else if(defaults.type==="excel"||defaults.type==="xls"||defaults.type==="word"||defaults.type==="doc"){const MSDocType=defaults.type==="excel"||defaults.type==="xls"?"excel":"word";const MSDocExt=MSDocType==="excel"?"xls":"doc";const MSDocSchema='xmlns:x="urn:schemas-microsoft-com:office:'+MSDocType+'"';docData="";let docName="";$(el).filter(function(){return isVisible($(this))}).each(function(){const $table=$(this);if(docName===""){docName=defaults.mso.worksheetName||$table.find("caption").text()||"Table";docName=$.trim(docName.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31))}if(defaults.exportHiddenCells===false){$hiddenTableElements=$table.find("tr, th, td").filter(":hidden");checkCellVisibility=$hiddenTableElements.length>0}rowIndex=0;ranges=[];colNames=GetColumnNames(this);docData+="";$head_rows=collectHeadRows($table);$($head_rows).each(function(){const $row=$(this);trData="";ForEachVisibleCell(this,"th,td",rowIndex,$head_rows.length,function(cell,row,col){if(cell!==null){let thStyle="";trData+="0)trData+=' colspan="'+tdColspan+'"';const tdRowspan=getRowspan(cell);if(tdRowspan>0)trData+=' rowspan="'+tdRowspan+'"';trData+=">"+parseString(cell,row,col)+""}});if(trData.length>0)docData+=""+trData+"";rowIndex++});docData+="";$rows=collectRows($table);$($rows).each(function(){const $row=$(this);trData="";ForEachVisibleCell(this,"td,th",rowIndex,$head_rows.length+$rows.length,function(cell,row,col){if(cell!==null){let tdValue=parseString(cell,row,col);let tdStyle="";let tdCss=$(cell).attr("data-tableexport-msonumberformat");if(typeof tdCss==="undefined"&&typeof defaults.mso.onMsoNumberFormat==="function")tdCss=defaults.mso.onMsoNumberFormat(cell,row,col);if(typeof tdCss!=="undefined"&&tdCss!=="")tdStyle="style=\"mso-number-format:'"+tdCss+"'";if(defaults.mso.styles.length){const cellStyles=document.defaultView.getComputedStyle(cell,null);const rowStyles=document.defaultView.getComputedStyle($row[0],null);for(let cssStyle in defaults.mso.styles){tdCss=cellStyles[defaults.mso.styles[cssStyle]];if(tdCss==="")tdCss=rowStyles[defaults.mso.styles[cssStyle]];if(tdCss!==""&&tdCss!=="0px none rgb(0, 0, 0)"&&tdCss!=="rgba(0, 0, 0, 0)"){tdStyle+=tdStyle===""?'style="':";";tdStyle+=defaults.mso.styles[cssStyle]+":"+tdCss}}}trData+="0)trData+=' colspan="'+tdColspan+'"';const tdRowspan=getRowspan(cell);if(tdRowspan>0)trData+=' rowspan="'+tdRowspan+'"';if(typeof tdValue==="string"&&tdValue!==""){tdValue=preventInjection(tdValue);tdValue=tdValue.replace(/\n/g,"
    ")}trData+=">"+tdValue+""}});if(trData.length>0)docData+="
    "+trData+"";rowIndex++});if(defaults.displayTableName)docData+="";docData+="
    "+parseString($("

    "+defaults.tableName+"

    "))+"
    "});let docFile='';docFile+='';docFile+="";if(MSDocType==="excel"){docFile+="\x3c!--[if gte mso 9]>";docFile+="";docFile+="";docFile+="";docFile+="";docFile+="";docFile+=docName;docFile+="";docFile+="";docFile+="";if(defaults.mso.rtl)docFile+="";docFile+="";docFile+="";docFile+="";docFile+="";docFile+="";docFile+="";docFile+="@page { size:"+defaults.mso.pageOrientation+"; mso-page-orientation:"+defaults.mso.pageOrientation+"; }";docFile+="@page Section1 {size:"+pageFormats[defaults.mso.pageFormat][0]+"pt "+pageFormats[defaults.mso.pageFormat][1]+"pt";docFile+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";docFile+="div.Section1 {page:Section1;}";docFile+="@page Section2 {size:"+pageFormats[defaults.mso.pageFormat][1]+"pt "+pageFormats[defaults.mso.pageFormat][0]+"pt";docFile+=";mso-page-orientation:"+defaults.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";docFile+="div.Section2 {page:Section2;}";docFile+="br {mso-data-placement:same-cell;}";docFile+="";docFile+="";docFile+="";docFile+='
    ';docFile+=docData;docFile+="
    ";docFile+="";docFile+="";if(defaults.outputMode==="string")return docFile;if(defaults.outputMode==="base64")return base64encode(docFile);saveToFile(docFile,defaults.fileName+"."+MSDocExt,"application/vnd.ms-"+MSDocType,"","base64",false)}else if(defaults.type==="png"){html2canvas($(el)[0]).then(function(canvas){const image=canvas.toDataURL();const byteString=atob(image.substring(22));const buffer=new ArrayBuffer(byteString.length);const intArray=new Uint8Array(buffer);for(let i=0;i1||rowspan>1){cellContent["colSpan"]=colspan||1;cellContent["rowSpan"]=rowspan||1}}else cellContent={text:" "};if(colselector.indexOf("th")>=0)cellContent["style"]="header";r.push(cellContent)});if(r.length)body.push(r);if(rLengthmw){if(w>pageFormats.a0[0]){rk="a0";ro="l"}for(let key in pageFormats){if(pageFormats.hasOwnProperty(key)){if(pageFormats[key][1]>w){rk=key;ro="l";if(pageFormats[key][0]>w)ro="p"}}}mw=w}}});defaults.jspdf.format=rk===""?"a4":rk;defaults.jspdf.orientation=ro===""?"w":ro}if(teOptions.doc==null){teOptions.doc=new jspdf.jsPDF(defaults.jspdf.orientation,defaults.jspdf.unit,defaults.jspdf.format);teOptions.wScaleFactor=1;teOptions.hScaleFactor=1;if(typeof defaults.jspdf.onDocCreated==="function")defaults.jspdf.onDocCreated(teOptions.doc)}if(teOptions.outputImages===true)teOptions.images={};if(typeof teOptions.images!=="undefined"){$(el).filter(function(){return isVisible($(this))}).each(function(){let rowCount=0;ranges=[];if(defaults.exportHiddenCells===false){$hiddenTableElements=$(this).find("tr, th, td").filter(":hidden");checkCellVisibility=$hiddenTableElements.length>0}$head_rows=collectHeadRows($(this));$rows=collectRows($(this));$($rows).each(function(){ForEachVisibleCell(this,"td,th",$head_rows.length+rowCount,$head_rows.length+$rows.length,function(cell){collectImages(cell,$(cell).children(),teOptions)});rowCount++})});$head_rows=[];$rows=[]}loadImages(teOptions,function(){$(el).filter(function(){return isVisible($(this))}).each(function(){let colKey;rowIndex=0;ranges=[];if(defaults.exportHiddenCells===false){$hiddenTableElements=$(this).find("tr, th, td").filter(":hidden");checkCellVisibility=$hiddenTableElements.length>0}colNames=GetColumnNames(this);teOptions.columns=[];teOptions.rows=[];teOptions.teCells={};if(typeof teOptions.onTable==="function")if(teOptions.onTable($(this),defaults)===false)return true;defaults.jspdf.autotable.tableExport=null;const atOptions=$.extend(true,{},defaults.jspdf.autotable);defaults.jspdf.autotable.tableExport=teOptions;atOptions.margin={};$.extend(true,atOptions.margin,defaults.jspdf.margins);atOptions.tableExport=teOptions;if(typeof atOptions.createdHeaderCell!=="function"){atOptions.createdHeaderCell=function(cell,data){if(typeof teOptions.columns[data.column.dataKey]!=="undefined"){const col=teOptions.columns[data.column.dataKey];if(typeof col.rect!=="undefined"){let rh;cell.contentWidth=col.rect.width;if(typeof teOptions.heightRatio==="undefined"||teOptions.heightRatio===0){if(data.row.raw[data.column.dataKey].rowspan)rh=data.row.raw[data.column.dataKey].rect.height/data.row.raw[data.column.dataKey].rowspan;else rh=data.row.raw[data.column.dataKey].rect.height;teOptions.heightRatio=cell.styles.rowHeight/rh}rh=data.row.raw[data.column.dataKey].rect.height*teOptions.heightRatio;if(rh>cell.styles.rowHeight)cell.styles.rowHeight=rh}cell.styles.halign=atOptions.headerStyles.halign==="inherit"?"center":atOptions.headerStyles.halign;cell.styles.valign=atOptions.headerStyles.valign;if(typeof col.style!=="undefined"&&col.style.hidden!==true){if(atOptions.headerStyles.halign==="inherit")cell.styles.halign=col.style.align;if(atOptions.styles.fillColor==="inherit")cell.styles.fillColor=col.style.bcolor;if(atOptions.styles.textColor==="inherit")cell.styles.textColor=col.style.color;if(atOptions.styles.fontStyle==="inherit")cell.styles.fontStyle=col.style.fstyle}}}}if(typeof atOptions.createdCell!=="function"){atOptions.createdCell=function(cell,data){const tecell=teOptions.teCells[data.row.index+":"+data.column.dataKey];cell.styles.halign=atOptions.styles.halign==="inherit"?"center":atOptions.styles.halign;cell.styles.valign=atOptions.styles.valign;if(typeof tecell!=="undefined"&&typeof tecell.style!=="undefined"&&tecell.style.hidden!==true){if(atOptions.styles.halign==="inherit")cell.styles.halign=tecell.style.align;if(atOptions.styles.fillColor==="inherit")cell.styles.fillColor=tecell.style.bcolor;if(atOptions.styles.textColor==="inherit")cell.styles.textColor=tecell.style.color;if(atOptions.styles.fontStyle==="inherit")cell.styles.fontStyle=tecell.style.fstyle}}}if(typeof atOptions.drawHeaderCell!=="function"){atOptions.drawHeaderCell=function(cell,data){const colopt=teOptions.columns[data.column.dataKey];if((colopt.style.hasOwnProperty("hidden")!==true||colopt.style.hidden!==true)&&colopt.rowIndex>=0)return prepareAutoTableText(cell,data,colopt);else return false}}if(typeof atOptions.drawCell!=="function"){atOptions.drawCell=function(cell,data){const teCell=teOptions.teCells[data.row.index+":"+data.column.dataKey];const draw2canvas=typeof teCell!=="undefined"&&teCell.isCanvas;if(draw2canvas!==true){if(prepareAutoTableText(cell,data,teCell)){teOptions.doc.rect(cell.x,cell.y,cell.width,cell.height,cell.styles.fillStyle);if(typeof teCell!=="undefined"&&(typeof teCell.hasUserDefText==="undefined"||teCell.hasUserDefText!==true)&&typeof teCell.elements!=="undefined"&&teCell.elements.length){const hScale=cell.height/teCell.rect.height;if(hScale>teOptions.hScaleFactor)teOptions.hScaleFactor=hScale;teOptions.wScaleFactor=cell.width/teCell.rect.width;const ySave=cell.textPos.y;drawAutotableElements(cell,teCell.elements,teOptions);cell.textPos.y=ySave;drawAutotableText(cell,teCell.elements,teOptions)}else drawAutotableText(cell,{},teOptions)}}else{const container=teCell.elements[0];const imgId=$(container).attr("data-tableexport-canvas");const r=container.getBoundingClientRect();cell.width=r.width*teOptions.wScaleFactor;cell.height=r.height*teOptions.hScaleFactor;data.row.height=cell.height;jsPdfDrawImage(cell,container,imgId,teOptions)}return false}}teOptions.headerrows=[];$head_rows=collectHeadRows($(this));$($head_rows).each(function(){colKey=0;teOptions.headerrows[rowIndex]=[];ForEachVisibleCell(this,"th,td",rowIndex,$head_rows.length,function(cell,row,col){const obj=getCellStyles(cell);obj.title=parseString(cell,row,col);obj.key=colKey++;obj.rowIndex=rowIndex;teOptions.headerrows[rowIndex].push(obj)});rowIndex++});if(rowIndex>0){let lastrow=rowIndex-1;while(lastrow>=0){$.each(teOptions.headerrows[lastrow],function(){let obj=this;if(lastrow>0&&this.rect===null)obj=teOptions.headerrows[lastrow-1][this.key];if(obj!==null&&obj.rowIndex>=0&&(obj.style.hasOwnProperty("hidden")!==true||obj.style.hidden!==true))teOptions.columns.push(obj)});lastrow=teOptions.columns.length>0?-1:lastrow-1}}let rowCount=0;$rows=[];$rows=collectRows($(this));$($rows).each(function(){const rowData=[];colKey=0;ForEachVisibleCell(this,"td,th",rowIndex,$head_rows.length+$rows.length,function(cell,row,col){let obj;if(typeof teOptions.columns[colKey]==="undefined"){obj={title:"",key:colKey,style:{hidden:true}};teOptions.columns.push(obj)}rowData.push(parseString(cell,row,col));if(typeof cell!=="undefined"&&cell!==null){obj=getCellStyles(cell);obj.isCanvas=cell.hasAttribute("data-tableexport-canvas");obj.elements=obj.isCanvas?$(cell):$(cell).children();if(typeof $(cell).data("teUserDefText")!=="undefined")obj.hasUserDefText=true;teOptions.teCells[rowCount+":"+colKey++]=obj}else{obj=$.extend(true,{},teOptions.teCells[rowCount+":"+(colKey-1)]);obj.colspan=-1;teOptions.teCells[rowCount+":"+colKey++]=obj}});if(rowData.length){teOptions.rows.push(rowData);rowCount++}rowIndex++});if(typeof teOptions.onBeforeAutotable==="function")teOptions.onBeforeAutotable($(this),teOptions.columns,teOptions.rows,atOptions);jsPdfAutoTable(teOptions.doc,teOptions.columns,teOptions.rows,atOptions);if(typeof teOptions.onAfterAutotable==="function")teOptions.onAfterAutotable($(this),atOptions);defaults.jspdf.autotable.startY=jsPdfAutoTableEndPosY()+atOptions.margin.top});jsPdfOutput(teOptions.doc,typeof teOptions.images!=="undefined"&&jQuery.isEmptyObject(teOptions.images)===false);if(typeof teOptions.headerrows!=="undefined")teOptions.headerrows.length=0;if(typeof teOptions.columns!=="undefined")teOptions.columns.length=0;if(typeof teOptions.rows!=="undefined")teOptions.rows.length=0;delete teOptions.doc;teOptions.doc=null})}}function collectHeadRows($table){const result=[];findTableElements($table,"thead").each(function(){result.push.apply(result,findTableElements($(this),defaults.theadSelector).toArray())});return result}function collectRows($table){const result=[];findTableElements($table,"tbody").each(function(){result.push.apply(result,findTableElements($(this),defaults.tbodySelector).toArray())});if(defaults.tfootSelector.length){findTableElements($table,"tfoot").each(function(){result.push.apply(result,findTableElements($(this),defaults.tfootSelector).toArray())})}return result}function findTableElements($parent,selector){const parentSelector=$parent[0].tagName;const parentLevel=$parent.parents(parentSelector).length;return $parent.find(selector).filter(function(){return parentLevel===$(this).closest(parentSelector).parents(parentSelector).length})}function GetColumnNames(table){const result=[];let maxCols=0;let row=0;let col=0;$(table).find("thead").first().find("th").each(function(index,el){const hasDataField=$(el).attr("data-field")!==undefined;if(typeof el.parentNode.rowIndex!=="undefined"&&row!==el.parentNode.rowIndex){row=el.parentNode.rowIndex;col=0;maxCols=0}const colSpan=getColspan(el);maxCols+=colSpan?colSpan:1;while(col0){if($.inArray(colIndex,defaults.ignoreColumn)!==-1||$.inArray(colIndex-rowLength,defaults.ignoreColumn)!==-1||colNames.length>colIndex&&typeof colNames[colIndex]!=="undefined"&&$.inArray(colNames[colIndex],defaults.ignoreColumn)!==-1)result=true}}else result=true;return result}function ForEachVisibleCell(tableRow,selector,rowIndex,rowCount,cellcallback){if(typeof cellcallback==="function"){let ignoreRow=false;if(typeof defaults.onIgnoreRow==="function")ignoreRow=defaults.onIgnoreRow($(tableRow),rowIndex);if(ignoreRow===false&&(defaults.ignoreRow.length===0||$.inArray(rowIndex,defaults.ignoreRow)===-1&&$.inArray(rowIndex-rowCount,defaults.ignoreRow)===-1)&&isVisible($(tableRow))){const $cells=findTableElements($(tableRow),selector);let cellsCount=$cells.length;let colCount=0;let colIndex=0;$cells.each(function(){const $cell=$(this);let colspan=getColspan(this);let rowspan=getRowspan(this);let c;$.each(ranges,function(){const range=this;if(rowIndex>range.s.r&&rowIndex<=range.e.r&&colCount>=range.s.c&&colCount<=range.e.c){for(c=0;c<=range.e.c-range.s.c;++c){cellsCount++;colIndex++;cellcallback(null,rowIndex,colCount++)}}});if(rowspan||colspan){rowspan=rowspan||1;colspan=colspan||1;ranges.push({s:{r:rowIndex,c:colCount},e:{r:rowIndex+rowspan-1,c:colCount+colspan-1}})}if(isColumnIgnored($cell,cellsCount,colIndex++)===false){cellcallback(this,rowIndex,colCount++)}if(colspan>1){for(c=0;c=range.s.r&&rowIndex<=range.e.r&&colCount>=range.s.c&&colCount<=range.e.c){for(let c=0;c<=range.e.c-range.s.c;++c){cellcallback(null,rowIndex,colCount++)}}})}}}function jsPdfDrawImage(cell,container,imgId,teOptions){if(typeof teOptions.images!=="undefined"){const image=teOptions.images[imgId];if(typeof image!=="undefined"){const r=container.getBoundingClientRect();const arCell=cell.width/cell.height;const arImg=r.width/r.height;let imgWidth=cell.width;let imgHeight=cell.height;const px2pt=.264583*72/25.4;let uy=0;if(arImg<=arCell){imgHeight=Math.min(cell.height,r.height);imgWidth=r.width*imgHeight/r.height}else if(arImg>arCell){imgWidth=Math.min(cell.width,r.width);imgHeight=r.height*imgWidth/r.width}imgWidth*=px2pt;imgHeight*=px2pt;if(imgHeight=0){let cellWidth=cell.width;let textPosX=cell.textPos.x;const i=data.table.columns.indexOf(data.column);for(let c=1;c1){if(cell.styles.halign==="right")textPosX=cell.textPos.x+cellWidth-cell.width;else if(cell.styles.halign==="center")textPosX=cell.textPos.x+(cellWidth-cell.width)/2}cell.width=cellWidth;cell.textPos.x=textPosX;if(typeof cellopt!=="undefined"&&cellopt.rowspan>1)cell.height=cell.height*cellopt.rowspan;if(cell.styles.valign==="middle"||cell.styles.valign==="bottom"){const splittedText=typeof cell.text==="string"?cell.text.split(/\r\n|\r|\n/g):cell.text;const lineCount=splittedText.length||1;if(lineCount>2)cell.textPos.y-=(2-FONT_ROW_RATIO)/2*data.row.styles.fontSize*(lineCount-2)/3}return true}else return false}function collectImages(cell,elements,teOptions){if(typeof cell!=="undefined"&&cell!==null){if(cell.hasAttribute("data-tableexport-canvas")){const imgId=(new Date).getTime();$(cell).attr("data-tableexport-canvas",imgId);teOptions.images[imgId]={url:'[data-tableexport-canvas="'+imgId+'"]',src:null}}else if(elements!=="undefined"&&elements!=null){elements.each(function(){if($(this).is("img")){const imgId=strHashCode(this.src);teOptions.images[imgId]={url:this.src,src:this.src}}collectImages(cell,$(this).children(),teOptions)})}}}function loadImages(teOptions,callback){let imageCount=0;let pendingCount=0;function done(){callback(imageCount)}function loadImage(image){if(image.url){if(!image.src){const $imgContainer=$(image.url);if($imgContainer.length){imageCount=++pendingCount;html2canvas($imgContainer[0]).then(function(canvas){image.src=canvas.toDataURL("image/png");if(!--pendingCount)done()})}}else{const img=new Image;imageCount=++pendingCount;img.crossOrigin="Anonymous";img.onerror=img.onload=function(){if(img.complete){if(img.src.indexOf("data:image/")===0){img.width=image.width||img.width||0;img.height=image.height||img.height||0}if(img.width+img.height){const canvas=document.createElement("canvas");const ctx=canvas.getContext("2d");canvas.width=img.width;canvas.height=img.height;ctx.drawImage(img,0,0);image.src=canvas.toDataURL("image/png")}}if(!--pendingCount)done()};img.src=image.url}}}if(typeof teOptions.images!=="undefined"){for(let i in teOptions.images)if(teOptions.images.hasOwnProperty(i))loadImage(teOptions.images[i])}return pendingCount||done()}function drawAutotableElements(cell,elements,teOptions){elements.each(function(){if($(this).is("div")){const bColor=rgb2array(getStyle(this,"background-color"),[255,255,255]);const lColor=rgb2array(getStyle(this,"border-top-color"),[0,0,0]);const lWidth=getPropertyUnitValue(this,"border-top-width",defaults.jspdf.unit);const r=this.getBoundingClientRect();const ux=this.offsetLeft*teOptions.wScaleFactor;const uy=this.offsetTop*teOptions.hScaleFactor;const uw=r.width*teOptions.wScaleFactor;const uh=r.height*teOptions.hScaleFactor;teOptions.doc.setDrawColor.apply(undefined,lColor);teOptions.doc.setFillColor.apply(undefined,bColor);teOptions.doc.setLineWidth(lWidth);teOptions.doc.rect(cell.x+ux,cell.y+uy,uw,uh,lWidth?"FD":"F")}else if($(this).is("img")){const imgId=strHashCode(this.src);jsPdfDrawImage(cell,this,imgId,teOptions)}drawAutotableElements(cell,$(this).children(),teOptions)})}function drawAutotableText(cell,texttags,teOptions){if(typeof teOptions.onAutotableText==="function"){teOptions.onAutotableText(teOptions.doc,cell,texttags)}else{let x=cell.textPos.x;let y=cell.textPos.y;const style={halign:cell.styles.halign,valign:cell.styles.valign};if(texttags.length){let tag=texttags[0];while(tag.previousSibling)tag=tag.previousSibling;let b=false,i=false;while(tag){let txt=tag.innerText||tag.textContent||"";const leadingSpace=txt.length&&txt[0]===" "?" ":"";const trailingSpace=txt.length>1&&txt[txt.length-1]===" "?" ":"";if(defaults.preserve.leadingWS!==true)txt=leadingSpace+trimLeft(txt);if(defaults.preserve.trailingWS!==true)txt=trimRight(txt)+trailingSpace;if($(tag).is("br")){x=cell.textPos.x;y+=teOptions.doc.internal.getFontSize()}if($(tag).is("b"))b=true;else if($(tag).is("i"))i=true;if(b||i)teOptions.doc.setFont("undefined ",b&&i?"bolditalic":b?"bold":"italic");let w=teOptions.doc.getStringUnitWidth(txt)*teOptions.doc.internal.getFontSize();if(w){if(cell.styles.overflow==="linebreak"&&x>cell.textPos.x&&x+w>cell.textPos.x+cell.width){const chars=".,!%*;:=-";if(chars.indexOf(txt.charAt(0))>=0){const s=txt.charAt(0);w=teOptions.doc.getStringUnitWidth(s)*teOptions.doc.internal.getFontSize();if(x+w<=cell.textPos.x+cell.width){jsPdfAutoTableText(s,x,y,style);txt=txt.substring(1,txt.length)}w=teOptions.doc.getStringUnitWidth(txt)*teOptions.doc.internal.getFontSize()}x=cell.textPos.x;y+=teOptions.doc.internal.getFontSize()}if(cell.styles.overflow!=="visible"){while(txt.length&&x+w>cell.textPos.x+cell.width){txt=txt.substring(0,txt.length-1);w=teOptions.doc.getStringUnitWidth(txt)*teOptions.doc.internal.getFontSize()}}jsPdfAutoTableText(txt,x,y,style);x+=w}if(b||i){if($(tag).is("b"))b=false;else if($(tag).is("i"))i=false;teOptions.doc.setFont("undefined ",!b&&!i?"normal":b?"bold":"italic")}tag=tag.nextSibling}cell.textPos.x=x;cell.textPos.y=y}else{jsPdfAutoTableText(cell.text,cell.textPos.x,cell.textPos.y,style)}}}function escapeRegExp(string){return string==null?"":string.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}function replaceAll(string,find,replace){return string==null?"":string.toString().replace(new RegExp(escapeRegExp(find),"g"),replace)}function trimLeft(string){return string==null?"":string.toString().replace(/^\s+/,"")}function trimRight(string){return string==null?"":string.toString().replace(/\s+$/,"")}function parseDateUTC(s){if(defaults.date.html.length===0)return false;defaults.date.pattern.lastIndex=0;const match=defaults.date.pattern.exec(s);if(match==null)return false;const y=+match[defaults.date.match_y];if(y<0||y>8099)return false;const m=match[defaults.date.match_m]*1;const d=match[defaults.date.match_d]*1;if(!isFinite(d))return false;const o=new Date(y,m-1,d,0,0,0);if(o.getFullYear()===y&&o.getMonth()===m-1&&o.getDate()===d)return new Date(Date.UTC(y,m-1,d,0,0,0));else return false}function parseNumber(value){value=value||"0";if(""!==defaults.numbers.html.thousandsSeparator)value=replaceAll(value,defaults.numbers.html.thousandsSeparator,"");if("."!==defaults.numbers.html.decimalMark)value=replaceAll(value,defaults.numbers.html.decimalMark,".");return typeof value==="number"||jQuery.isNumeric(value)!==false?value:false}function parsePercent(value){if(value.indexOf("%")>-1){value=parseNumber(value.replace(/%/g,""));if(value!==false)value=value/100}else value=false;return value}function parseString(cell,rowIndex,colIndex,cellInfo){let result="";let cellType="text";if(cell!==null){const $cell=$(cell);let htmlData;$cell.removeData("teUserDefText");if($cell[0].hasAttribute("data-tableexport-canvas")){htmlData=""}else if($cell[0].hasAttribute("data-tableexport-value")){htmlData=$cell.attr("data-tableexport-value");htmlData=htmlData?htmlData+"":"";$cell.data("teUserDefText",1)}else{htmlData=$cell.html();if(typeof defaults.onCellHtmlData==="function"){htmlData=defaults.onCellHtmlData($cell,rowIndex,colIndex,htmlData);$cell.data("teUserDefText",1)}else if(htmlData!==""){const html=$.parseHTML("
    "+htmlData+"
    ",null,false);let inputIndex=0;let selectIndex=0;htmlData="";$.each(html,function(){if($(this).is("input")){htmlData+=$cell.find("input").eq(inputIndex++).val()}else if($(this).is("select")){htmlData+=$cell.find("select option:selected").eq(selectIndex++).text()}else if($(this).is("br")){htmlData+="
    "}else{if(typeof $(this).html()==="undefined")htmlData+=$(this).text();else if(jQuery().bootstrapTable===undefined||$(this).hasClass("fht-cell")===false&&$(this).hasClass("filterControl")===false&&$cell.parents(".detail-view").length===0)htmlData+=$(this).html();if($(this).is("a")){const href=$cell.find("a").attr("href")||"";if(typeof defaults.onCellHtmlHyperlink==="function"){result+=defaults.onCellHtmlHyperlink($cell,rowIndex,colIndex,href,htmlData)}else if(defaults.htmlHyperlink==="href"){result+=href}else{result+=htmlData}htmlData=""}}})}}if(htmlData&&htmlData!==""&&defaults.htmlContent===true){result=$.trim(htmlData)}else if(htmlData&&htmlData!==""){const cellFormat=$cell.attr("data-tableexport-cellformat");if(cellFormat!==""){let text=htmlData.replace(/\n/g,"\u2028").replace(/(<\s*br([^>]*)>)/gi,"⁠");const obj=$("
    ").html(text).contents();let number=false;text="";$.each(obj.text().split("\u2028"),function(i,v){if(i>0)text+=" ";if(defaults.preserve.leadingWS!==true)v=trimLeft(v);text+=defaults.preserve.trailingWS!==true?trimRight(v):v});$.each(text.split("⁠"),function(i,v){if(i>0)result+="\n";if(defaults.preserve.leadingWS!==true)v=trimLeft(v);if(defaults.preserve.trailingWS!==true)v=trimRight(v);result+=v.replace(/\u00AD/g,"")});result=result.replace(/\u00A0/g," ");if(defaults.type==="json"||defaults.type==="excel"&&defaults.mso.fileFormat==="xmlss"||defaults.numbers.output===false){number=parseNumber(result);if(number!==false){cellType="number";result=Number(number)}}else if(defaults.numbers.html.decimalMark!==defaults.numbers.output.decimalMark||defaults.numbers.html.thousandsSeparator!==defaults.numbers.output.thousandsSeparator){number=parseNumber(result);if(number!==false){const frac=(""+number.substr(number<0?1:0)).split(".");if(frac.length===1)frac[1]="";const mod=frac[0].length>3?frac[0].length%3:0;cellType="number";result=(number<0?"-":"")+(defaults.numbers.output.thousandsSeparator?(mod?frac[0].substr(0,mod)+defaults.numbers.output.thousandsSeparator:"")+frac[0].substr(mod).replace(/(\d{3})(?=\d)/g,"$1"+defaults.numbers.output.thousandsSeparator):frac[0])+(frac[1].length?defaults.numbers.output.decimalMark+frac[1]:"")}}}else result=htmlData}if(defaults.escape===true){result=escape(result)}if(typeof defaults.onCellData==="function"){result=defaults.onCellData($cell,rowIndex,colIndex,result,cellType);$cell.data("teUserDefText",1)}}if(cellInfo!==undefined)cellInfo.type=cellType;return result}function preventInjection(str){if(str.length>0&&defaults.preventInjection===true){const chars="=+-@";if(chars.indexOf(str.charAt(0))>=0)return"'"+str}return str}function hyphenate(a,b,c){return b+"-"+c.toLowerCase()}function rgb2array(rgb_string,default_result){const re=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;const bits=re.exec(rgb_string);let result=default_result;if(bits)result=[parseInt(bits[1]),parseInt(bits[2]),parseInt(bits[3])];return result}function getCellStyles(cell){let a=getStyle(cell,"text-align");const fw=getStyle(cell,"font-weight");const fs=getStyle(cell,"font-style");let f="";if(a==="start")a=getStyle(cell,"direction")==="rtl"?"right":"left";if(fw>=700)f="bold";if(fs==="italic")f+=fs;if(f==="")f="normal";const result={style:{align:a,bcolor:rgb2array(getStyle(cell,"background-color"),[255,255,255]),color:rgb2array(getStyle(cell,"color"),[0,0,0]),fstyle:f},colspan:getColspan(cell),rowspan:getRowspan(cell)};if(cell!==null){const r=cell.getBoundingClientRect();result.rect={width:r.width,height:r.height}}return result}function getColspan(cell){let result=$(cell).attr("data-tableexport-colspan");if(typeof result==="undefined"&&$(cell).is("[colspan]"))result=$(cell).attr("colspan");return parseInt(result)||0}function getRowspan(cell){let result=$(cell).attr("data-tableexport-rowspan");if(typeof result==="undefined"&&$(cell).is("[rowspan]"))result=$(cell).attr("rowspan");return parseInt(result)||0}function getStyle(target,prop){try{if(window.getComputedStyle){prop=prop.replace(/([a-z])([A-Z])/,hyphenate);return window.getComputedStyle(target,null).getPropertyValue(prop)}if(target.currentStyle){return target.currentStyle[prop]}return target.style[prop]}catch(e){}return""}function getUnitValue(parent,value,unit){const baseline=100;const temp=document.createElement("div");temp.style.overflow="hidden";temp.style.visibility="hidden";parent.appendChild(temp);temp.style.width=baseline+unit;const factor=baseline/temp.offsetWidth;parent.removeChild(temp);return value*factor}function getPropertyUnitValue(target,prop,unit){const value=getStyle(target,prop);let numeric=value.match(/\d+/);if(numeric!==null){numeric=numeric[0];return getUnitValue(target.parentElement,numeric,unit)}return 0}function xlsxWorkbookToArrayBuffer(s){const buf=new ArrayBuffer(s.length);const view=new Uint8Array(buf);for(let i=0;i!==s.length;++i)view[i]=s.charCodeAt(i)&255;return buf}function xlsxTableToSheet(table){let ssfId;const ws={};const rows=table.getElementsByTagName("tr");const sheetRows=Math.min(1e7,rows.length);const range={s:{r:0,c:0},e:{r:0,c:0}};let merges=[],midx=0;let _R=0,R=0,_C=0,C=0,RS=0,CS=0;let elt;const ssfTable=XLSX.SSF.get_table();for(;_R0||CS>1)merges.push({s:{r:R,c:C},e:{r:R+(RS||1)-1,c:C+CS-1}});const cellInfo={type:""};let v=parseString(elt,_R,_C+CSOffset,cellInfo);let o={t:"s",v:v};let _t="";const cellFormat=$(elt).attr("data-tableexport-cellformat")||undefined;if(cellFormat!==""){ssfId=parseInt($(elt).attr("data-tableexport-xlsxformatid")||0);if(ssfId===0&&typeof defaults.mso.xlsx.formatId.numbers==="function")ssfId=defaults.mso.xlsx.formatId.numbers($(elt),_R,_C+CSOffset);if(ssfId===0&&typeof defaults.mso.xlsx.formatId.date==="function")ssfId=defaults.mso.xlsx.formatId.date($(elt),_R,_C+CSOffset);if(ssfId===49||ssfId==="@")_t="s";else if(cellInfo.type==="number"||ssfId>0&&ssfId<14||ssfId>36&&ssfId<41||ssfId===48)_t="n";else if(cellInfo.type==="date"||ssfId>13&&ssfId<37||ssfId>44&&ssfId<48||ssfId===56)_t="d"}else _t="s";if(v!=null){let vd;if(v.length===0){o.t="z"}else if(v.trim().length===0){}else if(_t==="s"){}else if(cellInfo.type==="function"){o={f:v}}else if(v==="TRUE"){o={t:"b",v:true}}else if(v==="FALSE"){o={t:"b",v:false}}else if(_t==="n"||isFinite(xlsxToNumber(v,defaults.numbers.output))){const vn=xlsxToNumber(v,defaults.numbers.output);if(ssfId===0&&typeof defaults.mso.xlsx.formatId.numbers!=="function"){ssfId=defaults.mso.xlsx.formatId.numbers}if(isFinite(vn)||isFinite(v))o={t:"n",v:isFinite(vn)?vn:v,z:typeof ssfId==="string"?ssfId:ssfId in ssfTable?ssfTable[ssfId]:ssfId===defaults.mso.xlsx.formatId.currency?defaults.mso.xlsx.format.currency:"0.00"}}else if((vd=parseDateUTC(v))!==false||_t==="d"){if(ssfId===0&&typeof defaults.mso.xlsx.formatId.date!=="function"){ssfId=defaults.mso.xlsx.formatId.date}o={t:"d",v:vd!==false?vd:v,z:typeof ssfId==="string"?ssfId:ssfId in ssfTable?ssfTable[ssfId]:"m/d/yy"}}const $aTag=$(elt).find("a");if($aTag&&$aTag.length){const href=$aTag[0].hasAttribute("href")?$aTag.attr("href"):"";const content=defaults.htmlHyperlink!=="href"||href===""?v:"";const hyperlink=href!==""?'=HYPERLINK("'+href+(content.length?'","'+content:"")+'")':"";if(hyperlink!==""){if(typeof defaults.mso.xlsx.onHyperlink==="function"){v=defaults.mso.xlsx.onHyperlink($(elt),_R,_C,href,content,hyperlink);if(v.indexOf("=HYPERLINK")!==0){o={t:"s",v:v}}else{o={f:v}}}else{o={f:hyperlink}}}}}ws[xlsxEncodeCell({c:C,r:R})]=o;if(range.e.c=sheetRows){ws["!fullref"]=xlsxEncodeRange((range.e.r=rows.length-_R+R-1,range))}return ws}function xlsxEncodeRow(row){return""+(row+1)}function xlsxEncodeCol(col){let s="";for(++col;col;col=Math.floor((col-1)/26)){s=String.fromCharCode((col-1)%26+65)+s}return s}function xlsxEncodeCell(cell){return xlsxEncodeCol(cell.c)+xlsxEncodeRow(cell.r)}function xlsxEncodeRange(cs,ce){if(typeof ce==="undefined"||typeof ce==="number"){return xlsxEncodeRange(cs.s,cs.e)}if(typeof cs!=="string"){cs=xlsxEncodeCell(cs)}if(typeof ce!=="string"){ce=xlsxEncodeCell(ce)}return cs===ce?cs:cs+":"+ce}function xlsxToNumber(s,numbersFormat){let v=Number(s);if(isFinite(v))return v;let wt=1;let ss=s;if(""!==numbersFormat.thousandsSeparator)ss=ss.replace(new RegExp("([\\d])"+numbersFormat.thousandsSeparator+"([\\d])","g"),"$1$2");if("."!==numbersFormat.decimalMark)ss=ss.replace(new RegExp("([\\d])"+numbersFormat.decimalMark+"([\\d])","g"),"$1.$2");ss=ss.replace(/[$]/g,"").replace(/[%]/g,function(){wt*=100;return""});if(isFinite(v=Number(ss)))return v/wt;ss=ss.replace(/[(](.*)[)]/,function($$,$1){wt=-wt;return $1});if(isFinite(v=Number(ss)))return v/wt;return v}function strHashCode(str){let hash=0,i,chr,len;if(str.length===0)return hash;for(i=0,len=str.length;i0||!!ua.match(/Trident.*rv\:11\./))){const frame=document.createElement("iframe");if(frame){document.body.appendChild(frame);frame.setAttribute("style","display:none");frame.contentDocument.open("txt/plain","replace");frame.contentDocument.write(data);frame.contentDocument.close();frame.contentWindow.focus();const extension=filename.substr(filename.lastIndexOf(".")+1);switch(extension){case"doc":case"json":case"png":case"pdf":case"xls":case"xlsx":filename+=".txt";break}frame.contentDocument.execCommand("SaveAs",true,filename);document.body.removeChild(frame)}}else{const DownloadLink=document.createElement("a");if(DownloadLink){let blobUrl=null;DownloadLink.style.display="none";if(filename!==false)DownloadLink.download=filename;else DownloadLink.target="_blank";if(typeof data==="object"){window.URL=window.URL||window.webkitURL;const binaryData=[];binaryData.push(data);blobUrl=window.URL.createObjectURL(new Blob(binaryData,{type:header}));DownloadLink.href=blobUrl}else if(header.toLowerCase().indexOf("base64,")>=0){DownloadLink.href=header+base64encode(data)}else{DownloadLink.href=header+encodeURIComponent(data)}document.body.appendChild(DownloadLink);if(document.createEvent){if(DownloadEvt===null)DownloadEvt=document.createEvent("MouseEvents");DownloadEvt.initEvent("click",true,false);DownloadLink.dispatchEvent(DownloadEvt)}else if(document.createEventObject)DownloadLink.fireEvent("onclick");else if(typeof DownloadLink.onclick==="function")DownloadLink.onclick();setTimeout(function(){if(blobUrl)window.URL.revokeObjectURL(blobUrl);document.body.removeChild(DownloadLink);if(typeof defaults.onAfterSaveToFile==="function")defaults.onAfterSaveToFile(data,filename)},100)}}}function utf8Encode(text){if(typeof text==="string"){text=text.replace(/\x0d\x0a/g,"\n");let utfText="";for(let n=0;n127&&c<2048){utfText+=String.fromCharCode(c>>6|192);utfText+=String.fromCharCode(c&63|128)}else{utfText+=String.fromCharCode(c>>12|224);utfText+=String.fromCharCode(c>>6&63|128);utfText+=String.fromCharCode(c&63|128)}}return utfText}return text}function base64encode(input){let chr1,chr2,chr3,enc1,enc2,enc3,enc4;const keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let output="";let i=0;input=utf8Encode(input);while(i>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4)}return output}var jsPdfDoc,jsPdfCursor,jsPdfSettings,jsPdfPageCount,jsPdfTable;function jsPdfAutoTable(doc,headers,data,options){jsPdfValidateInput(headers,data,options);jsPdfDoc=doc;jsPdfSettings=jsPdfInitOptions(options||{});jsPdfPageCount=1;jsPdfCursor={y:jsPdfSettings.startY===false?jsPdfSettings.margin.top:jsPdfSettings.startY};const userStyles={textColor:30,fontSize:jsPdfDoc.internal.getFontSize(),fontStyle:jsPdfDoc.internal.getFont().fontStyle};jsPdfCreateModels(headers,data);jsPdfCalculateWidths();const firstRowHeight=jsPdfTable.rows[0]&&jsPdfSettings.pageBreak==="auto"?jsPdfTable.rows[0].height:0;let minTableBottomPos=jsPdfSettings.startY+jsPdfSettings.margin.bottom+jsPdfTable.headerRow.height+firstRowHeight;if(jsPdfSettings.pageBreak==="avoid"){minTableBottomPos+=jsPdfTable.height}if(jsPdfSettings.pageBreak==="always"&&jsPdfSettings.startY!==false||jsPdfSettings.startY!==false&&minTableBottomPos>jsPdfDoc.internal.pageSize.height){jsPdfDoc.addPage();jsPdfCursor.y=jsPdfSettings.margin.top}jsPdfApplyStyles(userStyles);jsPdfSettings.beforePageContent(jsPdfHooksData());if(jsPdfSettings.drawHeaderRow(jsPdfTable.headerRow,jsPdfHooksData({row:jsPdfTable.headerRow}))!==false){jsPdfPrintRow(jsPdfTable.headerRow,jsPdfSettings.drawHeaderCell)}jsPdfApplyStyles(userStyles);jsPdfPrintRows();jsPdfSettings.afterPageContent(jsPdfHooksData());jsPdfApplyStyles(userStyles);return jsPdfDoc}function jsPdfAutoTableEndPosY(){if(typeof jsPdfCursor==="undefined"||typeof jsPdfCursor.y==="undefined"){return 0}return jsPdfCursor.y}function jsPdfAutoTableText(text,x,y,styles){if(typeof x!=="number"||typeof y!=="number"){console.error("The x and y parameters are required. Missing for the text: ",text)}const fontSize=jsPdfDoc.internal.getFontSize()/jsPdfDoc.internal.scaleFactor;const lineHeightProportion=FONT_ROW_RATIO;const splitRegex=/\r\n|\r|\n/g;let splittedText=null;let lineCount=1;if(styles.valign==="middle"||styles.valign==="bottom"||styles.halign==="center"||styles.halign==="right"){splittedText=typeof text==="string"?text.split(splitRegex):text;lineCount=splittedText.length||1}y+=fontSize*(2-lineHeightProportion);if(styles.valign==="middle")y-=lineCount/2*fontSize;else if(styles.valign==="bottom")y-=lineCount*fontSize;if(styles.halign==="center"||styles.halign==="right"){let alignSize=fontSize;if(styles.halign==="center")alignSize*=.5;if(splittedText&&lineCount>=1){for(let iLine=0;iLinecolumn.contentWidth){column.contentWidth=cellWidth}});column.width=column.contentWidth;tableContentWidth+=column.contentWidth});jsPdfTable.contentWidth=tableContentWidth;const maxTableWidth=jsPdfDoc.internal.pageSize.width-jsPdfSettings.margin.left-jsPdfSettings.margin.right;let preferredTableWidth=maxTableWidth;if(typeof jsPdfSettings.tableWidth==="number"){preferredTableWidth=jsPdfSettings.tableWidth}else if(jsPdfSettings.tableWidth==="wrap"){preferredTableWidth=jsPdfTable.contentWidth}jsPdfTable.width=preferredTableWidthjsPdfTable.width){column.width=column.contentWidth}else{dynamicColumns.push(column);dynamicColumnsContentWidth+=column.contentWidth;column.width=0}}staticWidth+=column.width});jsPdfDistributeWidth(dynamicColumns,staticWidth,dynamicColumnsContentWidth,fairWidth);jsPdfTable.height=0;const all=jsPdfTable.rows.concat(jsPdfTable.headerRow);all.forEach(function(row,i){let lineBreakCount=0;let cursorX=jsPdfTable.x;jsPdfTable.columns.forEach(function(col){const cell=row.cells[col.dataKey];col.x=cursorX;jsPdfApplyStyles(cell.styles);const textSpace=col.width-cell.styles.cellPadding*2;if(cell.styles.overflow==="linebreak"){cell.text=jsPdfDoc.splitTextToSize(cell.text,textSpace+1,{fontSize:cell.styles.fontSize})}else if(cell.styles.overflow==="ellipsize"){cell.text=jsPdfEllipsize(cell.text,textSpace,cell.styles)}else if(cell.styles.overflow==="visible"){}else if(cell.styles.overflow==="hidden"){cell.text=jsPdfEllipsize(cell.text,textSpace,cell.styles,"")}else if(typeof cell.styles.overflow==="function"){cell.text=cell.styles.overflow(cell.text,textSpace)}else{console.error("Unrecognized overflow type: "+cell.styles.overflow)}const count=Array.isArray(cell.text)?cell.text.length-1:0;if(count>lineBreakCount){lineBreakCount=count}cursorX+=col.width});row.heightStyle=row.styles.rowHeight;row.height=row.heightStyle+lineBreakCount*row.styles.fontSize*FONT_ROW_RATIO+(2-FONT_ROW_RATIO)/2*row.styles.fontSize;jsPdfTable.height+=row.height})}function jsPdfDistributeWidth(dynamicColumns,staticWidth,dynamicColumnsContentWidth,fairWidth){const extraWidth=jsPdfTable.width-staticWidth-dynamicColumnsContentWidth;for(let i=0;i=jsPdfDoc.internal.pageSize.height}function jsPdfPrintRow(row,hookHandler){for(let i=0;i=jsPdfGetStringWidth(text,styles)){return text}while(width, https://github.com/MrRio/jsPDF * 2015-2020 yWorks GmbH, http://www.yworks.com * 2015-2020 Lukas Holländer , https://github.com/HackbrettXXX * 2016-2018 Aras Abbasi * 2010 Aaron Spike, https://github.com/acspike * 2012 Willow Systems Corporation, willow-systems.com * 2012 Pablo Hess, https://github.com/pablohess * 2012 Florian Jenett, https://github.com/fjenett * 2013 Warren Weckesser, https://github.com/warrenweckesser * 2013 Youssef Beddad, https://github.com/lifof * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2013 Stefan Slonevskiy, https://github.com/stefslon * 2013 Jeremy Morel, https://github.com/jmorel * 2013 Christoph Hartmann, https://github.com/chris-rock * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Makes, https://github.com/dollaruw * 2014 Diego Casorran, https://github.com/diegocr * 2014 Steven Spungin, https://github.com/Flamenco * 2014 Kenneth Glassey, https://github.com/Gavvers * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Contributor(s): * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, * kim3er, mfo, alnorth, Flamenco */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).jspdf={})}(this,(function(t){"use strict";var e=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function r(){e.console&&"function"==typeof e.console.log&&e.console.log.apply(e.console,arguments)}var n={log:r,warn:function(t){e.console&&("function"==typeof e.console.warn?e.console.warn.apply(e.console,arguments):r.call(null,arguments))},error:function(t){e.console&&("function"==typeof e.console.error?e.console.error.apply(e.console,arguments):r(t))}}; /** * @license * FileSaver.js * A saveAs() FileSaver implementation. * * By Eli Grey, http://eligrey.com * * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT) * source : http://purl.eligrey.com/github/FileSaver.js */function i(t,e,r){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){c(i.response,e,r)},i.onerror=function(){n.error("could not download file")},i.send()}function a(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var s,u,c=e.saveAs||("object"!=typeof window||window!==e?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,r,n){var s=e.URL||e.webkitURL,u=document.createElement("a");r=r||t.name||"download",u.download=r,u.rel="noopener","string"==typeof t?(u.href=t,u.origin!==location.origin?a(u.href)?i(t,r,n):o(u,u.target="_blank"):o(u)):(u.href=s.createObjectURL(t),setTimeout((function(){s.revokeObjectURL(u.href)}),4e4),setTimeout((function(){o(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,r){if(e=e||t.name||"download","string"==typeof t)if(a(t))i(t,e,r);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout((function(){o(s)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(n.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,r),e)}:function(t,r,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return i(t,r,n);var o="application/octet-stream"===t.type,s=/constructor/i.test(e.HTMLElement)||e.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||o&&s)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var t=c.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},c.readAsDataURL(t)}else{var l=e.URL||e.webkitURL,h=l.createObjectURL(t);a?a.location=h:location.href=h,a=null,setTimeout((function(){l.revokeObjectURL(h)}),4e4)}}); /** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function l(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6));t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r}} /** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */ function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];r=d(r,n,i,a,e[0],7,-680876936),a=d(a,r,n,i,e[1],12,-389564586),i=d(i,a,r,n,e[2],17,606105819),n=d(n,i,a,r,e[3],22,-1044525330),r=d(r,n,i,a,e[4],7,-176418897),a=d(a,r,n,i,e[5],12,1200080426),i=d(i,a,r,n,e[6],17,-1473231341),n=d(n,i,a,r,e[7],22,-45705983),r=d(r,n,i,a,e[8],7,1770035416),a=d(a,r,n,i,e[9],12,-1958414417),i=d(i,a,r,n,e[10],17,-42063),n=d(n,i,a,r,e[11],22,-1990404162),r=d(r,n,i,a,e[12],7,1804603682),a=d(a,r,n,i,e[13],12,-40341101),i=d(i,a,r,n,e[14],17,-1502002290),r=p(r,n=d(n,i,a,r,e[15],22,1236535329),i,a,e[1],5,-165796510),a=p(a,r,n,i,e[6],9,-1069501632),i=p(i,a,r,n,e[11],14,643717713),n=p(n,i,a,r,e[0],20,-373897302),r=p(r,n,i,a,e[5],5,-701558691),a=p(a,r,n,i,e[10],9,38016083),i=p(i,a,r,n,e[15],14,-660478335),n=p(n,i,a,r,e[4],20,-405537848),r=p(r,n,i,a,e[9],5,568446438),a=p(a,r,n,i,e[14],9,-1019803690),i=p(i,a,r,n,e[3],14,-187363961),n=p(n,i,a,r,e[8],20,1163531501),r=p(r,n,i,a,e[13],5,-1444681467),a=p(a,r,n,i,e[2],9,-51403784),i=p(i,a,r,n,e[7],14,1735328473),r=g(r,n=p(n,i,a,r,e[12],20,-1926607734),i,a,e[5],4,-378558),a=g(a,r,n,i,e[8],11,-2022574463),i=g(i,a,r,n,e[11],16,1839030562),n=g(n,i,a,r,e[14],23,-35309556),r=g(r,n,i,a,e[1],4,-1530992060),a=g(a,r,n,i,e[4],11,1272893353),i=g(i,a,r,n,e[7],16,-155497632),n=g(n,i,a,r,e[10],23,-1094730640),r=g(r,n,i,a,e[13],4,681279174),a=g(a,r,n,i,e[0],11,-358537222),i=g(i,a,r,n,e[3],16,-722521979),n=g(n,i,a,r,e[6],23,76029189),r=g(r,n,i,a,e[9],4,-640364487),a=g(a,r,n,i,e[12],11,-421815835),i=g(i,a,r,n,e[15],16,530742520),r=m(r,n=g(n,i,a,r,e[2],23,-995338651),i,a,e[0],6,-198630844),a=m(a,r,n,i,e[7],10,1126891415),i=m(i,a,r,n,e[14],15,-1416354905),n=m(n,i,a,r,e[5],21,-57434055),r=m(r,n,i,a,e[12],6,1700485571),a=m(a,r,n,i,e[3],10,-1894986606),i=m(i,a,r,n,e[10],15,-1051523),n=m(n,i,a,r,e[1],21,-2054922799),r=m(r,n,i,a,e[8],6,1873313359),a=m(a,r,n,i,e[15],10,-30611744),i=m(i,a,r,n,e[6],15,-1560198380),n=m(n,i,a,r,e[13],21,1309151649),r=m(r,n,i,a,e[4],6,-145523070),a=m(a,r,n,i,e[11],10,-1120210379),i=m(i,a,r,n,e[2],15,718787259),n=m(n,i,a,r,e[9],21,-343485551),t[0]=L(r,t[0]),t[1]=L(n,t[1]),t[2]=L(i,t[2]),t[3]=L(a,t[3])}function f(t,e,r,n,i,a){return e=L(L(e,t),L(n,a)),L(e<>>32-i,r)}function d(t,e,r,n,i,a,o){return f(e&r|~e&n,t,e,i,a,o)}function p(t,e,r,n,i,a,o){return f(e&n|r&~n,t,e,i,a,o)}function g(t,e,r,n,i,a,o){return f(e^r^n,t,e,i,a,o)}function m(t,e,r,n,i,a,o){return f(r^(e|~n),t,e,i,a,o)}function v(t){var e,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)h(n,b(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(h(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*r,h(n,i),n}function b(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}s=e.atob.bind(e),u=e.btoa.bind(e);var y="0123456789abcdef".split("");function w(t){for(var e="",r=0;r<4;r++)e+=y[t>>8*r+4&15]+y[t>>8*r&15];return e}function N(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function A(t){return function(t){return t.map(N).join("")}(v(t))}function L(t,e){return t+e&4294967295}if("5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e>16)+(e>>16)+(r>>16)<<16|65535&r}} /** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */function x(t,e){var r,n,i,a;if(t!==r){for(var o=(i=t,a=1+(256/t.length>>0),new Array(a+1).join(i)),s=[],u=0;u<256;u++)s[u]=u;var c=0;for(u=0;u<256;u++){var l=s[u];c=(c+l+o.charCodeAt(u))%256,s[u]=s[c],s[c]=l}r=t,n=s}else s=n;var h=e.length,f=0,d=0,p="";for(u=0;u€/\f©þdSiz";let a=(e+this.padding).substr(0,32),o=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=A(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=x(this.encryptionKey,this.padding)}function P(t){if("object"!=typeof t)throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var r={};this.subscribe=function(t,e,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");r.hasOwnProperty(t)||(r[t]={});var i=Math.random().toString(35);return r[t][i]=[e,!!n],i},this.unsubscribe=function(t){for(var e in r)if(r[e][t])return delete r[e][t],0===Object.keys(r[e]).length&&delete r[e],!0;return!1},this.publish=function(i){if(r.hasOwnProperty(i)){var a=Array.prototype.slice.call(arguments,1),o=[];for(var s in r[i]){var u=r[i][s];try{u[0].apply(t,a)}catch(t){e.console&&n.error("jsPDF PubSub Error",t.message,t)}u[1]&&o.push(s)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return r}}function k(t){if(!(this instanceof k))return new k(t);var e="opacity,stroke-opacity".split(",");for(var r in t)t.hasOwnProperty(r)&&e.indexOf(r)>=0&&(this[r]=t[r]);this.id="",this.objectNumber=-1}function F(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function I(t,e,r,n,i){if(!(this instanceof I))return new I(t,e,r,n,i);this.type="axial"===t?2:3,this.coords=e,this.colors=r,F.call(this,n,i)}function C(t,e,r,n,i){if(!(this instanceof C))return new C(t,e,r,n,i);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,F.call(this,n,i)}function j(t){var r,i="string"==typeof arguments[0]?arguments[0]:"p",a=arguments[1],o=arguments[2],s=arguments[3],h=[],f=1,d=16,p="S",g=null;"object"==typeof(t=t||{})&&(i=t.orientation,a=t.unit||a,o=t.format||o,s=t.compress||t.compressPdf||s,null!==(g=t.encryption||null)&&(g.userPassword=g.userPassword||"",g.ownerPassword=g.ownerPassword||"",g.userPermissions=g.userPermissions||[]),f="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(r=t.precision),void 0!==t.floatPrecision&&(d=t.floatPrecision),p=t.defaultPathOperation||"S"),h=t.filters||(!0===s?["FlateEncode"]:h),a=a||"mm",i=(""+(i||"P")).toLowerCase();var m=t.putOnlyUsedFonts||!1,v={},b={internal:{},__private__:{}};b.__private__.PubSub=P;var y="1.3",w=b.__private__.getPdfVersion=function(){return y};b.__private__.setPdfVersion=function(t){y=t};var N={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};b.__private__.getPageFormats=function(){return N};var A=b.__private__.getPageFormat=function(t){return N[t]};o=o||"a4";var L={COMPAT:"compat",ADVANCED:"advanced"},x=L.COMPAT;function S(){this.saveGraphicsState(),ct(new Ht(xt,0,0,-xt,0,Er()*xt).toString()+" cm"),this.setFontSize(this.getFontSize()/xt),p="n",x=L.ADVANCED}function F(){this.restoreGraphicsState(),p="S",x=L.COMPAT}var O=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&t!==e&&(t=400==e?"italic"==t?"italic":"normal":700==e&&"italic"!==t?"bold":t+""+e),t};b.advancedAPI=function(t){var e=x===L.COMPAT;return e&&S.call(this),"function"!=typeof t||(t(this),e&&F.call(this)),this},b.compatAPI=function(t){var e=x===L.ADVANCED;return e&&F.call(this),"function"!=typeof t||(t(this),e&&S.call(this)),this},b.isAdvancedAPI=function(){return x===L.ADVANCED};var B,M=function(t){if(x!==L.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},E=b.roundToPrecision=b.__private__.roundToPrecision=function(t,e){var n=r||e;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};B=b.hpf=b.__private__.hpf="number"==typeof d?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return E(t,d)}:"smart"===d?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return E(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return E(t,16)};var q=b.f2=b.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return E(t,2)},R=b.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return E(t,3)},T=b.scale=b.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return x===L.COMPAT?t*xt:x===L.ADVANCED?t:void 0},D=function(t){return x===L.COMPAT?Er()-t:x===L.ADVANCED?t:void 0},U=function(t){return T(D(t))};b.__private__.setPrecision=b.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(r=parseInt(t,10))};var z,H="00000000000000000000000000000000",W=b.__private__.getFileId=function(){return H},V=b.__private__.setFileId=function(t){return H=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():H.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==g&&(Ve=new _(g.userPermissions,g.userPassword,g.ownerPassword,H)),H};b.setFileId=function(t){return V(t),this},b.getFileId=function(){return W()};var G=b.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),r=e<0?"+":"-",n=Math.floor(Math.abs(e/60)),i=Math.abs(e%60),a=[r,Z(n),"'",Z(i),"'"].join("");return["D:",t.getFullYear(),Z(t.getMonth()+1),Z(t.getDate()),Z(t.getHours()),Z(t.getMinutes()),Z(t.getSeconds()),a].join("")},Y=b.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),r=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),a=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(e,r,n,i,a,o,0)},J=b.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=G(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return z=e},X=b.__private__.getCreationDate=function(t){var e=z;return"jsDate"===t&&(e=Y(z)),e};b.setCreationDate=function(t){return J(t),this},b.getCreationDate=function(t){return X(t)};var K,Z=b.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},$=b.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},Q=0,tt=[],et=[],rt=0,nt=[],it=[],at=!1,ot=et,st=function(){Q=0,rt=0,et=[],tt=[],nt=[],Zt=Jt(),$t=Jt()};b.__private__.setCustomOutputDestination=function(t){at=!0,ot=t};var ut=function(t){at||(ot=t)};b.__private__.resetCustomOutputDestination=function(){at=!1,ot=et};var ct=b.__private__.out=function(t){return t=t.toString(),rt+=t.length+1,ot.push(t),ot},lt=b.__private__.write=function(t){return ct(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},ht=b.__private__.getArrayBuffer=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r);e--;)n[e]=t.charCodeAt(e);return r},ft=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];b.__private__.getStandardFonts=function(){return ft};var dt=t.fontSize||16;b.__private__.setFontSize=b.setFontSize=function(t){return dt=x===L.ADVANCED?t/xt:t,this};var pt,gt=b.__private__.getFontSize=b.getFontSize=function(){return x===L.COMPAT?dt:dt*xt},mt=t.R2L||!1;b.__private__.setR2L=b.setR2L=function(t){return mt=t,this},b.__private__.getR2L=b.getR2L=function(){return mt};var vt,bt=b.__private__.setZoomMode=function(t){var e=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(t))pt=t;else if(isNaN(t)){if(-1===e.indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');pt=t}else pt=parseInt(t,10)};b.__private__.getZoomMode=function(){return pt};var yt,wt=b.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');vt=t};b.__private__.getPageMode=function(){return vt};var Nt=b.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');yt=t};b.__private__.getLayoutMode=function(){return yt},b.__private__.setDisplayMode=b.setDisplayMode=function(t,e,r){return bt(t),Nt(e),wt(r),this};var At={title:"",subject:"",author:"",keywords:"",creator:""};b.__private__.getDocumentProperty=function(t){if(-1===Object.keys(At).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return At[t]},b.__private__.getDocumentProperties=function(){return At},b.__private__.setDocumentProperties=b.setProperties=b.setDocumentProperties=function(t){for(var e in At)At.hasOwnProperty(e)&&t[e]&&(At[e]=t[e]);return this},b.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(At).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return At[t]=e};var Lt,xt,St,_t,Pt,kt={},Ft={},It=[],Ct={},jt={},Ot={},Bt={},Mt=null,Et=0,qt=[],Rt=new P(b),Tt=t.hotfixes||[],Dt={},Ut={},zt=[],Ht=function(t,e,r,n,i,a){if(!(this instanceof Ht))return new Ht(t,e,r,n,i,a);isNaN(t)&&(t=1),isNaN(e)&&(e=0),isNaN(r)&&(r=0),isNaN(n)&&(n=1),isNaN(i)&&(i=0),isNaN(a)&&(a=0),this._matrix=[t,e,r,n,i,a]};Object.defineProperty(Ht.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Ht.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Ht.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Ht.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Ht.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Ht.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Ht.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Ht.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Ht.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Ht.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Ht.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Ht.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Ht.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ht.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ht.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ht.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),Ht.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(B).join(t)},Ht.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,r=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,a=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new Ht(e,r,n,i,a,o)},Ht.prototype.decompose=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(t*t+e*e),s=(t/=o)*r+(e/=o)*n;r-=t*s,n-=e*s;var u=Math.sqrt(r*r+n*n);return s/=u,t*(n/=u)>16&255,n=u>>8&255,i=255&u}if(void 0===n||void 0===a&&r===n&&n===i)if("string"==typeof r)e=r+" "+o[0];else switch(t.precision){case 2:e=q(r/255)+" "+o[0];break;case 3:default:e=R(r/255)+" "+o[0]}else if(void 0===a||"object"==typeof a){if(a&&!isNaN(a.a)&&0===a.a)return e=["1.","1.","1.",o[1]].join(" ");if("string"==typeof r)e=[r,n,i,o[1]].join(" ");else switch(t.precision){case 2:e=[q(r/255),q(n/255),q(i/255),o[1]].join(" ");break;default:case 3:e=[R(r/255),R(n/255),R(i/255),o[1]].join(" ")}}else if("string"==typeof r)e=[r,n,i,a,o[2]].join(" ");else switch(t.precision){case 2:e=[q(r),q(n),q(i),q(a),o[2]].join(" ");break;case 3:default:e=[R(r),R(n),R(i),R(a),o[2]].join(" ")}return e},ee=b.__private__.getFilters=function(){return h},re=b.__private__.putStream=function(t){var e=(t=t||{}).data||"",r=t.filters||ee(),n=t.alreadyAppliedFilters||[],i=t.addLength1||!1,a=e.length,o=t.objectId,s=function(t){return t};if(null!==g&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==g&&(s=Ve.encryptor(o,0));var u={};!0===r&&(r=["FlateEncode"]);var c=t.additionalKeyValues||[],l=(u=void 0!==j.API.processDataByFilters?j.API.processDataByFilters(e,r):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==u.data.length&&(c.push({key:"Length",value:u.data.length}),!0===i&&c.push({key:"Length1",value:a})),0!=l.length)if(l.split("/").length-1==1)c.push({key:"Filter",value:l});else{c.push({key:"Filter",value:"["+l+"]"});for(var h=0;h>"),0!==u.data.length&&(ct("stream"),ct(s(u.data)),ct("endstream"))},ne=b.__private__.putPage=function(t){var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;Xt(n,!0),ct("<>"),ct("endobj");var a=r.join("\n");return x===L.ADVANCED&&(a+="\nQ"),Xt(i,!0),re({data:a,filters:ee(),objectId:i}),ct("endobj"),n},ie=b.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=Et;t++)qt[t].objId=Jt(),qt[t].contentsObjId=Jt();for(t=1;t<=Et;t++)r.push(ne({number:t,data:it[t],objId:qt[t].objId,contentsObjId:qt[t].contentsObjId,mediaBox:qt[t].mediaBox,cropBox:qt[t].cropBox,bleedBox:qt[t].bleedBox,trimBox:qt[t].trimBox,artBox:qt[t].artBox,userUnit:qt[t].userUnit,rootDictionaryObjId:Zt,resourceDictionaryObjId:$t}));Xt(Zt,!0),ct("<>"),ct("endobj"),Rt.publish("postPutPages")},ae=function(t){var e=function(t,e){return-1!==t.indexOf(" ")?"("+Fe(t,e)+")":Fe(t,e)};Rt.publish("putFont",{font:t,out:ct,newObject:Yt,putStream:re,pdfEscapeWithNeededParanthesis:e}),!0!==t.isAlreadyPutted&&(t.objectNumber=Yt(),ct("<<"),ct("/Type /Font"),ct("/BaseFont /"+e(t.postScriptName)),ct("/Subtype /Type1"),"string"==typeof t.encoding&&ct("/Encoding /"+t.encoding),ct("/FirstChar 32"),ct("/LastChar 255"),ct(">>"),ct("endobj"))},oe=function(){for(var t in kt)kt.hasOwnProperty(t)&&(!1===m||!0===m&&v.hasOwnProperty(t))&&ae(kt[t])},se=function(t){t.objectNumber=Yt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[B(t.x),B(t.y),B(t.x+t.width),B(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var r=t.pages[1].join("\n");re({data:r,additionalKeyValues:e,objectId:t.objectNumber}),ct("endobj")},ue=function(){for(var t in Dt)Dt.hasOwnProperty(t)&&se(Dt[t])},ce=function(t,e){var r,n=[],i=1/(e-1);for(r=0;r<1;r+=i)n.push(r);if(n.push(1),0!=t[0].offset){var a={offset:0,color:t[0].color};t.unshift(a)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var s="",u=0,c=0;ct[u+1].offset;)u++;var l=t[u].offset,h=(r-l)/(t[u+1].offset-l),f=t[u].color,d=t[u+1].color;s+=$(Math.round((1-h)*f[0]+h*d[0]).toString(16))+$(Math.round((1-h)*f[1]+h*d[1]).toString(16))+$(Math.round((1-h)*f[2]+h*d[2]).toString(16))}return s.trim()},le=function(t,e){e||(e=21);var r=Yt(),n=ce(t.colors,e),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+e+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),re({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:r}),ct("endobj"),t.objectNumber=Yt(),ct("<< /ShadingType "+t.type),ct("/ColorSpace /DeviceRGB");var a="/Coords ["+B(parseFloat(t.coords[0]))+" "+B(parseFloat(t.coords[1]))+" ";2===t.type?a+=B(parseFloat(t.coords[2]))+" "+B(parseFloat(t.coords[3])):a+=B(parseFloat(t.coords[2]))+" "+B(parseFloat(t.coords[3]))+" "+B(parseFloat(t.coords[4]))+" "+B(parseFloat(t.coords[5])),ct(a+="]"),t.matrix&&ct("/Matrix ["+t.matrix.toString()+"]"),ct("/Function "+r+" 0 R"),ct("/Extend [true true]"),ct(">>"),ct("endobj")},he=function(t,e){var r=Jt(),n=Yt();e.push({resourcesOid:r,objectOid:n}),t.objectNumber=n;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(B).join(" ")+"]"}),i.push({key:"XStep",value:B(t.xStep)}),i.push({key:"YStep",value:B(t.yStep)}),i.push({key:"Resources",value:r+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),re({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),ct("endobj")},fe=function(t){var e;for(e in Ct)Ct.hasOwnProperty(e)&&(Ct[e]instanceof I?le(Ct[e]):Ct[e]instanceof C&&he(Ct[e],t))},de=function(t){for(var e in t.objectNumber=Yt(),ct("<<"),t)switch(e){case"opacity":ct("/ca "+q(t[e]));break;case"stroke-opacity":ct("/CA "+q(t[e]))}ct(">>"),ct("endobj")},pe=function(){var t;for(t in Ot)Ot.hasOwnProperty(t)&&de(Ot[t])},ge=function(){for(var t in ct("/XObject <<"),Dt)Dt.hasOwnProperty(t)&&Dt[t].objectNumber>=0&&ct("/"+t+" "+Dt[t].objectNumber+" 0 R");Rt.publish("putXobjectDict"),ct(">>")},me=function(){Ve.oid=Yt(),ct("<<"),ct("/Filter /Standard"),ct("/V "+Ve.v),ct("/R "+Ve.r),ct("/U <"+Ve.toHexString(Ve.U)+">"),ct("/O <"+Ve.toHexString(Ve.O)+">"),ct("/P "+Ve.P),ct(">>"),ct("endobj")},ve=function(){for(var t in ct("/Font <<"),kt)kt.hasOwnProperty(t)&&(!1===m||!0===m&&v.hasOwnProperty(t))&&ct("/"+t+" "+kt[t].objectNumber+" 0 R");ct(">>")},be=function(){if(Object.keys(Ct).length>0){for(var t in ct("/Shading <<"),Ct)Ct.hasOwnProperty(t)&&Ct[t]instanceof I&&Ct[t].objectNumber>=0&&ct("/"+t+" "+Ct[t].objectNumber+" 0 R");Rt.publish("putShadingPatternDict"),ct(">>")}},ye=function(t){if(Object.keys(Ct).length>0){for(var e in ct("/Pattern <<"),Ct)Ct.hasOwnProperty(e)&&Ct[e]instanceof b.TilingPattern&&Ct[e].objectNumber>=0&&Ct[e].objectNumber>")}},we=function(){if(Object.keys(Ot).length>0){var t;for(t in ct("/ExtGState <<"),Ot)Ot.hasOwnProperty(t)&&Ot[t].objectNumber>=0&&ct("/"+t+" "+Ot[t].objectNumber+" 0 R");Rt.publish("putGStateDict"),ct(">>")}},Ne=function(t){Xt(t.resourcesOid,!0),ct("<<"),ct("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ve(),be(),ye(t.objectOid),we(),ge(),ct(">>"),ct("endobj")},Ae=function(){var t=[];oe(),pe(),ue(),fe(t),Rt.publish("putResources"),t.forEach(Ne),Ne({resourcesOid:$t,objectOid:Number.MAX_SAFE_INTEGER}),Rt.publish("postPutResources")},Le=function(){Rt.publish("putAdditionalObjects");for(var t=0;t>8&&(u=!0);t=s.join("")}for(r=t.length;void 0===u&&0!==r;)t.charCodeAt(r-1)>>8&&(u=!0),r--;if(!u)return t;for(s=e.noBOM?[]:[254,255],r=0,n=t.length;r>8)>>8)throw new Error("Character at position "+r+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(l),s.push(c-(l<<8))}return String.fromCharCode.apply(void 0,s)},Fe=b.__private__.pdfEscape=b.pdfEscape=function(t,e){return ke(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ie=b.__private__.beginPage=function(t){it[++Et]=[],qt[Et]={objId:0,contentsObjId:0,userUnit:Number(f),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},Oe(Et),ut(it[K])},Ce=function(t,e){var r,a,s;switch(i=e||i,"string"==typeof t&&(r=A(t.toLowerCase()),Array.isArray(r)&&(a=r[0],s=r[1])),Array.isArray(t)&&(a=t[0]*xt,s=t[1]*xt),isNaN(a)&&(a=o[0],s=o[1]),(a>14400||s>14400)&&(n.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),a=Math.min(14400,a),s=Math.min(14400,s)),o=[a,s],i.substr(0,1)){case"l":s>a&&(o=[s,a]);break;case"p":a>s&&(o=[s,a])}Ie(o),hr(lr),ct(yr),0!==Sr&&ct(Sr+" J"),0!==_r&&ct(_r+" j"),Rt.publish("addPage",{pageNumber:Et})},je=function(t){t>0&&t<=Et&&(it.splice(t,1),qt.splice(t,1),Et--,K>Et&&(K=Et),this.setPage(K))},Oe=function(t){t>0&&t<=Et&&(K=t)},Be=b.__private__.getNumberOfPages=b.getNumberOfPages=function(){return it.length-1},Me=function(t,e,r){var i,a=void 0;return r=r||{},t=void 0!==t?t:kt[Lt].fontName,e=void 0!==e?e:kt[Lt].fontStyle,i=t.toLowerCase(),void 0!==Ft[i]&&void 0!==Ft[i][e]?a=Ft[i][e]:void 0!==Ft[t]&&void 0!==Ft[t][e]?a=Ft[t][e]:!1===r.disableWarning&&n.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),a||r.noFallback||null==(a=Ft.times[e])&&(a=Ft.times.normal),a},Ee=b.__private__.putInfo=function(){var t=Yt(),e=function(t){return t};for(var r in null!==g&&(e=Ve.encryptor(t,0)),ct("<<"),ct("/Producer ("+Fe(e("jsPDF "+j.version))+")"),At)At.hasOwnProperty(r)&&At[r]&&ct("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+Fe(e(At[r]))+")");ct("/CreationDate ("+Fe(e(z))+")"),ct(">>"),ct("endobj")},qe=b.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Zt;switch(Yt(),ct("<<"),ct("/Type /Catalog"),ct("/Pages "+e+" 0 R"),pt||(pt="fullwidth"),pt){case"fullwidth":ct("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ct("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ct("/OpenAction [3 0 R /Fit]");break;case"original":ct("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+pt;"%"===r.substr(r.length-1)&&(pt=parseInt(pt)/100),"number"==typeof pt&&ct("/OpenAction [3 0 R /XYZ null null "+q(pt)+"]")}switch(yt||(yt="continuous"),yt){case"continuous":ct("/PageLayout /OneColumn");break;case"single":ct("/PageLayout /SinglePage");break;case"two":case"twoleft":ct("/PageLayout /TwoColumnLeft");break;case"tworight":ct("/PageLayout /TwoColumnRight")}vt&&ct("/PageMode /"+vt),Rt.publish("putCatalog"),ct(">>"),ct("endobj")},Re=b.__private__.putTrailer=function(){ct("trailer"),ct("<<"),ct("/Size "+(Q+1)),ct("/Root "+Q+" 0 R"),ct("/Info "+(Q-1)+" 0 R"),null!==g&&ct("/Encrypt "+Ve.oid+" 0 R"),ct("/ID [ <"+H+"> <"+H+"> ]"),ct(">>")},Te=b.__private__.putHeader=function(){ct("%PDF-"+y),ct("%ºß¬à")},De=b.__private__.putXRef=function(){var t="0000000000";ct("xref"),ct("0 "+(Q+1)),ct("0000000000 65535 f ");for(var e=1;e<=Q;e++){"function"==typeof tt[e]?ct((t+tt[e]()).slice(-10)+" 00000 n "):void 0!==tt[e]?ct((t+tt[e]).slice(-10)+" 00000 n "):ct("0000000000 00000 n ")}},Ue=b.__private__.buildDocument=function(){st(),ut(et),Rt.publish("buildDocument"),Te(),ie(),Le(),Ae(),null!==g&&me(),Ee(),qe();var t=rt;return De(),Re(),ct("startxref"),ct(""+t),ct("%%EOF"),ut(it[K]),et.join("\n")},ze=b.__private__.getBlob=function(t){return new Blob([ht(t)],{type:"application/pdf"})},He=b.output=b.__private__.output=Pe((function(t,r){switch("string"==typeof(r=r||{})?r={filename:r}:r.filename=r.filename||"generated.pdf",t){case void 0:return Ue();case"save":b.save(r.filename);break;case"arraybuffer":return ht(Ue());case"blob":return ze(Ue());case"bloburi":case"bloburl":if(void 0!==e.URL&&"function"==typeof e.URL.createObjectURL)return e.URL&&e.URL.createObjectURL(ze(Ue()))||void 0;n.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var i="",a=Ue();try{i=u(a)}catch(t){i=u(unescape(encodeURIComponent(a)))}return"data:application/pdf;filename="+r.filename+";base64,"+i;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(e)){var o='