UNPKG

124 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 ($$8) { 'use strict';
6
7 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
9 var $__default = /*#__PURE__*/_interopDefaultLegacy($$8);
10
11 function _classCallCheck(instance, Constructor) {
12 if (!(instance instanceof Constructor)) {
13 throw new TypeError("Cannot call a class as a function");
14 }
15 }
16
17 function _defineProperties(target, props) {
18 for (var i = 0; i < props.length; i++) {
19 var descriptor = props[i];
20 descriptor.enumerable = descriptor.enumerable || false;
21 descriptor.configurable = true;
22 if ("value" in descriptor) descriptor.writable = true;
23 Object.defineProperty(target, descriptor.key, descriptor);
24 }
25 }
26
27 function _createClass(Constructor, protoProps, staticProps) {
28 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
29 if (staticProps) _defineProperties(Constructor, staticProps);
30 Object.defineProperty(Constructor, "prototype", {
31 writable: false
32 });
33 return Constructor;
34 }
35
36 function _inherits(subClass, superClass) {
37 if (typeof superClass !== "function" && superClass !== null) {
38 throw new TypeError("Super expression must either be null or a function");
39 }
40
41 subClass.prototype = Object.create(superClass && superClass.prototype, {
42 constructor: {
43 value: subClass,
44 writable: true,
45 configurable: true
46 }
47 });
48 Object.defineProperty(subClass, "prototype", {
49 writable: false
50 });
51 if (superClass) _setPrototypeOf(subClass, superClass);
52 }
53
54 function _getPrototypeOf(o) {
55 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
56 return o.__proto__ || Object.getPrototypeOf(o);
57 };
58 return _getPrototypeOf(o);
59 }
60
61 function _setPrototypeOf(o, p) {
62 _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
63 o.__proto__ = p;
64 return o;
65 };
66 return _setPrototypeOf(o, p);
67 }
68
69 function _isNativeReflectConstruct() {
70 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
71 if (Reflect.construct.sham) return false;
72 if (typeof Proxy === "function") return true;
73
74 try {
75 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
76 return true;
77 } catch (e) {
78 return false;
79 }
80 }
81
82 function _assertThisInitialized(self) {
83 if (self === void 0) {
84 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
85 }
86
87 return self;
88 }
89
90 function _possibleConstructorReturn(self, call) {
91 if (call && (typeof call === "object" || typeof call === "function")) {
92 return call;
93 } else if (call !== void 0) {
94 throw new TypeError("Derived constructors may only return object or undefined");
95 }
96
97 return _assertThisInitialized(self);
98 }
99
100 function _createSuper(Derived) {
101 var hasNativeReflectConstruct = _isNativeReflectConstruct();
102
103 return function _createSuperInternal() {
104 var Super = _getPrototypeOf(Derived),
105 result;
106
107 if (hasNativeReflectConstruct) {
108 var NewTarget = _getPrototypeOf(this).constructor;
109
110 result = Reflect.construct(Super, arguments, NewTarget);
111 } else {
112 result = Super.apply(this, arguments);
113 }
114
115 return _possibleConstructorReturn(this, result);
116 };
117 }
118
119 function _superPropBase(object, property) {
120 while (!Object.prototype.hasOwnProperty.call(object, property)) {
121 object = _getPrototypeOf(object);
122 if (object === null) break;
123 }
124
125 return object;
126 }
127
128 function _get() {
129 if (typeof Reflect !== "undefined" && Reflect.get) {
130 _get = Reflect.get.bind();
131 } else {
132 _get = function _get(target, property, receiver) {
133 var base = _superPropBase(target, property);
134
135 if (!base) return;
136 var desc = Object.getOwnPropertyDescriptor(base, property);
137
138 if (desc.get) {
139 return desc.get.call(arguments.length < 3 ? target : receiver);
140 }
141
142 return desc.value;
143 };
144 }
145
146 return _get.apply(this, arguments);
147 }
148
149 function _unsupportedIterableToArray(o, minLen) {
150 if (!o) return;
151 if (typeof o === "string") return _arrayLikeToArray(o, minLen);
152 var n = Object.prototype.toString.call(o).slice(8, -1);
153 if (n === "Object" && o.constructor) n = o.constructor.name;
154 if (n === "Map" || n === "Set") return Array.from(o);
155 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
156 }
157
158 function _arrayLikeToArray(arr, len) {
159 if (len == null || len > arr.length) len = arr.length;
160
161 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
162
163 return arr2;
164 }
165
166 function _createForOfIteratorHelper(o, allowArrayLike) {
167 var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
168
169 if (!it) {
170 if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
171 if (it) o = it;
172 var i = 0;
173
174 var F = function () {};
175
176 return {
177 s: F,
178 n: function () {
179 if (i >= o.length) return {
180 done: true
181 };
182 return {
183 done: false,
184 value: o[i++]
185 };
186 },
187 e: function (e) {
188 throw e;
189 },
190 f: F
191 };
192 }
193
194 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
195 }
196
197 var normalCompletion = true,
198 didErr = false,
199 err;
200 return {
201 s: function () {
202 it = it.call(o);
203 },
204 n: function () {
205 var step = it.next();
206 normalCompletion = step.done;
207 return step;
208 },
209 e: function (e) {
210 didErr = true;
211 err = e;
212 },
213 f: function () {
214 try {
215 if (!normalCompletion && it.return != null) it.return();
216 } finally {
217 if (didErr) throw err;
218 }
219 }
220 };
221 }
222
223 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
224
225 var check = function (it) {
226 return it && it.Math == Math && it;
227 };
228
229 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
230 var global$e =
231 // eslint-disable-next-line es-x/no-global-this -- safe
232 check(typeof globalThis == 'object' && globalThis) ||
233 check(typeof window == 'object' && window) ||
234 // eslint-disable-next-line no-restricted-globals -- safe
235 check(typeof self == 'object' && self) ||
236 check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
237 // eslint-disable-next-line no-new-func -- fallback
238 (function () { return this; })() || Function('return this')();
239
240 var objectGetOwnPropertyDescriptor = {};
241
242 var fails$k = function (exec) {
243 try {
244 return !!exec();
245 } catch (error) {
246 return true;
247 }
248 };
249
250 var fails$j = fails$k;
251
252 // Detect IE8's incomplete defineProperty implementation
253 var descriptors = !fails$j(function () {
254 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
255 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
256 });
257
258 var fails$i = fails$k;
259
260 var functionBindNative = !fails$i(function () {
261 // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
262 var test = (function () { /* empty */ }).bind();
263 // eslint-disable-next-line no-prototype-builtins -- safe
264 return typeof test != 'function' || test.hasOwnProperty('prototype');
265 });
266
267 var NATIVE_BIND$3 = functionBindNative;
268
269 var call$b = Function.prototype.call;
270
271 var functionCall = NATIVE_BIND$3 ? call$b.bind(call$b) : function () {
272 return call$b.apply(call$b, arguments);
273 };
274
275 var objectPropertyIsEnumerable = {};
276
277 var $propertyIsEnumerable = {}.propertyIsEnumerable;
278 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
279 var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
280
281 // Nashorn ~ JDK8 bug
282 var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
283
284 // `Object.prototype.propertyIsEnumerable` method implementation
285 // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
286 objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
287 var descriptor = getOwnPropertyDescriptor$1(this, V);
288 return !!descriptor && descriptor.enumerable;
289 } : $propertyIsEnumerable;
290
291 var createPropertyDescriptor$3 = function (bitmap, value) {
292 return {
293 enumerable: !(bitmap & 1),
294 configurable: !(bitmap & 2),
295 writable: !(bitmap & 4),
296 value: value
297 };
298 };
299
300 var NATIVE_BIND$2 = functionBindNative;
301
302 var FunctionPrototype$2 = Function.prototype;
303 var bind$2 = FunctionPrototype$2.bind;
304 var call$a = FunctionPrototype$2.call;
305 var uncurryThis$k = NATIVE_BIND$2 && bind$2.bind(call$a, call$a);
306
307 var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
308 return fn && uncurryThis$k(fn);
309 } : function (fn) {
310 return fn && function () {
311 return call$a.apply(fn, arguments);
312 };
313 };
314
315 var uncurryThis$j = functionUncurryThis;
316
317 var toString$9 = uncurryThis$j({}.toString);
318 var stringSlice$5 = uncurryThis$j(''.slice);
319
320 var classofRaw$1 = function (it) {
321 return stringSlice$5(toString$9(it), 8, -1);
322 };
323
324 var uncurryThis$i = functionUncurryThis;
325 var fails$h = fails$k;
326 var classof$7 = classofRaw$1;
327
328 var $Object$3 = Object;
329 var split = uncurryThis$i(''.split);
330
331 // fallback for non-array-like ES3 and non-enumerable old V8 strings
332 var indexedObject = fails$h(function () {
333 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
334 // eslint-disable-next-line no-prototype-builtins -- safe
335 return !$Object$3('z').propertyIsEnumerable(0);
336 }) ? function (it) {
337 return classof$7(it) == 'String' ? split(it, '') : $Object$3(it);
338 } : $Object$3;
339
340 var $TypeError$9 = TypeError;
341
342 // `RequireObjectCoercible` abstract operation
343 // https://tc39.es/ecma262/#sec-requireobjectcoercible
344 var requireObjectCoercible$7 = function (it) {
345 if (it == undefined) throw $TypeError$9("Can't call method on " + it);
346 return it;
347 };
348
349 // toObject with fallback for non-array-like ES3 strings
350 var IndexedObject$2 = indexedObject;
351 var requireObjectCoercible$6 = requireObjectCoercible$7;
352
353 var toIndexedObject$5 = function (it) {
354 return IndexedObject$2(requireObjectCoercible$6(it));
355 };
356
357 // `IsCallable` abstract operation
358 // https://tc39.es/ecma262/#sec-iscallable
359 var isCallable$e = function (argument) {
360 return typeof argument == 'function';
361 };
362
363 var isCallable$d = isCallable$e;
364
365 var isObject$8 = function (it) {
366 return typeof it == 'object' ? it !== null : isCallable$d(it);
367 };
368
369 var global$d = global$e;
370 var isCallable$c = isCallable$e;
371
372 var aFunction = function (argument) {
373 return isCallable$c(argument) ? argument : undefined;
374 };
375
376 var getBuiltIn$5 = function (namespace, method) {
377 return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
378 };
379
380 var uncurryThis$h = functionUncurryThis;
381
382 var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
383
384 var getBuiltIn$4 = getBuiltIn$5;
385
386 var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
387
388 var global$c = global$e;
389 var userAgent = engineUserAgent;
390
391 var process = global$c.process;
392 var Deno = global$c.Deno;
393 var versions = process && process.versions || Deno && Deno.version;
394 var v8 = versions && versions.v8;
395 var match, version;
396
397 if (v8) {
398 match = v8.split('.');
399 // in old Chrome, versions of V8 isn't V8 = Chrome / 10
400 // but their correct versions are not interesting for us
401 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
402 }
403
404 // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
405 // so check `userAgent` even if `.v8` exists, but 0
406 if (!version && userAgent) {
407 match = userAgent.match(/Edge\/(\d+)/);
408 if (!match || match[1] >= 74) {
409 match = userAgent.match(/Chrome\/(\d+)/);
410 if (match) version = +match[1];
411 }
412 }
413
414 var engineV8Version = version;
415
416 /* eslint-disable es-x/no-symbol -- required for testing */
417
418 var V8_VERSION$2 = engineV8Version;
419 var fails$g = fails$k;
420
421 // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
422 var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$g(function () {
423 var symbol = Symbol();
424 // Chrome 38 Symbol has incorrect toString conversion
425 // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
426 return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
427 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
428 !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
429 });
430
431 /* eslint-disable es-x/no-symbol -- required for testing */
432
433 var NATIVE_SYMBOL$1 = nativeSymbol;
434
435 var useSymbolAsUid = NATIVE_SYMBOL$1
436 && !Symbol.sham
437 && typeof Symbol.iterator == 'symbol';
438
439 var getBuiltIn$3 = getBuiltIn$5;
440 var isCallable$b = isCallable$e;
441 var isPrototypeOf$1 = objectIsPrototypeOf;
442 var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
443
444 var $Object$2 = Object;
445
446 var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
447 return typeof it == 'symbol';
448 } : function (it) {
449 var $Symbol = getBuiltIn$3('Symbol');
450 return isCallable$b($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
451 };
452
453 var $String$2 = String;
454
455 var tryToString$2 = function (argument) {
456 try {
457 return $String$2(argument);
458 } catch (error) {
459 return 'Object';
460 }
461 };
462
463 var isCallable$a = isCallable$e;
464 var tryToString$1 = tryToString$2;
465
466 var $TypeError$8 = TypeError;
467
468 // `Assert: IsCallable(argument) is true`
469 var aCallable$2 = function (argument) {
470 if (isCallable$a(argument)) return argument;
471 throw $TypeError$8(tryToString$1(argument) + ' is not a function');
472 };
473
474 var aCallable$1 = aCallable$2;
475
476 // `GetMethod` abstract operation
477 // https://tc39.es/ecma262/#sec-getmethod
478 var getMethod$4 = function (V, P) {
479 var func = V[P];
480 return func == null ? undefined : aCallable$1(func);
481 };
482
483 var call$9 = functionCall;
484 var isCallable$9 = isCallable$e;
485 var isObject$7 = isObject$8;
486
487 var $TypeError$7 = TypeError;
488
489 // `OrdinaryToPrimitive` abstract operation
490 // https://tc39.es/ecma262/#sec-ordinarytoprimitive
491 var ordinaryToPrimitive$1 = function (input, pref) {
492 var fn, val;
493 if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
494 if (isCallable$9(fn = input.valueOf) && !isObject$7(val = call$9(fn, input))) return val;
495 if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
496 throw $TypeError$7("Can't convert object to primitive value");
497 };
498
499 var shared$4 = {exports: {}};
500
501 var global$b = global$e;
502
503 // eslint-disable-next-line es-x/no-object-defineproperty -- safe
504 var defineProperty$2 = Object.defineProperty;
505
506 var defineGlobalProperty$3 = function (key, value) {
507 try {
508 defineProperty$2(global$b, key, { value: value, configurable: true, writable: true });
509 } catch (error) {
510 global$b[key] = value;
511 } return value;
512 };
513
514 var global$a = global$e;
515 var defineGlobalProperty$2 = defineGlobalProperty$3;
516
517 var SHARED = '__core-js_shared__';
518 var store$3 = global$a[SHARED] || defineGlobalProperty$2(SHARED, {});
519
520 var sharedStore = store$3;
521
522 var store$2 = sharedStore;
523
524 (shared$4.exports = function (key, value) {
525 return store$2[key] || (store$2[key] = value !== undefined ? value : {});
526 })('versions', []).push({
527 version: '3.22.8',
528 mode: 'global',
529 copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
530 license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
531 source: 'https://github.com/zloirock/core-js'
532 });
533
534 var requireObjectCoercible$5 = requireObjectCoercible$7;
535
536 var $Object$1 = Object;
537
538 // `ToObject` abstract operation
539 // https://tc39.es/ecma262/#sec-toobject
540 var toObject$4 = function (argument) {
541 return $Object$1(requireObjectCoercible$5(argument));
542 };
543
544 var uncurryThis$g = functionUncurryThis;
545 var toObject$3 = toObject$4;
546
547 var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
548
549 // `HasOwnProperty` abstract operation
550 // https://tc39.es/ecma262/#sec-hasownproperty
551 // eslint-disable-next-line es-x/no-object-hasown -- safe
552 var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
553 return hasOwnProperty(toObject$3(it), key);
554 };
555
556 var uncurryThis$f = functionUncurryThis;
557
558 var id = 0;
559 var postfix = Math.random();
560 var toString$8 = uncurryThis$f(1.0.toString);
561
562 var uid$2 = function (key) {
563 return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
564 };
565
566 var global$9 = global$e;
567 var shared$3 = shared$4.exports;
568 var hasOwn$7 = hasOwnProperty_1;
569 var uid$1 = uid$2;
570 var NATIVE_SYMBOL = nativeSymbol;
571 var USE_SYMBOL_AS_UID = useSymbolAsUid;
572
573 var WellKnownSymbolsStore = shared$3('wks');
574 var Symbol$1 = global$9.Symbol;
575 var symbolFor = Symbol$1 && Symbol$1['for'];
576 var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
577
578 var wellKnownSymbol$c = function (name) {
579 if (!hasOwn$7(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
580 var description = 'Symbol.' + name;
581 if (NATIVE_SYMBOL && hasOwn$7(Symbol$1, name)) {
582 WellKnownSymbolsStore[name] = Symbol$1[name];
583 } else if (USE_SYMBOL_AS_UID && symbolFor) {
584 WellKnownSymbolsStore[name] = symbolFor(description);
585 } else {
586 WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
587 }
588 } return WellKnownSymbolsStore[name];
589 };
590
591 var call$8 = functionCall;
592 var isObject$6 = isObject$8;
593 var isSymbol$1 = isSymbol$2;
594 var getMethod$3 = getMethod$4;
595 var ordinaryToPrimitive = ordinaryToPrimitive$1;
596 var wellKnownSymbol$b = wellKnownSymbol$c;
597
598 var $TypeError$6 = TypeError;
599 var TO_PRIMITIVE = wellKnownSymbol$b('toPrimitive');
600
601 // `ToPrimitive` abstract operation
602 // https://tc39.es/ecma262/#sec-toprimitive
603 var toPrimitive$1 = function (input, pref) {
604 if (!isObject$6(input) || isSymbol$1(input)) return input;
605 var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
606 var result;
607 if (exoticToPrim) {
608 if (pref === undefined) pref = 'default';
609 result = call$8(exoticToPrim, input, pref);
610 if (!isObject$6(result) || isSymbol$1(result)) return result;
611 throw $TypeError$6("Can't convert object to primitive value");
612 }
613 if (pref === undefined) pref = 'number';
614 return ordinaryToPrimitive(input, pref);
615 };
616
617 var toPrimitive = toPrimitive$1;
618 var isSymbol = isSymbol$2;
619
620 // `ToPropertyKey` abstract operation
621 // https://tc39.es/ecma262/#sec-topropertykey
622 var toPropertyKey$3 = function (argument) {
623 var key = toPrimitive(argument, 'string');
624 return isSymbol(key) ? key : key + '';
625 };
626
627 var global$8 = global$e;
628 var isObject$5 = isObject$8;
629
630 var document$1 = global$8.document;
631 // typeof document.createElement is 'object' in old IE
632 var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
633
634 var documentCreateElement$2 = function (it) {
635 return EXISTS$1 ? document$1.createElement(it) : {};
636 };
637
638 var DESCRIPTORS$7 = descriptors;
639 var fails$f = fails$k;
640 var createElement = documentCreateElement$2;
641
642 // Thanks to IE8 for its funny defineProperty
643 var ie8DomDefine = !DESCRIPTORS$7 && !fails$f(function () {
644 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
645 return Object.defineProperty(createElement('div'), 'a', {
646 get: function () { return 7; }
647 }).a != 7;
648 });
649
650 var DESCRIPTORS$6 = descriptors;
651 var call$7 = functionCall;
652 var propertyIsEnumerableModule = objectPropertyIsEnumerable;
653 var createPropertyDescriptor$2 = createPropertyDescriptor$3;
654 var toIndexedObject$4 = toIndexedObject$5;
655 var toPropertyKey$2 = toPropertyKey$3;
656 var hasOwn$6 = hasOwnProperty_1;
657 var IE8_DOM_DEFINE$1 = ie8DomDefine;
658
659 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
660 var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
661
662 // `Object.getOwnPropertyDescriptor` method
663 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
664 objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
665 O = toIndexedObject$4(O);
666 P = toPropertyKey$2(P);
667 if (IE8_DOM_DEFINE$1) try {
668 return $getOwnPropertyDescriptor$1(O, P);
669 } catch (error) { /* empty */ }
670 if (hasOwn$6(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule.f, O, P), O[P]);
671 };
672
673 var objectDefineProperty = {};
674
675 var DESCRIPTORS$5 = descriptors;
676 var fails$e = fails$k;
677
678 // V8 ~ Chrome 36-
679 // https://bugs.chromium.org/p/v8/issues/detail?id=3334
680 var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$e(function () {
681 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
682 return Object.defineProperty(function () { /* empty */ }, 'prototype', {
683 value: 42,
684 writable: false
685 }).prototype != 42;
686 });
687
688 var isObject$4 = isObject$8;
689
690 var $String$1 = String;
691 var $TypeError$5 = TypeError;
692
693 // `Assert: Type(argument) is Object`
694 var anObject$b = function (argument) {
695 if (isObject$4(argument)) return argument;
696 throw $TypeError$5($String$1(argument) + ' is not an object');
697 };
698
699 var DESCRIPTORS$4 = descriptors;
700 var IE8_DOM_DEFINE = ie8DomDefine;
701 var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
702 var anObject$a = anObject$b;
703 var toPropertyKey$1 = toPropertyKey$3;
704
705 var $TypeError$4 = TypeError;
706 // eslint-disable-next-line es-x/no-object-defineproperty -- safe
707 var $defineProperty = Object.defineProperty;
708 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
709 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
710 var ENUMERABLE = 'enumerable';
711 var CONFIGURABLE$1 = 'configurable';
712 var WRITABLE = 'writable';
713
714 // `Object.defineProperty` method
715 // https://tc39.es/ecma262/#sec-object.defineproperty
716 objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
717 anObject$a(O);
718 P = toPropertyKey$1(P);
719 anObject$a(Attributes);
720 if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
721 var current = $getOwnPropertyDescriptor(O, P);
722 if (current && current[WRITABLE]) {
723 O[P] = Attributes.value;
724 Attributes = {
725 configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
726 enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
727 writable: false
728 };
729 }
730 } return $defineProperty(O, P, Attributes);
731 } : $defineProperty : function defineProperty(O, P, Attributes) {
732 anObject$a(O);
733 P = toPropertyKey$1(P);
734 anObject$a(Attributes);
735 if (IE8_DOM_DEFINE) try {
736 return $defineProperty(O, P, Attributes);
737 } catch (error) { /* empty */ }
738 if ('get' in Attributes || 'set' in Attributes) throw $TypeError$4('Accessors not supported');
739 if ('value' in Attributes) O[P] = Attributes.value;
740 return O;
741 };
742
743 var DESCRIPTORS$3 = descriptors;
744 var definePropertyModule$3 = objectDefineProperty;
745 var createPropertyDescriptor$1 = createPropertyDescriptor$3;
746
747 var createNonEnumerableProperty$5 = DESCRIPTORS$3 ? function (object, key, value) {
748 return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
749 } : function (object, key, value) {
750 object[key] = value;
751 return object;
752 };
753
754 var makeBuiltIn$2 = {exports: {}};
755
756 var DESCRIPTORS$2 = descriptors;
757 var hasOwn$5 = hasOwnProperty_1;
758
759 var FunctionPrototype$1 = Function.prototype;
760 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
761 var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
762
763 var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
764 // additional protection from minified / mangled / dropped function names
765 var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
766 var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype$1, 'name').configurable));
767
768 var functionName = {
769 EXISTS: EXISTS,
770 PROPER: PROPER,
771 CONFIGURABLE: CONFIGURABLE
772 };
773
774 var uncurryThis$e = functionUncurryThis;
775 var isCallable$8 = isCallable$e;
776 var store$1 = sharedStore;
777
778 var functionToString = uncurryThis$e(Function.toString);
779
780 // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
781 if (!isCallable$8(store$1.inspectSource)) {
782 store$1.inspectSource = function (it) {
783 return functionToString(it);
784 };
785 }
786
787 var inspectSource$3 = store$1.inspectSource;
788
789 var global$7 = global$e;
790 var isCallable$7 = isCallable$e;
791 var inspectSource$2 = inspectSource$3;
792
793 var WeakMap$1 = global$7.WeakMap;
794
795 var nativeWeakMap = isCallable$7(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
796
797 var shared$2 = shared$4.exports;
798 var uid = uid$2;
799
800 var keys = shared$2('keys');
801
802 var sharedKey$2 = function (key) {
803 return keys[key] || (keys[key] = uid(key));
804 };
805
806 var hiddenKeys$4 = {};
807
808 var NATIVE_WEAK_MAP = nativeWeakMap;
809 var global$6 = global$e;
810 var uncurryThis$d = functionUncurryThis;
811 var isObject$3 = isObject$8;
812 var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
813 var hasOwn$4 = hasOwnProperty_1;
814 var shared$1 = sharedStore;
815 var sharedKey$1 = sharedKey$2;
816 var hiddenKeys$3 = hiddenKeys$4;
817
818 var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
819 var TypeError$1 = global$6.TypeError;
820 var WeakMap = global$6.WeakMap;
821 var set, get, has;
822
823 var enforce = function (it) {
824 return has(it) ? get(it) : set(it, {});
825 };
826
827 var getterFor = function (TYPE) {
828 return function (it) {
829 var state;
830 if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
831 throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
832 } return state;
833 };
834 };
835
836 if (NATIVE_WEAK_MAP || shared$1.state) {
837 var store = shared$1.state || (shared$1.state = new WeakMap());
838 var wmget = uncurryThis$d(store.get);
839 var wmhas = uncurryThis$d(store.has);
840 var wmset = uncurryThis$d(store.set);
841 set = function (it, metadata) {
842 if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
843 metadata.facade = it;
844 wmset(store, it, metadata);
845 return metadata;
846 };
847 get = function (it) {
848 return wmget(store, it) || {};
849 };
850 has = function (it) {
851 return wmhas(store, it);
852 };
853 } else {
854 var STATE = sharedKey$1('state');
855 hiddenKeys$3[STATE] = true;
856 set = function (it, metadata) {
857 if (hasOwn$4(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
858 metadata.facade = it;
859 createNonEnumerableProperty$4(it, STATE, metadata);
860 return metadata;
861 };
862 get = function (it) {
863 return hasOwn$4(it, STATE) ? it[STATE] : {};
864 };
865 has = function (it) {
866 return hasOwn$4(it, STATE);
867 };
868 }
869
870 var internalState = {
871 set: set,
872 get: get,
873 has: has,
874 enforce: enforce,
875 getterFor: getterFor
876 };
877
878 var fails$d = fails$k;
879 var isCallable$6 = isCallable$e;
880 var hasOwn$3 = hasOwnProperty_1;
881 var DESCRIPTORS$1 = descriptors;
882 var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
883 var inspectSource$1 = inspectSource$3;
884 var InternalStateModule = internalState;
885
886 var enforceInternalState = InternalStateModule.enforce;
887 var getInternalState$1 = InternalStateModule.get;
888 // eslint-disable-next-line es-x/no-object-defineproperty -- safe
889 var defineProperty$1 = Object.defineProperty;
890
891 var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$d(function () {
892 return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
893 });
894
895 var TEMPLATE = String(String).split('String');
896
897 var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
898 if (String(name).slice(0, 7) === 'Symbol(') {
899 name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
900 }
901 if (options && options.getter) name = 'get ' + name;
902 if (options && options.setter) name = 'set ' + name;
903 if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
904 defineProperty$1(value, 'name', { value: name, configurable: true });
905 }
906 if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
907 defineProperty$1(value, 'length', { value: options.arity });
908 }
909 try {
910 if (options && hasOwn$3(options, 'constructor') && options.constructor) {
911 if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
912 // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
913 } else if (value.prototype) value.prototype = undefined;
914 } catch (error) { /* empty */ }
915 var state = enforceInternalState(value);
916 if (!hasOwn$3(state, 'source')) {
917 state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
918 } return value;
919 };
920
921 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
922 // eslint-disable-next-line no-extend-native -- required
923 Function.prototype.toString = makeBuiltIn$1(function toString() {
924 return isCallable$6(this) && getInternalState$1(this).source || inspectSource$1(this);
925 }, 'toString');
926
927 var isCallable$5 = isCallable$e;
928 var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
929 var makeBuiltIn = makeBuiltIn$2.exports;
930 var defineGlobalProperty$1 = defineGlobalProperty$3;
931
932 var defineBuiltIn$4 = function (O, key, value, options) {
933 if (!options) options = {};
934 var simple = options.enumerable;
935 var name = options.name !== undefined ? options.name : key;
936 if (isCallable$5(value)) makeBuiltIn(value, name, options);
937 if (options.global) {
938 if (simple) O[key] = value;
939 else defineGlobalProperty$1(key, value);
940 } else {
941 if (!options.unsafe) delete O[key];
942 else if (O[key]) simple = true;
943 if (simple) O[key] = value;
944 else createNonEnumerableProperty$3(O, key, value);
945 } return O;
946 };
947
948 var objectGetOwnPropertyNames = {};
949
950 var ceil = Math.ceil;
951 var floor$1 = Math.floor;
952
953 // `Math.trunc` method
954 // https://tc39.es/ecma262/#sec-math.trunc
955 // eslint-disable-next-line es-x/no-math-trunc -- safe
956 var mathTrunc = Math.trunc || function trunc(x) {
957 var n = +x;
958 return (n > 0 ? floor$1 : ceil)(n);
959 };
960
961 var trunc = mathTrunc;
962
963 // `ToIntegerOrInfinity` abstract operation
964 // https://tc39.es/ecma262/#sec-tointegerorinfinity
965 var toIntegerOrInfinity$4 = function (argument) {
966 var number = +argument;
967 // eslint-disable-next-line no-self-compare -- NaN check
968 return number !== number || number === 0 ? 0 : trunc(number);
969 };
970
971 var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
972
973 var max$2 = Math.max;
974 var min$3 = Math.min;
975
976 // Helper for a popular repeating case of the spec:
977 // Let integer be ? ToInteger(index).
978 // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
979 var toAbsoluteIndex$2 = function (index, length) {
980 var integer = toIntegerOrInfinity$3(index);
981 return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
982 };
983
984 var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
985
986 var min$2 = Math.min;
987
988 // `ToLength` abstract operation
989 // https://tc39.es/ecma262/#sec-tolength
990 var toLength$3 = function (argument) {
991 return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
992 };
993
994 var toLength$2 = toLength$3;
995
996 // `LengthOfArrayLike` abstract operation
997 // https://tc39.es/ecma262/#sec-lengthofarraylike
998 var lengthOfArrayLike$4 = function (obj) {
999 return toLength$2(obj.length);
1000 };
1001
1002 var toIndexedObject$3 = toIndexedObject$5;
1003 var toAbsoluteIndex$1 = toAbsoluteIndex$2;
1004 var lengthOfArrayLike$3 = lengthOfArrayLike$4;
1005
1006 // `Array.prototype.{ indexOf, includes }` methods implementation
1007 var createMethod$2 = function (IS_INCLUDES) {
1008 return function ($this, el, fromIndex) {
1009 var O = toIndexedObject$3($this);
1010 var length = lengthOfArrayLike$3(O);
1011 var index = toAbsoluteIndex$1(fromIndex, length);
1012 var value;
1013 // Array#includes uses SameValueZero equality algorithm
1014 // eslint-disable-next-line no-self-compare -- NaN check
1015 if (IS_INCLUDES && el != el) while (length > index) {
1016 value = O[index++];
1017 // eslint-disable-next-line no-self-compare -- NaN check
1018 if (value != value) return true;
1019 // Array#indexOf ignores holes, Array#includes - not
1020 } else for (;length > index; index++) {
1021 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
1022 } return !IS_INCLUDES && -1;
1023 };
1024 };
1025
1026 var arrayIncludes = {
1027 // `Array.prototype.includes` method
1028 // https://tc39.es/ecma262/#sec-array.prototype.includes
1029 includes: createMethod$2(true),
1030 // `Array.prototype.indexOf` method
1031 // https://tc39.es/ecma262/#sec-array.prototype.indexof
1032 indexOf: createMethod$2(false)
1033 };
1034
1035 var uncurryThis$c = functionUncurryThis;
1036 var hasOwn$2 = hasOwnProperty_1;
1037 var toIndexedObject$2 = toIndexedObject$5;
1038 var indexOf$1 = arrayIncludes.indexOf;
1039 var hiddenKeys$2 = hiddenKeys$4;
1040
1041 var push$3 = uncurryThis$c([].push);
1042
1043 var objectKeysInternal = function (object, names) {
1044 var O = toIndexedObject$2(object);
1045 var i = 0;
1046 var result = [];
1047 var key;
1048 for (key in O) !hasOwn$2(hiddenKeys$2, key) && hasOwn$2(O, key) && push$3(result, key);
1049 // Don't enum bug & hidden keys
1050 while (names.length > i) if (hasOwn$2(O, key = names[i++])) {
1051 ~indexOf$1(result, key) || push$3(result, key);
1052 }
1053 return result;
1054 };
1055
1056 // IE8- don't enum bug keys
1057 var enumBugKeys$3 = [
1058 'constructor',
1059 'hasOwnProperty',
1060 'isPrototypeOf',
1061 'propertyIsEnumerable',
1062 'toLocaleString',
1063 'toString',
1064 'valueOf'
1065 ];
1066
1067 var internalObjectKeys$1 = objectKeysInternal;
1068 var enumBugKeys$2 = enumBugKeys$3;
1069
1070 var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1071
1072 // `Object.getOwnPropertyNames` method
1073 // https://tc39.es/ecma262/#sec-object.getownpropertynames
1074 // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
1075 objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1076 return internalObjectKeys$1(O, hiddenKeys$1);
1077 };
1078
1079 var objectGetOwnPropertySymbols = {};
1080
1081 // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
1082 objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1083
1084 var getBuiltIn$2 = getBuiltIn$5;
1085 var uncurryThis$b = functionUncurryThis;
1086 var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1087 var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1088 var anObject$9 = anObject$b;
1089
1090 var concat$1 = uncurryThis$b([].concat);
1091
1092 // all object keys, includes non-enumerable and symbols
1093 var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
1094 var keys = getOwnPropertyNamesModule.f(anObject$9(it));
1095 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1096 return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1097 };
1098
1099 var hasOwn$1 = hasOwnProperty_1;
1100 var ownKeys = ownKeys$1;
1101 var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1102 var definePropertyModule$2 = objectDefineProperty;
1103
1104 var copyConstructorProperties$1 = function (target, source, exceptions) {
1105 var keys = ownKeys(source);
1106 var defineProperty = definePropertyModule$2.f;
1107 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1108 for (var i = 0; i < keys.length; i++) {
1109 var key = keys[i];
1110 if (!hasOwn$1(target, key) && !(exceptions && hasOwn$1(exceptions, key))) {
1111 defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1112 }
1113 }
1114 };
1115
1116 var fails$c = fails$k;
1117 var isCallable$4 = isCallable$e;
1118
1119 var replacement = /#|\.prototype\./;
1120
1121 var isForced$1 = function (feature, detection) {
1122 var value = data[normalize(feature)];
1123 return value == POLYFILL ? true
1124 : value == NATIVE ? false
1125 : isCallable$4(detection) ? fails$c(detection)
1126 : !!detection;
1127 };
1128
1129 var normalize = isForced$1.normalize = function (string) {
1130 return String(string).replace(replacement, '.').toLowerCase();
1131 };
1132
1133 var data = isForced$1.data = {};
1134 var NATIVE = isForced$1.NATIVE = 'N';
1135 var POLYFILL = isForced$1.POLYFILL = 'P';
1136
1137 var isForced_1 = isForced$1;
1138
1139 var global$5 = global$e;
1140 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1141 var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1142 var defineBuiltIn$3 = defineBuiltIn$4;
1143 var defineGlobalProperty = defineGlobalProperty$3;
1144 var copyConstructorProperties = copyConstructorProperties$1;
1145 var isForced = isForced_1;
1146
1147 /*
1148 options.target - name of the target object
1149 options.global - target is the global object
1150 options.stat - export as static methods of target
1151 options.proto - export as prototype methods of target
1152 options.real - real prototype method for the `pure` version
1153 options.forced - export even if the native feature is available
1154 options.bind - bind methods to the target, required for the `pure` version
1155 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1156 options.unsafe - use the simple assignment of property instead of delete + defineProperty
1157 options.sham - add a flag to not completely full polyfills
1158 options.enumerable - export as enumerable property
1159 options.dontCallGetSet - prevent calling a getter on target
1160 options.name - the .name of the function if it does not match the key
1161 */
1162 var _export = function (options, source) {
1163 var TARGET = options.target;
1164 var GLOBAL = options.global;
1165 var STATIC = options.stat;
1166 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1167 if (GLOBAL) {
1168 target = global$5;
1169 } else if (STATIC) {
1170 target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
1171 } else {
1172 target = (global$5[TARGET] || {}).prototype;
1173 }
1174 if (target) for (key in source) {
1175 sourceProperty = source[key];
1176 if (options.dontCallGetSet) {
1177 descriptor = getOwnPropertyDescriptor(target, key);
1178 targetProperty = descriptor && descriptor.value;
1179 } else targetProperty = target[key];
1180 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1181 // contained in target
1182 if (!FORCED && targetProperty !== undefined) {
1183 if (typeof sourceProperty == typeof targetProperty) continue;
1184 copyConstructorProperties(sourceProperty, targetProperty);
1185 }
1186 // add a flag to not completely full polyfills
1187 if (options.sham || (targetProperty && targetProperty.sham)) {
1188 createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1189 }
1190 defineBuiltIn$3(target, key, sourceProperty, options);
1191 }
1192 };
1193
1194 var objectDefineProperties = {};
1195
1196 var internalObjectKeys = objectKeysInternal;
1197 var enumBugKeys$1 = enumBugKeys$3;
1198
1199 // `Object.keys` method
1200 // https://tc39.es/ecma262/#sec-object.keys
1201 // eslint-disable-next-line es-x/no-object-keys -- safe
1202 var objectKeys$1 = Object.keys || function keys(O) {
1203 return internalObjectKeys(O, enumBugKeys$1);
1204 };
1205
1206 var DESCRIPTORS = descriptors;
1207 var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1208 var definePropertyModule$1 = objectDefineProperty;
1209 var anObject$8 = anObject$b;
1210 var toIndexedObject$1 = toIndexedObject$5;
1211 var objectKeys = objectKeys$1;
1212
1213 // `Object.defineProperties` method
1214 // https://tc39.es/ecma262/#sec-object.defineproperties
1215 // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1216 objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1217 anObject$8(O);
1218 var props = toIndexedObject$1(Properties);
1219 var keys = objectKeys(Properties);
1220 var length = keys.length;
1221 var index = 0;
1222 var key;
1223 while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1224 return O;
1225 };
1226
1227 var getBuiltIn$1 = getBuiltIn$5;
1228
1229 var html$1 = getBuiltIn$1('document', 'documentElement');
1230
1231 /* global ActiveXObject -- old IE, WSH */
1232
1233 var anObject$7 = anObject$b;
1234 var definePropertiesModule = objectDefineProperties;
1235 var enumBugKeys = enumBugKeys$3;
1236 var hiddenKeys = hiddenKeys$4;
1237 var html = html$1;
1238 var documentCreateElement$1 = documentCreateElement$2;
1239 var sharedKey = sharedKey$2;
1240
1241 var GT = '>';
1242 var LT = '<';
1243 var PROTOTYPE = 'prototype';
1244 var SCRIPT = 'script';
1245 var IE_PROTO = sharedKey('IE_PROTO');
1246
1247 var EmptyConstructor = function () { /* empty */ };
1248
1249 var scriptTag = function (content) {
1250 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1251 };
1252
1253 // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1254 var NullProtoObjectViaActiveX = function (activeXDocument) {
1255 activeXDocument.write(scriptTag(''));
1256 activeXDocument.close();
1257 var temp = activeXDocument.parentWindow.Object;
1258 activeXDocument = null; // avoid memory leak
1259 return temp;
1260 };
1261
1262 // Create object with fake `null` prototype: use iframe Object with cleared prototype
1263 var NullProtoObjectViaIFrame = function () {
1264 // Thrash, waste and sodomy: IE GC bug
1265 var iframe = documentCreateElement$1('iframe');
1266 var JS = 'java' + SCRIPT + ':';
1267 var iframeDocument;
1268 iframe.style.display = 'none';
1269 html.appendChild(iframe);
1270 // https://github.com/zloirock/core-js/issues/475
1271 iframe.src = String(JS);
1272 iframeDocument = iframe.contentWindow.document;
1273 iframeDocument.open();
1274 iframeDocument.write(scriptTag('document.F=Object'));
1275 iframeDocument.close();
1276 return iframeDocument.F;
1277 };
1278
1279 // Check for document.domain and active x support
1280 // No need to use active x approach when document.domain is not set
1281 // see https://github.com/es-shims/es5-shim/issues/150
1282 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1283 // avoid IE GC bug
1284 var activeXDocument;
1285 var NullProtoObject = function () {
1286 try {
1287 activeXDocument = new ActiveXObject('htmlfile');
1288 } catch (error) { /* ignore */ }
1289 NullProtoObject = typeof document != 'undefined'
1290 ? document.domain && activeXDocument
1291 ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1292 : NullProtoObjectViaIFrame()
1293 : NullProtoObjectViaActiveX(activeXDocument); // WSH
1294 var length = enumBugKeys.length;
1295 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1296 return NullProtoObject();
1297 };
1298
1299 hiddenKeys[IE_PROTO] = true;
1300
1301 // `Object.create` method
1302 // https://tc39.es/ecma262/#sec-object.create
1303 // eslint-disable-next-line es-x/no-object-create -- safe
1304 var objectCreate = Object.create || function create(O, Properties) {
1305 var result;
1306 if (O !== null) {
1307 EmptyConstructor[PROTOTYPE] = anObject$7(O);
1308 result = new EmptyConstructor();
1309 EmptyConstructor[PROTOTYPE] = null;
1310 // add "__proto__" for Object.getPrototypeOf polyfill
1311 result[IE_PROTO] = O;
1312 } else result = NullProtoObject();
1313 return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1314 };
1315
1316 var wellKnownSymbol$a = wellKnownSymbol$c;
1317 var create$1 = objectCreate;
1318 var defineProperty = objectDefineProperty.f;
1319
1320 var UNSCOPABLES = wellKnownSymbol$a('unscopables');
1321 var ArrayPrototype = Array.prototype;
1322
1323 // Array.prototype[@@unscopables]
1324 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1325 if (ArrayPrototype[UNSCOPABLES] == undefined) {
1326 defineProperty(ArrayPrototype, UNSCOPABLES, {
1327 configurable: true,
1328 value: create$1(null)
1329 });
1330 }
1331
1332 // add a key to Array.prototype[@@unscopables]
1333 var addToUnscopables$2 = function (key) {
1334 ArrayPrototype[UNSCOPABLES][key] = true;
1335 };
1336
1337 var $$7 = _export;
1338 var $includes = arrayIncludes.includes;
1339 var fails$b = fails$k;
1340 var addToUnscopables$1 = addToUnscopables$2;
1341
1342 // FF99+ bug
1343 var BROKEN_ON_SPARSE = fails$b(function () {
1344 return !Array(1).includes();
1345 });
1346
1347 // `Array.prototype.includes` method
1348 // https://tc39.es/ecma262/#sec-array.prototype.includes
1349 $$7({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1350 includes: function includes(el /* , fromIndex = 0 */) {
1351 return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1352 }
1353 });
1354
1355 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1356 addToUnscopables$1('includes');
1357
1358 var isObject$2 = isObject$8;
1359 var classof$6 = classofRaw$1;
1360 var wellKnownSymbol$9 = wellKnownSymbol$c;
1361
1362 var MATCH$1 = wellKnownSymbol$9('match');
1363
1364 // `IsRegExp` abstract operation
1365 // https://tc39.es/ecma262/#sec-isregexp
1366 var isRegexp = function (it) {
1367 var isRegExp;
1368 return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$6(it) == 'RegExp');
1369 };
1370
1371 var isRegExp$1 = isRegexp;
1372
1373 var $TypeError$3 = TypeError;
1374
1375 var notARegexp = function (it) {
1376 if (isRegExp$1(it)) {
1377 throw $TypeError$3("The method doesn't accept regular expressions");
1378 } return it;
1379 };
1380
1381 var wellKnownSymbol$8 = wellKnownSymbol$c;
1382
1383 var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
1384 var test = {};
1385
1386 test[TO_STRING_TAG$1] = 'z';
1387
1388 var toStringTagSupport = String(test) === '[object z]';
1389
1390 var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
1391 var isCallable$3 = isCallable$e;
1392 var classofRaw = classofRaw$1;
1393 var wellKnownSymbol$7 = wellKnownSymbol$c;
1394
1395 var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
1396 var $Object = Object;
1397
1398 // ES3 wrong here
1399 var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1400
1401 // fallback for IE11 Script Access Denied error
1402 var tryGet = function (it, key) {
1403 try {
1404 return it[key];
1405 } catch (error) { /* empty */ }
1406 };
1407
1408 // getting tag from ES6+ `Object.prototype.toString`
1409 var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
1410 var O, tag, result;
1411 return it === undefined ? 'Undefined' : it === null ? 'Null'
1412 // @@toStringTag case
1413 : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1414 // builtinTag case
1415 : CORRECT_ARGUMENTS ? classofRaw(O)
1416 // ES3 arguments fallback
1417 : (result = classofRaw(O)) == 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
1418 };
1419
1420 var classof$4 = classof$5;
1421
1422 var $String = String;
1423
1424 var toString$7 = function (argument) {
1425 if (classof$4(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1426 return $String(argument);
1427 };
1428
1429 var wellKnownSymbol$6 = wellKnownSymbol$c;
1430
1431 var MATCH = wellKnownSymbol$6('match');
1432
1433 var correctIsRegexpLogic = function (METHOD_NAME) {
1434 var regexp = /./;
1435 try {
1436 '/./'[METHOD_NAME](regexp);
1437 } catch (error1) {
1438 try {
1439 regexp[MATCH] = false;
1440 return '/./'[METHOD_NAME](regexp);
1441 } catch (error2) { /* empty */ }
1442 } return false;
1443 };
1444
1445 var $$6 = _export;
1446 var uncurryThis$a = functionUncurryThis;
1447 var notARegExp = notARegexp;
1448 var requireObjectCoercible$4 = requireObjectCoercible$7;
1449 var toString$6 = toString$7;
1450 var correctIsRegExpLogic = correctIsRegexpLogic;
1451
1452 var stringIndexOf$1 = uncurryThis$a(''.indexOf);
1453
1454 // `String.prototype.includes` method
1455 // https://tc39.es/ecma262/#sec-string.prototype.includes
1456 $$6({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1457 includes: function includes(searchString /* , position = 0 */) {
1458 return !!~stringIndexOf$1(
1459 toString$6(requireObjectCoercible$4(this)),
1460 toString$6(notARegExp(searchString)),
1461 arguments.length > 1 ? arguments[1] : undefined
1462 );
1463 }
1464 });
1465
1466 var classof$3 = classofRaw$1;
1467
1468 // `IsArray` abstract operation
1469 // https://tc39.es/ecma262/#sec-isarray
1470 // eslint-disable-next-line es-x/no-array-isarray -- safe
1471 var isArray$2 = Array.isArray || function isArray(argument) {
1472 return classof$3(argument) == 'Array';
1473 };
1474
1475 var $TypeError$2 = TypeError;
1476 var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
1477
1478 var doesNotExceedSafeInteger$1 = function (it) {
1479 if (it > MAX_SAFE_INTEGER) throw $TypeError$2('Maximum allowed index exceeded');
1480 return it;
1481 };
1482
1483 var toPropertyKey = toPropertyKey$3;
1484 var definePropertyModule = objectDefineProperty;
1485 var createPropertyDescriptor = createPropertyDescriptor$3;
1486
1487 var createProperty$2 = function (object, key, value) {
1488 var propertyKey = toPropertyKey(key);
1489 if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
1490 else object[propertyKey] = value;
1491 };
1492
1493 var uncurryThis$9 = functionUncurryThis;
1494 var fails$a = fails$k;
1495 var isCallable$2 = isCallable$e;
1496 var classof$2 = classof$5;
1497 var getBuiltIn = getBuiltIn$5;
1498 var inspectSource = inspectSource$3;
1499
1500 var noop = function () { /* empty */ };
1501 var empty = [];
1502 var construct = getBuiltIn('Reflect', 'construct');
1503 var constructorRegExp = /^\s*(?:class|function)\b/;
1504 var exec$2 = uncurryThis$9(constructorRegExp.exec);
1505 var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1506
1507 var isConstructorModern = function isConstructor(argument) {
1508 if (!isCallable$2(argument)) return false;
1509 try {
1510 construct(noop, empty, argument);
1511 return true;
1512 } catch (error) {
1513 return false;
1514 }
1515 };
1516
1517 var isConstructorLegacy = function isConstructor(argument) {
1518 if (!isCallable$2(argument)) return false;
1519 switch (classof$2(argument)) {
1520 case 'AsyncFunction':
1521 case 'GeneratorFunction':
1522 case 'AsyncGeneratorFunction': return false;
1523 }
1524 try {
1525 // we can't check .prototype since constructors produced by .bind haven't it
1526 // `Function#toString` throws on some built-it function in some legacy engines
1527 // (for example, `DOMQuad` and similar in FF41-)
1528 return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource(argument));
1529 } catch (error) {
1530 return true;
1531 }
1532 };
1533
1534 isConstructorLegacy.sham = true;
1535
1536 // `IsConstructor` abstract operation
1537 // https://tc39.es/ecma262/#sec-isconstructor
1538 var isConstructor$2 = !construct || fails$a(function () {
1539 var called;
1540 return isConstructorModern(isConstructorModern.call)
1541 || !isConstructorModern(Object)
1542 || !isConstructorModern(function () { called = true; })
1543 || called;
1544 }) ? isConstructorLegacy : isConstructorModern;
1545
1546 var isArray$1 = isArray$2;
1547 var isConstructor$1 = isConstructor$2;
1548 var isObject$1 = isObject$8;
1549 var wellKnownSymbol$5 = wellKnownSymbol$c;
1550
1551 var SPECIES$3 = wellKnownSymbol$5('species');
1552 var $Array$1 = Array;
1553
1554 // a part of `ArraySpeciesCreate` abstract operation
1555 // https://tc39.es/ecma262/#sec-arrayspeciescreate
1556 var arraySpeciesConstructor$1 = function (originalArray) {
1557 var C;
1558 if (isArray$1(originalArray)) {
1559 C = originalArray.constructor;
1560 // cross-realm fallback
1561 if (isConstructor$1(C) && (C === $Array$1 || isArray$1(C.prototype))) C = undefined;
1562 else if (isObject$1(C)) {
1563 C = C[SPECIES$3];
1564 if (C === null) C = undefined;
1565 }
1566 } return C === undefined ? $Array$1 : C;
1567 };
1568
1569 var arraySpeciesConstructor = arraySpeciesConstructor$1;
1570
1571 // `ArraySpeciesCreate` abstract operation
1572 // https://tc39.es/ecma262/#sec-arrayspeciescreate
1573 var arraySpeciesCreate$2 = function (originalArray, length) {
1574 return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1575 };
1576
1577 var fails$9 = fails$k;
1578 var wellKnownSymbol$4 = wellKnownSymbol$c;
1579 var V8_VERSION$1 = engineV8Version;
1580
1581 var SPECIES$2 = wellKnownSymbol$4('species');
1582
1583 var arrayMethodHasSpeciesSupport$3 = function (METHOD_NAME) {
1584 // We can't use this feature detection in V8 since it causes
1585 // deoptimization and serious performance degradation
1586 // https://github.com/zloirock/core-js/issues/677
1587 return V8_VERSION$1 >= 51 || !fails$9(function () {
1588 var array = [];
1589 var constructor = array.constructor = {};
1590 constructor[SPECIES$2] = function () {
1591 return { foo: 1 };
1592 };
1593 return array[METHOD_NAME](Boolean).foo !== 1;
1594 });
1595 };
1596
1597 var $$5 = _export;
1598 var fails$8 = fails$k;
1599 var isArray = isArray$2;
1600 var isObject = isObject$8;
1601 var toObject$2 = toObject$4;
1602 var lengthOfArrayLike$2 = lengthOfArrayLike$4;
1603 var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
1604 var createProperty$1 = createProperty$2;
1605 var arraySpeciesCreate$1 = arraySpeciesCreate$2;
1606 var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$3;
1607 var wellKnownSymbol$3 = wellKnownSymbol$c;
1608 var V8_VERSION = engineV8Version;
1609
1610 var IS_CONCAT_SPREADABLE = wellKnownSymbol$3('isConcatSpreadable');
1611
1612 // We can't use this feature detection in V8 since it causes
1613 // deoptimization and serious performance degradation
1614 // https://github.com/zloirock/core-js/issues/679
1615 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$8(function () {
1616 var array = [];
1617 array[IS_CONCAT_SPREADABLE] = false;
1618 return array.concat()[0] !== array;
1619 });
1620
1621 var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$2('concat');
1622
1623 var isConcatSpreadable = function (O) {
1624 if (!isObject(O)) return false;
1625 var spreadable = O[IS_CONCAT_SPREADABLE];
1626 return spreadable !== undefined ? !!spreadable : isArray(O);
1627 };
1628
1629 var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1630
1631 // `Array.prototype.concat` method
1632 // https://tc39.es/ecma262/#sec-array.prototype.concat
1633 // with adding support of @@isConcatSpreadable and @@species
1634 $$5({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
1635 // eslint-disable-next-line no-unused-vars -- required for `.length`
1636 concat: function concat(arg) {
1637 var O = toObject$2(this);
1638 var A = arraySpeciesCreate$1(O, 0);
1639 var n = 0;
1640 var i, k, length, len, E;
1641 for (i = -1, length = arguments.length; i < length; i++) {
1642 E = i === -1 ? O : arguments[i];
1643 if (isConcatSpreadable(E)) {
1644 len = lengthOfArrayLike$2(E);
1645 doesNotExceedSafeInteger(n + len);
1646 for (k = 0; k < len; k++, n++) if (k in E) createProperty$1(A, n, E[k]);
1647 } else {
1648 doesNotExceedSafeInteger(n + 1);
1649 createProperty$1(A, n++, E);
1650 }
1651 }
1652 A.length = n;
1653 return A;
1654 }
1655 });
1656
1657 var anObject$6 = anObject$b;
1658
1659 // `RegExp.prototype.flags` getter implementation
1660 // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1661 var regexpFlags$1 = function () {
1662 var that = anObject$6(this);
1663 var result = '';
1664 if (that.hasIndices) result += 'd';
1665 if (that.global) result += 'g';
1666 if (that.ignoreCase) result += 'i';
1667 if (that.multiline) result += 'm';
1668 if (that.dotAll) result += 's';
1669 if (that.unicode) result += 'u';
1670 if (that.sticky) result += 'y';
1671 return result;
1672 };
1673
1674 var fails$7 = fails$k;
1675 var global$4 = global$e;
1676
1677 // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1678 var $RegExp$2 = global$4.RegExp;
1679
1680 var UNSUPPORTED_Y$2 = fails$7(function () {
1681 var re = $RegExp$2('a', 'y');
1682 re.lastIndex = 2;
1683 return re.exec('abcd') != null;
1684 });
1685
1686 // UC Browser bug
1687 // https://github.com/zloirock/core-js/issues/1008
1688 var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$7(function () {
1689 return !$RegExp$2('a', 'y').sticky;
1690 });
1691
1692 var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$7(function () {
1693 // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1694 var re = $RegExp$2('^r', 'gy');
1695 re.lastIndex = 2;
1696 return re.exec('str') != null;
1697 });
1698
1699 var regexpStickyHelpers = {
1700 BROKEN_CARET: BROKEN_CARET,
1701 MISSED_STICKY: MISSED_STICKY,
1702 UNSUPPORTED_Y: UNSUPPORTED_Y$2
1703 };
1704
1705 var fails$6 = fails$k;
1706 var global$3 = global$e;
1707
1708 // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1709 var $RegExp$1 = global$3.RegExp;
1710
1711 var regexpUnsupportedDotAll = fails$6(function () {
1712 var re = $RegExp$1('.', 's');
1713 return !(re.dotAll && re.exec('\n') && re.flags === 's');
1714 });
1715
1716 var fails$5 = fails$k;
1717 var global$2 = global$e;
1718
1719 // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1720 var $RegExp = global$2.RegExp;
1721
1722 var regexpUnsupportedNcg = fails$5(function () {
1723 var re = $RegExp('(?<a>b)', 'g');
1724 return re.exec('b').groups.a !== 'b' ||
1725 'b'.replace(re, '$<a>c') !== 'bc';
1726 });
1727
1728 /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1729 /* eslint-disable regexp/no-useless-quantifier -- testing */
1730 var call$6 = functionCall;
1731 var uncurryThis$8 = functionUncurryThis;
1732 var toString$5 = toString$7;
1733 var regexpFlags = regexpFlags$1;
1734 var stickyHelpers$1 = regexpStickyHelpers;
1735 var shared = shared$4.exports;
1736 var create = objectCreate;
1737 var getInternalState = internalState.get;
1738 var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1739 var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1740
1741 var nativeReplace = shared('native-string-replace', String.prototype.replace);
1742 var nativeExec = RegExp.prototype.exec;
1743 var patchedExec = nativeExec;
1744 var charAt$3 = uncurryThis$8(''.charAt);
1745 var indexOf = uncurryThis$8(''.indexOf);
1746 var replace$1 = uncurryThis$8(''.replace);
1747 var stringSlice$4 = uncurryThis$8(''.slice);
1748
1749 var UPDATES_LAST_INDEX_WRONG = (function () {
1750 var re1 = /a/;
1751 var re2 = /b*/g;
1752 call$6(nativeExec, re1, 'a');
1753 call$6(nativeExec, re2, 'a');
1754 return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1755 })();
1756
1757 var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
1758
1759 // nonparticipating capturing group, copied from es5-shim's String#split patch.
1760 var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1761
1762 var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1763
1764 if (PATCH) {
1765 patchedExec = function exec(string) {
1766 var re = this;
1767 var state = getInternalState(re);
1768 var str = toString$5(string);
1769 var raw = state.raw;
1770 var result, reCopy, lastIndex, match, i, object, group;
1771
1772 if (raw) {
1773 raw.lastIndex = re.lastIndex;
1774 result = call$6(patchedExec, raw, str);
1775 re.lastIndex = raw.lastIndex;
1776 return result;
1777 }
1778
1779 var groups = state.groups;
1780 var sticky = UNSUPPORTED_Y$1 && re.sticky;
1781 var flags = call$6(regexpFlags, re);
1782 var source = re.source;
1783 var charsAdded = 0;
1784 var strCopy = str;
1785
1786 if (sticky) {
1787 flags = replace$1(flags, 'y', '');
1788 if (indexOf(flags, 'g') === -1) {
1789 flags += 'g';
1790 }
1791
1792 strCopy = stringSlice$4(str, re.lastIndex);
1793 // Support anchored sticky behavior.
1794 if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1795 source = '(?: ' + source + ')';
1796 strCopy = ' ' + strCopy;
1797 charsAdded++;
1798 }
1799 // ^(? + rx + ) is needed, in combination with some str slicing, to
1800 // simulate the 'y' flag.
1801 reCopy = new RegExp('^(?:' + source + ')', flags);
1802 }
1803
1804 if (NPCG_INCLUDED) {
1805 reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1806 }
1807 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1808
1809 match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
1810
1811 if (sticky) {
1812 if (match) {
1813 match.input = stringSlice$4(match.input, charsAdded);
1814 match[0] = stringSlice$4(match[0], charsAdded);
1815 match.index = re.lastIndex;
1816 re.lastIndex += match[0].length;
1817 } else re.lastIndex = 0;
1818 } else if (UPDATES_LAST_INDEX_WRONG && match) {
1819 re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1820 }
1821 if (NPCG_INCLUDED && match && match.length > 1) {
1822 // Fix browsers whose `exec` methods don't consistently return `undefined`
1823 // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1824 call$6(nativeReplace, match[0], reCopy, function () {
1825 for (i = 1; i < arguments.length - 2; i++) {
1826 if (arguments[i] === undefined) match[i] = undefined;
1827 }
1828 });
1829 }
1830
1831 if (match && groups) {
1832 match.groups = object = create(null);
1833 for (i = 0; i < groups.length; i++) {
1834 group = groups[i];
1835 object[group[0]] = match[group[1]];
1836 }
1837 }
1838
1839 return match;
1840 };
1841 }
1842
1843 var regexpExec$3 = patchedExec;
1844
1845 var $$4 = _export;
1846 var exec$1 = regexpExec$3;
1847
1848 // `RegExp.prototype.exec` method
1849 // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1850 $$4({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
1851 exec: exec$1
1852 });
1853
1854 var NATIVE_BIND$1 = functionBindNative;
1855
1856 var FunctionPrototype = Function.prototype;
1857 var apply$2 = FunctionPrototype.apply;
1858 var call$5 = FunctionPrototype.call;
1859
1860 // eslint-disable-next-line es-x/no-reflect -- safe
1861 var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$5.bind(apply$2) : function () {
1862 return call$5.apply(apply$2, arguments);
1863 });
1864
1865 // TODO: Remove from `core-js@4` since it's moved to entry points
1866
1867 var uncurryThis$7 = functionUncurryThis;
1868 var defineBuiltIn$2 = defineBuiltIn$4;
1869 var regexpExec$2 = regexpExec$3;
1870 var fails$4 = fails$k;
1871 var wellKnownSymbol$2 = wellKnownSymbol$c;
1872 var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1873
1874 var SPECIES$1 = wellKnownSymbol$2('species');
1875 var RegExpPrototype$2 = RegExp.prototype;
1876
1877 var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1878 var SYMBOL = wellKnownSymbol$2(KEY);
1879
1880 var DELEGATES_TO_SYMBOL = !fails$4(function () {
1881 // String methods call symbol-named RegEp methods
1882 var O = {};
1883 O[SYMBOL] = function () { return 7; };
1884 return ''[KEY](O) != 7;
1885 });
1886
1887 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$4(function () {
1888 // Symbol-named RegExp methods call .exec
1889 var execCalled = false;
1890 var re = /a/;
1891
1892 if (KEY === 'split') {
1893 // We can't use real regex here since it causes deoptimization
1894 // and serious performance degradation in V8
1895 // https://github.com/zloirock/core-js/issues/306
1896 re = {};
1897 // RegExp[@@split] doesn't call the regex's exec method, but first creates
1898 // a new one. We need to return the patched regex when creating the new one.
1899 re.constructor = {};
1900 re.constructor[SPECIES$1] = function () { return re; };
1901 re.flags = '';
1902 re[SYMBOL] = /./[SYMBOL];
1903 }
1904
1905 re.exec = function () { execCalled = true; return null; };
1906
1907 re[SYMBOL]('');
1908 return !execCalled;
1909 });
1910
1911 if (
1912 !DELEGATES_TO_SYMBOL ||
1913 !DELEGATES_TO_EXEC ||
1914 FORCED
1915 ) {
1916 var uncurriedNativeRegExpMethod = uncurryThis$7(/./[SYMBOL]);
1917 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1918 var uncurriedNativeMethod = uncurryThis$7(nativeMethod);
1919 var $exec = regexp.exec;
1920 if ($exec === regexpExec$2 || $exec === RegExpPrototype$2.exec) {
1921 if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1922 // The native String method already delegates to @@method (this
1923 // polyfilled function), leasing to infinite recursion.
1924 // We avoid it by directly calling the native @@method method.
1925 return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
1926 }
1927 return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
1928 }
1929 return { done: false };
1930 });
1931
1932 defineBuiltIn$2(String.prototype, KEY, methods[0]);
1933 defineBuiltIn$2(RegExpPrototype$2, SYMBOL, methods[1]);
1934 }
1935
1936 if (SHAM) createNonEnumerableProperty$1(RegExpPrototype$2[SYMBOL], 'sham', true);
1937 };
1938
1939 var uncurryThis$6 = functionUncurryThis;
1940 var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
1941 var toString$4 = toString$7;
1942 var requireObjectCoercible$3 = requireObjectCoercible$7;
1943
1944 var charAt$2 = uncurryThis$6(''.charAt);
1945 var charCodeAt = uncurryThis$6(''.charCodeAt);
1946 var stringSlice$3 = uncurryThis$6(''.slice);
1947
1948 var createMethod$1 = function (CONVERT_TO_STRING) {
1949 return function ($this, pos) {
1950 var S = toString$4(requireObjectCoercible$3($this));
1951 var position = toIntegerOrInfinity$1(pos);
1952 var size = S.length;
1953 var first, second;
1954 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1955 first = charCodeAt(S, position);
1956 return first < 0xD800 || first > 0xDBFF || position + 1 === size
1957 || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
1958 ? CONVERT_TO_STRING
1959 ? charAt$2(S, position)
1960 : first
1961 : CONVERT_TO_STRING
1962 ? stringSlice$3(S, position, position + 2)
1963 : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1964 };
1965 };
1966
1967 var stringMultibyte = {
1968 // `String.prototype.codePointAt` method
1969 // https://tc39.es/ecma262/#sec-string.prototype.codepointat
1970 codeAt: createMethod$1(false),
1971 // `String.prototype.at` method
1972 // https://github.com/mathiasbynens/String.prototype.at
1973 charAt: createMethod$1(true)
1974 };
1975
1976 var charAt$1 = stringMultibyte.charAt;
1977
1978 // `AdvanceStringIndex` abstract operation
1979 // https://tc39.es/ecma262/#sec-advancestringindex
1980 var advanceStringIndex$2 = function (S, index, unicode) {
1981 return index + (unicode ? charAt$1(S, index).length : 1);
1982 };
1983
1984 var uncurryThis$5 = functionUncurryThis;
1985 var toObject$1 = toObject$4;
1986
1987 var floor = Math.floor;
1988 var charAt = uncurryThis$5(''.charAt);
1989 var replace = uncurryThis$5(''.replace);
1990 var stringSlice$2 = uncurryThis$5(''.slice);
1991 var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
1992 var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
1993
1994 // `GetSubstitution` abstract operation
1995 // https://tc39.es/ecma262/#sec-getsubstitution
1996 var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
1997 var tailPos = position + matched.length;
1998 var m = captures.length;
1999 var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
2000 if (namedCaptures !== undefined) {
2001 namedCaptures = toObject$1(namedCaptures);
2002 symbols = SUBSTITUTION_SYMBOLS;
2003 }
2004 return replace(replacement, symbols, function (match, ch) {
2005 var capture;
2006 switch (charAt(ch, 0)) {
2007 case '$': return '$';
2008 case '&': return matched;
2009 case '`': return stringSlice$2(str, 0, position);
2010 case "'": return stringSlice$2(str, tailPos);
2011 case '<':
2012 capture = namedCaptures[stringSlice$2(ch, 1, -1)];
2013 break;
2014 default: // \d\d?
2015 var n = +ch;
2016 if (n === 0) return match;
2017 if (n > m) {
2018 var f = floor(n / 10);
2019 if (f === 0) return match;
2020 if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
2021 return match;
2022 }
2023 capture = captures[n - 1];
2024 }
2025 return capture === undefined ? '' : capture;
2026 });
2027 };
2028
2029 var call$4 = functionCall;
2030 var anObject$5 = anObject$b;
2031 var isCallable$1 = isCallable$e;
2032 var classof$1 = classofRaw$1;
2033 var regexpExec$1 = regexpExec$3;
2034
2035 var $TypeError$1 = TypeError;
2036
2037 // `RegExpExec` abstract operation
2038 // https://tc39.es/ecma262/#sec-regexpexec
2039 var regexpExecAbstract = function (R, S) {
2040 var exec = R.exec;
2041 if (isCallable$1(exec)) {
2042 var result = call$4(exec, R, S);
2043 if (result !== null) anObject$5(result);
2044 return result;
2045 }
2046 if (classof$1(R) === 'RegExp') return call$4(regexpExec$1, R, S);
2047 throw $TypeError$1('RegExp#exec called on incompatible receiver');
2048 };
2049
2050 var apply$1 = functionApply;
2051 var call$3 = functionCall;
2052 var uncurryThis$4 = functionUncurryThis;
2053 var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
2054 var fails$3 = fails$k;
2055 var anObject$4 = anObject$b;
2056 var isCallable = isCallable$e;
2057 var toIntegerOrInfinity = toIntegerOrInfinity$4;
2058 var toLength$1 = toLength$3;
2059 var toString$3 = toString$7;
2060 var requireObjectCoercible$2 = requireObjectCoercible$7;
2061 var advanceStringIndex$1 = advanceStringIndex$2;
2062 var getMethod$2 = getMethod$4;
2063 var getSubstitution = getSubstitution$1;
2064 var regExpExec$1 = regexpExecAbstract;
2065 var wellKnownSymbol$1 = wellKnownSymbol$c;
2066
2067 var REPLACE = wellKnownSymbol$1('replace');
2068 var max$1 = Math.max;
2069 var min$1 = Math.min;
2070 var concat = uncurryThis$4([].concat);
2071 var push$2 = uncurryThis$4([].push);
2072 var stringIndexOf = uncurryThis$4(''.indexOf);
2073 var stringSlice$1 = uncurryThis$4(''.slice);
2074
2075 var maybeToString = function (it) {
2076 return it === undefined ? it : String(it);
2077 };
2078
2079 // IE <= 11 replaces $0 with the whole match, as if it was $&
2080 // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
2081 var REPLACE_KEEPS_$0 = (function () {
2082 // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
2083 return 'a'.replace(/./, '$0') === '$0';
2084 })();
2085
2086 // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
2087 var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2088 if (/./[REPLACE]) {
2089 return /./[REPLACE]('a', '$0') === '';
2090 }
2091 return false;
2092 })();
2093
2094 var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$3(function () {
2095 var re = /./;
2096 re.exec = function () {
2097 var result = [];
2098 result.groups = { a: '7' };
2099 return result;
2100 };
2101 // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
2102 return ''.replace(re, '$<a>') !== '7';
2103 });
2104
2105 // @@replace logic
2106 fixRegExpWellKnownSymbolLogic$2('replace', function (_, nativeReplace, maybeCallNative) {
2107 var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
2108
2109 return [
2110 // `String.prototype.replace` method
2111 // https://tc39.es/ecma262/#sec-string.prototype.replace
2112 function replace(searchValue, replaceValue) {
2113 var O = requireObjectCoercible$2(this);
2114 var replacer = searchValue == undefined ? undefined : getMethod$2(searchValue, REPLACE);
2115 return replacer
2116 ? call$3(replacer, searchValue, O, replaceValue)
2117 : call$3(nativeReplace, toString$3(O), searchValue, replaceValue);
2118 },
2119 // `RegExp.prototype[@@replace]` method
2120 // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2121 function (string, replaceValue) {
2122 var rx = anObject$4(this);
2123 var S = toString$3(string);
2124
2125 if (
2126 typeof replaceValue == 'string' &&
2127 stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
2128 stringIndexOf(replaceValue, '$<') === -1
2129 ) {
2130 var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
2131 if (res.done) return res.value;
2132 }
2133
2134 var functionalReplace = isCallable(replaceValue);
2135 if (!functionalReplace) replaceValue = toString$3(replaceValue);
2136
2137 var global = rx.global;
2138 if (global) {
2139 var fullUnicode = rx.unicode;
2140 rx.lastIndex = 0;
2141 }
2142 var results = [];
2143 while (true) {
2144 var result = regExpExec$1(rx, S);
2145 if (result === null) break;
2146
2147 push$2(results, result);
2148 if (!global) break;
2149
2150 var matchStr = toString$3(result[0]);
2151 if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode);
2152 }
2153
2154 var accumulatedResult = '';
2155 var nextSourcePosition = 0;
2156 for (var i = 0; i < results.length; i++) {
2157 result = results[i];
2158
2159 var matched = toString$3(result[0]);
2160 var position = max$1(min$1(toIntegerOrInfinity(result.index), S.length), 0);
2161 var captures = [];
2162 // NOTE: This is equivalent to
2163 // captures = result.slice(1).map(maybeToString)
2164 // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
2165 // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
2166 // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
2167 for (var j = 1; j < result.length; j++) push$2(captures, maybeToString(result[j]));
2168 var namedCaptures = result.groups;
2169 if (functionalReplace) {
2170 var replacerArgs = concat([matched], captures, position, S);
2171 if (namedCaptures !== undefined) push$2(replacerArgs, namedCaptures);
2172 var replacement = toString$3(apply$1(replaceValue, undefined, replacerArgs));
2173 } else {
2174 replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2175 }
2176 if (position >= nextSourcePosition) {
2177 accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
2178 nextSourcePosition = position + matched.length;
2179 }
2180 }
2181 return accumulatedResult + stringSlice$1(S, nextSourcePosition);
2182 }
2183 ];
2184 }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
2185
2186 var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
2187 var classof = classof$5;
2188
2189 // `Object.prototype.toString` method implementation
2190 // https://tc39.es/ecma262/#sec-object.prototype.tostring
2191 var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
2192 return '[object ' + classof(this) + ']';
2193 };
2194
2195 var TO_STRING_TAG_SUPPORT = toStringTagSupport;
2196 var defineBuiltIn$1 = defineBuiltIn$4;
2197 var toString$2 = objectToString;
2198
2199 // `Object.prototype.toString` method
2200 // https://tc39.es/ecma262/#sec-object.prototype.tostring
2201 if (!TO_STRING_TAG_SUPPORT) {
2202 defineBuiltIn$1(Object.prototype, 'toString', toString$2, { unsafe: true });
2203 }
2204
2205 // iterable DOM collections
2206 // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2207 var domIterables = {
2208 CSSRuleList: 0,
2209 CSSStyleDeclaration: 0,
2210 CSSValueList: 0,
2211 ClientRectList: 0,
2212 DOMRectList: 0,
2213 DOMStringList: 0,
2214 DOMTokenList: 1,
2215 DataTransferItemList: 0,
2216 FileList: 0,
2217 HTMLAllCollection: 0,
2218 HTMLCollection: 0,
2219 HTMLFormElement: 0,
2220 HTMLSelectElement: 0,
2221 MediaList: 0,
2222 MimeTypeArray: 0,
2223 NamedNodeMap: 0,
2224 NodeList: 1,
2225 PaintRequestList: 0,
2226 Plugin: 0,
2227 PluginArray: 0,
2228 SVGLengthList: 0,
2229 SVGNumberList: 0,
2230 SVGPathSegList: 0,
2231 SVGPointList: 0,
2232 SVGStringList: 0,
2233 SVGTransformList: 0,
2234 SourceBufferList: 0,
2235 StyleSheetList: 0,
2236 TextTrackCueList: 0,
2237 TextTrackList: 0,
2238 TouchList: 0
2239 };
2240
2241 // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2242 var documentCreateElement = documentCreateElement$2;
2243
2244 var classList = documentCreateElement('span').classList;
2245 var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2246
2247 var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2248
2249 var uncurryThis$3 = functionUncurryThis;
2250 var aCallable = aCallable$2;
2251 var NATIVE_BIND = functionBindNative;
2252
2253 var bind$1 = uncurryThis$3(uncurryThis$3.bind);
2254
2255 // optional / simple context binding
2256 var functionBindContext = function (fn, that) {
2257 aCallable(fn);
2258 return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
2259 return fn.apply(that, arguments);
2260 };
2261 };
2262
2263 var bind = functionBindContext;
2264 var uncurryThis$2 = functionUncurryThis;
2265 var IndexedObject$1 = indexedObject;
2266 var toObject = toObject$4;
2267 var lengthOfArrayLike$1 = lengthOfArrayLike$4;
2268 var arraySpeciesCreate = arraySpeciesCreate$2;
2269
2270 var push$1 = uncurryThis$2([].push);
2271
2272 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
2273 var createMethod = function (TYPE) {
2274 var IS_MAP = TYPE == 1;
2275 var IS_FILTER = TYPE == 2;
2276 var IS_SOME = TYPE == 3;
2277 var IS_EVERY = TYPE == 4;
2278 var IS_FIND_INDEX = TYPE == 6;
2279 var IS_FILTER_REJECT = TYPE == 7;
2280 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
2281 return function ($this, callbackfn, that, specificCreate) {
2282 var O = toObject($this);
2283 var self = IndexedObject$1(O);
2284 var boundFunction = bind(callbackfn, that);
2285 var length = lengthOfArrayLike$1(self);
2286 var index = 0;
2287 var create = specificCreate || arraySpeciesCreate;
2288 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
2289 var value, result;
2290 for (;length > index; index++) if (NO_HOLES || index in self) {
2291 value = self[index];
2292 result = boundFunction(value, index, O);
2293 if (TYPE) {
2294 if (IS_MAP) target[index] = result; // map
2295 else if (result) switch (TYPE) {
2296 case 3: return true; // some
2297 case 5: return value; // find
2298 case 6: return index; // findIndex
2299 case 2: push$1(target, value); // filter
2300 } else switch (TYPE) {
2301 case 4: return false; // every
2302 case 7: push$1(target, value); // filterReject
2303 }
2304 }
2305 }
2306 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
2307 };
2308 };
2309
2310 var arrayIteration = {
2311 // `Array.prototype.forEach` method
2312 // https://tc39.es/ecma262/#sec-array.prototype.foreach
2313 forEach: createMethod(0),
2314 // `Array.prototype.map` method
2315 // https://tc39.es/ecma262/#sec-array.prototype.map
2316 map: createMethod(1),
2317 // `Array.prototype.filter` method
2318 // https://tc39.es/ecma262/#sec-array.prototype.filter
2319 filter: createMethod(2),
2320 // `Array.prototype.some` method
2321 // https://tc39.es/ecma262/#sec-array.prototype.some
2322 some: createMethod(3),
2323 // `Array.prototype.every` method
2324 // https://tc39.es/ecma262/#sec-array.prototype.every
2325 every: createMethod(4),
2326 // `Array.prototype.find` method
2327 // https://tc39.es/ecma262/#sec-array.prototype.find
2328 find: createMethod(5),
2329 // `Array.prototype.findIndex` method
2330 // https://tc39.es/ecma262/#sec-array.prototype.findIndex
2331 findIndex: createMethod(6),
2332 // `Array.prototype.filterReject` method
2333 // https://github.com/tc39/proposal-array-filtering
2334 filterReject: createMethod(7)
2335 };
2336
2337 var fails$2 = fails$k;
2338
2339 var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
2340 var method = [][METHOD_NAME];
2341 return !!method && fails$2(function () {
2342 // eslint-disable-next-line no-useless-call -- required for testing
2343 method.call(null, argument || function () { return 1; }, 1);
2344 });
2345 };
2346
2347 var $forEach = arrayIteration.forEach;
2348 var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
2349
2350 var STRICT_METHOD$1 = arrayMethodIsStrict$1('forEach');
2351
2352 // `Array.prototype.forEach` method implementation
2353 // https://tc39.es/ecma262/#sec-array.prototype.foreach
2354 var arrayForEach = !STRICT_METHOD$1 ? function forEach(callbackfn /* , thisArg */) {
2355 return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2356 // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
2357 } : [].forEach;
2358
2359 var global$1 = global$e;
2360 var DOMIterables = domIterables;
2361 var DOMTokenListPrototype = domTokenListPrototype;
2362 var forEach = arrayForEach;
2363 var createNonEnumerableProperty = createNonEnumerableProperty$5;
2364
2365 var handlePrototype = function (CollectionPrototype) {
2366 // some Chrome versions have non-configurable methods on DOMTokenList
2367 if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
2368 createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
2369 } catch (error) {
2370 CollectionPrototype.forEach = forEach;
2371 }
2372 };
2373
2374 for (var COLLECTION_NAME in DOMIterables) {
2375 if (DOMIterables[COLLECTION_NAME]) {
2376 handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype);
2377 }
2378 }
2379
2380 handlePrototype(DOMTokenListPrototype);
2381
2382 var call$2 = functionCall;
2383 var hasOwn = hasOwnProperty_1;
2384 var isPrototypeOf = objectIsPrototypeOf;
2385 var regExpFlags = regexpFlags$1;
2386
2387 var RegExpPrototype$1 = RegExp.prototype;
2388
2389 var regexpGetFlags = function (R) {
2390 var flags = R.flags;
2391 return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
2392 ? call$2(regExpFlags, R) : flags;
2393 };
2394
2395 var PROPER_FUNCTION_NAME = functionName.PROPER;
2396 var defineBuiltIn = defineBuiltIn$4;
2397 var anObject$3 = anObject$b;
2398 var $toString = toString$7;
2399 var fails$1 = fails$k;
2400 var getRegExpFlags = regexpGetFlags;
2401
2402 var TO_STRING = 'toString';
2403 var RegExpPrototype = RegExp.prototype;
2404 var n$ToString = RegExpPrototype[TO_STRING];
2405
2406 var NOT_GENERIC = fails$1(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
2407 // FF44- RegExp#toString has a wrong name
2408 var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
2409
2410 // `RegExp.prototype.toString` method
2411 // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
2412 if (NOT_GENERIC || INCORRECT_NAME) {
2413 defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
2414 var R = anObject$3(this);
2415 var pattern = $toString(R.source);
2416 var flags = $toString(getRegExpFlags(R));
2417 return '/' + pattern + '/' + flags;
2418 }, { unsafe: true });
2419 }
2420
2421 var $$3 = _export;
2422 var $find = arrayIteration.find;
2423 var addToUnscopables = addToUnscopables$2;
2424
2425 var FIND = 'find';
2426 var SKIPS_HOLES = true;
2427
2428 // Shouldn't skip holes
2429 if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
2430
2431 // `Array.prototype.find` method
2432 // https://tc39.es/ecma262/#sec-array.prototype.find
2433 $$3({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
2434 find: function find(callbackfn /* , that = undefined */) {
2435 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2436 }
2437 });
2438
2439 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2440 addToUnscopables(FIND);
2441
2442 var $$2 = _export;
2443 var $filter = arrayIteration.filter;
2444 var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$3;
2445
2446 var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('filter');
2447
2448 // `Array.prototype.filter` method
2449 // https://tc39.es/ecma262/#sec-array.prototype.filter
2450 // with adding support of @@species
2451 $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
2452 filter: function filter(callbackfn /* , thisArg */) {
2453 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2454 }
2455 });
2456
2457 var isConstructor = isConstructor$2;
2458 var tryToString = tryToString$2;
2459
2460 var $TypeError = TypeError;
2461
2462 // `Assert: IsConstructor(argument) is true`
2463 var aConstructor$1 = function (argument) {
2464 if (isConstructor(argument)) return argument;
2465 throw $TypeError(tryToString(argument) + ' is not a constructor');
2466 };
2467
2468 var anObject$2 = anObject$b;
2469 var aConstructor = aConstructor$1;
2470 var wellKnownSymbol = wellKnownSymbol$c;
2471
2472 var SPECIES = wellKnownSymbol('species');
2473
2474 // `SpeciesConstructor` abstract operation
2475 // https://tc39.es/ecma262/#sec-speciesconstructor
2476 var speciesConstructor$1 = function (O, defaultConstructor) {
2477 var C = anObject$2(O).constructor;
2478 var S;
2479 return C === undefined || (S = anObject$2(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);
2480 };
2481
2482 var toAbsoluteIndex = toAbsoluteIndex$2;
2483 var lengthOfArrayLike = lengthOfArrayLike$4;
2484 var createProperty = createProperty$2;
2485
2486 var $Array = Array;
2487 var max = Math.max;
2488
2489 var arraySliceSimple = function (O, start, end) {
2490 var length = lengthOfArrayLike(O);
2491 var k = toAbsoluteIndex(start, length);
2492 var fin = toAbsoluteIndex(end === undefined ? length : end, length);
2493 var result = $Array(max(fin - k, 0));
2494 for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
2495 result.length = n;
2496 return result;
2497 };
2498
2499 var apply = functionApply;
2500 var call$1 = functionCall;
2501 var uncurryThis$1 = functionUncurryThis;
2502 var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
2503 var isRegExp = isRegexp;
2504 var anObject$1 = anObject$b;
2505 var requireObjectCoercible$1 = requireObjectCoercible$7;
2506 var speciesConstructor = speciesConstructor$1;
2507 var advanceStringIndex = advanceStringIndex$2;
2508 var toLength = toLength$3;
2509 var toString$1 = toString$7;
2510 var getMethod$1 = getMethod$4;
2511 var arraySlice = arraySliceSimple;
2512 var callRegExpExec = regexpExecAbstract;
2513 var regexpExec = regexpExec$3;
2514 var stickyHelpers = regexpStickyHelpers;
2515 var fails = fails$k;
2516
2517 var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
2518 var MAX_UINT32 = 0xFFFFFFFF;
2519 var min = Math.min;
2520 var $push = [].push;
2521 var exec = uncurryThis$1(/./.exec);
2522 var push = uncurryThis$1($push);
2523 var stringSlice = uncurryThis$1(''.slice);
2524
2525 // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
2526 // Weex JS has frozen built-in prototypes, so use try / catch wrapper
2527 var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
2528 // eslint-disable-next-line regexp/no-empty-group -- required for testing
2529 var re = /(?:)/;
2530 var originalExec = re.exec;
2531 re.exec = function () { return originalExec.apply(this, arguments); };
2532 var result = 'ab'.split(re);
2533 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
2534 });
2535
2536 // @@split logic
2537 fixRegExpWellKnownSymbolLogic$1('split', function (SPLIT, nativeSplit, maybeCallNative) {
2538 var internalSplit;
2539 if (
2540 'abbc'.split(/(b)*/)[1] == 'c' ||
2541 // eslint-disable-next-line regexp/no-empty-group -- required for testing
2542 'test'.split(/(?:)/, -1).length != 4 ||
2543 'ab'.split(/(?:ab)*/).length != 2 ||
2544 '.'.split(/(.?)(.?)/).length != 4 ||
2545 // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
2546 '.'.split(/()()/).length > 1 ||
2547 ''.split(/.?/).length
2548 ) {
2549 // based on es5-shim implementation, need to rework it
2550 internalSplit = function (separator, limit) {
2551 var string = toString$1(requireObjectCoercible$1(this));
2552 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
2553 if (lim === 0) return [];
2554 if (separator === undefined) return [string];
2555 // If `separator` is not a regex, use native split
2556 if (!isRegExp(separator)) {
2557 return call$1(nativeSplit, string, separator, lim);
2558 }
2559 var output = [];
2560 var flags = (separator.ignoreCase ? 'i' : '') +
2561 (separator.multiline ? 'm' : '') +
2562 (separator.unicode ? 'u' : '') +
2563 (separator.sticky ? 'y' : '');
2564 var lastLastIndex = 0;
2565 // Make `global` and avoid `lastIndex` issues by working with a copy
2566 var separatorCopy = new RegExp(separator.source, flags + 'g');
2567 var match, lastIndex, lastLength;
2568 while (match = call$1(regexpExec, separatorCopy, string)) {
2569 lastIndex = separatorCopy.lastIndex;
2570 if (lastIndex > lastLastIndex) {
2571 push(output, stringSlice(string, lastLastIndex, match.index));
2572 if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));
2573 lastLength = match[0].length;
2574 lastLastIndex = lastIndex;
2575 if (output.length >= lim) break;
2576 }
2577 if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
2578 }
2579 if (lastLastIndex === string.length) {
2580 if (lastLength || !exec(separatorCopy, '')) push(output, '');
2581 } else push(output, stringSlice(string, lastLastIndex));
2582 return output.length > lim ? arraySlice(output, 0, lim) : output;
2583 };
2584 // Chakra, V8
2585 } else if ('0'.split(undefined, 0).length) {
2586 internalSplit = function (separator, limit) {
2587 return separator === undefined && limit === 0 ? [] : call$1(nativeSplit, this, separator, limit);
2588 };
2589 } else internalSplit = nativeSplit;
2590
2591 return [
2592 // `String.prototype.split` method
2593 // https://tc39.es/ecma262/#sec-string.prototype.split
2594 function split(separator, limit) {
2595 var O = requireObjectCoercible$1(this);
2596 var splitter = separator == undefined ? undefined : getMethod$1(separator, SPLIT);
2597 return splitter
2598 ? call$1(splitter, separator, O, limit)
2599 : call$1(internalSplit, toString$1(O), separator, limit);
2600 },
2601 // `RegExp.prototype[@@split]` method
2602 // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
2603 //
2604 // NOTE: This cannot be properly polyfilled in engines that don't support
2605 // the 'y' flag.
2606 function (string, limit) {
2607 var rx = anObject$1(this);
2608 var S = toString$1(string);
2609 var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
2610
2611 if (res.done) return res.value;
2612
2613 var C = speciesConstructor(rx, RegExp);
2614
2615 var unicodeMatching = rx.unicode;
2616 var flags = (rx.ignoreCase ? 'i' : '') +
2617 (rx.multiline ? 'm' : '') +
2618 (rx.unicode ? 'u' : '') +
2619 (UNSUPPORTED_Y ? 'g' : 'y');
2620
2621 // ^(? + rx + ) is needed, in combination with some S slicing, to
2622 // simulate the 'y' flag.
2623 var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
2624 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
2625 if (lim === 0) return [];
2626 if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
2627 var p = 0;
2628 var q = 0;
2629 var A = [];
2630 while (q < S.length) {
2631 splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
2632 var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
2633 var e;
2634 if (
2635 z === null ||
2636 (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
2637 ) {
2638 q = advanceStringIndex(S, q, unicodeMatching);
2639 } else {
2640 push(A, stringSlice(S, p, q));
2641 if (A.length === lim) return A;
2642 for (var i = 1; i <= z.length - 1; i++) {
2643 push(A, z[i]);
2644 if (A.length === lim) return A;
2645 }
2646 q = p = e;
2647 }
2648 }
2649 push(A, stringSlice(S, p));
2650 return A;
2651 }
2652 ];
2653 }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
2654
2655 var $$1 = _export;
2656 var $map = arrayIteration.map;
2657 var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$3;
2658
2659 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
2660
2661 // `Array.prototype.map` method
2662 // https://tc39.es/ecma262/#sec-array.prototype.map
2663 // with adding support of @@species
2664 $$1({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
2665 map: function map(callbackfn /* , thisArg */) {
2666 return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2667 }
2668 });
2669
2670 // `SameValue` abstract operation
2671 // https://tc39.es/ecma262/#sec-samevalue
2672 // eslint-disable-next-line es-x/no-object-is -- safe
2673 var sameValue$1 = Object.is || function is(x, y) {
2674 // eslint-disable-next-line no-self-compare -- NaN check
2675 return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
2676 };
2677
2678 var call = functionCall;
2679 var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2680 var anObject = anObject$b;
2681 var requireObjectCoercible = requireObjectCoercible$7;
2682 var sameValue = sameValue$1;
2683 var toString = toString$7;
2684 var getMethod = getMethod$4;
2685 var regExpExec = regexpExecAbstract;
2686
2687 // @@search logic
2688 fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
2689 return [
2690 // `String.prototype.search` method
2691 // https://tc39.es/ecma262/#sec-string.prototype.search
2692 function search(regexp) {
2693 var O = requireObjectCoercible(this);
2694 var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
2695 return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
2696 },
2697 // `RegExp.prototype[@@search]` method
2698 // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
2699 function (string) {
2700 var rx = anObject(this);
2701 var S = toString(string);
2702 var res = maybeCallNative(nativeSearch, rx, S);
2703
2704 if (res.done) return res.value;
2705
2706 var previousLastIndex = rx.lastIndex;
2707 if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
2708 var result = regExpExec(rx, S);
2709 if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
2710 return result === null ? -1 : result.index;
2711 }
2712 ];
2713 });
2714
2715 var $ = _export;
2716 var uncurryThis = functionUncurryThis;
2717 var IndexedObject = indexedObject;
2718 var toIndexedObject = toIndexedObject$5;
2719 var arrayMethodIsStrict = arrayMethodIsStrict$2;
2720
2721 var un$Join = uncurryThis([].join);
2722
2723 var ES3_STRINGS = IndexedObject != Object;
2724 var STRICT_METHOD = arrayMethodIsStrict('join', ',');
2725
2726 // `Array.prototype.join` method
2727 // https://tc39.es/ecma262/#sec-array.prototype.join
2728 $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
2729 join: function join(separator) {
2730 return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
2731 }
2732 });
2733
2734 /**
2735 * @author: Dennis Hernández
2736 * @update zhixin wen <wenzhixin2010@gmail.com>
2737 */
2738
2739 var Utils = $__default["default"].fn.bootstrapTable.utils;
2740 var UtilsCookie = {
2741 cookieIds: {
2742 sortOrder: 'bs.table.sortOrder',
2743 sortName: 'bs.table.sortName',
2744 sortPriority: 'bs.table.sortPriority',
2745 pageNumber: 'bs.table.pageNumber',
2746 pageList: 'bs.table.pageList',
2747 columns: 'bs.table.columns',
2748 hiddenColumns: 'bs.table.hiddenColumns',
2749 cardView: 'bs.table.cardView',
2750 searchText: 'bs.table.searchText',
2751 reorderColumns: 'bs.table.reorderColumns',
2752 filterControl: 'bs.table.filterControl',
2753 filterBy: 'bs.table.filterBy'
2754 },
2755 getCurrentHeader: function getCurrentHeader(that) {
2756 return that.options.height ? that.$tableHeader : that.$header;
2757 },
2758 getCurrentSearchControls: function getCurrentSearchControls(that) {
2759 return that.options.height ? 'table select, table input' : 'select, input';
2760 },
2761 isCookieSupportedByBrowser: function isCookieSupportedByBrowser() {
2762 return navigator.cookieEnabled;
2763 },
2764 isCookieEnabled: function isCookieEnabled(that, cookieName) {
2765 return that.options.cookiesEnabled.includes(cookieName);
2766 },
2767 setCookie: function setCookie(that, cookieName, cookieValue) {
2768 if (!that.options.cookie || !UtilsCookie.isCookieEnabled(that, cookieName)) {
2769 return;
2770 }
2771
2772 return that._storage.setItem("".concat(that.options.cookieIdTable, ".").concat(cookieName), cookieValue);
2773 },
2774 getCookie: function getCookie(that, cookieName) {
2775 if (!cookieName || !UtilsCookie.isCookieEnabled(that, cookieName)) {
2776 return null;
2777 }
2778
2779 return that._storage.getItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
2780 },
2781 deleteCookie: function deleteCookie(that, cookieName) {
2782 return that._storage.removeItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
2783 },
2784 calculateExpiration: function calculateExpiration(cookieExpire) {
2785 var time = cookieExpire.replace(/[0-9]*/, ''); // s,mi,h,d,m,y
2786
2787 cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); // number
2788
2789 switch (time.toLowerCase()) {
2790 case 's':
2791 cookieExpire = +cookieExpire;
2792 break;
2793
2794 case 'mi':
2795 cookieExpire *= 60;
2796 break;
2797
2798 case 'h':
2799 cookieExpire = cookieExpire * 60 * 60;
2800 break;
2801
2802 case 'd':
2803 cookieExpire = cookieExpire * 24 * 60 * 60;
2804 break;
2805
2806 case 'm':
2807 cookieExpire = cookieExpire * 30 * 24 * 60 * 60;
2808 break;
2809
2810 case 'y':
2811 cookieExpire = cookieExpire * 365 * 24 * 60 * 60;
2812 break;
2813
2814 default:
2815 cookieExpire = undefined;
2816 break;
2817 }
2818
2819 if (!cookieExpire) {
2820 return '';
2821 }
2822
2823 var d = new Date();
2824 d.setTime(d.getTime() + cookieExpire * 1000);
2825 return d.toGMTString();
2826 },
2827 initCookieFilters: function initCookieFilters(bootstrapTable) {
2828 setTimeout(function () {
2829 var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(bootstrapTable, UtilsCookie.cookieIds.filterControl));
2830
2831 if (!bootstrapTable._filterControlValuesLoaded && parsedCookieFilters) {
2832 var cachedFilters = {};
2833 var header = UtilsCookie.getCurrentHeader(bootstrapTable);
2834 var searchControls = UtilsCookie.getCurrentSearchControls(bootstrapTable);
2835
2836 var applyCookieFilters = function applyCookieFilters(element, filteredCookies) {
2837 filteredCookies.forEach(function (cookie) {
2838 var value = element.value.toString();
2839 var text = cookie.text;
2840
2841 if (text === '' || element.type === 'radio' && value !== text) {
2842 return;
2843 }
2844
2845 if (element.tagName === 'INPUT' && element.type === 'radio' && value === text) {
2846 element.checked = true;
2847 cachedFilters[cookie.field] = text;
2848 } else if (element.tagName === 'INPUT') {
2849 element.value = text;
2850 cachedFilters[cookie.field] = text;
2851 } else if (element.tagName === 'SELECT' && bootstrapTable.options.filterControlContainer) {
2852 element.value = text;
2853 cachedFilters[cookie.field] = text;
2854 } else if (text !== '' && element.tagName === 'SELECT') {
2855 cachedFilters[cookie.field] = text;
2856
2857 var _iterator = _createForOfIteratorHelper(element),
2858 _step;
2859
2860 try {
2861 for (_iterator.s(); !(_step = _iterator.n()).done;) {
2862 var currentElement = _step.value;
2863
2864 if (currentElement.value === text) {
2865 currentElement.selected = true;
2866 return;
2867 }
2868 }
2869 } catch (err) {
2870 _iterator.e(err);
2871 } finally {
2872 _iterator.f();
2873 }
2874
2875 var option = document.createElement('option');
2876 option.value = text;
2877 option.text = text;
2878 element.add(option, element[1]);
2879 element.selectedIndex = 1;
2880 }
2881 });
2882 };
2883
2884 var filterContainer = header;
2885
2886 if (bootstrapTable.options.filterControlContainer) {
2887 filterContainer = $__default["default"]("".concat(bootstrapTable.options.filterControlContainer));
2888 }
2889
2890 filterContainer.find(searchControls).each(function () {
2891 var field = $__default["default"](this).closest('[data-field]').data('field');
2892 var filteredCookies = parsedCookieFilters.filter(function (cookie) {
2893 return cookie.field === field;
2894 });
2895 applyCookieFilters(this, filteredCookies);
2896 });
2897 bootstrapTable.initColumnSearch(cachedFilters);
2898 bootstrapTable._filterControlValuesLoaded = true;
2899 bootstrapTable.initServer();
2900 }
2901 }, 250);
2902 }
2903 };
2904 $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
2905 cookie: false,
2906 cookieExpire: '2h',
2907 cookiePath: null,
2908 cookieDomain: null,
2909 cookieSecure: null,
2910 cookieSameSite: 'Lax',
2911 cookieIdTable: '',
2912 cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.sortPriority', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.hiddenColumns', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy', 'bs.table.reorderColumns', 'bs.table.cardView'],
2913 cookieStorage: 'cookieStorage',
2914 // localStorage, sessionStorage, customStorage
2915 cookieCustomStorageGet: null,
2916 cookieCustomStorageSet: null,
2917 cookieCustomStorageDelete: null,
2918 // internal variable
2919 _filterControls: [],
2920 _filterControlValuesLoaded: false,
2921 _storage: {
2922 setItem: undefined,
2923 getItem: undefined,
2924 removeItem: undefined
2925 }
2926 });
2927 $__default["default"].fn.bootstrapTable.methods.push('getCookies');
2928 $__default["default"].fn.bootstrapTable.methods.push('deleteCookie');
2929 $__default["default"].extend($__default["default"].fn.bootstrapTable.utils, {
2930 setCookie: UtilsCookie.setCookie,
2931 getCookie: UtilsCookie.getCookie
2932 });
2933
2934 $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
2935 _inherits(_class, _$$BootstrapTable);
2936
2937 var _super = _createSuper(_class);
2938
2939 function _class() {
2940 _classCallCheck(this, _class);
2941
2942 return _super.apply(this, arguments);
2943 }
2944
2945 _createClass(_class, [{
2946 key: "init",
2947 value: function init() {
2948 if (this.options.cookie) {
2949 if (this.options.cookieStorage === 'cookieStorage' && !UtilsCookie.isCookieSupportedByBrowser()) {
2950 throw new Error('Cookies are not enabled in this browser.');
2951 }
2952
2953 this.configureStorage(); // FilterBy logic
2954
2955 var filterByCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterBy);
2956
2957 if (typeof filterByCookieValue === 'boolean' && !filterByCookieValue) {
2958 throw new Error('The cookie value of filterBy must be a json!');
2959 }
2960
2961 var filterByCookie = {};
2962
2963 try {
2964 filterByCookie = JSON.parse(filterByCookieValue);
2965 } catch (e) {
2966 throw new Error('Could not parse the json of the filterBy cookie!');
2967 }
2968
2969 this.filterColumns = filterByCookie ? filterByCookie : {}; // FilterControl logic
2970
2971 this._filterControls = [];
2972 this._filterControlValuesLoaded = false;
2973 this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/'/g, '').replace(/ /g, '').toLowerCase().split(',') : this.options.cookiesEnabled;
2974
2975 if (this.options.filterControl) {
2976 var that = this;
2977 this.$el.on('column-search.bs.table', function (e, field, text) {
2978 var isNewField = true;
2979
2980 for (var i = 0; i < that._filterControls.length; i++) {
2981 if (that._filterControls[i].field === field) {
2982 that._filterControls[i].text = text;
2983 isNewField = false;
2984 break;
2985 }
2986 }
2987
2988 if (isNewField) {
2989 that._filterControls.push({
2990 field: field,
2991 text: text
2992 });
2993 }
2994
2995 UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that._filterControls));
2996 }).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that));
2997 }
2998 }
2999
3000 _get(_getPrototypeOf(_class.prototype), "init", this).call(this);
3001 }
3002 }, {
3003 key: "initServer",
3004 value: function initServer() {
3005 var _get2;
3006
3007 if (this.options.cookie && this.options.filterControl && !this._filterControlValuesLoaded) {
3008 var cookie = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterControl));
3009
3010 if (cookie) {
3011 return;
3012 }
3013 }
3014
3015 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3016 args[_key] = arguments[_key];
3017 }
3018
3019 (_get2 = _get(_getPrototypeOf(_class.prototype), "initServer", this)).call.apply(_get2, [this].concat(args));
3020 }
3021 }, {
3022 key: "initTable",
3023 value: function initTable() {
3024 var _get3;
3025
3026 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
3027 args[_key2] = arguments[_key2];
3028 }
3029
3030 (_get3 = _get(_getPrototypeOf(_class.prototype), "initTable", this)).call.apply(_get3, [this].concat(args));
3031
3032 this.initCookie();
3033 }
3034 }, {
3035 key: "onSort",
3036 value: function onSort() {
3037 var _get4;
3038
3039 for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
3040 args[_key3] = arguments[_key3];
3041 }
3042
3043 (_get4 = _get(_getPrototypeOf(_class.prototype), "onSort", this)).call.apply(_get4, [this].concat(args));
3044
3045 if (!this.options.cookie) {
3046 return;
3047 }
3048
3049 if (this.options.sortName === undefined || this.options.sortOrder === undefined) {
3050 UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
3051 UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
3052 } else {
3053 this.options.sortPriority = null;
3054 UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
3055 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder);
3056 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName);
3057 }
3058 }
3059 }, {
3060 key: "onMultipleSort",
3061 value: function onMultipleSort() {
3062 var _get5;
3063
3064 for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
3065 args[_key4] = arguments[_key4];
3066 }
3067
3068 (_get5 = _get(_getPrototypeOf(_class.prototype), "onMultipleSort", this)).call.apply(_get5, [this].concat(args));
3069
3070 if (!this.options.cookie) {
3071 return;
3072 }
3073
3074 if (this.options.sortPriority === undefined) {
3075 UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
3076 } else {
3077 this.options.sortName = undefined;
3078 this.options.sortOrder = undefined;
3079 UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
3080 UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
3081 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortPriority, JSON.stringify(this.options.sortPriority));
3082 }
3083 }
3084 }, {
3085 key: "onPageNumber",
3086 value: function onPageNumber() {
3087 var _get6;
3088
3089 for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
3090 args[_key5] = arguments[_key5];
3091 }
3092
3093 (_get6 = _get(_getPrototypeOf(_class.prototype), "onPageNumber", this)).call.apply(_get6, [this].concat(args));
3094
3095 if (!this.options.cookie) {
3096 return;
3097 }
3098
3099 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
3100 }
3101 }, {
3102 key: "onPageListChange",
3103 value: function onPageListChange() {
3104 var _get7;
3105
3106 for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
3107 args[_key6] = arguments[_key6];
3108 }
3109
3110 (_get7 = _get(_getPrototypeOf(_class.prototype), "onPageListChange", this)).call.apply(_get7, [this].concat(args));
3111
3112 if (!this.options.cookie) {
3113 return;
3114 }
3115
3116 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize);
3117 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
3118 }
3119 }, {
3120 key: "onPagePre",
3121 value: function onPagePre() {
3122 var _get8;
3123
3124 for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
3125 args[_key7] = arguments[_key7];
3126 }
3127
3128 (_get8 = _get(_getPrototypeOf(_class.prototype), "onPagePre", this)).call.apply(_get8, [this].concat(args));
3129
3130 if (!this.options.cookie) {
3131 return;
3132 }
3133
3134 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
3135 }
3136 }, {
3137 key: "onPageNext",
3138 value: function onPageNext() {
3139 var _get9;
3140
3141 for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
3142 args[_key8] = arguments[_key8];
3143 }
3144
3145 (_get9 = _get(_getPrototypeOf(_class.prototype), "onPageNext", this)).call.apply(_get9, [this].concat(args));
3146
3147 if (!this.options.cookie) {
3148 return;
3149 }
3150
3151 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
3152 }
3153 }, {
3154 key: "_toggleColumn",
3155 value: function _toggleColumn() {
3156 var _get10;
3157
3158 for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
3159 args[_key9] = arguments[_key9];
3160 }
3161
3162 (_get10 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get10, [this].concat(args));
3163
3164 if (!this.options.cookie) {
3165 return;
3166 }
3167
3168 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.hiddenColumns, JSON.stringify(this.getHiddenColumns().map(function (column) {
3169 return column.field;
3170 })));
3171 }
3172 }, {
3173 key: "_toggleAllColumns",
3174 value: function _toggleAllColumns() {
3175 var _get11;
3176
3177 for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
3178 args[_key10] = arguments[_key10];
3179 }
3180
3181 (_get11 = _get(_getPrototypeOf(_class.prototype), "_toggleAllColumns", this)).call.apply(_get11, [this].concat(args));
3182
3183 if (!this.options.cookie) {
3184 return;
3185 }
3186
3187 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.hiddenColumns, JSON.stringify(this.getHiddenColumns().map(function (column) {
3188 return column.field;
3189 })));
3190 }
3191 }, {
3192 key: "toggleView",
3193 value: function toggleView() {
3194 _get(_getPrototypeOf(_class.prototype), "toggleView", this).call(this);
3195
3196 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.cardView, this.options.cardView);
3197 }
3198 }, {
3199 key: "selectPage",
3200 value: function selectPage(page) {
3201 _get(_getPrototypeOf(_class.prototype), "selectPage", this).call(this, page);
3202
3203 if (!this.options.cookie) {
3204 return;
3205 }
3206
3207 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page);
3208 }
3209 }, {
3210 key: "onSearch",
3211 value: function onSearch(event) {
3212 _get(_getPrototypeOf(_class.prototype), "onSearch", this).call(this, event, arguments.length > 1 ? arguments[1] : true);
3213
3214 if (!this.options.cookie) {
3215 return;
3216 }
3217
3218 if (this.options.search) {
3219 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText);
3220 }
3221
3222 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
3223 }
3224 }, {
3225 key: "initHeader",
3226 value: function initHeader() {
3227 var _get12;
3228
3229 if (this.options.reorderableColumns && this.options.cookie) {
3230 this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.reorderColumns));
3231 }
3232
3233 for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
3234 args[_key11] = arguments[_key11];
3235 }
3236
3237 (_get12 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get12, [this].concat(args));
3238 }
3239 }, {
3240 key: "persistReorderColumnsState",
3241 value: function persistReorderColumnsState(that) {
3242 UtilsCookie.setCookie(that, UtilsCookie.cookieIds.reorderColumns, JSON.stringify(that.columnsSortOrder));
3243 }
3244 }, {
3245 key: "filterBy",
3246 value: function filterBy() {
3247 var _get13;
3248
3249 for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
3250 args[_key12] = arguments[_key12];
3251 }
3252
3253 (_get13 = _get(_getPrototypeOf(_class.prototype), "filterBy", this)).call.apply(_get13, [this].concat(args));
3254
3255 if (!this.options.cookie) {
3256 return;
3257 }
3258
3259 UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns));
3260 }
3261 }, {
3262 key: "initCookie",
3263 value: function initCookie() {
3264 var _this = this;
3265
3266 if (!this.options.cookie) {
3267 return;
3268 }
3269
3270 if (this.options.cookieIdTable === '' || this.options.cookieExpire === '') {
3271 console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.');
3272 this.options.cookie = false; // Make sure that the cookie extension is disabled
3273
3274 return;
3275 }
3276
3277 var sortOrderCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortOrder);
3278 var sortOrderNameCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortName);
3279 var sortPriorityCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortPriority);
3280 var pageNumberCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageNumber);
3281 var pageListCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageList);
3282 var searchTextCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.searchText);
3283 var cardViewCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.cardView);
3284 var columnsCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.columns);
3285 var hiddenColumnsCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.hiddenColumns);
3286
3287 if (typeof columnsCookieValue === 'boolean' && !columnsCookieValue) {
3288 throw new Error('The cookie value of filterBy must be a json!');
3289 }
3290
3291 var columnsCookie = {};
3292
3293 try {
3294 columnsCookie = JSON.parse(columnsCookieValue);
3295 } catch (e) {
3296 throw new Error('Could not parse the json of the columns cookie!', columnsCookieValue);
3297 }
3298
3299 var hiddenColumnsCookie = {};
3300
3301 try {
3302 hiddenColumnsCookie = JSON.parse(hiddenColumnsCookieValue);
3303 } catch (e) {
3304 throw new Error('Could not parse the json of the hidden columns cookie!', hiddenColumnsCookieValue);
3305 }
3306
3307 try {
3308 sortPriorityCookie = JSON.parse(sortPriorityCookie);
3309 } catch (e) {
3310 throw new Error('Could not parse the json of the sortPriority cookie!', sortPriorityCookie);
3311 }
3312
3313 if (!sortPriorityCookie) {
3314 // sortOrder
3315 this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder; // sortName
3316
3317 this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName;
3318 } else {
3319 this.options.sortOrder = undefined;
3320 this.options.sortName = undefined;
3321 } // sortPriority
3322
3323
3324 this.options.sortPriority = sortPriorityCookie ? sortPriorityCookie : this.options.sortPriority;
3325
3326 if (this.options.sortOrder || this.options.sortName) {
3327 // sortPriority
3328 this.options.sortPriority = null;
3329 } // pageNumber
3330
3331
3332 this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber; // pageSize
3333
3334 this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize; // searchText
3335
3336 if (UtilsCookie.isCookieEnabled(this, 'bs.table.searchText') && this.options.searchText === '') {
3337 this.options.searchText = searchTextCookie ? searchTextCookie : '';
3338 } // cardView
3339
3340
3341 this.options.cardView = cardViewCookie === 'true' ? cardViewCookie : false;
3342
3343 if (hiddenColumnsCookie) {
3344 var _iterator2 = _createForOfIteratorHelper(this.columns),
3345 _step2;
3346
3347 try {
3348 var _loop = function _loop() {
3349 var column = _step2.value;
3350 column.visible = !hiddenColumnsCookie.filter(function (columnField) {
3351 if (_this.isSelectionColumn(column)) {
3352 return true;
3353 }
3354
3355 return columnField === column.field;
3356 }).length > 0 || !column.switchable;
3357 };
3358
3359 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
3360 _loop();
3361 }
3362 } catch (err) {
3363 _iterator2.e(err);
3364 } finally {
3365 _iterator2.f();
3366 }
3367 } else if (columnsCookie) {
3368 /**
3369 * This is needed for the old saved cookies!
3370 * It can be removed in 2-3 Versions Later!!
3371 * TODO: Remove this part (column cookie) some versions later e.g. 1.22.0
3372 */
3373 var _iterator3 = _createForOfIteratorHelper(this.columns),
3374 _step3;
3375
3376 try {
3377 var _loop2 = function _loop2() {
3378 var column = _step3.value;
3379
3380 if (!column.switchable) {
3381 return "continue";
3382 }
3383
3384 column.visible = columnsCookie.filter(function (columnField) {
3385 if (_this.isSelectionColumn(column)) {
3386 return true;
3387 }
3388
3389 if (columnField instanceof Object) {
3390 return columnField.field === column.field;
3391 }
3392
3393 return columnField === column.field;
3394 }).length > 0;
3395 };
3396
3397 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
3398 var _ret = _loop2();
3399
3400 if (_ret === "continue") continue;
3401 }
3402 } catch (err) {
3403 _iterator3.e(err);
3404 } finally {
3405 _iterator3.f();
3406 }
3407 }
3408 }
3409 }, {
3410 key: "getCookies",
3411 value: function getCookies() {
3412 var bootstrapTable = this;
3413 var cookies = {};
3414 $__default["default"].each(UtilsCookie.cookieIds, function (key, value) {
3415 cookies[key] = UtilsCookie.getCookie(bootstrapTable, value);
3416
3417 if (key === 'columns' || key === 'hiddenColumns' || key === 'sortPriority') {
3418 cookies[key] = JSON.parse(cookies[key]);
3419 }
3420 });
3421 return cookies;
3422 }
3423 }, {
3424 key: "deleteCookie",
3425 value: function deleteCookie(cookieName) {
3426 if (!cookieName) {
3427 return;
3428 }
3429
3430 UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds[cookieName]);
3431 }
3432 }, {
3433 key: "configureStorage",
3434 value: function configureStorage() {
3435 var that = this;
3436 this._storage = {};
3437
3438 switch (this.options.cookieStorage) {
3439 case 'cookieStorage':
3440 this._storage.setItem = function (cookieName, cookieValue) {
3441 document.cookie = [cookieName, '=', encodeURIComponent(cookieValue), "; expires=".concat(UtilsCookie.calculateExpiration(that.options.cookieExpire)), that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', that.options.cookieSecure ? '; secure' : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
3442 };
3443
3444 this._storage.getItem = function (cookieName) {
3445 var value = "; ".concat(document.cookie);
3446 var parts = value.split("; ".concat(cookieName, "="));
3447 return parts.length === 2 ? decodeURIComponent(parts.pop().split(';').shift()) : null;
3448 };
3449
3450 this._storage.removeItem = function (cookieName) {
3451 document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
3452 };
3453
3454 break;
3455
3456 case 'localStorage':
3457 this._storage.setItem = function (cookieName, cookieValue) {
3458 localStorage.setItem(cookieName, cookieValue);
3459 };
3460
3461 this._storage.getItem = function (cookieName) {
3462 return localStorage.getItem(cookieName);
3463 };
3464
3465 this._storage.removeItem = function (cookieName) {
3466 localStorage.removeItem(cookieName);
3467 };
3468
3469 break;
3470
3471 case 'sessionStorage':
3472 this._storage.setItem = function (cookieName, cookieValue) {
3473 sessionStorage.setItem(cookieName, cookieValue);
3474 };
3475
3476 this._storage.getItem = function (cookieName) {
3477 return sessionStorage.getItem(cookieName);
3478 };
3479
3480 this._storage.removeItem = function (cookieName) {
3481 sessionStorage.removeItem(cookieName);
3482 };
3483
3484 break;
3485
3486 case 'customStorage':
3487 if (!this.options.cookieCustomStorageSet || !this.options.cookieCustomStorageGet || !this.options.cookieCustomStorageDelete) {
3488 throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
3489 }
3490
3491 this._storage.setItem = function (cookieName, cookieValue) {
3492 Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], '');
3493 };
3494
3495 this._storage.getItem = function (cookieName) {
3496 return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], '');
3497 };
3498
3499 this._storage.removeItem = function (cookieName) {
3500 Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], '');
3501 };
3502
3503 break;
3504
3505 default:
3506 throw new Error('Storage method not supported.');
3507 }
3508 }
3509 }]);
3510
3511 return _class;
3512 }($__default["default"].BootstrapTable);
3513
3514}));