UNPKG

59.3 kBJavaScriptView Raw
1var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
3function createCommonjsModule(fn, module) {
4 return module = { exports: {} }, fn(module, module.exports), module.exports;
5}
6
7var O = 'object';
8var check = function (it) {
9 return it && it.Math == Math && it;
10};
11
12// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
13var global_1 =
14 // eslint-disable-next-line no-undef
15 check(typeof globalThis == O && globalThis) ||
16 check(typeof window == O && window) ||
17 check(typeof self == O && self) ||
18 check(typeof commonjsGlobal == O && commonjsGlobal) ||
19 // eslint-disable-next-line no-new-func
20 Function('return this')();
21
22var fails = function (exec) {
23 try {
24 return !!exec();
25 } catch (error) {
26 return true;
27 }
28};
29
30// Thank's IE8 for his funny defineProperty
31var descriptors = !fails(function () {
32 return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
33});
34
35var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
36var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
37
38// Nashorn ~ JDK8 bug
39var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
40
41// `Object.prototype.propertyIsEnumerable` method implementation
42// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
43var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
44 var descriptor = getOwnPropertyDescriptor(this, V);
45 return !!descriptor && descriptor.enumerable;
46} : nativePropertyIsEnumerable;
47
48var objectPropertyIsEnumerable = {
49 f: f
50};
51
52var createPropertyDescriptor = function (bitmap, value) {
53 return {
54 enumerable: !(bitmap & 1),
55 configurable: !(bitmap & 2),
56 writable: !(bitmap & 4),
57 value: value
58 };
59};
60
61var toString = {}.toString;
62
63var classofRaw = function (it) {
64 return toString.call(it).slice(8, -1);
65};
66
67var split = ''.split;
68
69// fallback for non-array-like ES3 and non-enumerable old V8 strings
70var indexedObject = fails(function () {
71 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
72 // eslint-disable-next-line no-prototype-builtins
73 return !Object('z').propertyIsEnumerable(0);
74}) ? function (it) {
75 return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
76} : Object;
77
78// `RequireObjectCoercible` abstract operation
79// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
80var requireObjectCoercible = function (it) {
81 if (it == undefined) throw TypeError("Can't call method on " + it);
82 return it;
83};
84
85// toObject with fallback for non-array-like ES3 strings
86
87
88
89var toIndexedObject = function (it) {
90 return indexedObject(requireObjectCoercible(it));
91};
92
93var isObject = function (it) {
94 return typeof it === 'object' ? it !== null : typeof it === 'function';
95};
96
97// `ToPrimitive` abstract operation
98// https://tc39.github.io/ecma262/#sec-toprimitive
99// instead of the ES6 spec version, we didn't implement @@toPrimitive case
100// and the second argument - flag - preferred type is a string
101var toPrimitive = function (input, PREFERRED_STRING) {
102 if (!isObject(input)) return input;
103 var fn, val;
104 if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
105 if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
106 if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
107 throw TypeError("Can't convert object to primitive value");
108};
109
110var hasOwnProperty = {}.hasOwnProperty;
111
112var has = function (it, key) {
113 return hasOwnProperty.call(it, key);
114};
115
116var document = global_1.document;
117// typeof document.createElement is 'object' in old IE
118var EXISTS = isObject(document) && isObject(document.createElement);
119
120var documentCreateElement = function (it) {
121 return EXISTS ? document.createElement(it) : {};
122};
123
124// Thank's IE8 for his funny defineProperty
125var ie8DomDefine = !descriptors && !fails(function () {
126 return Object.defineProperty(documentCreateElement('div'), 'a', {
127 get: function () { return 7; }
128 }).a != 7;
129});
130
131var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
132
133// `Object.getOwnPropertyDescriptor` method
134// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
135var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
136 O = toIndexedObject(O);
137 P = toPrimitive(P, true);
138 if (ie8DomDefine) try {
139 return nativeGetOwnPropertyDescriptor(O, P);
140 } catch (error) { /* empty */ }
141 if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
142};
143
144var objectGetOwnPropertyDescriptor = {
145 f: f$1
146};
147
148var anObject = function (it) {
149 if (!isObject(it)) {
150 throw TypeError(String(it) + ' is not an object');
151 } return it;
152};
153
154var nativeDefineProperty = Object.defineProperty;
155
156// `Object.defineProperty` method
157// https://tc39.github.io/ecma262/#sec-object.defineproperty
158var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
159 anObject(O);
160 P = toPrimitive(P, true);
161 anObject(Attributes);
162 if (ie8DomDefine) try {
163 return nativeDefineProperty(O, P, Attributes);
164 } catch (error) { /* empty */ }
165 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
166 if ('value' in Attributes) O[P] = Attributes.value;
167 return O;
168};
169
170var objectDefineProperty = {
171 f: f$2
172};
173
174var hide = descriptors ? function (object, key, value) {
175 return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
176} : function (object, key, value) {
177 object[key] = value;
178 return object;
179};
180
181var setGlobal = function (key, value) {
182 try {
183 hide(global_1, key, value);
184 } catch (error) {
185 global_1[key] = value;
186 } return value;
187};
188
189var shared = createCommonjsModule(function (module) {
190var SHARED = '__core-js_shared__';
191var store = global_1[SHARED] || setGlobal(SHARED, {});
192
193(module.exports = function (key, value) {
194 return store[key] || (store[key] = value !== undefined ? value : {});
195})('versions', []).push({
196 version: '3.1.3',
197 mode: 'global',
198 copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
199});
200});
201
202var functionToString = shared('native-function-to-string', Function.toString);
203
204var WeakMap = global_1.WeakMap;
205
206var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
207
208var id = 0;
209var postfix = Math.random();
210
211var uid = function (key) {
212 return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
213};
214
215var keys = shared('keys');
216
217var sharedKey = function (key) {
218 return keys[key] || (keys[key] = uid(key));
219};
220
221var hiddenKeys = {};
222
223var WeakMap$1 = global_1.WeakMap;
224var set, get, has$1;
225
226var enforce = function (it) {
227 return has$1(it) ? get(it) : set(it, {});
228};
229
230var getterFor = function (TYPE) {
231 return function (it) {
232 var state;
233 if (!isObject(it) || (state = get(it)).type !== TYPE) {
234 throw TypeError('Incompatible receiver, ' + TYPE + ' required');
235 } return state;
236 };
237};
238
239if (nativeWeakMap) {
240 var store = new WeakMap$1();
241 var wmget = store.get;
242 var wmhas = store.has;
243 var wmset = store.set;
244 set = function (it, metadata) {
245 wmset.call(store, it, metadata);
246 return metadata;
247 };
248 get = function (it) {
249 return wmget.call(store, it) || {};
250 };
251 has$1 = function (it) {
252 return wmhas.call(store, it);
253 };
254} else {
255 var STATE = sharedKey('state');
256 hiddenKeys[STATE] = true;
257 set = function (it, metadata) {
258 hide(it, STATE, metadata);
259 return metadata;
260 };
261 get = function (it) {
262 return has(it, STATE) ? it[STATE] : {};
263 };
264 has$1 = function (it) {
265 return has(it, STATE);
266 };
267}
268
269var internalState = {
270 set: set,
271 get: get,
272 has: has$1,
273 enforce: enforce,
274 getterFor: getterFor
275};
276
277var redefine = createCommonjsModule(function (module) {
278var getInternalState = internalState.get;
279var enforceInternalState = internalState.enforce;
280var TEMPLATE = String(functionToString).split('toString');
281
282shared('inspectSource', function (it) {
283 return functionToString.call(it);
284});
285
286(module.exports = function (O, key, value, options) {
287 var unsafe = options ? !!options.unsafe : false;
288 var simple = options ? !!options.enumerable : false;
289 var noTargetGet = options ? !!options.noTargetGet : false;
290 if (typeof value == 'function') {
291 if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
292 enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
293 }
294 if (O === global_1) {
295 if (simple) O[key] = value;
296 else setGlobal(key, value);
297 return;
298 } else if (!unsafe) {
299 delete O[key];
300 } else if (!noTargetGet && O[key]) {
301 simple = true;
302 }
303 if (simple) O[key] = value;
304 else hide(O, key, value);
305// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
306})(Function.prototype, 'toString', function toString() {
307 return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
308});
309});
310
311var path = global_1;
312
313var aFunction = function (variable) {
314 return typeof variable == 'function' ? variable : undefined;
315};
316
317var getBuiltIn = function (namespace, method) {
318 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
319 : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
320};
321
322var ceil = Math.ceil;
323var floor = Math.floor;
324
325// `ToInteger` abstract operation
326// https://tc39.github.io/ecma262/#sec-tointeger
327var toInteger = function (argument) {
328 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
329};
330
331var min = Math.min;
332
333// `ToLength` abstract operation
334// https://tc39.github.io/ecma262/#sec-tolength
335var toLength = function (argument) {
336 return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
337};
338
339var max = Math.max;
340var min$1 = Math.min;
341
342// Helper for a popular repeating case of the spec:
343// Let integer be ? ToInteger(index).
344// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
345var toAbsoluteIndex = function (index, length) {
346 var integer = toInteger(index);
347 return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
348};
349
350// `Array.prototype.{ indexOf, includes }` methods implementation
351var createMethod = function (IS_INCLUDES) {
352 return function ($this, el, fromIndex) {
353 var O = toIndexedObject($this);
354 var length = toLength(O.length);
355 var index = toAbsoluteIndex(fromIndex, length);
356 var value;
357 // Array#includes uses SameValueZero equality algorithm
358 // eslint-disable-next-line no-self-compare
359 if (IS_INCLUDES && el != el) while (length > index) {
360 value = O[index++];
361 // eslint-disable-next-line no-self-compare
362 if (value != value) return true;
363 // Array#indexOf ignores holes, Array#includes - not
364 } else for (;length > index; index++) {
365 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
366 } return !IS_INCLUDES && -1;
367 };
368};
369
370var arrayIncludes = {
371 // `Array.prototype.includes` method
372 // https://tc39.github.io/ecma262/#sec-array.prototype.includes
373 includes: createMethod(true),
374 // `Array.prototype.indexOf` method
375 // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
376 indexOf: createMethod(false)
377};
378
379var indexOf = arrayIncludes.indexOf;
380
381
382var objectKeysInternal = function (object, names) {
383 var O = toIndexedObject(object);
384 var i = 0;
385 var result = [];
386 var key;
387 for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
388 // Don't enum bug & hidden keys
389 while (names.length > i) if (has(O, key = names[i++])) {
390 ~indexOf(result, key) || result.push(key);
391 }
392 return result;
393};
394
395// IE8- don't enum bug keys
396var enumBugKeys = [
397 'constructor',
398 'hasOwnProperty',
399 'isPrototypeOf',
400 'propertyIsEnumerable',
401 'toLocaleString',
402 'toString',
403 'valueOf'
404];
405
406var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
407
408// `Object.getOwnPropertyNames` method
409// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
410var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
411 return objectKeysInternal(O, hiddenKeys$1);
412};
413
414var objectGetOwnPropertyNames = {
415 f: f$3
416};
417
418var f$4 = Object.getOwnPropertySymbols;
419
420var objectGetOwnPropertySymbols = {
421 f: f$4
422};
423
424// all object keys, includes non-enumerable and symbols
425var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
426 var keys = objectGetOwnPropertyNames.f(anObject(it));
427 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
428 return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
429};
430
431var copyConstructorProperties = function (target, source) {
432 var keys = ownKeys(source);
433 var defineProperty = objectDefineProperty.f;
434 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
435 for (var i = 0; i < keys.length; i++) {
436 var key = keys[i];
437 if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
438 }
439};
440
441var replacement = /#|\.prototype\./;
442
443var isForced = function (feature, detection) {
444 var value = data[normalize(feature)];
445 return value == POLYFILL ? true
446 : value == NATIVE ? false
447 : typeof detection == 'function' ? fails(detection)
448 : !!detection;
449};
450
451var normalize = isForced.normalize = function (string) {
452 return String(string).replace(replacement, '.').toLowerCase();
453};
454
455var data = isForced.data = {};
456var NATIVE = isForced.NATIVE = 'N';
457var POLYFILL = isForced.POLYFILL = 'P';
458
459var isForced_1 = isForced;
460
461var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
462
463
464
465
466
467
468/*
469 options.target - name of the target object
470 options.global - target is the global object
471 options.stat - export as static methods of target
472 options.proto - export as prototype methods of target
473 options.real - real prototype method for the `pure` version
474 options.forced - export even if the native feature is available
475 options.bind - bind methods to the target, required for the `pure` version
476 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
477 options.unsafe - use the simple assignment of property instead of delete + defineProperty
478 options.sham - add a flag to not completely full polyfills
479 options.enumerable - export as enumerable property
480 options.noTargetGet - prevent calling a getter on target
481*/
482var _export = function (options, source) {
483 var TARGET = options.target;
484 var GLOBAL = options.global;
485 var STATIC = options.stat;
486 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
487 if (GLOBAL) {
488 target = global_1;
489 } else if (STATIC) {
490 target = global_1[TARGET] || setGlobal(TARGET, {});
491 } else {
492 target = (global_1[TARGET] || {}).prototype;
493 }
494 if (target) for (key in source) {
495 sourceProperty = source[key];
496 if (options.noTargetGet) {
497 descriptor = getOwnPropertyDescriptor$1(target, key);
498 targetProperty = descriptor && descriptor.value;
499 } else targetProperty = target[key];
500 FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
501 // contained in target
502 if (!FORCED && targetProperty !== undefined) {
503 if (typeof sourceProperty === typeof targetProperty) continue;
504 copyConstructorProperties(sourceProperty, targetProperty);
505 }
506 // add a flag to not completely full polyfills
507 if (options.sham || (targetProperty && targetProperty.sham)) {
508 hide(sourceProperty, 'sham', true);
509 }
510 // extend global
511 redefine(target, key, sourceProperty, options);
512 }
513};
514
515var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
516 // Chrome 38 Symbol has incorrect toString conversion
517 // eslint-disable-next-line no-undef
518 return !String(Symbol());
519});
520
521// `IsArray` abstract operation
522// https://tc39.github.io/ecma262/#sec-isarray
523var isArray = Array.isArray || function isArray(arg) {
524 return classofRaw(arg) == 'Array';
525};
526
527// `ToObject` abstract operation
528// https://tc39.github.io/ecma262/#sec-toobject
529var toObject = function (argument) {
530 return Object(requireObjectCoercible(argument));
531};
532
533// `Object.keys` method
534// https://tc39.github.io/ecma262/#sec-object.keys
535var objectKeys = Object.keys || function keys(O) {
536 return objectKeysInternal(O, enumBugKeys);
537};
538
539// `Object.defineProperties` method
540// https://tc39.github.io/ecma262/#sec-object.defineproperties
541var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
542 anObject(O);
543 var keys = objectKeys(Properties);
544 var length = keys.length;
545 var index = 0;
546 var key;
547 while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
548 return O;
549};
550
551var html = getBuiltIn('document', 'documentElement');
552
553var IE_PROTO = sharedKey('IE_PROTO');
554
555var PROTOTYPE = 'prototype';
556var Empty = function () { /* empty */ };
557
558// Create object with fake `null` prototype: use iframe Object with cleared prototype
559var createDict = function () {
560 // Thrash, waste and sodomy: IE GC bug
561 var iframe = documentCreateElement('iframe');
562 var length = enumBugKeys.length;
563 var lt = '<';
564 var script = 'script';
565 var gt = '>';
566 var js = 'java' + script + ':';
567 var iframeDocument;
568 iframe.style.display = 'none';
569 html.appendChild(iframe);
570 iframe.src = String(js);
571 iframeDocument = iframe.contentWindow.document;
572 iframeDocument.open();
573 iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
574 iframeDocument.close();
575 createDict = iframeDocument.F;
576 while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
577 return createDict();
578};
579
580// `Object.create` method
581// https://tc39.github.io/ecma262/#sec-object.create
582var objectCreate = Object.create || function create(O, Properties) {
583 var result;
584 if (O !== null) {
585 Empty[PROTOTYPE] = anObject(O);
586 result = new Empty();
587 Empty[PROTOTYPE] = null;
588 // add "__proto__" for Object.getPrototypeOf polyfill
589 result[IE_PROTO] = O;
590 } else result = createDict();
591 return Properties === undefined ? result : objectDefineProperties(result, Properties);
592};
593
594hiddenKeys[IE_PROTO] = true;
595
596var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
597
598var toString$1 = {}.toString;
599
600var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
601 ? Object.getOwnPropertyNames(window) : [];
602
603var getWindowNames = function (it) {
604 try {
605 return nativeGetOwnPropertyNames(it);
606 } catch (error) {
607 return windowNames.slice();
608 }
609};
610
611// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
612var f$5 = function getOwnPropertyNames(it) {
613 return windowNames && toString$1.call(it) == '[object Window]'
614 ? getWindowNames(it)
615 : nativeGetOwnPropertyNames(toIndexedObject(it));
616};
617
618var objectGetOwnPropertyNamesExternal = {
619 f: f$5
620};
621
622var Symbol$1 = global_1.Symbol;
623var store$1 = shared('wks');
624
625var wellKnownSymbol = function (name) {
626 return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
627 || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
628};
629
630var f$6 = wellKnownSymbol;
631
632var wrappedWellKnownSymbol = {
633 f: f$6
634};
635
636var defineProperty = objectDefineProperty.f;
637
638var defineWellKnownSymbol = function (NAME) {
639 var Symbol = path.Symbol || (path.Symbol = {});
640 if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
641 value: wrappedWellKnownSymbol.f(NAME)
642 });
643};
644
645var defineProperty$1 = objectDefineProperty.f;
646
647
648
649var TO_STRING_TAG = wellKnownSymbol('toStringTag');
650
651var setToStringTag = function (it, TAG, STATIC) {
652 if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
653 defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG });
654 }
655};
656
657var aFunction$1 = function (it) {
658 if (typeof it != 'function') {
659 throw TypeError(String(it) + ' is not a function');
660 } return it;
661};
662
663// optional / simple context binding
664var bindContext = function (fn, that, length) {
665 aFunction$1(fn);
666 if (that === undefined) return fn;
667 switch (length) {
668 case 0: return function () {
669 return fn.call(that);
670 };
671 case 1: return function (a) {
672 return fn.call(that, a);
673 };
674 case 2: return function (a, b) {
675 return fn.call(that, a, b);
676 };
677 case 3: return function (a, b, c) {
678 return fn.call(that, a, b, c);
679 };
680 }
681 return function (/* ...args */) {
682 return fn.apply(that, arguments);
683 };
684};
685
686var SPECIES = wellKnownSymbol('species');
687
688// `ArraySpeciesCreate` abstract operation
689// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
690var arraySpeciesCreate = function (originalArray, length) {
691 var C;
692 if (isArray(originalArray)) {
693 C = originalArray.constructor;
694 // cross-realm fallback
695 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
696 else if (isObject(C)) {
697 C = C[SPECIES];
698 if (C === null) C = undefined;
699 }
700 } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
701};
702
703var push = [].push;
704
705// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
706var createMethod$1 = function (TYPE) {
707 var IS_MAP = TYPE == 1;
708 var IS_FILTER = TYPE == 2;
709 var IS_SOME = TYPE == 3;
710 var IS_EVERY = TYPE == 4;
711 var IS_FIND_INDEX = TYPE == 6;
712 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
713 return function ($this, callbackfn, that, specificCreate) {
714 var O = toObject($this);
715 var self = indexedObject(O);
716 var boundFunction = bindContext(callbackfn, that, 3);
717 var length = toLength(self.length);
718 var index = 0;
719 var create = specificCreate || arraySpeciesCreate;
720 var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
721 var value, result;
722 for (;length > index; index++) if (NO_HOLES || index in self) {
723 value = self[index];
724 result = boundFunction(value, index, O);
725 if (TYPE) {
726 if (IS_MAP) target[index] = result; // map
727 else if (result) switch (TYPE) {
728 case 3: return true; // some
729 case 5: return value; // find
730 case 6: return index; // findIndex
731 case 2: push.call(target, value); // filter
732 } else if (IS_EVERY) return false; // every
733 }
734 }
735 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
736 };
737};
738
739var arrayIteration = {
740 // `Array.prototype.forEach` method
741 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
742 forEach: createMethod$1(0),
743 // `Array.prototype.map` method
744 // https://tc39.github.io/ecma262/#sec-array.prototype.map
745 map: createMethod$1(1),
746 // `Array.prototype.filter` method
747 // https://tc39.github.io/ecma262/#sec-array.prototype.filter
748 filter: createMethod$1(2),
749 // `Array.prototype.some` method
750 // https://tc39.github.io/ecma262/#sec-array.prototype.some
751 some: createMethod$1(3),
752 // `Array.prototype.every` method
753 // https://tc39.github.io/ecma262/#sec-array.prototype.every
754 every: createMethod$1(4),
755 // `Array.prototype.find` method
756 // https://tc39.github.io/ecma262/#sec-array.prototype.find
757 find: createMethod$1(5),
758 // `Array.prototype.findIndex` method
759 // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
760 findIndex: createMethod$1(6)
761};
762
763var $forEach = arrayIteration.forEach;
764
765var HIDDEN = sharedKey('hidden');
766var SYMBOL = 'Symbol';
767var PROTOTYPE$1 = 'prototype';
768var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
769var setInternalState = internalState.set;
770var getInternalState = internalState.getterFor(SYMBOL);
771var ObjectPrototype = Object[PROTOTYPE$1];
772var $Symbol = global_1.Symbol;
773var JSON = global_1.JSON;
774var nativeJSONStringify = JSON && JSON.stringify;
775var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
776var nativeDefineProperty$1 = objectDefineProperty.f;
777var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
778var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
779var AllSymbols = shared('symbols');
780var ObjectPrototypeSymbols = shared('op-symbols');
781var StringToSymbolRegistry = shared('string-to-symbol-registry');
782var SymbolToStringRegistry = shared('symbol-to-string-registry');
783var WellKnownSymbolsStore = shared('wks');
784var QObject = global_1.QObject;
785// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
786var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
787
788// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
789var setSymbolDescriptor = descriptors && fails(function () {
790 return objectCreate(nativeDefineProperty$1({}, 'a', {
791 get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
792 })).a != 7;
793}) ? function (O, P, Attributes) {
794 var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype, P);
795 if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
796 nativeDefineProperty$1(O, P, Attributes);
797 if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
798 nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);
799 }
800} : nativeDefineProperty$1;
801
802var wrap = function (tag, description) {
803 var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
804 setInternalState(symbol, {
805 type: SYMBOL,
806 tag: tag,
807 description: description
808 });
809 if (!descriptors) symbol.description = description;
810 return symbol;
811};
812
813var isSymbol = nativeSymbol && typeof $Symbol.iterator == 'symbol' ? function (it) {
814 return typeof it == 'symbol';
815} : function (it) {
816 return Object(it) instanceof $Symbol;
817};
818
819var $defineProperty = function defineProperty(O, P, Attributes) {
820 if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
821 anObject(O);
822 var key = toPrimitive(P, true);
823 anObject(Attributes);
824 if (has(AllSymbols, key)) {
825 if (!Attributes.enumerable) {
826 if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));
827 O[HIDDEN][key] = true;
828 } else {
829 if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
830 Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
831 } return setSymbolDescriptor(O, key, Attributes);
832 } return nativeDefineProperty$1(O, key, Attributes);
833};
834
835var $defineProperties = function defineProperties(O, Properties) {
836 anObject(O);
837 var properties = toIndexedObject(Properties);
838 var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
839 $forEach(keys, function (key) {
840 if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
841 });
842 return O;
843};
844
845var $create = function create(O, Properties) {
846 return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
847};
848
849var $propertyIsEnumerable = function propertyIsEnumerable(V) {
850 var P = toPrimitive(V, true);
851 var enumerable = nativePropertyIsEnumerable$1.call(this, P);
852 if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
853 return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
854};
855
856var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
857 var it = toIndexedObject(O);
858 var key = toPrimitive(P, true);
859 if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
860 var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);
861 if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
862 descriptor.enumerable = true;
863 }
864 return descriptor;
865};
866
867var $getOwnPropertyNames = function getOwnPropertyNames(O) {
868 var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));
869 var result = [];
870 $forEach(names, function (key) {
871 if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
872 });
873 return result;
874};
875
876var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
877 var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
878 var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
879 var result = [];
880 $forEach(names, function (key) {
881 if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
882 result.push(AllSymbols[key]);
883 }
884 });
885 return result;
886};
887
888// `Symbol` constructor
889// https://tc39.github.io/ecma262/#sec-symbol-constructor
890if (!nativeSymbol) {
891 $Symbol = function Symbol() {
892 if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
893 var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
894 var tag = uid(description);
895 var setter = function (value) {
896 if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
897 if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
898 setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
899 };
900 if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
901 return wrap(tag, description);
902 };
903
904 redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
905 return getInternalState(this).tag;
906 });
907
908 objectPropertyIsEnumerable.f = $propertyIsEnumerable;
909 objectDefineProperty.f = $defineProperty;
910 objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
911 objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
912 objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
913
914 if (descriptors) {
915 // https://github.com/tc39/proposal-Symbol-description
916 nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
917 configurable: true,
918 get: function description() {
919 return getInternalState(this).description;
920 }
921 });
922 {
923 redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
924 }
925 }
926
927 wrappedWellKnownSymbol.f = function (name) {
928 return wrap(wellKnownSymbol(name), name);
929 };
930}
931
932_export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
933 Symbol: $Symbol
934});
935
936$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
937 defineWellKnownSymbol(name);
938});
939
940_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
941 // `Symbol.for` method
942 // https://tc39.github.io/ecma262/#sec-symbol.for
943 'for': function (key) {
944 var string = String(key);
945 if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
946 var symbol = $Symbol(string);
947 StringToSymbolRegistry[string] = symbol;
948 SymbolToStringRegistry[symbol] = string;
949 return symbol;
950 },
951 // `Symbol.keyFor` method
952 // https://tc39.github.io/ecma262/#sec-symbol.keyfor
953 keyFor: function keyFor(sym) {
954 if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
955 if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
956 },
957 useSetter: function () { USE_SETTER = true; },
958 useSimple: function () { USE_SETTER = false; }
959});
960
961_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
962 // `Object.create` method
963 // https://tc39.github.io/ecma262/#sec-object.create
964 create: $create,
965 // `Object.defineProperty` method
966 // https://tc39.github.io/ecma262/#sec-object.defineproperty
967 defineProperty: $defineProperty,
968 // `Object.defineProperties` method
969 // https://tc39.github.io/ecma262/#sec-object.defineproperties
970 defineProperties: $defineProperties,
971 // `Object.getOwnPropertyDescriptor` method
972 // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
973 getOwnPropertyDescriptor: $getOwnPropertyDescriptor
974});
975
976_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
977 // `Object.getOwnPropertyNames` method
978 // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
979 getOwnPropertyNames: $getOwnPropertyNames,
980 // `Object.getOwnPropertySymbols` method
981 // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
982 getOwnPropertySymbols: $getOwnPropertySymbols
983});
984
985// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
986// https://bugs.chromium.org/p/v8/issues/detail?id=3443
987_export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwnPropertySymbols.f(1); }) }, {
988 getOwnPropertySymbols: function getOwnPropertySymbols(it) {
989 return objectGetOwnPropertySymbols.f(toObject(it));
990 }
991});
992
993// `JSON.stringify` method behavior with symbols
994// https://tc39.github.io/ecma262/#sec-json.stringify
995JSON && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {
996 var symbol = $Symbol();
997 // MS Edge converts symbol values to JSON as {}
998 return nativeJSONStringify([symbol]) != '[null]'
999 // WebKit converts symbol values to JSON as null
1000 || nativeJSONStringify({ a: symbol }) != '{}'
1001 // V8 throws on boxed symbols
1002 || nativeJSONStringify(Object(symbol)) != '{}';
1003}) }, {
1004 stringify: function stringify(it) {
1005 var args = [it];
1006 var index = 1;
1007 var replacer, $replacer;
1008 while (arguments.length > index) args.push(arguments[index++]);
1009 $replacer = replacer = args[1];
1010 if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
1011 if (!isArray(replacer)) replacer = function (key, value) {
1012 if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
1013 if (!isSymbol(value)) return value;
1014 };
1015 args[1] = replacer;
1016 return nativeJSONStringify.apply(JSON, args);
1017 }
1018});
1019
1020// `Symbol.prototype[@@toPrimitive]` method
1021// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
1022if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
1023// `Symbol.prototype[@@toStringTag]` property
1024// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
1025setToStringTag($Symbol, SYMBOL);
1026
1027hiddenKeys[HIDDEN] = true;
1028
1029var defineProperty$2 = objectDefineProperty.f;
1030
1031
1032var NativeSymbol = global_1.Symbol;
1033
1034if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
1035 // Safari 12 bug
1036 NativeSymbol().description !== undefined
1037)) {
1038 var EmptyStringDescriptionStore = {};
1039 // wrap Symbol constructor for correct work with undefined description
1040 var SymbolWrapper = function Symbol() {
1041 var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
1042 var result = this instanceof SymbolWrapper
1043 ? new NativeSymbol(description)
1044 // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
1045 : description === undefined ? NativeSymbol() : NativeSymbol(description);
1046 if (description === '') EmptyStringDescriptionStore[result] = true;
1047 return result;
1048 };
1049 copyConstructorProperties(SymbolWrapper, NativeSymbol);
1050 var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
1051 symbolPrototype.constructor = SymbolWrapper;
1052
1053 var symbolToString = symbolPrototype.toString;
1054 var native = String(NativeSymbol('test')) == 'Symbol(test)';
1055 var regexp = /^Symbol\((.*)\)[^)]+$/;
1056 defineProperty$2(symbolPrototype, 'description', {
1057 configurable: true,
1058 get: function description() {
1059 var symbol = isObject(this) ? this.valueOf() : this;
1060 var string = symbolToString.call(symbol);
1061 if (has(EmptyStringDescriptionStore, symbol)) return '';
1062 var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
1063 return desc === '' ? undefined : desc;
1064 }
1065 });
1066
1067 _export({ global: true, forced: true }, {
1068 Symbol: SymbolWrapper
1069 });
1070}
1071
1072// `Symbol.iterator` well-known symbol
1073// https://tc39.github.io/ecma262/#sec-symbol.iterator
1074defineWellKnownSymbol('iterator');
1075
1076var createProperty = function (object, key, value) {
1077 var propertyKey = toPrimitive(key);
1078 if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
1079 else object[propertyKey] = value;
1080};
1081
1082var SPECIES$1 = wellKnownSymbol('species');
1083
1084var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1085 return !fails(function () {
1086 var array = [];
1087 var constructor = array.constructor = {};
1088 constructor[SPECIES$1] = function () {
1089 return { foo: 1 };
1090 };
1091 return array[METHOD_NAME](Boolean).foo !== 1;
1092 });
1093};
1094
1095var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1096var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1097var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
1098
1099var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
1100 var array = [];
1101 array[IS_CONCAT_SPREADABLE] = false;
1102 return array.concat()[0] !== array;
1103});
1104
1105var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
1106
1107var isConcatSpreadable = function (O) {
1108 if (!isObject(O)) return false;
1109 var spreadable = O[IS_CONCAT_SPREADABLE];
1110 return spreadable !== undefined ? !!spreadable : isArray(O);
1111};
1112
1113var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1114
1115// `Array.prototype.concat` method
1116// https://tc39.github.io/ecma262/#sec-array.prototype.concat
1117// with adding support of @@isConcatSpreadable and @@species
1118_export({ target: 'Array', proto: true, forced: FORCED }, {
1119 concat: function concat(arg) { // eslint-disable-line no-unused-vars
1120 var O = toObject(this);
1121 var A = arraySpeciesCreate(O, 0);
1122 var n = 0;
1123 var i, k, length, len, E;
1124 for (i = -1, length = arguments.length; i < length; i++) {
1125 E = i === -1 ? O : arguments[i];
1126 if (isConcatSpreadable(E)) {
1127 len = toLength(E.length);
1128 if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1129 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1130 } else {
1131 if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1132 createProperty(A, n++, E);
1133 }
1134 }
1135 A.length = n;
1136 return A;
1137 }
1138});
1139
1140var UNSCOPABLES = wellKnownSymbol('unscopables');
1141var ArrayPrototype = Array.prototype;
1142
1143// Array.prototype[@@unscopables]
1144// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1145if (ArrayPrototype[UNSCOPABLES] == undefined) {
1146 hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
1147}
1148
1149// add a key to Array.prototype[@@unscopables]
1150var addToUnscopables = function (key) {
1151 ArrayPrototype[UNSCOPABLES][key] = true;
1152};
1153
1154var correctPrototypeGetter = !fails(function () {
1155 function F() { /* empty */ }
1156 F.prototype.constructor = null;
1157 return Object.getPrototypeOf(new F()) !== F.prototype;
1158});
1159
1160var IE_PROTO$1 = sharedKey('IE_PROTO');
1161var ObjectPrototype$1 = Object.prototype;
1162
1163// `Object.getPrototypeOf` method
1164// https://tc39.github.io/ecma262/#sec-object.getprototypeof
1165var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
1166 O = toObject(O);
1167 if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
1168 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
1169 return O.constructor.prototype;
1170 } return O instanceof Object ? ObjectPrototype$1 : null;
1171};
1172
1173var ITERATOR = wellKnownSymbol('iterator');
1174var BUGGY_SAFARI_ITERATORS = false;
1175
1176var returnThis = function () { return this; };
1177
1178// `%IteratorPrototype%` object
1179// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
1180var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
1181
1182if ([].keys) {
1183 arrayIterator = [].keys();
1184 // Safari 8 has buggy iterators w/o `next`
1185 if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
1186 else {
1187 PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
1188 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
1189 }
1190}
1191
1192if (IteratorPrototype == undefined) IteratorPrototype = {};
1193
1194// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
1195if ( !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
1196
1197var iteratorsCore = {
1198 IteratorPrototype: IteratorPrototype,
1199 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1200};
1201
1202var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1203
1204var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
1205 var TO_STRING_TAG = NAME + ' Iterator';
1206 IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
1207 setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
1208 return IteratorConstructor;
1209};
1210
1211var aPossiblePrototype = function (it) {
1212 if (!isObject(it) && it !== null) {
1213 throw TypeError("Can't set " + String(it) + ' as a prototype');
1214 } return it;
1215};
1216
1217// `Object.setPrototypeOf` method
1218// https://tc39.github.io/ecma262/#sec-object.setprototypeof
1219// Works with __proto__ only. Old v8 can't work with null proto objects.
1220/* eslint-disable no-proto */
1221var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1222 var CORRECT_SETTER = false;
1223 var test = {};
1224 var setter;
1225 try {
1226 setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
1227 setter.call(test, []);
1228 CORRECT_SETTER = test instanceof Array;
1229 } catch (error) { /* empty */ }
1230 return function setPrototypeOf(O, proto) {
1231 anObject(O);
1232 aPossiblePrototype(proto);
1233 if (CORRECT_SETTER) setter.call(O, proto);
1234 else O.__proto__ = proto;
1235 return O;
1236 };
1237}() : undefined);
1238
1239var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
1240var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
1241var ITERATOR$1 = wellKnownSymbol('iterator');
1242var KEYS = 'keys';
1243var VALUES = 'values';
1244var ENTRIES = 'entries';
1245
1246var returnThis$1 = function () { return this; };
1247
1248var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1249 createIteratorConstructor(IteratorConstructor, NAME, next);
1250
1251 var getIterationMethod = function (KIND) {
1252 if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1253 if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
1254 switch (KIND) {
1255 case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1256 case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1257 case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1258 } return function () { return new IteratorConstructor(this); };
1259 };
1260
1261 var TO_STRING_TAG = NAME + ' Iterator';
1262 var INCORRECT_VALUES_NAME = false;
1263 var IterablePrototype = Iterable.prototype;
1264 var nativeIterator = IterablePrototype[ITERATOR$1]
1265 || IterablePrototype['@@iterator']
1266 || DEFAULT && IterablePrototype[DEFAULT];
1267 var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
1268 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1269 var CurrentIteratorPrototype, methods, KEY;
1270
1271 // fix native
1272 if (anyNativeIterator) {
1273 CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
1274 if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
1275 if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
1276 if (objectSetPrototypeOf) {
1277 objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
1278 } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
1279 hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
1280 }
1281 }
1282 // Set @@toStringTag to native iterators
1283 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1284 }
1285 }
1286
1287 // fix Array#{values, @@iterator}.name in V8 / FF
1288 if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1289 INCORRECT_VALUES_NAME = true;
1290 defaultIterator = function values() { return nativeIterator.call(this); };
1291 }
1292
1293 // define iterator
1294 if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
1295 hide(IterablePrototype, ITERATOR$1, defaultIterator);
1296 }
1297
1298 // export additional methods
1299 if (DEFAULT) {
1300 methods = {
1301 values: getIterationMethod(VALUES),
1302 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1303 entries: getIterationMethod(ENTRIES)
1304 };
1305 if (FORCED) for (KEY in methods) {
1306 if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1307 redefine(IterablePrototype, KEY, methods[KEY]);
1308 }
1309 } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
1310 }
1311
1312 return methods;
1313};
1314
1315var ARRAY_ITERATOR = 'Array Iterator';
1316var setInternalState$1 = internalState.set;
1317var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
1318
1319// `Array.prototype.entries` method
1320// https://tc39.github.io/ecma262/#sec-array.prototype.entries
1321// `Array.prototype.keys` method
1322// https://tc39.github.io/ecma262/#sec-array.prototype.keys
1323// `Array.prototype.values` method
1324// https://tc39.github.io/ecma262/#sec-array.prototype.values
1325// `Array.prototype[@@iterator]` method
1326// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
1327// `CreateArrayIterator` internal method
1328// https://tc39.github.io/ecma262/#sec-createarrayiterator
1329var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1330 setInternalState$1(this, {
1331 type: ARRAY_ITERATOR,
1332 target: toIndexedObject(iterated), // target
1333 index: 0, // next index
1334 kind: kind // kind
1335 });
1336// `%ArrayIteratorPrototype%.next` method
1337// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
1338}, function () {
1339 var state = getInternalState$1(this);
1340 var target = state.target;
1341 var kind = state.kind;
1342 var index = state.index++;
1343 if (!target || index >= target.length) {
1344 state.target = undefined;
1345 return { value: undefined, done: true };
1346 }
1347 if (kind == 'keys') return { value: index, done: false };
1348 if (kind == 'values') return { value: target[index], done: false };
1349 return { value: [index, target[index]], done: false };
1350}, 'values');
1351
1352// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1353addToUnscopables('keys');
1354addToUnscopables('values');
1355addToUnscopables('entries');
1356
1357var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1358// ES3 wrong here
1359var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1360
1361// fallback for IE11 Script Access Denied error
1362var tryGet = function (it, key) {
1363 try {
1364 return it[key];
1365 } catch (error) { /* empty */ }
1366};
1367
1368// getting tag from ES6+ `Object.prototype.toString`
1369var classof = function (it) {
1370 var O, tag, result;
1371 return it === undefined ? 'Undefined' : it === null ? 'Null'
1372 // @@toStringTag case
1373 : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1374 // builtinTag case
1375 : CORRECT_ARGUMENTS ? classofRaw(O)
1376 // ES3 arguments fallback
1377 : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1378};
1379
1380var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
1381var test = {};
1382
1383test[TO_STRING_TAG$2] = 'z';
1384
1385// `Object.prototype.toString` method implementation
1386// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1387var objectToString = String(test) !== '[object z]' ? function toString() {
1388 return '[object ' + classof(this) + ']';
1389} : test.toString;
1390
1391var ObjectPrototype$2 = Object.prototype;
1392
1393// `Object.prototype.toString` method
1394// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1395if (objectToString !== ObjectPrototype$2.toString) {
1396 redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });
1397}
1398
1399// `String.prototype.{ codePointAt, at }` methods implementation
1400var createMethod$2 = function (CONVERT_TO_STRING) {
1401 return function ($this, pos) {
1402 var S = String(requireObjectCoercible($this));
1403 var position = toInteger(pos);
1404 var size = S.length;
1405 var first, second;
1406 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1407 first = S.charCodeAt(position);
1408 return first < 0xD800 || first > 0xDBFF || position + 1 === size
1409 || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
1410 ? CONVERT_TO_STRING ? S.charAt(position) : first
1411 : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1412 };
1413};
1414
1415var stringMultibyte = {
1416 // `String.prototype.codePointAt` method
1417 // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
1418 codeAt: createMethod$2(false),
1419 // `String.prototype.at` method
1420 // https://github.com/mathiasbynens/String.prototype.at
1421 charAt: createMethod$2(true)
1422};
1423
1424var charAt = stringMultibyte.charAt;
1425
1426
1427
1428var STRING_ITERATOR = 'String Iterator';
1429var setInternalState$2 = internalState.set;
1430var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
1431
1432// `String.prototype[@@iterator]` method
1433// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
1434defineIterator(String, 'String', function (iterated) {
1435 setInternalState$2(this, {
1436 type: STRING_ITERATOR,
1437 string: String(iterated),
1438 index: 0
1439 });
1440// `%StringIteratorPrototype%.next` method
1441// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
1442}, function next() {
1443 var state = getInternalState$2(this);
1444 var string = state.string;
1445 var index = state.index;
1446 var point;
1447 if (index >= string.length) return { value: undefined, done: true };
1448 point = charAt(string, index);
1449 state.index += point.length;
1450 return { value: point, done: false };
1451});
1452
1453// iterable DOM collections
1454// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1455var domIterables = {
1456 CSSRuleList: 0,
1457 CSSStyleDeclaration: 0,
1458 CSSValueList: 0,
1459 ClientRectList: 0,
1460 DOMRectList: 0,
1461 DOMStringList: 0,
1462 DOMTokenList: 1,
1463 DataTransferItemList: 0,
1464 FileList: 0,
1465 HTMLAllCollection: 0,
1466 HTMLCollection: 0,
1467 HTMLFormElement: 0,
1468 HTMLSelectElement: 0,
1469 MediaList: 0,
1470 MimeTypeArray: 0,
1471 NamedNodeMap: 0,
1472 NodeList: 1,
1473 PaintRequestList: 0,
1474 Plugin: 0,
1475 PluginArray: 0,
1476 SVGLengthList: 0,
1477 SVGNumberList: 0,
1478 SVGPathSegList: 0,
1479 SVGPointList: 0,
1480 SVGStringList: 0,
1481 SVGTransformList: 0,
1482 SourceBufferList: 0,
1483 StyleSheetList: 0,
1484 TextTrackCueList: 0,
1485 TextTrackList: 0,
1486 TouchList: 0
1487};
1488
1489var ITERATOR$2 = wellKnownSymbol('iterator');
1490var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
1491var ArrayValues = es_array_iterator.values;
1492
1493for (var COLLECTION_NAME in domIterables) {
1494 var Collection = global_1[COLLECTION_NAME];
1495 var CollectionPrototype = Collection && Collection.prototype;
1496 if (CollectionPrototype) {
1497 // some Chrome versions have non-configurable methods on DOMTokenList
1498 if (CollectionPrototype[ITERATOR$2] !== ArrayValues) try {
1499 hide(CollectionPrototype, ITERATOR$2, ArrayValues);
1500 } catch (error) {
1501 CollectionPrototype[ITERATOR$2] = ArrayValues;
1502 }
1503 if (!CollectionPrototype[TO_STRING_TAG$3]) hide(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME);
1504 if (domIterables[COLLECTION_NAME]) for (var METHOD_NAME in es_array_iterator) {
1505 // some Chrome versions have non-configurable methods on DOMTokenList
1506 if (CollectionPrototype[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
1507 hide(CollectionPrototype, METHOD_NAME, es_array_iterator[METHOD_NAME]);
1508 } catch (error) {
1509 CollectionPrototype[METHOD_NAME] = es_array_iterator[METHOD_NAME];
1510 }
1511 }
1512 }
1513}
1514
1515function _defineProperty(obj, key, value) {
1516 if (key in obj) {
1517 Object.defineProperty(obj, key, {
1518 value: value,
1519 enumerable: true,
1520 configurable: true,
1521 writable: true
1522 });
1523 } else {
1524 obj[key] = value;
1525 }
1526
1527 return obj;
1528}
1529
1530function _objectSpread(target) {
1531 for (var i = 1; i < arguments.length; i++) {
1532 var source = arguments[i] != null ? arguments[i] : {};
1533 var ownKeys = Object.keys(source);
1534
1535 if (typeof Object.getOwnPropertySymbols === 'function') {
1536 ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
1537 return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1538 }));
1539 }
1540
1541 ownKeys.forEach(function (key) {
1542 _defineProperty(target, key, source[key]);
1543 });
1544 }
1545
1546 return target;
1547}
1548
1549function _toConsumableArray(arr) {
1550 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
1551}
1552
1553function _arrayWithoutHoles(arr) {
1554 if (Array.isArray(arr)) {
1555 for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
1556
1557 return arr2;
1558 }
1559}
1560
1561function _iterableToArray(iter) {
1562 if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
1563}
1564
1565function _nonIterableSpread() {
1566 throw new TypeError("Invalid attempt to spread non-iterable instance");
1567}
1568
1569//
1570//
1571//
1572//
1573var $ = window.jQuery;
1574
1575var deepCopy = function deepCopy(arg) {
1576 return $.extend(true, Array.isArray(arg) ? [] : {}, arg);
1577};
1578
1579var script = {
1580 name: 'BootstrapTable',
1581 props: {
1582 columns: {
1583 type: Array,
1584 require: true
1585 },
1586 data: {
1587 type: [Array, Object],
1588 default: function _default() {
1589 return undefined;
1590 }
1591 },
1592 options: {
1593 type: Object,
1594 default: function _default() {
1595 return {};
1596 }
1597 }
1598 },
1599 mounted: function mounted() {
1600 var _this = this;
1601
1602 this.$table = $(this.$el);
1603 this.$table.on('all.bs.table', function (e, name, args) {
1604 _this.$emit.apply(_this, [$.fn.bootstrapTable.events[name]].concat(_toConsumableArray(args)));
1605 });
1606
1607 this._initTable();
1608 },
1609 methods: _objectSpread({
1610 _initTable: function _initTable() {
1611 var options = _objectSpread({}, deepCopy(this.options), {
1612 columns: deepCopy(this.columns),
1613 data: deepCopy(this.data)
1614 });
1615
1616 if (!this._hasInit) {
1617 this.$table.bootstrapTable(options);
1618 this._hasInit = true;
1619 } else {
1620 this.refreshOptions(options);
1621 }
1622 }
1623 }, function () {
1624 var res = {};
1625 var _iteratorNormalCompletion = true;
1626 var _didIteratorError = false;
1627 var _iteratorError = undefined;
1628
1629 try {
1630 var _loop = function _loop() {
1631 var method = _step.value;
1632
1633 res[method] = function () {
1634 var _this$$table;
1635
1636 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1637 args[_key] = arguments[_key];
1638 }
1639
1640 return (_this$$table = this.$table).bootstrapTable.apply(_this$$table, [method].concat(args));
1641 };
1642 };
1643
1644 for (var _iterator = $.fn.bootstrapTable.methods[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
1645 _loop();
1646 }
1647 } catch (err) {
1648 _didIteratorError = true;
1649 _iteratorError = err;
1650 } finally {
1651 try {
1652 if (!_iteratorNormalCompletion && _iterator.return != null) {
1653 _iterator.return();
1654 }
1655 } finally {
1656 if (_didIteratorError) {
1657 throw _iteratorError;
1658 }
1659 }
1660 }
1661
1662 return res;
1663 }()),
1664 watch: {
1665 options: {
1666 handler: function handler() {
1667 this._initTable();
1668 },
1669 deep: true
1670 },
1671 columns: {
1672 handler: function handler() {
1673 this._initTable();
1674 },
1675 deep: true
1676 },
1677 data: {
1678 handler: function handler() {
1679 this.load(deepCopy(this.data));
1680 },
1681 deep: true
1682 }
1683 }
1684};
1685
1686function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
1687/* server only */
1688, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
1689 if (typeof shadowMode !== 'boolean') {
1690 createInjectorSSR = createInjector;
1691 createInjector = shadowMode;
1692 shadowMode = false;
1693 } // Vue.extend constructor export interop.
1694
1695
1696 var options = typeof script === 'function' ? script.options : script; // render functions
1697
1698 if (template && template.render) {
1699 options.render = template.render;
1700 options.staticRenderFns = template.staticRenderFns;
1701 options._compiled = true; // functional template
1702
1703 if (isFunctionalTemplate) {
1704 options.functional = true;
1705 }
1706 } // scopedId
1707
1708
1709 if (scopeId) {
1710 options._scopeId = scopeId;
1711 }
1712
1713 var hook;
1714
1715 if (moduleIdentifier) {
1716 // server build
1717 hook = function hook(context) {
1718 // 2.3 injection
1719 context = context || // cached call
1720 this.$vnode && this.$vnode.ssrContext || // stateful
1721 this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
1722 // 2.2 with runInNewContext: true
1723
1724 if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1725 context = __VUE_SSR_CONTEXT__;
1726 } // inject component styles
1727
1728
1729 if (style) {
1730 style.call(this, createInjectorSSR(context));
1731 } // register component module identifier for async chunk inference
1732
1733
1734 if (context && context._registeredComponents) {
1735 context._registeredComponents.add(moduleIdentifier);
1736 }
1737 }; // used by ssr in case component is cached and beforeCreate
1738 // never gets called
1739
1740
1741 options._ssrRegister = hook;
1742 } else if (style) {
1743 hook = shadowMode ? function () {
1744 style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
1745 } : function (context) {
1746 style.call(this, createInjector(context));
1747 };
1748 }
1749
1750 if (hook) {
1751 if (options.functional) {
1752 // register for functional component in vue file
1753 var originalRender = options.render;
1754
1755 options.render = function renderWithStyleInjection(h, context) {
1756 hook.call(context);
1757 return originalRender(h, context);
1758 };
1759 } else {
1760 // inject component registration as beforeCreate hook
1761 var existing = options.beforeCreate;
1762 options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
1763 }
1764 }
1765
1766 return script;
1767}
1768
1769var normalizeComponent_1 = normalizeComponent;
1770
1771/* script */
1772const __vue_script__ = script;
1773
1774/* template */
1775var __vue_render__ = function() {
1776 var _vm = this;
1777 var _h = _vm.$createElement;
1778 var _c = _vm._self._c || _h;
1779 return _c("table")
1780};
1781var __vue_staticRenderFns__ = [];
1782__vue_render__._withStripped = true;
1783
1784 /* style */
1785 const __vue_inject_styles__ = undefined;
1786 /* scoped */
1787 const __vue_scope_id__ = undefined;
1788 /* module identifier */
1789 const __vue_module_identifier__ = undefined;
1790 /* functional template */
1791 const __vue_is_functional_template__ = false;
1792 /* style inject */
1793
1794 /* style inject SSR */
1795
1796
1797
1798 var BootstrapTable = normalizeComponent_1(
1799 { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
1800 __vue_inject_styles__,
1801 __vue_script__,
1802 __vue_scope_id__,
1803 __vue_is_functional_template__,
1804 __vue_module_identifier__,
1805 undefined,
1806 undefined
1807 );
1808
1809export default BootstrapTable;