bootstrap-table-rails 1.18.2 → 1.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +1 -1
- data/bootstrap-table-rails.gemspec +2 -2
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/.DS_Store +0 -0
- data/vendor/assets/javascripts/bootstrap-table/.DS_Store +0 -0
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +188 -168
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +464 -442
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +1499 -1477
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +4 -2
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +7535 -7422
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +1787 -1758
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +1225 -1213
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +2610 -2567
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +1255 -1252
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +1269 -1272
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +876 -857
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1912 -1915
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +2244 -2251
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +3163 -3163
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +2442 -2457
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +1622 -1627
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +1619 -1631
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +1473 -1477
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +1305 -1318
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +1809 -1814
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.css +5 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +1132 -1137
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +305 -315
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +1660 -1679
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +1486 -1495
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +1067 -1055
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +927 -907
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +1263 -1236
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +2049 -2056
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +1250 -1206
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +146 -126
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +147 -128
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +151 -132
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +128 -109
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +3 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +1133 -1123
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +3 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +1125 -1115
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +7 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +1141 -1131
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +7 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +1134 -1124
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +3 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +1102 -1092
- metadata +7 -7
@@ -1,3 +1,142 @@
|
|
1
|
+
function _defineProperty(obj, key, value) {
|
2
|
+
if (key in obj) {
|
3
|
+
Object.defineProperty(obj, key, {
|
4
|
+
value: value,
|
5
|
+
enumerable: true,
|
6
|
+
configurable: true,
|
7
|
+
writable: true
|
8
|
+
});
|
9
|
+
} else {
|
10
|
+
obj[key] = value;
|
11
|
+
}
|
12
|
+
|
13
|
+
return obj;
|
14
|
+
}
|
15
|
+
|
16
|
+
function ownKeys$1(object, enumerableOnly) {
|
17
|
+
var keys = Object.keys(object);
|
18
|
+
|
19
|
+
if (Object.getOwnPropertySymbols) {
|
20
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
21
|
+
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
22
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
23
|
+
});
|
24
|
+
keys.push.apply(keys, symbols);
|
25
|
+
}
|
26
|
+
|
27
|
+
return keys;
|
28
|
+
}
|
29
|
+
|
30
|
+
function _objectSpread2(target) {
|
31
|
+
for (var i = 1; i < arguments.length; i++) {
|
32
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
33
|
+
|
34
|
+
if (i % 2) {
|
35
|
+
ownKeys$1(Object(source), true).forEach(function (key) {
|
36
|
+
_defineProperty(target, key, source[key]);
|
37
|
+
});
|
38
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
39
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
40
|
+
} else {
|
41
|
+
ownKeys$1(Object(source)).forEach(function (key) {
|
42
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
43
|
+
});
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
return target;
|
48
|
+
}
|
49
|
+
|
50
|
+
function _toConsumableArray(arr) {
|
51
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
52
|
+
}
|
53
|
+
|
54
|
+
function _arrayWithoutHoles(arr) {
|
55
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
56
|
+
}
|
57
|
+
|
58
|
+
function _iterableToArray(iter) {
|
59
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
60
|
+
}
|
61
|
+
|
62
|
+
function _unsupportedIterableToArray(o, minLen) {
|
63
|
+
if (!o) return;
|
64
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
65
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
66
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
67
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
68
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
69
|
+
}
|
70
|
+
|
71
|
+
function _arrayLikeToArray(arr, len) {
|
72
|
+
if (len == null || len > arr.length) len = arr.length;
|
73
|
+
|
74
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
75
|
+
|
76
|
+
return arr2;
|
77
|
+
}
|
78
|
+
|
79
|
+
function _nonIterableSpread() {
|
80
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
81
|
+
}
|
82
|
+
|
83
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
84
|
+
var it;
|
85
|
+
|
86
|
+
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
|
87
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
88
|
+
if (it) o = it;
|
89
|
+
var i = 0;
|
90
|
+
|
91
|
+
var F = function () {};
|
92
|
+
|
93
|
+
return {
|
94
|
+
s: F,
|
95
|
+
n: function () {
|
96
|
+
if (i >= o.length) return {
|
97
|
+
done: true
|
98
|
+
};
|
99
|
+
return {
|
100
|
+
done: false,
|
101
|
+
value: o[i++]
|
102
|
+
};
|
103
|
+
},
|
104
|
+
e: function (e) {
|
105
|
+
throw e;
|
106
|
+
},
|
107
|
+
f: F
|
108
|
+
};
|
109
|
+
}
|
110
|
+
|
111
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
112
|
+
}
|
113
|
+
|
114
|
+
var normalCompletion = true,
|
115
|
+
didErr = false,
|
116
|
+
err;
|
117
|
+
return {
|
118
|
+
s: function () {
|
119
|
+
it = o[Symbol.iterator]();
|
120
|
+
},
|
121
|
+
n: function () {
|
122
|
+
var step = it.next();
|
123
|
+
normalCompletion = step.done;
|
124
|
+
return step;
|
125
|
+
},
|
126
|
+
e: function (e) {
|
127
|
+
didErr = true;
|
128
|
+
err = e;
|
129
|
+
},
|
130
|
+
f: function () {
|
131
|
+
try {
|
132
|
+
if (!normalCompletion && it.return != null) it.return();
|
133
|
+
} finally {
|
134
|
+
if (didErr) throw err;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
};
|
138
|
+
}
|
139
|
+
|
1
140
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
2
141
|
|
3
142
|
function createCommonjsModule(fn, module) {
|
@@ -10,12 +149,13 @@ var check = function (it) {
|
|
10
149
|
|
11
150
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
12
151
|
var global_1 =
|
13
|
-
// eslint-disable-next-line no-
|
152
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
14
153
|
check(typeof globalThis == 'object' && globalThis) ||
|
15
154
|
check(typeof window == 'object' && window) ||
|
155
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
16
156
|
check(typeof self == 'object' && self) ||
|
17
157
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
18
|
-
// eslint-disable-next-line no-new-func
|
158
|
+
// eslint-disable-next-line no-new-func -- fallback
|
19
159
|
(function () { return this; })() || Function('return this')();
|
20
160
|
|
21
161
|
var fails = function (exec) {
|
@@ -26,26 +166,28 @@ var fails = function (exec) {
|
|
26
166
|
}
|
27
167
|
};
|
28
168
|
|
29
|
-
//
|
169
|
+
// Detect IE8's incomplete defineProperty implementation
|
30
170
|
var descriptors = !fails(function () {
|
171
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
31
172
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
32
173
|
});
|
33
174
|
|
34
|
-
var
|
35
|
-
|
175
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
176
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
177
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
36
178
|
|
37
179
|
// Nashorn ~ JDK8 bug
|
38
|
-
var NASHORN_BUG = getOwnPropertyDescriptor &&
|
180
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
39
181
|
|
40
182
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
41
|
-
// https://tc39.
|
42
|
-
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
43
|
-
var descriptor = getOwnPropertyDescriptor(this, V);
|
183
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
184
|
+
var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
185
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
44
186
|
return !!descriptor && descriptor.enumerable;
|
45
|
-
} :
|
187
|
+
} : $propertyIsEnumerable;
|
46
188
|
|
47
189
|
var objectPropertyIsEnumerable = {
|
48
|
-
f: f
|
190
|
+
f: f$4
|
49
191
|
};
|
50
192
|
|
51
193
|
var createPropertyDescriptor = function (bitmap, value) {
|
@@ -68,14 +210,14 @@ var split = ''.split;
|
|
68
210
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
69
211
|
var indexedObject = fails(function () {
|
70
212
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
71
|
-
// eslint-disable-next-line no-prototype-builtins
|
213
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
72
214
|
return !Object('z').propertyIsEnumerable(0);
|
73
215
|
}) ? function (it) {
|
74
216
|
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
75
217
|
} : Object;
|
76
218
|
|
77
219
|
// `RequireObjectCoercible` abstract operation
|
78
|
-
// https://tc39.
|
220
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
79
221
|
var requireObjectCoercible = function (it) {
|
80
222
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
81
223
|
return it;
|
@@ -94,7 +236,7 @@ var isObject = function (it) {
|
|
94
236
|
};
|
95
237
|
|
96
238
|
// `ToPrimitive` abstract operation
|
97
|
-
// https://tc39.
|
239
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
98
240
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
99
241
|
// and the second argument - flag - preferred type is a string
|
100
242
|
var toPrimitive = function (input, PREFERRED_STRING) {
|
@@ -108,7 +250,7 @@ var toPrimitive = function (input, PREFERRED_STRING) {
|
|
108
250
|
|
109
251
|
var hasOwnProperty = {}.hasOwnProperty;
|
110
252
|
|
111
|
-
var has = function (it, key) {
|
253
|
+
var has$1 = function (it, key) {
|
112
254
|
return hasOwnProperty.call(it, key);
|
113
255
|
};
|
114
256
|
|
@@ -122,26 +264,28 @@ var documentCreateElement = function (it) {
|
|
122
264
|
|
123
265
|
// Thank's IE8 for his funny defineProperty
|
124
266
|
var ie8DomDefine = !descriptors && !fails(function () {
|
267
|
+
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing
|
125
268
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
126
269
|
get: function () { return 7; }
|
127
270
|
}).a != 7;
|
128
271
|
});
|
129
272
|
|
130
|
-
|
273
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
274
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
131
275
|
|
132
276
|
// `Object.getOwnPropertyDescriptor` method
|
133
|
-
// https://tc39.
|
134
|
-
var f$
|
277
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
278
|
+
var f$3 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
135
279
|
O = toIndexedObject(O);
|
136
280
|
P = toPrimitive(P, true);
|
137
281
|
if (ie8DomDefine) try {
|
138
|
-
return
|
282
|
+
return $getOwnPropertyDescriptor(O, P);
|
139
283
|
} catch (error) { /* empty */ }
|
140
|
-
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
284
|
+
if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
141
285
|
};
|
142
286
|
|
143
287
|
var objectGetOwnPropertyDescriptor = {
|
144
|
-
f: f$
|
288
|
+
f: f$3
|
145
289
|
};
|
146
290
|
|
147
291
|
var anObject = function (it) {
|
@@ -150,16 +294,17 @@ var anObject = function (it) {
|
|
150
294
|
} return it;
|
151
295
|
};
|
152
296
|
|
153
|
-
|
297
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
298
|
+
var $defineProperty = Object.defineProperty;
|
154
299
|
|
155
300
|
// `Object.defineProperty` method
|
156
|
-
// https://tc39.
|
157
|
-
var f$2 = descriptors ?
|
301
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
302
|
+
var f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) {
|
158
303
|
anObject(O);
|
159
304
|
P = toPrimitive(P, true);
|
160
305
|
anObject(Attributes);
|
161
306
|
if (ie8DomDefine) try {
|
162
|
-
return
|
307
|
+
return $defineProperty(O, P, Attributes);
|
163
308
|
} catch (error) { /* empty */ }
|
164
309
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
165
310
|
if ('value' in Attributes) O[P] = Attributes.value;
|
@@ -186,9 +331,9 @@ var setGlobal = function (key, value) {
|
|
186
331
|
};
|
187
332
|
|
188
333
|
var SHARED = '__core-js_shared__';
|
189
|
-
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
334
|
+
var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
|
190
335
|
|
191
|
-
var sharedStore = store;
|
336
|
+
var sharedStore = store$1;
|
192
337
|
|
193
338
|
var functionToString = Function.toString;
|
194
339
|
|
@@ -201,17 +346,17 @@ if (typeof sharedStore.inspectSource != 'function') {
|
|
201
346
|
|
202
347
|
var inspectSource = sharedStore.inspectSource;
|
203
348
|
|
204
|
-
var WeakMap = global_1.WeakMap;
|
349
|
+
var WeakMap$1 = global_1.WeakMap;
|
205
350
|
|
206
|
-
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
351
|
+
var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
|
207
352
|
|
208
353
|
var shared = createCommonjsModule(function (module) {
|
209
354
|
(module.exports = function (key, value) {
|
210
355
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
211
356
|
})('versions', []).push({
|
212
|
-
version: '3.
|
213
|
-
mode:
|
214
|
-
copyright: '©
|
357
|
+
version: '3.10.1',
|
358
|
+
mode: 'global',
|
359
|
+
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
215
360
|
});
|
216
361
|
});
|
217
362
|
|
@@ -228,13 +373,13 @@ var sharedKey = function (key) {
|
|
228
373
|
return keys[key] || (keys[key] = uid(key));
|
229
374
|
};
|
230
375
|
|
231
|
-
var hiddenKeys = {};
|
376
|
+
var hiddenKeys$1 = {};
|
232
377
|
|
233
|
-
var WeakMap
|
234
|
-
var set, get, has
|
378
|
+
var WeakMap = global_1.WeakMap;
|
379
|
+
var set, get, has;
|
235
380
|
|
236
381
|
var enforce = function (it) {
|
237
|
-
return has
|
382
|
+
return has(it) ? get(it) : set(it, {});
|
238
383
|
};
|
239
384
|
|
240
385
|
var getterFor = function (TYPE) {
|
@@ -247,41 +392,41 @@ var getterFor = function (TYPE) {
|
|
247
392
|
};
|
248
393
|
|
249
394
|
if (nativeWeakMap) {
|
250
|
-
var store
|
251
|
-
var wmget = store
|
252
|
-
var wmhas = store
|
253
|
-
var wmset = store
|
395
|
+
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
396
|
+
var wmget = store.get;
|
397
|
+
var wmhas = store.has;
|
398
|
+
var wmset = store.set;
|
254
399
|
set = function (it, metadata) {
|
255
400
|
metadata.facade = it;
|
256
|
-
wmset.call(store
|
401
|
+
wmset.call(store, it, metadata);
|
257
402
|
return metadata;
|
258
403
|
};
|
259
404
|
get = function (it) {
|
260
|
-
return wmget.call(store
|
405
|
+
return wmget.call(store, it) || {};
|
261
406
|
};
|
262
|
-
has
|
263
|
-
return wmhas.call(store
|
407
|
+
has = function (it) {
|
408
|
+
return wmhas.call(store, it);
|
264
409
|
};
|
265
410
|
} else {
|
266
411
|
var STATE = sharedKey('state');
|
267
|
-
hiddenKeys[STATE] = true;
|
412
|
+
hiddenKeys$1[STATE] = true;
|
268
413
|
set = function (it, metadata) {
|
269
414
|
metadata.facade = it;
|
270
415
|
createNonEnumerableProperty(it, STATE, metadata);
|
271
416
|
return metadata;
|
272
417
|
};
|
273
418
|
get = function (it) {
|
274
|
-
return has(it, STATE) ? it[STATE] : {};
|
419
|
+
return has$1(it, STATE) ? it[STATE] : {};
|
275
420
|
};
|
276
|
-
has
|
277
|
-
return has(it, STATE);
|
421
|
+
has = function (it) {
|
422
|
+
return has$1(it, STATE);
|
278
423
|
};
|
279
424
|
}
|
280
425
|
|
281
426
|
var internalState = {
|
282
427
|
set: set,
|
283
428
|
get: get,
|
284
|
-
has: has
|
429
|
+
has: has,
|
285
430
|
enforce: enforce,
|
286
431
|
getterFor: getterFor
|
287
432
|
};
|
@@ -297,7 +442,7 @@ var TEMPLATE = String(String).split('String');
|
|
297
442
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
298
443
|
var state;
|
299
444
|
if (typeof value == 'function') {
|
300
|
-
if (typeof key == 'string' && !has(value, 'name')) {
|
445
|
+
if (typeof key == 'string' && !has$1(value, 'name')) {
|
301
446
|
createNonEnumerableProperty(value, 'name', key);
|
302
447
|
}
|
303
448
|
state = enforceInternalState(value);
|
@@ -334,23 +479,23 @@ var getBuiltIn = function (namespace, method) {
|
|
334
479
|
};
|
335
480
|
|
336
481
|
var ceil = Math.ceil;
|
337
|
-
var floor = Math.floor;
|
482
|
+
var floor$1 = Math.floor;
|
338
483
|
|
339
484
|
// `ToInteger` abstract operation
|
340
|
-
// https://tc39.
|
485
|
+
// https://tc39.es/ecma262/#sec-tointeger
|
341
486
|
var toInteger = function (argument) {
|
342
|
-
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
487
|
+
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor$1 : ceil)(argument);
|
343
488
|
};
|
344
489
|
|
345
|
-
var min = Math.min;
|
490
|
+
var min$2 = Math.min;
|
346
491
|
|
347
492
|
// `ToLength` abstract operation
|
348
|
-
// https://tc39.
|
493
|
+
// https://tc39.es/ecma262/#sec-tolength
|
349
494
|
var toLength = function (argument) {
|
350
|
-
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
495
|
+
return argument > 0 ? min$2(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
351
496
|
};
|
352
497
|
|
353
|
-
var max = Math.max;
|
498
|
+
var max$1 = Math.max;
|
354
499
|
var min$1 = Math.min;
|
355
500
|
|
356
501
|
// Helper for a popular repeating case of the spec:
|
@@ -358,21 +503,21 @@ var min$1 = Math.min;
|
|
358
503
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
359
504
|
var toAbsoluteIndex = function (index, length) {
|
360
505
|
var integer = toInteger(index);
|
361
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
506
|
+
return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
|
362
507
|
};
|
363
508
|
|
364
509
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
365
|
-
var createMethod = function (IS_INCLUDES) {
|
510
|
+
var createMethod$1 = function (IS_INCLUDES) {
|
366
511
|
return function ($this, el, fromIndex) {
|
367
512
|
var O = toIndexedObject($this);
|
368
513
|
var length = toLength(O.length);
|
369
514
|
var index = toAbsoluteIndex(fromIndex, length);
|
370
515
|
var value;
|
371
516
|
// Array#includes uses SameValueZero equality algorithm
|
372
|
-
// eslint-disable-next-line no-self-compare
|
517
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
373
518
|
if (IS_INCLUDES && el != el) while (length > index) {
|
374
519
|
value = O[index++];
|
375
|
-
// eslint-disable-next-line no-self-compare
|
520
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
376
521
|
if (value != value) return true;
|
377
522
|
// Array#indexOf ignores holes, Array#includes - not
|
378
523
|
} else for (;length > index; index++) {
|
@@ -383,11 +528,11 @@ var createMethod = function (IS_INCLUDES) {
|
|
383
528
|
|
384
529
|
var arrayIncludes = {
|
385
530
|
// `Array.prototype.includes` method
|
386
|
-
// https://tc39.
|
387
|
-
includes: createMethod(true),
|
531
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
532
|
+
includes: createMethod$1(true),
|
388
533
|
// `Array.prototype.indexOf` method
|
389
|
-
// https://tc39.
|
390
|
-
indexOf: createMethod(false)
|
534
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
535
|
+
indexOf: createMethod$1(false)
|
391
536
|
};
|
392
537
|
|
393
538
|
var indexOf = arrayIncludes.indexOf;
|
@@ -398,9 +543,9 @@ var objectKeysInternal = function (object, names) {
|
|
398
543
|
var i = 0;
|
399
544
|
var result = [];
|
400
545
|
var key;
|
401
|
-
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
546
|
+
for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
|
402
547
|
// Don't enum bug & hidden keys
|
403
|
-
while (names.length > i) if (has(O, key = names[i++])) {
|
548
|
+
while (names.length > i) if (has$1(O, key = names[i++])) {
|
404
549
|
~indexOf(result, key) || result.push(key);
|
405
550
|
}
|
406
551
|
return result;
|
@@ -417,22 +562,24 @@ var enumBugKeys = [
|
|
417
562
|
'valueOf'
|
418
563
|
];
|
419
564
|
|
420
|
-
var hiddenKeys
|
565
|
+
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
421
566
|
|
422
567
|
// `Object.getOwnPropertyNames` method
|
423
|
-
// https://tc39.
|
424
|
-
|
425
|
-
|
568
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
569
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
570
|
+
var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
571
|
+
return objectKeysInternal(O, hiddenKeys);
|
426
572
|
};
|
427
573
|
|
428
574
|
var objectGetOwnPropertyNames = {
|
429
|
-
f: f$
|
575
|
+
f: f$1
|
430
576
|
};
|
431
577
|
|
432
|
-
|
578
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
579
|
+
var f = Object.getOwnPropertySymbols;
|
433
580
|
|
434
581
|
var objectGetOwnPropertySymbols = {
|
435
|
-
f: f
|
582
|
+
f: f
|
436
583
|
};
|
437
584
|
|
438
585
|
// all object keys, includes non-enumerable and symbols
|
@@ -448,7 +595,7 @@ var copyConstructorProperties = function (target, source) {
|
|
448
595
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
449
596
|
for (var i = 0; i < keys.length; i++) {
|
450
597
|
var key = keys[i];
|
451
|
-
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
598
|
+
if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
452
599
|
}
|
453
600
|
};
|
454
601
|
|
@@ -472,7 +619,7 @@ var POLYFILL = isForced.POLYFILL = 'P';
|
|
472
619
|
|
473
620
|
var isForced_1 = isForced;
|
474
621
|
|
475
|
-
var getOwnPropertyDescriptor
|
622
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
476
623
|
|
477
624
|
|
478
625
|
|
@@ -508,7 +655,7 @@ var _export = function (options, source) {
|
|
508
655
|
if (target) for (key in source) {
|
509
656
|
sourceProperty = source[key];
|
510
657
|
if (options.noTargetGet) {
|
511
|
-
descriptor = getOwnPropertyDescriptor
|
658
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
512
659
|
targetProperty = descriptor && descriptor.value;
|
513
660
|
} else targetProperty = target[key];
|
514
661
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
@@ -526,215 +673,71 @@ var _export = function (options, source) {
|
|
526
673
|
}
|
527
674
|
};
|
528
675
|
|
529
|
-
// `
|
530
|
-
// https://tc39.
|
531
|
-
var
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
676
|
+
// `RegExp.prototype.flags` getter implementation
|
677
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
678
|
+
var regexpFlags = function () {
|
679
|
+
var that = anObject(this);
|
680
|
+
var result = '';
|
681
|
+
if (that.global) result += 'g';
|
682
|
+
if (that.ignoreCase) result += 'i';
|
683
|
+
if (that.multiline) result += 'm';
|
684
|
+
if (that.dotAll) result += 's';
|
685
|
+
if (that.unicode) result += 'u';
|
686
|
+
if (that.sticky) result += 'y';
|
687
|
+
return result;
|
539
688
|
};
|
540
689
|
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
}
|
690
|
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
691
|
+
// so we use an intermediate function.
|
692
|
+
function RE(s, f) {
|
693
|
+
return RegExp(s, f);
|
694
|
+
}
|
546
695
|
|
547
|
-
var
|
548
|
-
//
|
549
|
-
|
550
|
-
|
696
|
+
var UNSUPPORTED_Y$1 = fails(function () {
|
697
|
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
698
|
+
var re = RE('a', 'y');
|
699
|
+
re.lastIndex = 2;
|
700
|
+
return re.exec('abcd') != null;
|
551
701
|
});
|
552
702
|
|
553
|
-
var
|
554
|
-
//
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
var WellKnownSymbolsStore = shared('wks');
|
560
|
-
var Symbol$1 = global_1.Symbol;
|
561
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
703
|
+
var BROKEN_CARET = fails(function () {
|
704
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
705
|
+
var re = RE('^r', 'gy');
|
706
|
+
re.lastIndex = 2;
|
707
|
+
return re.exec('str') != null;
|
708
|
+
});
|
562
709
|
|
563
|
-
var
|
564
|
-
|
565
|
-
|
566
|
-
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
567
|
-
} return WellKnownSymbolsStore[name];
|
710
|
+
var regexpStickyHelpers = {
|
711
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1,
|
712
|
+
BROKEN_CARET: BROKEN_CARET
|
568
713
|
};
|
569
714
|
|
570
|
-
var
|
571
|
-
|
572
|
-
// `ArraySpeciesCreate` abstract operation
|
573
|
-
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
574
|
-
var arraySpeciesCreate = function (originalArray, length) {
|
575
|
-
var C;
|
576
|
-
if (isArray(originalArray)) {
|
577
|
-
C = originalArray.constructor;
|
578
|
-
// cross-realm fallback
|
579
|
-
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
580
|
-
else if (isObject(C)) {
|
581
|
-
C = C[SPECIES];
|
582
|
-
if (C === null) C = undefined;
|
583
|
-
}
|
584
|
-
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
585
|
-
};
|
715
|
+
var nativeExec = RegExp.prototype.exec;
|
716
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
586
717
|
|
587
|
-
var
|
718
|
+
var patchedExec = nativeExec;
|
588
719
|
|
589
|
-
var
|
590
|
-
var
|
591
|
-
var
|
592
|
-
|
720
|
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
721
|
+
var re1 = /a/;
|
722
|
+
var re2 = /b*/g;
|
723
|
+
nativeExec.call(re1, 'a');
|
724
|
+
nativeExec.call(re2, 'a');
|
725
|
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
726
|
+
})();
|
593
727
|
|
594
|
-
|
595
|
-
match = v8.split('.');
|
596
|
-
version = match[0] + match[1];
|
597
|
-
} else if (engineUserAgent) {
|
598
|
-
match = engineUserAgent.match(/Edge\/(\d+)/);
|
599
|
-
if (!match || match[1] >= 74) {
|
600
|
-
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
601
|
-
if (match) version = match[1];
|
602
|
-
}
|
603
|
-
}
|
728
|
+
var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
604
729
|
|
605
|
-
|
730
|
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
731
|
+
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
732
|
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
606
733
|
|
607
|
-
var
|
608
|
-
|
609
|
-
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
610
|
-
// We can't use this feature detection in V8 since it causes
|
611
|
-
// deoptimization and serious performance degradation
|
612
|
-
// https://github.com/zloirock/core-js/issues/677
|
613
|
-
return engineV8Version >= 51 || !fails(function () {
|
614
|
-
var array = [];
|
615
|
-
var constructor = array.constructor = {};
|
616
|
-
constructor[SPECIES$1] = function () {
|
617
|
-
return { foo: 1 };
|
618
|
-
};
|
619
|
-
return array[METHOD_NAME](Boolean).foo !== 1;
|
620
|
-
});
|
621
|
-
};
|
622
|
-
|
623
|
-
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
624
|
-
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
625
|
-
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
626
|
-
|
627
|
-
// We can't use this feature detection in V8 since it causes
|
628
|
-
// deoptimization and serious performance degradation
|
629
|
-
// https://github.com/zloirock/core-js/issues/679
|
630
|
-
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
|
631
|
-
var array = [];
|
632
|
-
array[IS_CONCAT_SPREADABLE] = false;
|
633
|
-
return array.concat()[0] !== array;
|
634
|
-
});
|
635
|
-
|
636
|
-
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
637
|
-
|
638
|
-
var isConcatSpreadable = function (O) {
|
639
|
-
if (!isObject(O)) return false;
|
640
|
-
var spreadable = O[IS_CONCAT_SPREADABLE];
|
641
|
-
return spreadable !== undefined ? !!spreadable : isArray(O);
|
642
|
-
};
|
643
|
-
|
644
|
-
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
645
|
-
|
646
|
-
// `Array.prototype.concat` method
|
647
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
648
|
-
// with adding support of @@isConcatSpreadable and @@species
|
649
|
-
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
650
|
-
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
651
|
-
var O = toObject(this);
|
652
|
-
var A = arraySpeciesCreate(O, 0);
|
653
|
-
var n = 0;
|
654
|
-
var i, k, length, len, E;
|
655
|
-
for (i = -1, length = arguments.length; i < length; i++) {
|
656
|
-
E = i === -1 ? O : arguments[i];
|
657
|
-
if (isConcatSpreadable(E)) {
|
658
|
-
len = toLength(E.length);
|
659
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
660
|
-
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
661
|
-
} else {
|
662
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
663
|
-
createProperty(A, n++, E);
|
664
|
-
}
|
665
|
-
}
|
666
|
-
A.length = n;
|
667
|
-
return A;
|
668
|
-
}
|
669
|
-
});
|
670
|
-
|
671
|
-
// `RegExp.prototype.flags` getter implementation
|
672
|
-
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
673
|
-
var regexpFlags = function () {
|
674
|
-
var that = anObject(this);
|
675
|
-
var result = '';
|
676
|
-
if (that.global) result += 'g';
|
677
|
-
if (that.ignoreCase) result += 'i';
|
678
|
-
if (that.multiline) result += 'm';
|
679
|
-
if (that.dotAll) result += 's';
|
680
|
-
if (that.unicode) result += 'u';
|
681
|
-
if (that.sticky) result += 'y';
|
682
|
-
return result;
|
683
|
-
};
|
684
|
-
|
685
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
686
|
-
// so we use an intermediate function.
|
687
|
-
function RE(s, f) {
|
688
|
-
return RegExp(s, f);
|
689
|
-
}
|
690
|
-
|
691
|
-
var UNSUPPORTED_Y = fails(function () {
|
692
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
693
|
-
var re = RE('a', 'y');
|
694
|
-
re.lastIndex = 2;
|
695
|
-
return re.exec('abcd') != null;
|
696
|
-
});
|
697
|
-
|
698
|
-
var BROKEN_CARET = fails(function () {
|
699
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
700
|
-
var re = RE('^r', 'gy');
|
701
|
-
re.lastIndex = 2;
|
702
|
-
return re.exec('str') != null;
|
703
|
-
});
|
704
|
-
|
705
|
-
var regexpStickyHelpers = {
|
706
|
-
UNSUPPORTED_Y: UNSUPPORTED_Y,
|
707
|
-
BROKEN_CARET: BROKEN_CARET
|
708
|
-
};
|
709
|
-
|
710
|
-
var nativeExec = RegExp.prototype.exec;
|
711
|
-
// This always refers to the native implementation, because the
|
712
|
-
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
713
|
-
// which loads this file before patching the method.
|
714
|
-
var nativeReplace = String.prototype.replace;
|
715
|
-
|
716
|
-
var patchedExec = nativeExec;
|
717
|
-
|
718
|
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
719
|
-
var re1 = /a/;
|
720
|
-
var re2 = /b*/g;
|
721
|
-
nativeExec.call(re1, 'a');
|
722
|
-
nativeExec.call(re2, 'a');
|
723
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
724
|
-
})();
|
725
|
-
|
726
|
-
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
727
|
-
|
728
|
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
729
|
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
730
|
-
|
731
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
734
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
|
732
735
|
|
733
736
|
if (PATCH) {
|
734
737
|
patchedExec = function exec(str) {
|
735
738
|
var re = this;
|
736
739
|
var lastIndex, reCopy, match, i;
|
737
|
-
var sticky = UNSUPPORTED_Y
|
740
|
+
var sticky = UNSUPPORTED_Y && re.sticky;
|
738
741
|
var flags = regexpFlags.call(re);
|
739
742
|
var source = re.source;
|
740
743
|
var charsAdded = 0;
|
@@ -791,12 +794,65 @@ if (PATCH) {
|
|
791
794
|
|
792
795
|
var regexpExec = patchedExec;
|
793
796
|
|
797
|
+
// `RegExp.prototype.exec` method
|
798
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
794
799
|
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
795
800
|
exec: regexpExec
|
796
801
|
});
|
797
802
|
|
798
|
-
|
803
|
+
var engineIsNode = classofRaw(global_1.process) == 'process';
|
804
|
+
|
805
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
806
|
+
|
807
|
+
var process = global_1.process;
|
808
|
+
var versions = process && process.versions;
|
809
|
+
var v8 = versions && versions.v8;
|
810
|
+
var match, version;
|
811
|
+
|
812
|
+
if (v8) {
|
813
|
+
match = v8.split('.');
|
814
|
+
version = match[0] + match[1];
|
815
|
+
} else if (engineUserAgent) {
|
816
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
817
|
+
if (!match || match[1] >= 74) {
|
818
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
819
|
+
if (match) version = match[1];
|
820
|
+
}
|
821
|
+
}
|
822
|
+
|
823
|
+
var engineV8Version = version && +version;
|
824
|
+
|
825
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
826
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
827
|
+
// eslint-disable-next-line es/no-symbol -- required for testing
|
828
|
+
return !Symbol.sham &&
|
829
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
830
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
831
|
+
(engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
|
832
|
+
});
|
833
|
+
|
834
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
835
|
+
|
836
|
+
|
837
|
+
var useSymbolAsUid = nativeSymbol
|
838
|
+
&& !Symbol.sham
|
839
|
+
&& typeof Symbol.iterator == 'symbol';
|
840
|
+
|
841
|
+
var WellKnownSymbolsStore = shared('wks');
|
842
|
+
var Symbol$1 = global_1.Symbol;
|
843
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
844
|
+
|
845
|
+
var wellKnownSymbol = function (name) {
|
846
|
+
if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
847
|
+
if (nativeSymbol && has$1(Symbol$1, name)) {
|
848
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
849
|
+
} else {
|
850
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
851
|
+
}
|
852
|
+
} return WellKnownSymbolsStore[name];
|
853
|
+
};
|
799
854
|
|
855
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
800
856
|
|
801
857
|
|
802
858
|
|
@@ -821,6 +877,7 @@ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
821
877
|
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
822
878
|
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
823
879
|
var REPLACE_KEEPS_$0 = (function () {
|
880
|
+
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
824
881
|
return 'a'.replace(/./, '$0') === '$0';
|
825
882
|
})();
|
826
883
|
|
@@ -836,6 +893,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
836
893
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
837
894
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
838
895
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
896
|
+
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
839
897
|
var re = /(?:)/;
|
840
898
|
var originalExec = re.exec;
|
841
899
|
re.exec = function () { return originalExec.apply(this, arguments); };
|
@@ -889,7 +947,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
|
889
947
|
) {
|
890
948
|
var nativeRegExpMethod = /./[SYMBOL];
|
891
949
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
892
|
-
if (regexp.exec ===
|
950
|
+
if (regexp.exec === RegExp.prototype.exec) {
|
893
951
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
894
952
|
// The native String method already delegates to @@method (this
|
895
953
|
// polyfilled function), leasing to infinite recursion.
|
@@ -921,7 +979,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
|
921
979
|
};
|
922
980
|
|
923
981
|
// `String.prototype.{ codePointAt, at }` methods implementation
|
924
|
-
var createMethod
|
982
|
+
var createMethod = function (CONVERT_TO_STRING) {
|
925
983
|
return function ($this, pos) {
|
926
984
|
var S = String(requireObjectCoercible($this));
|
927
985
|
var position = toInteger(pos);
|
@@ -938,23 +996,68 @@ var createMethod$1 = function (CONVERT_TO_STRING) {
|
|
938
996
|
|
939
997
|
var stringMultibyte = {
|
940
998
|
// `String.prototype.codePointAt` method
|
941
|
-
// https://tc39.
|
942
|
-
codeAt: createMethod
|
999
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
1000
|
+
codeAt: createMethod(false),
|
943
1001
|
// `String.prototype.at` method
|
944
1002
|
// https://github.com/mathiasbynens/String.prototype.at
|
945
|
-
charAt: createMethod
|
1003
|
+
charAt: createMethod(true)
|
946
1004
|
};
|
947
1005
|
|
948
1006
|
var charAt = stringMultibyte.charAt;
|
949
1007
|
|
950
1008
|
// `AdvanceStringIndex` abstract operation
|
951
|
-
// https://tc39.
|
1009
|
+
// https://tc39.es/ecma262/#sec-advancestringindex
|
952
1010
|
var advanceStringIndex = function (S, index, unicode) {
|
953
1011
|
return index + (unicode ? charAt(S, index).length : 1);
|
954
1012
|
};
|
955
1013
|
|
1014
|
+
// `ToObject` abstract operation
|
1015
|
+
// https://tc39.es/ecma262/#sec-toobject
|
1016
|
+
var toObject = function (argument) {
|
1017
|
+
return Object(requireObjectCoercible(argument));
|
1018
|
+
};
|
1019
|
+
|
1020
|
+
var floor = Math.floor;
|
1021
|
+
var replace = ''.replace;
|
1022
|
+
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
1023
|
+
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
1024
|
+
|
1025
|
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
1026
|
+
var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
|
1027
|
+
var tailPos = position + matched.length;
|
1028
|
+
var m = captures.length;
|
1029
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
1030
|
+
if (namedCaptures !== undefined) {
|
1031
|
+
namedCaptures = toObject(namedCaptures);
|
1032
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
1033
|
+
}
|
1034
|
+
return replace.call(replacement, symbols, function (match, ch) {
|
1035
|
+
var capture;
|
1036
|
+
switch (ch.charAt(0)) {
|
1037
|
+
case '$': return '$';
|
1038
|
+
case '&': return matched;
|
1039
|
+
case '`': return str.slice(0, position);
|
1040
|
+
case "'": return str.slice(tailPos);
|
1041
|
+
case '<':
|
1042
|
+
capture = namedCaptures[ch.slice(1, -1)];
|
1043
|
+
break;
|
1044
|
+
default: // \d\d?
|
1045
|
+
var n = +ch;
|
1046
|
+
if (n === 0) return match;
|
1047
|
+
if (n > m) {
|
1048
|
+
var f = floor(n / 10);
|
1049
|
+
if (f === 0) return match;
|
1050
|
+
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
1051
|
+
return match;
|
1052
|
+
}
|
1053
|
+
capture = captures[n - 1];
|
1054
|
+
}
|
1055
|
+
return capture === undefined ? '' : capture;
|
1056
|
+
});
|
1057
|
+
};
|
1058
|
+
|
956
1059
|
// `RegExpExec` abstract operation
|
957
|
-
// https://tc39.
|
1060
|
+
// https://tc39.es/ecma262/#sec-regexpexec
|
958
1061
|
var regexpExecAbstract = function (R, S) {
|
959
1062
|
var exec = R.exec;
|
960
1063
|
if (typeof exec === 'function') {
|
@@ -972,11 +1075,8 @@ var regexpExecAbstract = function (R, S) {
|
|
972
1075
|
return regexpExec.call(R, S);
|
973
1076
|
};
|
974
1077
|
|
975
|
-
var max
|
976
|
-
var min
|
977
|
-
var floor$1 = Math.floor;
|
978
|
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
979
|
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
1078
|
+
var max = Math.max;
|
1079
|
+
var min = Math.min;
|
980
1080
|
|
981
1081
|
var maybeToString = function (it) {
|
982
1082
|
return it === undefined ? it : String(it);
|
@@ -990,7 +1090,7 @@ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, ma
|
|
990
1090
|
|
991
1091
|
return [
|
992
1092
|
// `String.prototype.replace` method
|
993
|
-
// https://tc39.
|
1093
|
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
994
1094
|
function replace(searchValue, replaceValue) {
|
995
1095
|
var O = requireObjectCoercible(this);
|
996
1096
|
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
@@ -999,7 +1099,7 @@ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, ma
|
|
999
1099
|
: nativeReplace.call(String(O), searchValue, replaceValue);
|
1000
1100
|
},
|
1001
1101
|
// `RegExp.prototype[@@replace]` method
|
1002
|
-
// https://tc39.
|
1102
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
1003
1103
|
function (regexp, replaceValue) {
|
1004
1104
|
if (
|
1005
1105
|
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
|
@@ -1038,7 +1138,7 @@ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, ma
|
|
1038
1138
|
result = results[i];
|
1039
1139
|
|
1040
1140
|
var matched = String(result[0]);
|
1041
|
-
var position = max
|
1141
|
+
var position = max(min(toInteger(result.index), S.length), 0);
|
1042
1142
|
var captures = [];
|
1043
1143
|
// NOTE: This is equivalent to
|
1044
1144
|
// captures = result.slice(1).map(maybeToString)
|
@@ -1062,180 +1162,102 @@ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, ma
|
|
1062
1162
|
return accumulatedResult + S.slice(nextSourcePosition);
|
1063
1163
|
}
|
1064
1164
|
];
|
1065
|
-
|
1066
|
-
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
1067
|
-
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
1068
|
-
var tailPos = position + matched.length;
|
1069
|
-
var m = captures.length;
|
1070
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
1071
|
-
if (namedCaptures !== undefined) {
|
1072
|
-
namedCaptures = toObject(namedCaptures);
|
1073
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
1074
|
-
}
|
1075
|
-
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
1076
|
-
var capture;
|
1077
|
-
switch (ch.charAt(0)) {
|
1078
|
-
case '$': return '$';
|
1079
|
-
case '&': return matched;
|
1080
|
-
case '`': return str.slice(0, position);
|
1081
|
-
case "'": return str.slice(tailPos);
|
1082
|
-
case '<':
|
1083
|
-
capture = namedCaptures[ch.slice(1, -1)];
|
1084
|
-
break;
|
1085
|
-
default: // \d\d?
|
1086
|
-
var n = +ch;
|
1087
|
-
if (n === 0) return match;
|
1088
|
-
if (n > m) {
|
1089
|
-
var f = floor$1(n / 10);
|
1090
|
-
if (f === 0) return match;
|
1091
|
-
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
1092
|
-
return match;
|
1093
|
-
}
|
1094
|
-
capture = captures[n - 1];
|
1095
|
-
}
|
1096
|
-
return capture === undefined ? '' : capture;
|
1097
|
-
});
|
1098
|
-
}
|
1099
1165
|
});
|
1100
1166
|
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
writable: true
|
1108
|
-
});
|
1109
|
-
} else {
|
1110
|
-
obj[key] = value;
|
1111
|
-
}
|
1112
|
-
|
1113
|
-
return obj;
|
1114
|
-
}
|
1115
|
-
|
1116
|
-
function ownKeys$1(object, enumerableOnly) {
|
1117
|
-
var keys = Object.keys(object);
|
1118
|
-
|
1119
|
-
if (Object.getOwnPropertySymbols) {
|
1120
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
1121
|
-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
1122
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
1123
|
-
});
|
1124
|
-
keys.push.apply(keys, symbols);
|
1125
|
-
}
|
1167
|
+
// `IsArray` abstract operation
|
1168
|
+
// https://tc39.es/ecma262/#sec-isarray
|
1169
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
1170
|
+
var isArray = Array.isArray || function isArray(arg) {
|
1171
|
+
return classofRaw(arg) == 'Array';
|
1172
|
+
};
|
1126
1173
|
|
1127
|
-
|
1128
|
-
|
1174
|
+
var createProperty = function (object, key, value) {
|
1175
|
+
var propertyKey = toPrimitive(key);
|
1176
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
1177
|
+
else object[propertyKey] = value;
|
1178
|
+
};
|
1129
1179
|
|
1130
|
-
|
1131
|
-
for (var i = 1; i < arguments.length; i++) {
|
1132
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
1180
|
+
var SPECIES$1 = wellKnownSymbol('species');
|
1133
1181
|
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1182
|
+
// `ArraySpeciesCreate` abstract operation
|
1183
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
1184
|
+
var arraySpeciesCreate = function (originalArray, length) {
|
1185
|
+
var C;
|
1186
|
+
if (isArray(originalArray)) {
|
1187
|
+
C = originalArray.constructor;
|
1188
|
+
// cross-realm fallback
|
1189
|
+
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
1190
|
+
else if (isObject(C)) {
|
1191
|
+
C = C[SPECIES$1];
|
1192
|
+
if (C === null) C = undefined;
|
1144
1193
|
}
|
1145
|
-
}
|
1146
|
-
|
1147
|
-
return target;
|
1148
|
-
}
|
1149
|
-
|
1150
|
-
function _toConsumableArray(arr) {
|
1151
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
1152
|
-
}
|
1153
|
-
|
1154
|
-
function _arrayWithoutHoles(arr) {
|
1155
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
1156
|
-
}
|
1157
|
-
|
1158
|
-
function _iterableToArray(iter) {
|
1159
|
-
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
1160
|
-
}
|
1161
|
-
|
1162
|
-
function _unsupportedIterableToArray(o, minLen) {
|
1163
|
-
if (!o) return;
|
1164
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
1165
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
1166
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
1167
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
1168
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
1169
|
-
}
|
1170
|
-
|
1171
|
-
function _arrayLikeToArray(arr, len) {
|
1172
|
-
if (len == null || len > arr.length) len = arr.length;
|
1173
|
-
|
1174
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
1194
|
+
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
1195
|
+
};
|
1175
1196
|
|
1176
|
-
|
1177
|
-
}
|
1197
|
+
var SPECIES = wellKnownSymbol('species');
|
1178
1198
|
|
1179
|
-
function
|
1180
|
-
|
1181
|
-
|
1199
|
+
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
1200
|
+
// We can't use this feature detection in V8 since it causes
|
1201
|
+
// deoptimization and serious performance degradation
|
1202
|
+
// https://github.com/zloirock/core-js/issues/677
|
1203
|
+
return engineV8Version >= 51 || !fails(function () {
|
1204
|
+
var array = [];
|
1205
|
+
var constructor = array.constructor = {};
|
1206
|
+
constructor[SPECIES] = function () {
|
1207
|
+
return { foo: 1 };
|
1208
|
+
};
|
1209
|
+
return array[METHOD_NAME](Boolean).foo !== 1;
|
1210
|
+
});
|
1211
|
+
};
|
1182
1212
|
|
1183
|
-
|
1184
|
-
|
1213
|
+
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
1214
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
1215
|
+
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
1185
1216
|
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1217
|
+
// We can't use this feature detection in V8 since it causes
|
1218
|
+
// deoptimization and serious performance degradation
|
1219
|
+
// https://github.com/zloirock/core-js/issues/679
|
1220
|
+
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
|
1221
|
+
var array = [];
|
1222
|
+
array[IS_CONCAT_SPREADABLE] = false;
|
1223
|
+
return array.concat()[0] !== array;
|
1224
|
+
});
|
1190
1225
|
|
1191
|
-
|
1226
|
+
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
1192
1227
|
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
};
|
1199
|
-
return {
|
1200
|
-
done: false,
|
1201
|
-
value: o[i++]
|
1202
|
-
};
|
1203
|
-
},
|
1204
|
-
e: function (e) {
|
1205
|
-
throw e;
|
1206
|
-
},
|
1207
|
-
f: F
|
1208
|
-
};
|
1209
|
-
}
|
1228
|
+
var isConcatSpreadable = function (O) {
|
1229
|
+
if (!isObject(O)) return false;
|
1230
|
+
var spreadable = O[IS_CONCAT_SPREADABLE];
|
1231
|
+
return spreadable !== undefined ? !!spreadable : isArray(O);
|
1232
|
+
};
|
1210
1233
|
|
1211
|
-
|
1212
|
-
}
|
1234
|
+
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
1213
1235
|
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
} finally {
|
1234
|
-
if (didErr) throw err;
|
1236
|
+
// `Array.prototype.concat` method
|
1237
|
+
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
1238
|
+
// with adding support of @@isConcatSpreadable and @@species
|
1239
|
+
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
1240
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
1241
|
+
concat: function concat(arg) {
|
1242
|
+
var O = toObject(this);
|
1243
|
+
var A = arraySpeciesCreate(O, 0);
|
1244
|
+
var n = 0;
|
1245
|
+
var i, k, length, len, E;
|
1246
|
+
for (i = -1, length = arguments.length; i < length; i++) {
|
1247
|
+
E = i === -1 ? O : arguments[i];
|
1248
|
+
if (isConcatSpreadable(E)) {
|
1249
|
+
len = toLength(E.length);
|
1250
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1251
|
+
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
1252
|
+
} else {
|
1253
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1254
|
+
createProperty(A, n++, E);
|
1235
1255
|
}
|
1236
1256
|
}
|
1237
|
-
|
1238
|
-
|
1257
|
+
A.length = n;
|
1258
|
+
return A;
|
1259
|
+
}
|
1260
|
+
});
|
1239
1261
|
|
1240
1262
|
//
|
1241
1263
|
//
|