UNPKG

110 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
3 typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
5}(this, (function ($) { 'use strict';
6
7 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
9 var $__default = /*#__PURE__*/_interopDefaultLegacy($);
10
11 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
12
13 function createCommonjsModule(fn, module) {
14 return module = { exports: {} }, fn(module, module.exports), module.exports;
15 }
16
17 var check = function (it) {
18 return it && it.Math == Math && it;
19 };
20
21 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
22 var global_1 =
23 // eslint-disable-next-line no-undef
24 check(typeof globalThis == 'object' && globalThis) ||
25 check(typeof window == 'object' && window) ||
26 check(typeof self == 'object' && self) ||
27 check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
28 // eslint-disable-next-line no-new-func
29 (function () { return this; })() || Function('return this')();
30
31 var fails = function (exec) {
32 try {
33 return !!exec();
34 } catch (error) {
35 return true;
36 }
37 };
38
39 // Thank's IE8 for his funny defineProperty
40 var descriptors = !fails(function () {
41 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
42 });
43
44 var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
45 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
46
47 // Nashorn ~ JDK8 bug
48 var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
49
50 // `Object.prototype.propertyIsEnumerable` method implementation
51 // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
52 var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
53 var descriptor = getOwnPropertyDescriptor(this, V);
54 return !!descriptor && descriptor.enumerable;
55 } : nativePropertyIsEnumerable;
56
57 var objectPropertyIsEnumerable = {
58 f: f
59 };
60
61 var createPropertyDescriptor = function (bitmap, value) {
62 return {
63 enumerable: !(bitmap & 1),
64 configurable: !(bitmap & 2),
65 writable: !(bitmap & 4),
66 value: value
67 };
68 };
69
70 var toString = {}.toString;
71
72 var classofRaw = function (it) {
73 return toString.call(it).slice(8, -1);
74 };
75
76 var split = ''.split;
77
78 // fallback for non-array-like ES3 and non-enumerable old V8 strings
79 var indexedObject = fails(function () {
80 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
81 // eslint-disable-next-line no-prototype-builtins
82 return !Object('z').propertyIsEnumerable(0);
83 }) ? function (it) {
84 return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
85 } : Object;
86
87 // `RequireObjectCoercible` abstract operation
88 // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
89 var requireObjectCoercible = function (it) {
90 if (it == undefined) throw TypeError("Can't call method on " + it);
91 return it;
92 };
93
94 // toObject with fallback for non-array-like ES3 strings
95
96
97
98 var toIndexedObject = function (it) {
99 return indexedObject(requireObjectCoercible(it));
100 };
101
102 var isObject = function (it) {
103 return typeof it === 'object' ? it !== null : typeof it === 'function';
104 };
105
106 // `ToPrimitive` abstract operation
107 // https://tc39.github.io/ecma262/#sec-toprimitive
108 // instead of the ES6 spec version, we didn't implement @@toPrimitive case
109 // and the second argument - flag - preferred type is a string
110 var toPrimitive = function (input, PREFERRED_STRING) {
111 if (!isObject(input)) return input;
112 var fn, val;
113 if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
114 if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
115 if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
116 throw TypeError("Can't convert object to primitive value");
117 };
118
119 var hasOwnProperty = {}.hasOwnProperty;
120
121 var has = function (it, key) {
122 return hasOwnProperty.call(it, key);
123 };
124
125 var document$1 = global_1.document;
126 // typeof document.createElement is 'object' in old IE
127 var EXISTS = isObject(document$1) && isObject(document$1.createElement);
128
129 var documentCreateElement = function (it) {
130 return EXISTS ? document$1.createElement(it) : {};
131 };
132
133 // Thank's IE8 for his funny defineProperty
134 var ie8DomDefine = !descriptors && !fails(function () {
135 return Object.defineProperty(documentCreateElement('div'), 'a', {
136 get: function () { return 7; }
137 }).a != 7;
138 });
139
140 var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
141
142 // `Object.getOwnPropertyDescriptor` method
143 // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
144 var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
145 O = toIndexedObject(O);
146 P = toPrimitive(P, true);
147 if (ie8DomDefine) try {
148 return nativeGetOwnPropertyDescriptor(O, P);
149 } catch (error) { /* empty */ }
150 if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
151 };
152
153 var objectGetOwnPropertyDescriptor = {
154 f: f$1
155 };
156
157 var anObject = function (it) {
158 if (!isObject(it)) {
159 throw TypeError(String(it) + ' is not an object');
160 } return it;
161 };
162
163 var nativeDefineProperty = Object.defineProperty;
164
165 // `Object.defineProperty` method
166 // https://tc39.github.io/ecma262/#sec-object.defineproperty
167 var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
168 anObject(O);
169 P = toPrimitive(P, true);
170 anObject(Attributes);
171 if (ie8DomDefine) try {
172 return nativeDefineProperty(O, P, Attributes);
173 } catch (error) { /* empty */ }
174 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
175 if ('value' in Attributes) O[P] = Attributes.value;
176 return O;
177 };
178
179 var objectDefineProperty = {
180 f: f$2
181 };
182
183 var createNonEnumerableProperty = descriptors ? function (object, key, value) {
184 return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
185 } : function (object, key, value) {
186 object[key] = value;
187 return object;
188 };
189
190 var setGlobal = function (key, value) {
191 try {
192 createNonEnumerableProperty(global_1, key, value);
193 } catch (error) {
194 global_1[key] = value;
195 } return value;
196 };
197
198 var SHARED = '__core-js_shared__';
199 var store = global_1[SHARED] || setGlobal(SHARED, {});
200
201 var sharedStore = store;
202
203 var functionToString = Function.toString;
204
205 // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
206 if (typeof sharedStore.inspectSource != 'function') {
207 sharedStore.inspectSource = function (it) {
208 return functionToString.call(it);
209 };
210 }
211
212 var inspectSource = sharedStore.inspectSource;
213
214 var WeakMap = global_1.WeakMap;
215
216 var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
217
218 var shared = createCommonjsModule(function (module) {
219 (module.exports = function (key, value) {
220 return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
221 })('versions', []).push({
222 version: '3.8.1',
223 mode: 'global',
224 copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
225 });
226 });
227
228 var id = 0;
229 var postfix = Math.random();
230
231 var uid = function (key) {
232 return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
233 };
234
235 var keys = shared('keys');
236
237 var sharedKey = function (key) {
238 return keys[key] || (keys[key] = uid(key));
239 };
240
241 var hiddenKeys = {};
242
243 var WeakMap$1 = global_1.WeakMap;
244 var set, get, has$1;
245
246 var enforce = function (it) {
247 return has$1(it) ? get(it) : set(it, {});
248 };
249
250 var getterFor = function (TYPE) {
251 return function (it) {
252 var state;
253 if (!isObject(it) || (state = get(it)).type !== TYPE) {
254 throw TypeError('Incompatible receiver, ' + TYPE + ' required');
255 } return state;
256 };
257 };
258
259 if (nativeWeakMap) {
260 var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
261 var wmget = store$1.get;
262 var wmhas = store$1.has;
263 var wmset = store$1.set;
264 set = function (it, metadata) {
265 metadata.facade = it;
266 wmset.call(store$1, it, metadata);
267 return metadata;
268 };
269 get = function (it) {
270 return wmget.call(store$1, it) || {};
271 };
272 has$1 = function (it) {
273 return wmhas.call(store$1, it);
274 };
275 } else {
276 var STATE = sharedKey('state');
277 hiddenKeys[STATE] = true;
278 set = function (it, metadata) {
279 metadata.facade = it;
280 createNonEnumerableProperty(it, STATE, metadata);
281 return metadata;
282 };
283 get = function (it) {
284 return has(it, STATE) ? it[STATE] : {};
285 };
286 has$1 = function (it) {
287 return has(it, STATE);
288 };
289 }
290
291 var internalState = {
292 set: set,
293 get: get,
294 has: has$1,
295 enforce: enforce,
296 getterFor: getterFor
297 };
298
299 var redefine = createCommonjsModule(function (module) {
300 var getInternalState = internalState.get;
301 var enforceInternalState = internalState.enforce;
302 var TEMPLATE = String(String).split('String');
303
304 (module.exports = function (O, key, value, options) {
305 var unsafe = options ? !!options.unsafe : false;
306 var simple = options ? !!options.enumerable : false;
307 var noTargetGet = options ? !!options.noTargetGet : false;
308 var state;
309 if (typeof value == 'function') {
310 if (typeof key == 'string' && !has(value, 'name')) {
311 createNonEnumerableProperty(value, 'name', key);
312 }
313 state = enforceInternalState(value);
314 if (!state.source) {
315 state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
316 }
317 }
318 if (O === global_1) {
319 if (simple) O[key] = value;
320 else setGlobal(key, value);
321 return;
322 } else if (!unsafe) {
323 delete O[key];
324 } else if (!noTargetGet && O[key]) {
325 simple = true;
326 }
327 if (simple) O[key] = value;
328 else createNonEnumerableProperty(O, key, value);
329 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
330 })(Function.prototype, 'toString', function toString() {
331 return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
332 });
333 });
334
335 var path = global_1;
336
337 var aFunction = function (variable) {
338 return typeof variable == 'function' ? variable : undefined;
339 };
340
341 var getBuiltIn = function (namespace, method) {
342 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
343 : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
344 };
345
346 var ceil = Math.ceil;
347 var floor = Math.floor;
348
349 // `ToInteger` abstract operation
350 // https://tc39.github.io/ecma262/#sec-tointeger
351 var toInteger = function (argument) {
352 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
353 };
354
355 var min = Math.min;
356
357 // `ToLength` abstract operation
358 // https://tc39.github.io/ecma262/#sec-tolength
359 var toLength = function (argument) {
360 return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
361 };
362
363 var max = Math.max;
364 var min$1 = Math.min;
365
366 // Helper for a popular repeating case of the spec:
367 // Let integer be ? ToInteger(index).
368 // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
369 var toAbsoluteIndex = function (index, length) {
370 var integer = toInteger(index);
371 return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
372 };
373
374 // `Array.prototype.{ indexOf, includes }` methods implementation
375 var createMethod = function (IS_INCLUDES) {
376 return function ($this, el, fromIndex) {
377 var O = toIndexedObject($this);
378 var length = toLength(O.length);
379 var index = toAbsoluteIndex(fromIndex, length);
380 var value;
381 // Array#includes uses SameValueZero equality algorithm
382 // eslint-disable-next-line no-self-compare
383 if (IS_INCLUDES && el != el) while (length > index) {
384 value = O[index++];
385 // eslint-disable-next-line no-self-compare
386 if (value != value) return true;
387 // Array#indexOf ignores holes, Array#includes - not
388 } else for (;length > index; index++) {
389 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
390 } return !IS_INCLUDES && -1;
391 };
392 };
393
394 var arrayIncludes = {
395 // `Array.prototype.includes` method
396 // https://tc39.github.io/ecma262/#sec-array.prototype.includes
397 includes: createMethod(true),
398 // `Array.prototype.indexOf` method
399 // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
400 indexOf: createMethod(false)
401 };
402
403 var indexOf = arrayIncludes.indexOf;
404
405
406 var objectKeysInternal = function (object, names) {
407 var O = toIndexedObject(object);
408 var i = 0;
409 var result = [];
410 var key;
411 for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
412 // Don't enum bug & hidden keys
413 while (names.length > i) if (has(O, key = names[i++])) {
414 ~indexOf(result, key) || result.push(key);
415 }
416 return result;
417 };
418
419 // IE8- don't enum bug keys
420 var enumBugKeys = [
421 'constructor',
422 'hasOwnProperty',
423 'isPrototypeOf',
424 'propertyIsEnumerable',
425 'toLocaleString',
426 'toString',
427 'valueOf'
428 ];
429
430 var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
431
432 // `Object.getOwnPropertyNames` method
433 // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
434 var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
435 return objectKeysInternal(O, hiddenKeys$1);
436 };
437
438 var objectGetOwnPropertyNames = {
439 f: f$3
440 };
441
442 var f$4 = Object.getOwnPropertySymbols;
443
444 var objectGetOwnPropertySymbols = {
445 f: f$4
446 };
447
448 // all object keys, includes non-enumerable and symbols
449 var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
450 var keys = objectGetOwnPropertyNames.f(anObject(it));
451 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
452 return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
453 };
454
455 var copyConstructorProperties = function (target, source) {
456 var keys = ownKeys(source);
457 var defineProperty = objectDefineProperty.f;
458 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
459 for (var i = 0; i < keys.length; i++) {
460 var key = keys[i];
461 if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
462 }
463 };
464
465 var replacement = /#|\.prototype\./;
466
467 var isForced = function (feature, detection) {
468 var value = data[normalize(feature)];
469 return value == POLYFILL ? true
470 : value == NATIVE ? false
471 : typeof detection == 'function' ? fails(detection)
472 : !!detection;
473 };
474
475 var normalize = isForced.normalize = function (string) {
476 return String(string).replace(replacement, '.').toLowerCase();
477 };
478
479 var data = isForced.data = {};
480 var NATIVE = isForced.NATIVE = 'N';
481 var POLYFILL = isForced.POLYFILL = 'P';
482
483 var isForced_1 = isForced;
484
485 var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
486
487
488
489
490
491
492 /*
493 options.target - name of the target object
494 options.global - target is the global object
495 options.stat - export as static methods of target
496 options.proto - export as prototype methods of target
497 options.real - real prototype method for the `pure` version
498 options.forced - export even if the native feature is available
499 options.bind - bind methods to the target, required for the `pure` version
500 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
501 options.unsafe - use the simple assignment of property instead of delete + defineProperty
502 options.sham - add a flag to not completely full polyfills
503 options.enumerable - export as enumerable property
504 options.noTargetGet - prevent calling a getter on target
505 */
506 var _export = function (options, source) {
507 var TARGET = options.target;
508 var GLOBAL = options.global;
509 var STATIC = options.stat;
510 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
511 if (GLOBAL) {
512 target = global_1;
513 } else if (STATIC) {
514 target = global_1[TARGET] || setGlobal(TARGET, {});
515 } else {
516 target = (global_1[TARGET] || {}).prototype;
517 }
518 if (target) for (key in source) {
519 sourceProperty = source[key];
520 if (options.noTargetGet) {
521 descriptor = getOwnPropertyDescriptor$1(target, key);
522 targetProperty = descriptor && descriptor.value;
523 } else targetProperty = target[key];
524 FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
525 // contained in target
526 if (!FORCED && targetProperty !== undefined) {
527 if (typeof sourceProperty === typeof targetProperty) continue;
528 copyConstructorProperties(sourceProperty, targetProperty);
529 }
530 // add a flag to not completely full polyfills
531 if (options.sham || (targetProperty && targetProperty.sham)) {
532 createNonEnumerableProperty(sourceProperty, 'sham', true);
533 }
534 // extend global
535 redefine(target, key, sourceProperty, options);
536 }
537 };
538
539 // `IsArray` abstract operation
540 // https://tc39.github.io/ecma262/#sec-isarray
541 var isArray = Array.isArray || function isArray(arg) {
542 return classofRaw(arg) == 'Array';
543 };
544
545 // `ToObject` abstract operation
546 // https://tc39.github.io/ecma262/#sec-toobject
547 var toObject = function (argument) {
548 return Object(requireObjectCoercible(argument));
549 };
550
551 var createProperty = function (object, key, value) {
552 var propertyKey = toPrimitive(key);
553 if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
554 else object[propertyKey] = value;
555 };
556
557 var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
558 // Chrome 38 Symbol has incorrect toString conversion
559 // eslint-disable-next-line no-undef
560 return !String(Symbol());
561 });
562
563 var useSymbolAsUid = nativeSymbol
564 // eslint-disable-next-line no-undef
565 && !Symbol.sham
566 // eslint-disable-next-line no-undef
567 && typeof Symbol.iterator == 'symbol';
568
569 var WellKnownSymbolsStore = shared('wks');
570 var Symbol$1 = global_1.Symbol;
571 var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
572
573 var wellKnownSymbol = function (name) {
574 if (!has(WellKnownSymbolsStore, name)) {
575 if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
576 else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
577 } return WellKnownSymbolsStore[name];
578 };
579
580 var SPECIES = wellKnownSymbol('species');
581
582 // `ArraySpeciesCreate` abstract operation
583 // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
584 var arraySpeciesCreate = function (originalArray, length) {
585 var C;
586 if (isArray(originalArray)) {
587 C = originalArray.constructor;
588 // cross-realm fallback
589 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
590 else if (isObject(C)) {
591 C = C[SPECIES];
592 if (C === null) C = undefined;
593 }
594 } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
595 };
596
597 var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
598
599 var process = global_1.process;
600 var versions = process && process.versions;
601 var v8 = versions && versions.v8;
602 var match, version;
603
604 if (v8) {
605 match = v8.split('.');
606 version = match[0] + match[1];
607 } else if (engineUserAgent) {
608 match = engineUserAgent.match(/Edge\/(\d+)/);
609 if (!match || match[1] >= 74) {
610 match = engineUserAgent.match(/Chrome\/(\d+)/);
611 if (match) version = match[1];
612 }
613 }
614
615 var engineV8Version = version && +version;
616
617 var SPECIES$1 = wellKnownSymbol('species');
618
619 var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
620 // We can't use this feature detection in V8 since it causes
621 // deoptimization and serious performance degradation
622 // https://github.com/zloirock/core-js/issues/677
623 return engineV8Version >= 51 || !fails(function () {
624 var array = [];
625 var constructor = array.constructor = {};
626 constructor[SPECIES$1] = function () {
627 return { foo: 1 };
628 };
629 return array[METHOD_NAME](Boolean).foo !== 1;
630 });
631 };
632
633 var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
634 var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
635 var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
636
637 // We can't use this feature detection in V8 since it causes
638 // deoptimization and serious performance degradation
639 // https://github.com/zloirock/core-js/issues/679
640 var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
641 var array = [];
642 array[IS_CONCAT_SPREADABLE] = false;
643 return array.concat()[0] !== array;
644 });
645
646 var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
647
648 var isConcatSpreadable = function (O) {
649 if (!isObject(O)) return false;
650 var spreadable = O[IS_CONCAT_SPREADABLE];
651 return spreadable !== undefined ? !!spreadable : isArray(O);
652 };
653
654 var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
655
656 // `Array.prototype.concat` method
657 // https://tc39.github.io/ecma262/#sec-array.prototype.concat
658 // with adding support of @@isConcatSpreadable and @@species
659 _export({ target: 'Array', proto: true, forced: FORCED }, {
660 concat: function concat(arg) { // eslint-disable-line no-unused-vars
661 var O = toObject(this);
662 var A = arraySpeciesCreate(O, 0);
663 var n = 0;
664 var i, k, length, len, E;
665 for (i = -1, length = arguments.length; i < length; i++) {
666 E = i === -1 ? O : arguments[i];
667 if (isConcatSpreadable(E)) {
668 len = toLength(E.length);
669 if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
670 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
671 } else {
672 if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
673 createProperty(A, n++, E);
674 }
675 }
676 A.length = n;
677 return A;
678 }
679 });
680
681 var aFunction$1 = function (it) {
682 if (typeof it != 'function') {
683 throw TypeError(String(it) + ' is not a function');
684 } return it;
685 };
686
687 // optional / simple context binding
688 var functionBindContext = function (fn, that, length) {
689 aFunction$1(fn);
690 if (that === undefined) return fn;
691 switch (length) {
692 case 0: return function () {
693 return fn.call(that);
694 };
695 case 1: return function (a) {
696 return fn.call(that, a);
697 };
698 case 2: return function (a, b) {
699 return fn.call(that, a, b);
700 };
701 case 3: return function (a, b, c) {
702 return fn.call(that, a, b, c);
703 };
704 }
705 return function (/* ...args */) {
706 return fn.apply(that, arguments);
707 };
708 };
709
710 var push = [].push;
711
712 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
713 var createMethod$1 = function (TYPE) {
714 var IS_MAP = TYPE == 1;
715 var IS_FILTER = TYPE == 2;
716 var IS_SOME = TYPE == 3;
717 var IS_EVERY = TYPE == 4;
718 var IS_FIND_INDEX = TYPE == 6;
719 var IS_FILTER_OUT = TYPE == 7;
720 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
721 return function ($this, callbackfn, that, specificCreate) {
722 var O = toObject($this);
723 var self = indexedObject(O);
724 var boundFunction = functionBindContext(callbackfn, that, 3);
725 var length = toLength(self.length);
726 var index = 0;
727 var create = specificCreate || arraySpeciesCreate;
728 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
729 var value, result;
730 for (;length > index; index++) if (NO_HOLES || index in self) {
731 value = self[index];
732 result = boundFunction(value, index, O);
733 if (TYPE) {
734 if (IS_MAP) target[index] = result; // map
735 else if (result) switch (TYPE) {
736 case 3: return true; // some
737 case 5: return value; // find
738 case 6: return index; // findIndex
739 case 2: push.call(target, value); // filter
740 } else switch (TYPE) {
741 case 4: return false; // every
742 case 7: push.call(target, value); // filterOut
743 }
744 }
745 }
746 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
747 };
748 };
749
750 var arrayIteration = {
751 // `Array.prototype.forEach` method
752 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
753 forEach: createMethod$1(0),
754 // `Array.prototype.map` method
755 // https://tc39.github.io/ecma262/#sec-array.prototype.map
756 map: createMethod$1(1),
757 // `Array.prototype.filter` method
758 // https://tc39.github.io/ecma262/#sec-array.prototype.filter
759 filter: createMethod$1(2),
760 // `Array.prototype.some` method
761 // https://tc39.github.io/ecma262/#sec-array.prototype.some
762 some: createMethod$1(3),
763 // `Array.prototype.every` method
764 // https://tc39.github.io/ecma262/#sec-array.prototype.every
765 every: createMethod$1(4),
766 // `Array.prototype.find` method
767 // https://tc39.github.io/ecma262/#sec-array.prototype.find
768 find: createMethod$1(5),
769 // `Array.prototype.findIndex` method
770 // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
771 findIndex: createMethod$1(6),
772 // `Array.prototype.filterOut` method
773 // https://github.com/tc39/proposal-array-filtering
774 filterOut: createMethod$1(7)
775 };
776
777 var defineProperty = Object.defineProperty;
778 var cache = {};
779
780 var thrower = function (it) { throw it; };
781
782 var arrayMethodUsesToLength = function (METHOD_NAME, options) {
783 if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
784 if (!options) options = {};
785 var method = [][METHOD_NAME];
786 var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
787 var argument0 = has(options, 0) ? options[0] : thrower;
788 var argument1 = has(options, 1) ? options[1] : undefined;
789
790 return cache[METHOD_NAME] = !!method && !fails(function () {
791 if (ACCESSORS && !descriptors) return true;
792 var O = { length: -1 };
793
794 if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
795 else O[1] = 1;
796
797 method.call(O, argument0, argument1);
798 });
799 };
800
801 var $filter = arrayIteration.filter;
802
803
804
805 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
806 // Edge 14- issue
807 var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
808
809 // `Array.prototype.filter` method
810 // https://tc39.github.io/ecma262/#sec-array.prototype.filter
811 // with adding support of @@species
812 _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
813 filter: function filter(callbackfn /* , thisArg */) {
814 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
815 }
816 });
817
818 // `Object.keys` method
819 // https://tc39.github.io/ecma262/#sec-object.keys
820 var objectKeys = Object.keys || function keys(O) {
821 return objectKeysInternal(O, enumBugKeys);
822 };
823
824 // `Object.defineProperties` method
825 // https://tc39.github.io/ecma262/#sec-object.defineproperties
826 var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
827 anObject(O);
828 var keys = objectKeys(Properties);
829 var length = keys.length;
830 var index = 0;
831 var key;
832 while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
833 return O;
834 };
835
836 var html = getBuiltIn('document', 'documentElement');
837
838 var GT = '>';
839 var LT = '<';
840 var PROTOTYPE = 'prototype';
841 var SCRIPT = 'script';
842 var IE_PROTO = sharedKey('IE_PROTO');
843
844 var EmptyConstructor = function () { /* empty */ };
845
846 var scriptTag = function (content) {
847 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
848 };
849
850 // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
851 var NullProtoObjectViaActiveX = function (activeXDocument) {
852 activeXDocument.write(scriptTag(''));
853 activeXDocument.close();
854 var temp = activeXDocument.parentWindow.Object;
855 activeXDocument = null; // avoid memory leak
856 return temp;
857 };
858
859 // Create object with fake `null` prototype: use iframe Object with cleared prototype
860 var NullProtoObjectViaIFrame = function () {
861 // Thrash, waste and sodomy: IE GC bug
862 var iframe = documentCreateElement('iframe');
863 var JS = 'java' + SCRIPT + ':';
864 var iframeDocument;
865 iframe.style.display = 'none';
866 html.appendChild(iframe);
867 // https://github.com/zloirock/core-js/issues/475
868 iframe.src = String(JS);
869 iframeDocument = iframe.contentWindow.document;
870 iframeDocument.open();
871 iframeDocument.write(scriptTag('document.F=Object'));
872 iframeDocument.close();
873 return iframeDocument.F;
874 };
875
876 // Check for document.domain and active x support
877 // No need to use active x approach when document.domain is not set
878 // see https://github.com/es-shims/es5-shim/issues/150
879 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
880 // avoid IE GC bug
881 var activeXDocument;
882 var NullProtoObject = function () {
883 try {
884 /* global ActiveXObject */
885 activeXDocument = document.domain && new ActiveXObject('htmlfile');
886 } catch (error) { /* ignore */ }
887 NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
888 var length = enumBugKeys.length;
889 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
890 return NullProtoObject();
891 };
892
893 hiddenKeys[IE_PROTO] = true;
894
895 // `Object.create` method
896 // https://tc39.github.io/ecma262/#sec-object.create
897 var objectCreate = Object.create || function create(O, Properties) {
898 var result;
899 if (O !== null) {
900 EmptyConstructor[PROTOTYPE] = anObject(O);
901 result = new EmptyConstructor();
902 EmptyConstructor[PROTOTYPE] = null;
903 // add "__proto__" for Object.getPrototypeOf polyfill
904 result[IE_PROTO] = O;
905 } else result = NullProtoObject();
906 return Properties === undefined ? result : objectDefineProperties(result, Properties);
907 };
908
909 var UNSCOPABLES = wellKnownSymbol('unscopables');
910 var ArrayPrototype = Array.prototype;
911
912 // Array.prototype[@@unscopables]
913 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
914 if (ArrayPrototype[UNSCOPABLES] == undefined) {
915 objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
916 configurable: true,
917 value: objectCreate(null)
918 });
919 }
920
921 // add a key to Array.prototype[@@unscopables]
922 var addToUnscopables = function (key) {
923 ArrayPrototype[UNSCOPABLES][key] = true;
924 };
925
926 var $find = arrayIteration.find;
927
928
929
930 var FIND = 'find';
931 var SKIPS_HOLES = true;
932
933 var USES_TO_LENGTH$1 = arrayMethodUsesToLength(FIND);
934
935 // Shouldn't skip holes
936 if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
937
938 // `Array.prototype.find` method
939 // https://tc39.github.io/ecma262/#sec-array.prototype.find
940 _export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$1 }, {
941 find: function find(callbackfn /* , that = undefined */) {
942 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
943 }
944 });
945
946 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
947 addToUnscopables(FIND);
948
949 var arrayMethodIsStrict = function (METHOD_NAME, argument) {
950 var method = [][METHOD_NAME];
951 return !!method && fails(function () {
952 // eslint-disable-next-line no-useless-call,no-throw-literal
953 method.call(null, argument || function () { throw 1; }, 1);
954 });
955 };
956
957 var $forEach = arrayIteration.forEach;
958
959
960
961 var STRICT_METHOD = arrayMethodIsStrict('forEach');
962 var USES_TO_LENGTH$2 = arrayMethodUsesToLength('forEach');
963
964 // `Array.prototype.forEach` method implementation
965 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
966 var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$2) ? function forEach(callbackfn /* , thisArg */) {
967 return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
968 } : [].forEach;
969
970 // `Array.prototype.forEach` method
971 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
972 _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
973 forEach: arrayForEach
974 });
975
976 var $includes = arrayIncludes.includes;
977
978
979
980 var USES_TO_LENGTH$3 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
981
982 // `Array.prototype.includes` method
983 // https://tc39.github.io/ecma262/#sec-array.prototype.includes
984 _export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$3 }, {
985 includes: function includes(el /* , fromIndex = 0 */) {
986 return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
987 }
988 });
989
990 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
991 addToUnscopables('includes');
992
993 var $indexOf = arrayIncludes.indexOf;
994
995
996
997 var nativeIndexOf = [].indexOf;
998
999 var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
1000 var STRICT_METHOD$1 = arrayMethodIsStrict('indexOf');
1001 var USES_TO_LENGTH$4 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
1002
1003 // `Array.prototype.indexOf` method
1004 // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
1005 _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 || !USES_TO_LENGTH$4 }, {
1006 indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
1007 return NEGATIVE_ZERO
1008 // convert -0 to +0
1009 ? nativeIndexOf.apply(this, arguments) || 0
1010 : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
1011 }
1012 });
1013
1014 var nativeAssign = Object.assign;
1015 var defineProperty$1 = Object.defineProperty;
1016
1017 // `Object.assign` method
1018 // https://tc39.github.io/ecma262/#sec-object.assign
1019 var objectAssign = !nativeAssign || fails(function () {
1020 // should have correct order of operations (Edge bug)
1021 if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', {
1022 enumerable: true,
1023 get: function () {
1024 defineProperty$1(this, 'b', {
1025 value: 3,
1026 enumerable: false
1027 });
1028 }
1029 }), { b: 2 })).b !== 1) return true;
1030 // should work with symbols and should have deterministic property order (V8 bug)
1031 var A = {};
1032 var B = {};
1033 // eslint-disable-next-line no-undef
1034 var symbol = Symbol();
1035 var alphabet = 'abcdefghijklmnopqrst';
1036 A[symbol] = 7;
1037 alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1038 return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
1039 }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
1040 var T = toObject(target);
1041 var argumentsLength = arguments.length;
1042 var index = 1;
1043 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
1044 var propertyIsEnumerable = objectPropertyIsEnumerable.f;
1045 while (argumentsLength > index) {
1046 var S = indexedObject(arguments[index++]);
1047 var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
1048 var length = keys.length;
1049 var j = 0;
1050 var key;
1051 while (length > j) {
1052 key = keys[j++];
1053 if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
1054 }
1055 } return T;
1056 } : nativeAssign;
1057
1058 // `Object.assign` method
1059 // https://tc39.github.io/ecma262/#sec-object.assign
1060 _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
1061 assign: objectAssign
1062 });
1063
1064 var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
1065
1066 // `Object.keys` method
1067 // https://tc39.github.io/ecma262/#sec-object.keys
1068 _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
1069 keys: function keys(it) {
1070 return objectKeys(toObject(it));
1071 }
1072 });
1073
1074 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1075 var test = {};
1076
1077 test[TO_STRING_TAG] = 'z';
1078
1079 var toStringTagSupport = String(test) === '[object z]';
1080
1081 var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1082 // ES3 wrong here
1083 var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1084
1085 // fallback for IE11 Script Access Denied error
1086 var tryGet = function (it, key) {
1087 try {
1088 return it[key];
1089 } catch (error) { /* empty */ }
1090 };
1091
1092 // getting tag from ES6+ `Object.prototype.toString`
1093 var classof = toStringTagSupport ? classofRaw : function (it) {
1094 var O, tag, result;
1095 return it === undefined ? 'Undefined' : it === null ? 'Null'
1096 // @@toStringTag case
1097 : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1098 // builtinTag case
1099 : CORRECT_ARGUMENTS ? classofRaw(O)
1100 // ES3 arguments fallback
1101 : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1102 };
1103
1104 // `Object.prototype.toString` method implementation
1105 // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1106 var objectToString = toStringTagSupport ? {}.toString : function toString() {
1107 return '[object ' + classof(this) + ']';
1108 };
1109
1110 // `Object.prototype.toString` method
1111 // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1112 if (!toStringTagSupport) {
1113 redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
1114 }
1115
1116 // a string of all valid unicode whitespaces
1117 // eslint-disable-next-line max-len
1118 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';
1119
1120 var whitespace = '[' + whitespaces + ']';
1121 var ltrim = RegExp('^' + whitespace + whitespace + '*');
1122 var rtrim = RegExp(whitespace + whitespace + '*$');
1123
1124 // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1125 var createMethod$2 = function (TYPE) {
1126 return function ($this) {
1127 var string = String(requireObjectCoercible($this));
1128 if (TYPE & 1) string = string.replace(ltrim, '');
1129 if (TYPE & 2) string = string.replace(rtrim, '');
1130 return string;
1131 };
1132 };
1133
1134 var stringTrim = {
1135 // `String.prototype.{ trimLeft, trimStart }` methods
1136 // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
1137 start: createMethod$2(1),
1138 // `String.prototype.{ trimRight, trimEnd }` methods
1139 // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
1140 end: createMethod$2(2),
1141 // `String.prototype.trim` method
1142 // https://tc39.github.io/ecma262/#sec-string.prototype.trim
1143 trim: createMethod$2(3)
1144 };
1145
1146 var trim = stringTrim.trim;
1147
1148
1149 var $parseInt = global_1.parseInt;
1150 var hex = /^[+-]?0[Xx]/;
1151 var FORCED$1 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;
1152
1153 // `parseInt` method
1154 // https://tc39.github.io/ecma262/#sec-parseint-string-radix
1155 var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
1156 var S = trim(String(string));
1157 return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
1158 } : $parseInt;
1159
1160 // `parseInt` method
1161 // https://tc39.github.io/ecma262/#sec-parseint-string-radix
1162 _export({ global: true, forced: parseInt != numberParseInt }, {
1163 parseInt: numberParseInt
1164 });
1165
1166 // `RegExp.prototype.flags` getter implementation
1167 // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
1168 var regexpFlags = function () {
1169 var that = anObject(this);
1170 var result = '';
1171 if (that.global) result += 'g';
1172 if (that.ignoreCase) result += 'i';
1173 if (that.multiline) result += 'm';
1174 if (that.dotAll) result += 's';
1175 if (that.unicode) result += 'u';
1176 if (that.sticky) result += 'y';
1177 return result;
1178 };
1179
1180 // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
1181 // so we use an intermediate function.
1182 function RE(s, f) {
1183 return RegExp(s, f);
1184 }
1185
1186 var UNSUPPORTED_Y = fails(function () {
1187 // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1188 var re = RE('a', 'y');
1189 re.lastIndex = 2;
1190 return re.exec('abcd') != null;
1191 });
1192
1193 var BROKEN_CARET = fails(function () {
1194 // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1195 var re = RE('^r', 'gy');
1196 re.lastIndex = 2;
1197 return re.exec('str') != null;
1198 });
1199
1200 var regexpStickyHelpers = {
1201 UNSUPPORTED_Y: UNSUPPORTED_Y,
1202 BROKEN_CARET: BROKEN_CARET
1203 };
1204
1205 var nativeExec = RegExp.prototype.exec;
1206 // This always refers to the native implementation, because the
1207 // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
1208 // which loads this file before patching the method.
1209 var nativeReplace = String.prototype.replace;
1210
1211 var patchedExec = nativeExec;
1212
1213 var UPDATES_LAST_INDEX_WRONG = (function () {
1214 var re1 = /a/;
1215 var re2 = /b*/g;
1216 nativeExec.call(re1, 'a');
1217 nativeExec.call(re2, 'a');
1218 return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1219 })();
1220
1221 var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
1222
1223 // nonparticipating capturing group, copied from es5-shim's String#split patch.
1224 var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1225
1226 var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
1227
1228 if (PATCH) {
1229 patchedExec = function exec(str) {
1230 var re = this;
1231 var lastIndex, reCopy, match, i;
1232 var sticky = UNSUPPORTED_Y$1 && re.sticky;
1233 var flags = regexpFlags.call(re);
1234 var source = re.source;
1235 var charsAdded = 0;
1236 var strCopy = str;
1237
1238 if (sticky) {
1239 flags = flags.replace('y', '');
1240 if (flags.indexOf('g') === -1) {
1241 flags += 'g';
1242 }
1243
1244 strCopy = String(str).slice(re.lastIndex);
1245 // Support anchored sticky behavior.
1246 if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
1247 source = '(?: ' + source + ')';
1248 strCopy = ' ' + strCopy;
1249 charsAdded++;
1250 }
1251 // ^(? + rx + ) is needed, in combination with some str slicing, to
1252 // simulate the 'y' flag.
1253 reCopy = new RegExp('^(?:' + source + ')', flags);
1254 }
1255
1256 if (NPCG_INCLUDED) {
1257 reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1258 }
1259 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1260
1261 match = nativeExec.call(sticky ? reCopy : re, strCopy);
1262
1263 if (sticky) {
1264 if (match) {
1265 match.input = match.input.slice(charsAdded);
1266 match[0] = match[0].slice(charsAdded);
1267 match.index = re.lastIndex;
1268 re.lastIndex += match[0].length;
1269 } else re.lastIndex = 0;
1270 } else if (UPDATES_LAST_INDEX_WRONG && match) {
1271 re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1272 }
1273 if (NPCG_INCLUDED && match && match.length > 1) {
1274 // Fix browsers whose `exec` methods don't consistently return `undefined`
1275 // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1276 nativeReplace.call(match[0], reCopy, function () {
1277 for (i = 1; i < arguments.length - 2; i++) {
1278 if (arguments[i] === undefined) match[i] = undefined;
1279 }
1280 });
1281 }
1282
1283 return match;
1284 };
1285 }
1286
1287 var regexpExec = patchedExec;
1288
1289 _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
1290 exec: regexpExec
1291 });
1292
1293 var TO_STRING = 'toString';
1294 var RegExpPrototype = RegExp.prototype;
1295 var nativeToString = RegExpPrototype[TO_STRING];
1296
1297 var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
1298 // FF44- RegExp#toString has a wrong name
1299 var INCORRECT_NAME = nativeToString.name != TO_STRING;
1300
1301 // `RegExp.prototype.toString` method
1302 // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
1303 if (NOT_GENERIC || INCORRECT_NAME) {
1304 redefine(RegExp.prototype, TO_STRING, function toString() {
1305 var R = anObject(this);
1306 var p = String(R.source);
1307 var rf = R.flags;
1308 var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
1309 return '/' + p + '/' + f;
1310 }, { unsafe: true });
1311 }
1312
1313 var MATCH = wellKnownSymbol('match');
1314
1315 // `IsRegExp` abstract operation
1316 // https://tc39.github.io/ecma262/#sec-isregexp
1317 var isRegexp = function (it) {
1318 var isRegExp;
1319 return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
1320 };
1321
1322 var notARegexp = function (it) {
1323 if (isRegexp(it)) {
1324 throw TypeError("The method doesn't accept regular expressions");
1325 } return it;
1326 };
1327
1328 var MATCH$1 = wellKnownSymbol('match');
1329
1330 var correctIsRegexpLogic = function (METHOD_NAME) {
1331 var regexp = /./;
1332 try {
1333 '/./'[METHOD_NAME](regexp);
1334 } catch (error1) {
1335 try {
1336 regexp[MATCH$1] = false;
1337 return '/./'[METHOD_NAME](regexp);
1338 } catch (error2) { /* empty */ }
1339 } return false;
1340 };
1341
1342 // `String.prototype.includes` method
1343 // https://tc39.github.io/ecma262/#sec-string.prototype.includes
1344 _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
1345 includes: function includes(searchString /* , position = 0 */) {
1346 return !!~String(requireObjectCoercible(this))
1347 .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
1348 }
1349 });
1350
1351 var non = '\u200B\u0085\u180E';
1352
1353 // check that a method works with the correct list
1354 // of whitespaces and has a correct name
1355 var stringTrimForced = function (METHOD_NAME) {
1356 return fails(function () {
1357 return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
1358 });
1359 };
1360
1361 var $trim = stringTrim.trim;
1362
1363
1364 // `String.prototype.trim` method
1365 // https://tc39.github.io/ecma262/#sec-string.prototype.trim
1366 _export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
1367 trim: function trim() {
1368 return $trim(this);
1369 }
1370 });
1371
1372 // iterable DOM collections
1373 // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1374 var domIterables = {
1375 CSSRuleList: 0,
1376 CSSStyleDeclaration: 0,
1377 CSSValueList: 0,
1378 ClientRectList: 0,
1379 DOMRectList: 0,
1380 DOMStringList: 0,
1381 DOMTokenList: 1,
1382 DataTransferItemList: 0,
1383 FileList: 0,
1384 HTMLAllCollection: 0,
1385 HTMLCollection: 0,
1386 HTMLFormElement: 0,
1387 HTMLSelectElement: 0,
1388 MediaList: 0,
1389 MimeTypeArray: 0,
1390 NamedNodeMap: 0,
1391 NodeList: 1,
1392 PaintRequestList: 0,
1393 Plugin: 0,
1394 PluginArray: 0,
1395 SVGLengthList: 0,
1396 SVGNumberList: 0,
1397 SVGPathSegList: 0,
1398 SVGPointList: 0,
1399 SVGStringList: 0,
1400 SVGTransformList: 0,
1401 SourceBufferList: 0,
1402 StyleSheetList: 0,
1403 TextTrackCueList: 0,
1404 TextTrackList: 0,
1405 TouchList: 0
1406 };
1407
1408 for (var COLLECTION_NAME in domIterables) {
1409 var Collection = global_1[COLLECTION_NAME];
1410 var CollectionPrototype = Collection && Collection.prototype;
1411 // some Chrome versions have non-configurable methods on DOMTokenList
1412 if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
1413 createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
1414 } catch (error) {
1415 CollectionPrototype.forEach = arrayForEach;
1416 }
1417 }
1418
1419 function _typeof(obj) {
1420 "@babel/helpers - typeof";
1421
1422 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1423 _typeof = function (obj) {
1424 return typeof obj;
1425 };
1426 } else {
1427 _typeof = function (obj) {
1428 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1429 };
1430 }
1431
1432 return _typeof(obj);
1433 }
1434
1435 function _classCallCheck(instance, Constructor) {
1436 if (!(instance instanceof Constructor)) {
1437 throw new TypeError("Cannot call a class as a function");
1438 }
1439 }
1440
1441 function _defineProperties(target, props) {
1442 for (var i = 0; i < props.length; i++) {
1443 var descriptor = props[i];
1444 descriptor.enumerable = descriptor.enumerable || false;
1445 descriptor.configurable = true;
1446 if ("value" in descriptor) descriptor.writable = true;
1447 Object.defineProperty(target, descriptor.key, descriptor);
1448 }
1449 }
1450
1451 function _createClass(Constructor, protoProps, staticProps) {
1452 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1453 if (staticProps) _defineProperties(Constructor, staticProps);
1454 return Constructor;
1455 }
1456
1457 function _inherits(subClass, superClass) {
1458 if (typeof superClass !== "function" && superClass !== null) {
1459 throw new TypeError("Super expression must either be null or a function");
1460 }
1461
1462 subClass.prototype = Object.create(superClass && superClass.prototype, {
1463 constructor: {
1464 value: subClass,
1465 writable: true,
1466 configurable: true
1467 }
1468 });
1469 if (superClass) _setPrototypeOf(subClass, superClass);
1470 }
1471
1472 function _getPrototypeOf(o) {
1473 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
1474 return o.__proto__ || Object.getPrototypeOf(o);
1475 };
1476 return _getPrototypeOf(o);
1477 }
1478
1479 function _setPrototypeOf(o, p) {
1480 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1481 o.__proto__ = p;
1482 return o;
1483 };
1484
1485 return _setPrototypeOf(o, p);
1486 }
1487
1488 function _isNativeReflectConstruct() {
1489 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1490 if (Reflect.construct.sham) return false;
1491 if (typeof Proxy === "function") return true;
1492
1493 try {
1494 Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
1495 return true;
1496 } catch (e) {
1497 return false;
1498 }
1499 }
1500
1501 function _assertThisInitialized(self) {
1502 if (self === void 0) {
1503 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1504 }
1505
1506 return self;
1507 }
1508
1509 function _possibleConstructorReturn(self, call) {
1510 if (call && (typeof call === "object" || typeof call === "function")) {
1511 return call;
1512 }
1513
1514 return _assertThisInitialized(self);
1515 }
1516
1517 function _createSuper(Derived) {
1518 var hasNativeReflectConstruct = _isNativeReflectConstruct();
1519
1520 return function _createSuperInternal() {
1521 var Super = _getPrototypeOf(Derived),
1522 result;
1523
1524 if (hasNativeReflectConstruct) {
1525 var NewTarget = _getPrototypeOf(this).constructor;
1526
1527 result = Reflect.construct(Super, arguments, NewTarget);
1528 } else {
1529 result = Super.apply(this, arguments);
1530 }
1531
1532 return _possibleConstructorReturn(this, result);
1533 };
1534 }
1535
1536 function _superPropBase(object, property) {
1537 while (!Object.prototype.hasOwnProperty.call(object, property)) {
1538 object = _getPrototypeOf(object);
1539 if (object === null) break;
1540 }
1541
1542 return object;
1543 }
1544
1545 function _get(target, property, receiver) {
1546 if (typeof Reflect !== "undefined" && Reflect.get) {
1547 _get = Reflect.get;
1548 } else {
1549 _get = function _get(target, property, receiver) {
1550 var base = _superPropBase(target, property);
1551
1552 if (!base) return;
1553 var desc = Object.getOwnPropertyDescriptor(base, property);
1554
1555 if (desc.get) {
1556 return desc.get.call(receiver);
1557 }
1558
1559 return desc.value;
1560 };
1561 }
1562
1563 return _get(target, property, receiver || target);
1564 }
1565
1566 function _toConsumableArray(arr) {
1567 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1568 }
1569
1570 function _arrayWithoutHoles(arr) {
1571 if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1572 }
1573
1574 function _iterableToArray(iter) {
1575 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
1576 }
1577
1578 function _unsupportedIterableToArray(o, minLen) {
1579 if (!o) return;
1580 if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1581 var n = Object.prototype.toString.call(o).slice(8, -1);
1582 if (n === "Object" && o.constructor) n = o.constructor.name;
1583 if (n === "Map" || n === "Set") return Array.from(o);
1584 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1585 }
1586
1587 function _arrayLikeToArray(arr, len) {
1588 if (len == null || len > arr.length) len = arr.length;
1589
1590 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1591
1592 return arr2;
1593 }
1594
1595 function _nonIterableSpread() {
1596 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1597 }
1598
1599 var nativeJoin = [].join;
1600
1601 var ES3_STRINGS = indexedObject != Object;
1602 var STRICT_METHOD$2 = arrayMethodIsStrict('join', ',');
1603
1604 // `Array.prototype.join` method
1605 // https://tc39.github.io/ecma262/#sec-array.prototype.join
1606 _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$2 }, {
1607 join: function join(separator) {
1608 return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
1609 }
1610 });
1611
1612 var test$1 = [];
1613 var nativeSort = test$1.sort;
1614
1615 // IE8-
1616 var FAILS_ON_UNDEFINED = fails(function () {
1617 test$1.sort(undefined);
1618 });
1619 // V8 bug
1620 var FAILS_ON_NULL = fails(function () {
1621 test$1.sort(null);
1622 });
1623 // Old WebKit
1624 var STRICT_METHOD$3 = arrayMethodIsStrict('sort');
1625
1626 var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$3;
1627
1628 // `Array.prototype.sort` method
1629 // https://tc39.github.io/ecma262/#sec-array.prototype.sort
1630 _export({ target: 'Array', proto: true, forced: FORCED$2 }, {
1631 sort: function sort(comparefn) {
1632 return comparefn === undefined
1633 ? nativeSort.call(toObject(this))
1634 : nativeSort.call(toObject(this), aFunction$1(comparefn));
1635 }
1636 });
1637
1638 // TODO: Remove from `core-js@4` since it's moved to entry points
1639
1640
1641
1642
1643
1644
1645
1646 var SPECIES$2 = wellKnownSymbol('species');
1647
1648 var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
1649 // #replace needs built-in support for named groups.
1650 // #match works fine because it just return the exec results, even if it has
1651 // a "grops" property.
1652 var re = /./;
1653 re.exec = function () {
1654 var result = [];
1655 result.groups = { a: '7' };
1656 return result;
1657 };
1658 return ''.replace(re, '$<a>') !== '7';
1659 });
1660
1661 // IE <= 11 replaces $0 with the whole match, as if it was $&
1662 // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
1663 var REPLACE_KEEPS_$0 = (function () {
1664 return 'a'.replace(/./, '$0') === '$0';
1665 })();
1666
1667 var REPLACE = wellKnownSymbol('replace');
1668 // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
1669 var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
1670 if (/./[REPLACE]) {
1671 return /./[REPLACE]('a', '$0') === '';
1672 }
1673 return false;
1674 })();
1675
1676 // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
1677 // Weex JS has frozen built-in prototypes, so use try / catch wrapper
1678 var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
1679 var re = /(?:)/;
1680 var originalExec = re.exec;
1681 re.exec = function () { return originalExec.apply(this, arguments); };
1682 var result = 'ab'.split(re);
1683 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
1684 });
1685
1686 var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
1687 var SYMBOL = wellKnownSymbol(KEY);
1688
1689 var DELEGATES_TO_SYMBOL = !fails(function () {
1690 // String methods call symbol-named RegEp methods
1691 var O = {};
1692 O[SYMBOL] = function () { return 7; };
1693 return ''[KEY](O) != 7;
1694 });
1695
1696 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
1697 // Symbol-named RegExp methods call .exec
1698 var execCalled = false;
1699 var re = /a/;
1700
1701 if (KEY === 'split') {
1702 // We can't use real regex here since it causes deoptimization
1703 // and serious performance degradation in V8
1704 // https://github.com/zloirock/core-js/issues/306
1705 re = {};
1706 // RegExp[@@split] doesn't call the regex's exec method, but first creates
1707 // a new one. We need to return the patched regex when creating the new one.
1708 re.constructor = {};
1709 re.constructor[SPECIES$2] = function () { return re; };
1710 re.flags = '';
1711 re[SYMBOL] = /./[SYMBOL];
1712 }
1713
1714 re.exec = function () { execCalled = true; return null; };
1715
1716 re[SYMBOL]('');
1717 return !execCalled;
1718 });
1719
1720 if (
1721 !DELEGATES_TO_SYMBOL ||
1722 !DELEGATES_TO_EXEC ||
1723 (KEY === 'replace' && !(
1724 REPLACE_SUPPORTS_NAMED_GROUPS &&
1725 REPLACE_KEEPS_$0 &&
1726 !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
1727 )) ||
1728 (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
1729 ) {
1730 var nativeRegExpMethod = /./[SYMBOL];
1731 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1732 if (regexp.exec === regexpExec) {
1733 if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1734 // The native String method already delegates to @@method (this
1735 // polyfilled function), leasing to infinite recursion.
1736 // We avoid it by directly calling the native @@method method.
1737 return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
1738 }
1739 return { done: true, value: nativeMethod.call(str, regexp, arg2) };
1740 }
1741 return { done: false };
1742 }, {
1743 REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
1744 REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
1745 });
1746 var stringMethod = methods[0];
1747 var regexMethod = methods[1];
1748
1749 redefine(String.prototype, KEY, stringMethod);
1750 redefine(RegExp.prototype, SYMBOL, length == 2
1751 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
1752 // 21.2.5.11 RegExp.prototype[@@split](string, limit)
1753 ? function (string, arg) { return regexMethod.call(string, this, arg); }
1754 // 21.2.5.6 RegExp.prototype[@@match](string)
1755 // 21.2.5.9 RegExp.prototype[@@search](string)
1756 : function (string) { return regexMethod.call(string, this); }
1757 );
1758 }
1759
1760 if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
1761 };
1762
1763 // `String.prototype.{ codePointAt, at }` methods implementation
1764 var createMethod$3 = function (CONVERT_TO_STRING) {
1765 return function ($this, pos) {
1766 var S = String(requireObjectCoercible($this));
1767 var position = toInteger(pos);
1768 var size = S.length;
1769 var first, second;
1770 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1771 first = S.charCodeAt(position);
1772 return first < 0xD800 || first > 0xDBFF || position + 1 === size
1773 || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
1774 ? CONVERT_TO_STRING ? S.charAt(position) : first
1775 : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1776 };
1777 };
1778
1779 var stringMultibyte = {
1780 // `String.prototype.codePointAt` method
1781 // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
1782 codeAt: createMethod$3(false),
1783 // `String.prototype.at` method
1784 // https://github.com/mathiasbynens/String.prototype.at
1785 charAt: createMethod$3(true)
1786 };
1787
1788 var charAt = stringMultibyte.charAt;
1789
1790 // `AdvanceStringIndex` abstract operation
1791 // https://tc39.github.io/ecma262/#sec-advancestringindex
1792 var advanceStringIndex = function (S, index, unicode) {
1793 return index + (unicode ? charAt(S, index).length : 1);
1794 };
1795
1796 // `RegExpExec` abstract operation
1797 // https://tc39.github.io/ecma262/#sec-regexpexec
1798 var regexpExecAbstract = function (R, S) {
1799 var exec = R.exec;
1800 if (typeof exec === 'function') {
1801 var result = exec.call(R, S);
1802 if (typeof result !== 'object') {
1803 throw TypeError('RegExp exec method returned something other than an Object or null');
1804 }
1805 return result;
1806 }
1807
1808 if (classofRaw(R) !== 'RegExp') {
1809 throw TypeError('RegExp#exec called on incompatible receiver');
1810 }
1811
1812 return regexpExec.call(R, S);
1813 };
1814
1815 // @@match logic
1816 fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
1817 return [
1818 // `String.prototype.match` method
1819 // https://tc39.github.io/ecma262/#sec-string.prototype.match
1820 function match(regexp) {
1821 var O = requireObjectCoercible(this);
1822 var matcher = regexp == undefined ? undefined : regexp[MATCH];
1823 return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
1824 },
1825 // `RegExp.prototype[@@match]` method
1826 // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
1827 function (regexp) {
1828 var res = maybeCallNative(nativeMatch, regexp, this);
1829 if (res.done) return res.value;
1830
1831 var rx = anObject(regexp);
1832 var S = String(this);
1833
1834 if (!rx.global) return regexpExecAbstract(rx, S);
1835
1836 var fullUnicode = rx.unicode;
1837 rx.lastIndex = 0;
1838 var A = [];
1839 var n = 0;
1840 var result;
1841 while ((result = regexpExecAbstract(rx, S)) !== null) {
1842 var matchStr = String(result[0]);
1843 A[n] = matchStr;
1844 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1845 n++;
1846 }
1847 return n === 0 ? null : A;
1848 }
1849 ];
1850 });
1851
1852 var max$1 = Math.max;
1853 var min$2 = Math.min;
1854 var floor$1 = Math.floor;
1855 var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
1856 var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
1857
1858 var maybeToString = function (it) {
1859 return it === undefined ? it : String(it);
1860 };
1861
1862 // @@replace logic
1863 fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
1864 var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
1865 var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
1866 var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
1867
1868 return [
1869 // `String.prototype.replace` method
1870 // https://tc39.github.io/ecma262/#sec-string.prototype.replace
1871 function replace(searchValue, replaceValue) {
1872 var O = requireObjectCoercible(this);
1873 var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
1874 return replacer !== undefined
1875 ? replacer.call(searchValue, O, replaceValue)
1876 : nativeReplace.call(String(O), searchValue, replaceValue);
1877 },
1878 // `RegExp.prototype[@@replace]` method
1879 // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
1880 function (regexp, replaceValue) {
1881 if (
1882 (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
1883 (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
1884 ) {
1885 var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
1886 if (res.done) return res.value;
1887 }
1888
1889 var rx = anObject(regexp);
1890 var S = String(this);
1891
1892 var functionalReplace = typeof replaceValue === 'function';
1893 if (!functionalReplace) replaceValue = String(replaceValue);
1894
1895 var global = rx.global;
1896 if (global) {
1897 var fullUnicode = rx.unicode;
1898 rx.lastIndex = 0;
1899 }
1900 var results = [];
1901 while (true) {
1902 var result = regexpExecAbstract(rx, S);
1903 if (result === null) break;
1904
1905 results.push(result);
1906 if (!global) break;
1907
1908 var matchStr = String(result[0]);
1909 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1910 }
1911
1912 var accumulatedResult = '';
1913 var nextSourcePosition = 0;
1914 for (var i = 0; i < results.length; i++) {
1915 result = results[i];
1916
1917 var matched = String(result[0]);
1918 var position = max$1(min$2(toInteger(result.index), S.length), 0);
1919 var captures = [];
1920 // NOTE: This is equivalent to
1921 // captures = result.slice(1).map(maybeToString)
1922 // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1923 // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1924 // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1925 for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
1926 var namedCaptures = result.groups;
1927 if (functionalReplace) {
1928 var replacerArgs = [matched].concat(captures, position, S);
1929 if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
1930 var replacement = String(replaceValue.apply(undefined, replacerArgs));
1931 } else {
1932 replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1933 }
1934 if (position >= nextSourcePosition) {
1935 accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
1936 nextSourcePosition = position + matched.length;
1937 }
1938 }
1939 return accumulatedResult + S.slice(nextSourcePosition);
1940 }
1941 ];
1942
1943 // https://tc39.github.io/ecma262/#sec-getsubstitution
1944 function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
1945 var tailPos = position + matched.length;
1946 var m = captures.length;
1947 var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1948 if (namedCaptures !== undefined) {
1949 namedCaptures = toObject(namedCaptures);
1950 symbols = SUBSTITUTION_SYMBOLS;
1951 }
1952 return nativeReplace.call(replacement, symbols, function (match, ch) {
1953 var capture;
1954 switch (ch.charAt(0)) {
1955 case '$': return '$';
1956 case '&': return matched;
1957 case '`': return str.slice(0, position);
1958 case "'": return str.slice(tailPos);
1959 case '<':
1960 capture = namedCaptures[ch.slice(1, -1)];
1961 break;
1962 default: // \d\d?
1963 var n = +ch;
1964 if (n === 0) return match;
1965 if (n > m) {
1966 var f = floor$1(n / 10);
1967 if (f === 0) return match;
1968 if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
1969 return match;
1970 }
1971 capture = captures[n - 1];
1972 }
1973 return capture === undefined ? '' : capture;
1974 });
1975 }
1976 });
1977
1978 var SPECIES$3 = wellKnownSymbol('species');
1979
1980 // `SpeciesConstructor` abstract operation
1981 // https://tc39.github.io/ecma262/#sec-speciesconstructor
1982 var speciesConstructor = function (O, defaultConstructor) {
1983 var C = anObject(O).constructor;
1984 var S;
1985 return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor : aFunction$1(S);
1986 };
1987
1988 var arrayPush = [].push;
1989 var min$3 = Math.min;
1990 var MAX_UINT32 = 0xFFFFFFFF;
1991
1992 // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
1993 var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
1994
1995 // @@split logic
1996 fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
1997 var internalSplit;
1998 if (
1999 'abbc'.split(/(b)*/)[1] == 'c' ||
2000 'test'.split(/(?:)/, -1).length != 4 ||
2001 'ab'.split(/(?:ab)*/).length != 2 ||
2002 '.'.split(/(.?)(.?)/).length != 4 ||
2003 '.'.split(/()()/).length > 1 ||
2004 ''.split(/.?/).length
2005 ) {
2006 // based on es5-shim implementation, need to rework it
2007 internalSplit = function (separator, limit) {
2008 var string = String(requireObjectCoercible(this));
2009 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
2010 if (lim === 0) return [];
2011 if (separator === undefined) return [string];
2012 // If `separator` is not a regex, use native split
2013 if (!isRegexp(separator)) {
2014 return nativeSplit.call(string, separator, lim);
2015 }
2016 var output = [];
2017 var flags = (separator.ignoreCase ? 'i' : '') +
2018 (separator.multiline ? 'm' : '') +
2019 (separator.unicode ? 'u' : '') +
2020 (separator.sticky ? 'y' : '');
2021 var lastLastIndex = 0;
2022 // Make `global` and avoid `lastIndex` issues by working with a copy
2023 var separatorCopy = new RegExp(separator.source, flags + 'g');
2024 var match, lastIndex, lastLength;
2025 while (match = regexpExec.call(separatorCopy, string)) {
2026 lastIndex = separatorCopy.lastIndex;
2027 if (lastIndex > lastLastIndex) {
2028 output.push(string.slice(lastLastIndex, match.index));
2029 if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
2030 lastLength = match[0].length;
2031 lastLastIndex = lastIndex;
2032 if (output.length >= lim) break;
2033 }
2034 if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
2035 }
2036 if (lastLastIndex === string.length) {
2037 if (lastLength || !separatorCopy.test('')) output.push('');
2038 } else output.push(string.slice(lastLastIndex));
2039 return output.length > lim ? output.slice(0, lim) : output;
2040 };
2041 // Chakra, V8
2042 } else if ('0'.split(undefined, 0).length) {
2043 internalSplit = function (separator, limit) {
2044 return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
2045 };
2046 } else internalSplit = nativeSplit;
2047
2048 return [
2049 // `String.prototype.split` method
2050 // https://tc39.github.io/ecma262/#sec-string.prototype.split
2051 function split(separator, limit) {
2052 var O = requireObjectCoercible(this);
2053 var splitter = separator == undefined ? undefined : separator[SPLIT];
2054 return splitter !== undefined
2055 ? splitter.call(separator, O, limit)
2056 : internalSplit.call(String(O), separator, limit);
2057 },
2058 // `RegExp.prototype[@@split]` method
2059 // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
2060 //
2061 // NOTE: This cannot be properly polyfilled in engines that don't support
2062 // the 'y' flag.
2063 function (regexp, limit) {
2064 var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
2065 if (res.done) return res.value;
2066
2067 var rx = anObject(regexp);
2068 var S = String(this);
2069 var C = speciesConstructor(rx, RegExp);
2070
2071 var unicodeMatching = rx.unicode;
2072 var flags = (rx.ignoreCase ? 'i' : '') +
2073 (rx.multiline ? 'm' : '') +
2074 (rx.unicode ? 'u' : '') +
2075 (SUPPORTS_Y ? 'y' : 'g');
2076
2077 // ^(? + rx + ) is needed, in combination with some S slicing, to
2078 // simulate the 'y' flag.
2079 var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
2080 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
2081 if (lim === 0) return [];
2082 if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
2083 var p = 0;
2084 var q = 0;
2085 var A = [];
2086 while (q < S.length) {
2087 splitter.lastIndex = SUPPORTS_Y ? q : 0;
2088 var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));
2089 var e;
2090 if (
2091 z === null ||
2092 (e = min$3(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
2093 ) {
2094 q = advanceStringIndex(S, q, unicodeMatching);
2095 } else {
2096 A.push(S.slice(p, q));
2097 if (A.length === lim) return A;
2098 for (var i = 1; i <= z.length - 1; i++) {
2099 A.push(z[i]);
2100 if (A.length === lim) return A;
2101 }
2102 q = p = e;
2103 }
2104 }
2105 A.push(S.slice(p));
2106 return A;
2107 }
2108 ];
2109 }, !SUPPORTS_Y);
2110
2111 var Utils = $__default['default'].fn.bootstrapTable.utils;
2112 var searchControls = 'select, input:not([type="checkbox"]):not([type="radio"])';
2113 function getOptionsFromSelectControl(selectControl) {
2114 return selectControl.get(selectControl.length - 1).options;
2115 }
2116 function getControlContainer(that) {
2117 if (that.options.filterControlContainer) {
2118 return $__default['default']("".concat(that.options.filterControlContainer));
2119 }
2120
2121 return that.$header;
2122 }
2123 function getSearchControls(that) {
2124 return getControlContainer(that).find(searchControls);
2125 }
2126 function hideUnusedSelectOptions(selectControl, uniqueValues) {
2127 var options = getOptionsFromSelectControl(selectControl);
2128
2129 for (var i = 0; i < options.length; i++) {
2130 if (options[i].value !== '') {
2131 if (!uniqueValues.hasOwnProperty(options[i].value)) {
2132 selectControl.find(Utils.sprintf('option[value=\'%s\']', options[i].value)).hide();
2133 } else {
2134 selectControl.find(Utils.sprintf('option[value=\'%s\']', options[i].value)).show();
2135 }
2136 }
2137 }
2138 }
2139 function existOptionInSelectControl(selectControl, value) {
2140 var options = getOptionsFromSelectControl(selectControl);
2141
2142 for (var i = 0; i < options.length; i++) {
2143 if (options[i].value === Utils.unescapeHTML(value.toString())) {
2144 // The value is not valid to add
2145 return true;
2146 }
2147 } // If we get here, the value is valid to add
2148
2149
2150 return false;
2151 }
2152 function addOptionToSelectControl(selectControl, _value, text, selected) {
2153 var value = _value === undefined || _value === null ? '' : _value.toString().trim();
2154 var $selectControl = $__default['default'](selectControl.get(selectControl.length - 1));
2155
2156 if (!existOptionInSelectControl(selectControl, value)) {
2157 var option = $__default['default']("<option value=\"".concat(value, "\">").concat(text, "</option>"));
2158
2159 if (value === selected) {
2160 option.attr('selected', true);
2161 }
2162
2163 $selectControl.append(option);
2164 }
2165 }
2166 function sortSelectControl(selectControl, orderBy) {
2167 var $selectControl = $__default['default'](selectControl.get(selectControl.length - 1));
2168 var $opts = $selectControl.find('option:gt(0)');
2169
2170 if (orderBy !== 'server') {
2171 $opts.sort(function (a, b) {
2172 return Utils.sort(a.textContent, b.textContent, orderBy === 'desc' ? -1 : 1);
2173 });
2174 }
2175
2176 $selectControl.find('option:gt(0)').remove();
2177 $selectControl.append($opts);
2178 }
2179 function fixHeaderCSS(_ref) {
2180 var $tableHeader = _ref.$tableHeader;
2181 $tableHeader.css('height', '89px');
2182 }
2183 function getElementClass($element) {
2184 return $element.attr('class').replace('form-control', '').replace('focus-temp', '').replace('search-input', '').trim();
2185 }
2186 function getCursorPosition(el) {
2187 if (Utils.isIEBrowser()) {
2188 if ($__default['default'](el).is('input[type=text]')) {
2189 var pos = 0;
2190
2191 if ('selectionStart' in el) {
2192 pos = el.selectionStart;
2193 } else if ('selection' in document) {
2194 el.focus();
2195 var Sel = document.selection.createRange();
2196 var SelLength = document.selection.createRange().text.length;
2197 Sel.moveStart('character', -el.value.length);
2198 pos = Sel.text.length - SelLength;
2199 }
2200
2201 return pos;
2202 }
2203
2204 return -1;
2205 }
2206
2207 return -1;
2208 }
2209 function setCursorPosition(el) {
2210 $__default['default'](el).val(el.value);
2211 }
2212 function copyValues(that) {
2213 var searchControls = getSearchControls(that);
2214 that.options.valuesFilterControl = [];
2215 searchControls.each(function () {
2216 var $field = $__default['default'](this);
2217
2218 if (that.options.height) {
2219 var fieldClass = getElementClass($field);
2220 $field = $__default['default'](".fixed-table-header .".concat(fieldClass));
2221 }
2222
2223 that.options.valuesFilterControl.push({
2224 field: $field.closest('[data-field]').data('field'),
2225 value: $field.val(),
2226 position: getCursorPosition($field.get(0)),
2227 hasFocus: $field.is(':focus')
2228 });
2229 });
2230 }
2231 function setValues(that) {
2232 var field = null;
2233 var result = [];
2234 var searchControls = getSearchControls(that);
2235
2236 if (that.options.valuesFilterControl.length > 0) {
2237 // Callback to apply after settings fields values
2238 var fieldToFocusCallback = null;
2239 searchControls.each(function (i, el) {
2240 var $this = $__default['default'](el);
2241 field = $this.closest('[data-field]').data('field');
2242 result = that.options.valuesFilterControl.filter(function (valueObj) {
2243 return valueObj.field === field;
2244 });
2245
2246 if (result.length > 0) {
2247 if ($this.is('[type=radio]')) {
2248 return;
2249 }
2250
2251 $this.val(result[0].value);
2252
2253 if (result[0].hasFocus && result[0].value !== '') {
2254 // set callback if the field had the focus.
2255 fieldToFocusCallback = function (fieldToFocus, carretPosition) {
2256 // Closure here to capture the field and cursor position
2257 var closedCallback = function closedCallback() {
2258 fieldToFocus.focus();
2259 setCursorPosition(fieldToFocus);
2260 };
2261
2262 return closedCallback;
2263 }($this.get(0), result[0].position);
2264 }
2265 }
2266 }); // Callback call.
2267
2268 if (fieldToFocusCallback !== null) {
2269 fieldToFocusCallback();
2270 }
2271 }
2272 }
2273 function collectBootstrapCookies() {
2274 var cookies = [];
2275 var foundCookies = document.cookie.match(/(?:bs.table.)(\w*)/g);
2276 var foundLocalStorage = localStorage;
2277
2278 if (foundCookies) {
2279 $__default['default'].each(foundCookies, function (i, _cookie) {
2280 var cookie = _cookie;
2281
2282 if (/./.test(cookie)) {
2283 cookie = cookie.split('.').pop();
2284 }
2285
2286 if ($__default['default'].inArray(cookie, cookies) === -1) {
2287 cookies.push(cookie);
2288 }
2289 });
2290 }
2291
2292 if (foundLocalStorage) {
2293 for (var i = 0; i < foundLocalStorage.length; i++) {
2294 var cookie = foundLocalStorage.key(i);
2295
2296 if (/./.test(cookie)) {
2297 cookie = cookie.split('.').pop();
2298 }
2299
2300 if (!cookies.includes(cookie)) {
2301 cookies.push(cookie);
2302 }
2303 }
2304 }
2305
2306 return cookies;
2307 }
2308 function escapeID(id) {
2309 // eslint-disable-next-line no-useless-escape
2310 return String(id).replace(/([:.\[\],])/g, '\\$1');
2311 }
2312 function isColumnSearchableViaSelect(_ref2) {
2313 var filterControl = _ref2.filterControl,
2314 searchable = _ref2.searchable;
2315 return filterControl && filterControl.toLowerCase() === 'select' && searchable;
2316 }
2317 function isFilterDataNotGiven(_ref3) {
2318 var filterData = _ref3.filterData;
2319 return filterData === undefined || filterData.toLowerCase() === 'column';
2320 }
2321 function hasSelectControlElement(selectControl) {
2322 return selectControl && selectControl.length > 0;
2323 }
2324 function initFilterSelectControls(that) {
2325 var data = that.data;
2326 var z = that.options.pagination ? that.options.sidePagination === 'server' ? that.pageTo : that.options.totalRows : that.pageTo;
2327 $__default['default'].each(that.header.fields, function (j, field) {
2328 var column = that.columns[that.fieldsColumnsIndex[field]];
2329 var selectControl = getControlContainer(that).find("select.bootstrap-table-filter-control-".concat(escapeID(column.field)));
2330
2331 if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
2332 if (selectControl.get(selectControl.length - 1).options.length === 0) {
2333 // Added the default option
2334 addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault);
2335 }
2336
2337 var uniqueValues = {};
2338
2339 for (var i = 0; i < z; i++) {
2340 // Added a new value
2341 var fieldValue = Utils.getItemField(data[i], field, false);
2342 var formatter = that.options.editable && column.editable ? column._formatter : that.header.formatters[j];
2343 var formattedValue = Utils.calculateObjectValue(that.header, formatter, [fieldValue, data[i], i], fieldValue);
2344
2345 if (column.filterDataCollector) {
2346 formattedValue = Utils.calculateObjectValue(that.header, column.filterDataCollector, [fieldValue, data[i], formattedValue], formattedValue);
2347 }
2348
2349 if (column.searchFormatter) {
2350 fieldValue = formattedValue;
2351 }
2352
2353 uniqueValues[formattedValue] = fieldValue;
2354
2355 if (_typeof(formattedValue) === 'object' && formattedValue !== null) {
2356 formattedValue.forEach(function (value) {
2357 addOptionToSelectControl(selectControl, value, value, column.filterDefault);
2358 });
2359 continue;
2360 } // eslint-disable-next-line guard-for-in
2361
2362
2363 for (var key in uniqueValues) {
2364 addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
2365 }
2366 }
2367
2368 sortSelectControl(selectControl, column.filterOrderBy);
2369
2370 if (that.options.hideUnusedSelectOptions) {
2371 hideUnusedSelectOptions(selectControl, uniqueValues);
2372 }
2373 }
2374 });
2375 }
2376 function getFilterDataMethod(objFilterDataMethod, searchTerm) {
2377 var keys = Object.keys(objFilterDataMethod);
2378
2379 for (var i = 0; i < keys.length; i++) {
2380 if (keys[i] === searchTerm) {
2381 return objFilterDataMethod[searchTerm];
2382 }
2383 }
2384
2385 return null;
2386 }
2387 function createControls(that, header) {
2388 var addedFilterControl = false;
2389 var html;
2390 $__default['default'].each(that.columns, function (_, column) {
2391 html = [];
2392
2393 if (!column.visible) {
2394 return;
2395 }
2396
2397 if (!column.filterControl && !that.options.filterControlContainer) {
2398 html.push('<div class="no-filter-control"></div>');
2399 } else if (that.options.filterControlContainer) {
2400 var $filterControls = $__default['default'](".bootstrap-table-filter-control-".concat(column.field));
2401 $__default['default'].each($filterControls, function (_, filterControl) {
2402 var $filterControl = $__default['default'](filterControl);
2403
2404 if (!$filterControl.is('[type=radio]')) {
2405 var placeholder = column.filterControlPlaceholder ? column.filterControlPlaceholder : '';
2406 $filterControl.attr('placeholder', placeholder).val(column.filterDefault);
2407 }
2408
2409 $filterControl.attr('data-field', column.field);
2410 });
2411 addedFilterControl = true;
2412 } else {
2413 var nameControl = column.filterControl.toLowerCase();
2414 html.push('<div class="filter-control">');
2415 addedFilterControl = true;
2416
2417 if (column.searchable && that.options.filterTemplate[nameControl]) {
2418 html.push(that.options.filterTemplate[nameControl](that, column.field, column.filterControlPlaceholder ? column.filterControlPlaceholder : '', column.filterDefault));
2419 }
2420 }
2421
2422 if (!column.filterControl && '' !== column.filterDefault && 'undefined' !== typeof column.filterDefault) {
2423 if ($__default['default'].isEmptyObject(that.filterColumnsPartial)) {
2424 that.filterColumnsPartial = {};
2425 }
2426
2427 that.filterColumnsPartial[column.field] = column.filterDefault;
2428 }
2429
2430 $__default['default'].each(header.find('th'), function (i, th) {
2431 var $th = $__default['default'](th);
2432
2433 if ($th.data('field') === column.field) {
2434 $th.find('.fht-cell').append(html.join(''));
2435 return false;
2436 }
2437 });
2438
2439 if (column.filterData && column.filterData.toLowerCase() !== 'column') {
2440 var filterDataType = getFilterDataMethod(
2441 /* eslint-disable no-use-before-define */
2442 filterDataMethods, column.filterData.substring(0, column.filterData.indexOf(':')));
2443 var filterDataSource;
2444 var selectControl;
2445
2446 if (filterDataType) {
2447 filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
2448 selectControl = header.find(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
2449 addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault);
2450 filterDataType(filterDataSource, selectControl, that.options.filterOrderBy, column.filterDefault);
2451 } else {
2452 throw new SyntaxError('Error. You should use any of these allowed filter data methods: var, obj, json, url, func.' + ' Use like this: var: {key: "value"}');
2453 }
2454 }
2455 });
2456
2457 if (addedFilterControl) {
2458 header.off('keyup', 'input').on('keyup', 'input', function (_ref4, obj) {
2459 var currentTarget = _ref4.currentTarget,
2460 keyCode = _ref4.keyCode;
2461 syncControls(that); // Simulate enter key action from clear button
2462
2463 keyCode = obj ? obj.keyCode : keyCode;
2464
2465 if (that.options.searchOnEnterKey && keyCode !== 13) {
2466 return;
2467 }
2468
2469 if ($__default['default'].inArray(keyCode, [37, 38, 39, 40]) > -1) {
2470 return;
2471 }
2472
2473 var $currentTarget = $__default['default'](currentTarget);
2474
2475 if ($currentTarget.is(':checkbox') || $currentTarget.is(':radio')) {
2476 return;
2477 }
2478
2479 clearTimeout(currentTarget.timeoutId || 0);
2480 currentTarget.timeoutId = setTimeout(function () {
2481 that.onColumnSearch({
2482 currentTarget: currentTarget,
2483 keyCode: keyCode
2484 });
2485 }, that.options.searchTimeOut);
2486 });
2487 header.off('change', 'select:not(".ms-offscreen")').on('change', 'select:not(".ms-offscreen")', function (_ref5) {
2488 var currentTarget = _ref5.currentTarget,
2489 keyCode = _ref5.keyCode;
2490 syncControls(that);
2491 var $select = $__default['default'](currentTarget);
2492 var value = $select.val();
2493
2494 if (value && value.length > 0 && value.trim()) {
2495 $select.find('option[selected]').removeAttr('selected');
2496 $select.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
2497 } else {
2498 $select.find('option[selected]').removeAttr('selected');
2499 }
2500
2501 clearTimeout(currentTarget.timeoutId || 0);
2502 currentTarget.timeoutId = setTimeout(function () {
2503 that.onColumnSearch({
2504 currentTarget: currentTarget,
2505 keyCode: keyCode
2506 });
2507 }, that.options.searchTimeOut);
2508 });
2509 header.off('mouseup', 'input:not([type=radio])').on('mouseup', 'input:not([type=radio])', function (_ref6) {
2510 var currentTarget = _ref6.currentTarget,
2511 keyCode = _ref6.keyCode;
2512 var $input = $__default['default'](currentTarget);
2513 var oldValue = $input.val();
2514
2515 if (oldValue === '') {
2516 return;
2517 }
2518
2519 setTimeout(function () {
2520 syncControls(that);
2521 var newValue = $input.val();
2522
2523 if (newValue === '') {
2524 clearTimeout(currentTarget.timeoutId || 0);
2525 currentTarget.timeoutId = setTimeout(function () {
2526 that.onColumnSearch({
2527 currentTarget: currentTarget,
2528 keyCode: keyCode
2529 });
2530 }, that.options.searchTimeOut);
2531 }
2532 }, 1);
2533 });
2534 header.off('change', 'input[type=radio]').on('change', 'input[type=radio]', function (_ref7) {
2535 var currentTarget = _ref7.currentTarget,
2536 keyCode = _ref7.keyCode;
2537 clearTimeout(currentTarget.timeoutId || 0);
2538 currentTarget.timeoutId = setTimeout(function () {
2539 syncControls(that);
2540 that.onColumnSearch({
2541 currentTarget: currentTarget,
2542 keyCode: keyCode
2543 });
2544 }, that.options.searchTimeOut);
2545 });
2546
2547 if (header.find('.date-filter-control').length > 0) {
2548 $__default['default'].each(that.columns, function (i, _ref8) {
2549 var filterDefault = _ref8.filterDefault,
2550 filterControl = _ref8.filterControl,
2551 field = _ref8.field,
2552 filterDatepickerOptions = _ref8.filterDatepickerOptions;
2553
2554 if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
2555 var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(field));
2556 $datepicker.datepicker(filterDatepickerOptions);
2557
2558 if (filterDefault) {
2559 $datepicker.datepicker('setDate', filterDefault);
2560 }
2561
2562 $datepicker.on('changeDate', function (_ref9) {
2563 var currentTarget = _ref9.currentTarget,
2564 keyCode = _ref9.keyCode;
2565 clearTimeout(currentTarget.timeoutId || 0);
2566 currentTarget.timeoutId = setTimeout(function () {
2567 syncControls(that);
2568 that.onColumnSearch({
2569 currentTarget: currentTarget,
2570 keyCode: keyCode
2571 });
2572 }, that.options.searchTimeOut);
2573 });
2574 }
2575 });
2576 }
2577
2578 if (that.options.sidePagination !== 'server' && !that.options.height) {
2579 that.triggerSearch();
2580 }
2581
2582 if (!that.options.filterControlVisible) {
2583 header.find('.filter-control, .no-filter-control').hide();
2584 }
2585 } else {
2586 header.find('.filter-control, .no-filter-control').hide();
2587 }
2588
2589 that.trigger('created-controls');
2590 }
2591 function getDirectionOfSelectOptions(_alignment) {
2592 var alignment = _alignment === undefined ? 'left' : _alignment.toLowerCase();
2593
2594 switch (alignment) {
2595 case 'left':
2596 return 'ltr';
2597
2598 case 'right':
2599 return 'rtl';
2600
2601 case 'auto':
2602 return 'auto';
2603
2604 default:
2605 return 'ltr';
2606 }
2607 }
2608 function syncControls(that) {
2609 if (that.options.height) {
2610 var controlsTableHeader = that.$tableHeader.find(searchControls);
2611 that.$header.find(searchControls).each(function (_, control) {
2612 var $control = $__default['default'](control);
2613 var controlClass = getElementClass($control);
2614 var foundControl = controlsTableHeader.filter(function (_, ele) {
2615 var eleClass = getElementClass($__default['default'](ele));
2616 return controlClass === eleClass;
2617 });
2618
2619 if (foundControl.length === 0) {
2620 return;
2621 }
2622
2623 if ($control.is('select')) {
2624 $control.find('option:selected').removeAttr('selected');
2625 $control.find("option[value='".concat(foundControl.val(), "']")).attr('selected', true);
2626 } else {
2627 $control.val(foundControl.val());
2628 }
2629 });
2630 }
2631 }
2632 var filterDataMethods = {
2633 func: function func(filterDataSource, selectControl, filterOrderBy, selected) {
2634 var variableValues = window[filterDataSource].apply(); // eslint-disable-next-line guard-for-in
2635
2636 for (var key in variableValues) {
2637 addOptionToSelectControl(selectControl, key, variableValues[key], selected);
2638 }
2639
2640 sortSelectControl(selectControl, filterOrderBy);
2641 },
2642 obj: function obj(filterDataSource, selectControl, filterOrderBy, selected) {
2643 var objectKeys = filterDataSource.split('.');
2644 var variableName = objectKeys.shift();
2645 var variableValues = window[variableName];
2646
2647 if (objectKeys.length > 0) {
2648 objectKeys.forEach(function (key) {
2649 variableValues = variableValues[key];
2650 });
2651 } // eslint-disable-next-line guard-for-in
2652
2653
2654 for (var key in variableValues) {
2655 addOptionToSelectControl(selectControl, key, variableValues[key], selected);
2656 }
2657
2658 sortSelectControl(selectControl, filterOrderBy);
2659 },
2660 var: function _var(filterDataSource, selectControl, filterOrderBy, selected) {
2661 var variableValues = window[filterDataSource];
2662 var isArray = Array.isArray(variableValues);
2663
2664 for (var key in variableValues) {
2665 if (isArray) {
2666 addOptionToSelectControl(selectControl, variableValues[key], variableValues[key], selected);
2667 } else {
2668 addOptionToSelectControl(selectControl, key, variableValues[key], selected);
2669 }
2670 }
2671
2672 sortSelectControl(selectControl, filterOrderBy);
2673 },
2674 url: function url(filterDataSource, selectControl, filterOrderBy, selected) {
2675 $__default['default'].ajax({
2676 url: filterDataSource,
2677 dataType: 'json',
2678 success: function success(data) {
2679 // eslint-disable-next-line guard-for-in
2680 for (var key in data) {
2681 addOptionToSelectControl(selectControl, key, data[key], selected);
2682 }
2683
2684 sortSelectControl(selectControl, filterOrderBy);
2685 }
2686 });
2687 },
2688 json: function json(filterDataSource, selectControl, filterOrderBy, selected) {
2689 var variableValues = JSON.parse(filterDataSource); // eslint-disable-next-line guard-for-in
2690
2691 for (var key in variableValues) {
2692 addOptionToSelectControl(selectControl, key, variableValues[key], selected);
2693 }
2694
2695 sortSelectControl(selectControl, filterOrderBy);
2696 }
2697 };
2698
2699 var Utils$1 = $__default['default'].fn.bootstrapTable.utils;
2700 $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
2701 filterControl: false,
2702 filterControlVisible: true,
2703 // eslint-disable-next-line no-unused-vars
2704 onColumnSearch: function onColumnSearch(field, text) {
2705 return false;
2706 },
2707 onCreatedControls: function onCreatedControls() {
2708 return false;
2709 },
2710 alignmentSelectControlOptions: undefined,
2711 filterTemplate: {
2712 input: function input(that, field, placeholder, value) {
2713 return Utils$1.sprintf('<input type="search" class="form-control bootstrap-table-filter-control-%s search-input" style="width: 100%;" placeholder="%s" value="%s">', field, 'undefined' === typeof placeholder ? '' : placeholder, 'undefined' === typeof value ? '' : value);
2714 },
2715 select: function select(_ref, field) {
2716 var options = _ref.options;
2717 return Utils$1.sprintf('<select class="form-control bootstrap-table-filter-control-%s" style="width: 100%;" dir="%s"></select>', field, getDirectionOfSelectOptions(options.alignmentSelectControlOptions));
2718 },
2719 datepicker: function datepicker(that, field, value) {
2720 return Utils$1.sprintf('<input type="text" class="form-control date-filter-control bootstrap-table-filter-control-%s" style="width: 100%;" value="%s">', field, 'undefined' === typeof value ? '' : value);
2721 }
2722 },
2723 disableControlWhenSearch: false,
2724 searchOnEnterKey: false,
2725 showFilterControlSwitch: false,
2726 // internal variables
2727 valuesFilterControl: []
2728 });
2729 $__default['default'].extend($__default['default'].fn.bootstrapTable.columnDefaults, {
2730 filterControl: undefined,
2731 // input, select, datepicker
2732 filterDataCollector: undefined,
2733 filterData: undefined,
2734 filterDatepickerOptions: {},
2735 filterStrictSearch: false,
2736 filterStartsWithSearch: false,
2737 filterControlPlaceholder: '',
2738 filterDefault: '',
2739 filterOrderBy: 'asc' // asc || desc
2740
2741 });
2742 $__default['default'].extend($__default['default'].fn.bootstrapTable.Constructor.EVENTS, {
2743 'column-search.bs.table': 'onColumnSearch',
2744 'created-controls.bs.table': 'onCreatedControls'
2745 });
2746 $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, {
2747 clear: {
2748 bootstrap3: 'glyphicon-trash icon-clear'
2749 }[$__default['default'].fn.bootstrapTable.theme] || 'fa-trash',
2750 filterControlSwitchHide: {
2751 bootstrap3: 'glyphicon-zoom-out icon-zoom-out',
2752 materialize: 'zoom_out'
2753 }[$__default['default'].fn.bootstrapTable.theme] || 'fa-search-minus',
2754 filterControlSwitchShow: {
2755 bootstrap3: 'glyphicon-zoom-in icon-zoom-in',
2756 materialize: 'zoom_in'
2757 }[$__default['default'].fn.bootstrapTable.theme] || 'fa-search-plus'
2758 });
2759 $__default['default'].extend($__default['default'].fn.bootstrapTable.locales, {
2760 formatFilterControlSwitch: function formatFilterControlSwitch() {
2761 return 'Hide/Show controls';
2762 },
2763 formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
2764 return 'Hide controls';
2765 },
2766 formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
2767 return 'Show controls';
2768 }
2769 });
2770 $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, $__default['default'].fn.bootstrapTable.locales);
2771 $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
2772 formatClearSearch: function formatClearSearch() {
2773 return 'Clear filters';
2774 }
2775 });
2776 $__default['default'].fn.bootstrapTable.methods.push('triggerSearch');
2777 $__default['default'].fn.bootstrapTable.methods.push('clearFilterControl');
2778 $__default['default'].fn.bootstrapTable.methods.push('toggleFilterControl');
2779
2780 $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
2781 _inherits(_class, _$$BootstrapTable);
2782
2783 var _super = _createSuper(_class);
2784
2785 function _class() {
2786 _classCallCheck(this, _class);
2787
2788 return _super.apply(this, arguments);
2789 }
2790
2791 _createClass(_class, [{
2792 key: "init",
2793 value: function init() {
2794 var _this = this;
2795
2796 // Make sure that the filterControl option is set
2797 if (this.options.filterControl) {
2798 // Make sure that the internal variables are set correctly
2799 this.options.valuesFilterControl = [];
2800 this.$el.on('reset-view.bs.table', function () {
2801 // Create controls on $tableHeader if the height is set
2802 if (!_this.options.height) {
2803 return;
2804 } // Avoid recreate the controls
2805
2806
2807 var $controlContainer = getControlContainer(_this);
2808
2809 if (($controlContainer.find('select').length > 0 || $controlContainer.find('input:not([type="checkbox"]):not([type="radio"])').length > 0) && !_this.options.filterControlContainer) {
2810 return;
2811 }
2812
2813 createControls(_this, $controlContainer);
2814 }).on('post-header.bs.table', function () {
2815 setValues(_this);
2816 }).on('post-body.bs.table', function () {
2817 if (_this.options.height && !_this.options.filterControlContainer) {
2818 fixHeaderCSS(_this);
2819 }
2820
2821 _this.$tableLoading.css('top', _this.$header.outerHeight() + 1);
2822 }).on('column-switch.bs.table', function () {
2823 setValues(_this);
2824 }).on('load-success.bs.table', function () {
2825 _this.enableControls(true);
2826 }).on('load-error.bs.table', function () {
2827 _this.enableControls(true);
2828 });
2829 }
2830
2831 _get(_getPrototypeOf(_class.prototype), "init", this).call(this);
2832 }
2833 }, {
2834 key: "initHeader",
2835 value: function initHeader() {
2836 _get(_getPrototypeOf(_class.prototype), "initHeader", this).call(this);
2837
2838 if (!this.options.filterControl || this.options.height) {
2839 return;
2840 }
2841
2842 createControls(this, getControlContainer(this));
2843 }
2844 }, {
2845 key: "initBody",
2846 value: function initBody() {
2847 _get(_getPrototypeOf(_class.prototype), "initBody", this).call(this);
2848
2849 syncControls(this);
2850 initFilterSelectControls(this);
2851 }
2852 }, {
2853 key: "initSearch",
2854 value: function initSearch() {
2855 var _this2 = this;
2856
2857 var that = this;
2858 var fp = $__default['default'].isEmptyObject(that.filterColumnsPartial) ? null : that.filterColumnsPartial;
2859
2860 _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
2861
2862 if (this.options.sidePagination === 'server' || fp === null) {
2863 return;
2864 } // Check partial column filter
2865
2866
2867 that.data = fp ? that.data.filter(function (item, i) {
2868 var itemIsExpected = [];
2869 var keys1 = Object.keys(item);
2870 var keys2 = Object.keys(fp);
2871 var keys = keys1.concat(keys2.filter(function (item) {
2872 return !keys1.includes(item);
2873 }));
2874 keys.forEach(function (key) {
2875 var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
2876 var fval = (fp[key] || '').toLowerCase();
2877 var value = Utils$1.unescapeHTML(Utils$1.getItemField(item, key, false));
2878 var tmpItemIsExpected;
2879
2880 if (fval === '') {
2881 tmpItemIsExpected = true;
2882 } else {
2883 // Fix #142: search use formatted data
2884 if (thisColumn && thisColumn.searchFormatter) {
2885 value = $__default['default'].fn.bootstrapTable.utils.calculateObjectValue(that.header, that.header.formatters[$__default['default'].inArray(key, that.header.fields)], [value, item, i], value);
2886 }
2887
2888 if ($__default['default'].inArray(key, that.header.fields) !== -1) {
2889 if (value === undefined || value === null) {
2890 tmpItemIsExpected = false;
2891 } else if (_typeof(value) === 'object') {
2892 value.forEach(function (objectValue) {
2893 if (tmpItemIsExpected) {
2894 return;
2895 }
2896
2897 if (_this2.options.searchAccentNeutralise) {
2898 objectValue = Utils$1.normalizeAccent(objectValue);
2899 }
2900
2901 tmpItemIsExpected = that.isValueExpected(fval, objectValue, thisColumn, key);
2902 });
2903 } else if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
2904 if (_this2.options.searchAccentNeutralise) {
2905 value = Utils$1.normalizeAccent(value);
2906 }
2907
2908 tmpItemIsExpected = that.isValueExpected(fval, value, thisColumn, key);
2909 }
2910 }
2911 }
2912
2913 itemIsExpected.push(tmpItemIsExpected);
2914 });
2915 return !itemIsExpected.includes(false);
2916 }) : that.data;
2917 that.unsortedData = _toConsumableArray(that.data);
2918 }
2919 }, {
2920 key: "isValueExpected",
2921 value: function isValueExpected(searchValue, value, column, key) {
2922 var tmpItemIsExpected = false;
2923
2924 if (column.filterStrictSearch) {
2925 tmpItemIsExpected = value.toString().toLowerCase() === searchValue.toString().toLowerCase();
2926 } else if (column.filterStartsWithSearch) {
2927 tmpItemIsExpected = "".concat(value).toLowerCase().indexOf(searchValue) === 0;
2928 } else {
2929 tmpItemIsExpected = "".concat(value).toLowerCase().includes(searchValue);
2930 }
2931
2932 var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(\d+)?|(\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm;
2933 var matches = largerSmallerEqualsRegex.exec(searchValue);
2934
2935 if (matches) {
2936 var operator = matches[1] || "".concat(matches[5], "l");
2937 var comparisonValue = matches[2] || matches[3];
2938 var int = parseInt(value, 10);
2939 var comparisonInt = parseInt(comparisonValue, 10);
2940
2941 switch (operator) {
2942 case '>':
2943 case '<l':
2944 tmpItemIsExpected = int > comparisonInt;
2945 break;
2946
2947 case '<':
2948 case '>l':
2949 tmpItemIsExpected = int < comparisonInt;
2950 break;
2951
2952 case '<=':
2953 case '=<':
2954 case '>=l':
2955 case '=>l':
2956 tmpItemIsExpected = int <= comparisonInt;
2957 break;
2958
2959 case '>=':
2960 case '=>':
2961 case '<=l':
2962 case '=<l':
2963 tmpItemIsExpected = int >= comparisonInt;
2964 break;
2965 }
2966 }
2967
2968 if (column.filterCustomSearch) {
2969 var customSearchResult = Utils$1.calculateObjectValue(this, column.filterCustomSearch, [searchValue, value, key, this.options.data], true);
2970
2971 if (customSearchResult !== null) {
2972 tmpItemIsExpected = customSearchResult;
2973 }
2974 }
2975
2976 return tmpItemIsExpected;
2977 }
2978 }, {
2979 key: "initColumnSearch",
2980 value: function initColumnSearch(filterColumnsDefaults) {
2981 copyValues(this);
2982
2983 if (filterColumnsDefaults) {
2984 this.filterColumnsPartial = filterColumnsDefaults;
2985 this.updatePagination(); // eslint-disable-next-line guard-for-in
2986
2987 for (var filter in filterColumnsDefaults) {
2988 this.trigger('column-search', filter, filterColumnsDefaults[filter]);
2989 }
2990 }
2991 }
2992 }, {
2993 key: "onColumnSearch",
2994 value: function onColumnSearch(_ref2) {
2995 var currentTarget = _ref2.currentTarget,
2996 keyCode = _ref2.keyCode;
2997
2998 if ($__default['default'].inArray(keyCode, [37, 38, 39, 40]) > -1) {
2999 return;
3000 }
3001
3002 copyValues(this);
3003 var text = $__default['default'].trim($__default['default'](currentTarget).val());
3004 var $field = $__default['default'](currentTarget).closest('[data-field]').data('field');
3005 this.trigger('column-search', $field, text);
3006
3007 if ($__default['default'].isEmptyObject(this.filterColumnsPartial)) {
3008 this.filterColumnsPartial = {};
3009 }
3010
3011 if (text) {
3012 this.filterColumnsPartial[$field] = text;
3013 } else {
3014 delete this.filterColumnsPartial[$field];
3015 }
3016
3017 this.options.pageNumber = 1;
3018 this.enableControls(false);
3019 this.onSearch({
3020 currentTarget: currentTarget
3021 }, false);
3022 }
3023 }, {
3024 key: "initToolbar",
3025 value: function initToolbar() {
3026 this.showToolbar = this.showToolbar || this.options.showFilterControlSwitch;
3027 this.showSearchClearButton = this.options.filterControl && this.options.showSearchClearButton;
3028
3029 if (this.options.showFilterControlSwitch) {
3030 this.buttons = Object.assign(this.buttons, {
3031 filterControlSwitch: {
3032 text: this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
3033 icon: this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
3034 event: this.toggleFilterControl,
3035 attributes: {
3036 'aria-label': this.options.formatFilterControlSwitch(),
3037 title: this.options.formatFilterControlSwitch()
3038 }
3039 }
3040 });
3041 }
3042
3043 _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
3044 }
3045 }, {
3046 key: "resetSearch",
3047 value: function resetSearch(text) {
3048 if (this.options.filterControl && this.options.showSearchClearButton) {
3049 this.clearFilterControl();
3050 }
3051
3052 _get(_getPrototypeOf(_class.prototype), "resetSearch", this).call(this, text);
3053 }
3054 }, {
3055 key: "clearFilterControl",
3056 value: function clearFilterControl() {
3057 if (this.options.filterControl) {
3058 var that = this;
3059 var cookies = collectBootstrapCookies();
3060 var table = this.$el.closest('table');
3061 var controls = getSearchControls(that);
3062 var search = Utils$1.getSearchInput(this);
3063 var hasValues = false;
3064 var timeoutId = 0;
3065 $__default['default'].each(that.options.valuesFilterControl, function (i, item) {
3066 hasValues = hasValues ? true : item.value !== '';
3067 item.value = '';
3068 });
3069 $__default['default'].each(that.options.filterControls, function (i, item) {
3070 item.text = '';
3071 });
3072 setValues(that); // clear cookies once the filters are clean
3073
3074 clearTimeout(timeoutId);
3075 timeoutId = setTimeout(function () {
3076 if (cookies && cookies.length > 0) {
3077 $__default['default'].each(cookies, function (i, item) {
3078 if (that.deleteCookie !== undefined) {
3079 that.deleteCookie(item);
3080 }
3081 });
3082 }
3083 }, that.options.searchTimeOut); // If there is not any value in the controls exit this method
3084
3085 if (!hasValues) {
3086 return;
3087 } // Clear each type of filter if it exists.
3088 // Requires the body to reload each time a type of filter is found because we never know
3089 // which ones are going to be present.
3090
3091
3092 if (controls.length > 0) {
3093 this.filterColumnsPartial = {};
3094 $__default['default'](controls[0]).trigger(controls[0].tagName === 'INPUT' ? 'keyup' : 'change', {
3095 keyCode: 13
3096 });
3097 } else {
3098 return;
3099 }
3100
3101 if (search.length > 0) {
3102 that.resetSearch();
3103 } // use the default sort order if it exists. do nothing if it does not
3104
3105
3106 if (that.options.sortName !== table.data('sortName') || that.options.sortOrder !== table.data('sortOrder')) {
3107 var sorter = this.$header.find(Utils$1.sprintf('[data-field="%s"]', $__default['default'](controls[0]).closest('table').data('sortName')));
3108
3109 if (sorter.length > 0) {
3110 that.onSort({
3111 type: 'keypress',
3112 currentTarget: sorter
3113 });
3114 $__default['default'](sorter).find('.sortable').trigger('click');
3115 }
3116 }
3117 }
3118 }
3119 }, {
3120 key: "triggerSearch",
3121 value: function triggerSearch() {
3122 var searchControls = getSearchControls(this);
3123 searchControls.each(function () {
3124 var el = $__default['default'](this);
3125
3126 if (el.is('select')) {
3127 el.change();
3128 } else {
3129 el.keyup();
3130 }
3131 });
3132 }
3133 }, {
3134 key: "enableControls",
3135 value: function enableControls(enable) {
3136 if (this.options.disableControlWhenSearch && this.options.sidePagination === 'server') {
3137 var searchControls = getSearchControls(this);
3138
3139 if (!enable) {
3140 searchControls.prop('disabled', 'disabled');
3141 } else {
3142 searchControls.removeProp('disabled');
3143 }
3144 }
3145 }
3146 }, {
3147 key: "toggleFilterControl",
3148 value: function toggleFilterControl() {
3149 this.options.filterControlVisible = !this.options.filterControlVisible;
3150 var $filterControls = getControlContainer(this).find('.filter-control, .no-filter-control');
3151
3152 if (this.options.filterControlVisible) {
3153 $filterControls.show();
3154 } else {
3155 $filterControls.hide();
3156 this.clearFilterControl();
3157 }
3158
3159 var icon = this.options.showButtonIcons ? this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow : '';
3160 var text = this.options.showButtonText ? this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow() : '';
3161 this.$toolbar.find('>.columns').find('.filter-control-switch').html("".concat(Utils$1.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
3162 }
3163 }]);
3164
3165 return _class;
3166 }($__default['default'].BootstrapTable);
3167
3168})));