bootstrap-table-rails 1.19.0 → 1.20.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/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/bootstrap-table-locale-all.js +946 -358
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +858 -403
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +859 -404
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +7 -6
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +2900 -2041
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +1066 -465
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +585 -268
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1443 -949
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +594 -278
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +595 -277
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +511 -207
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +921 -542
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +912 -478
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css +9 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +2798 -1187
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +1352 -754
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +610 -296
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +902 -435
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +16 -8
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +697 -375
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +623 -274
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +847 -403
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +575 -260
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +578 -267
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +800 -324
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +615 -281
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +555 -222
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +511 -207
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +582 -267
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +916 -556
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +566 -256
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +505 -209
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +517 -221
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +500 -203
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hi-IN.js +1102 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +522 -225
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-lb-LU.js +1102 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +536 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +536 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +596 -278
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +592 -258
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +596 -262
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +594 -275
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +590 -256
- metadata +9 -8
- data/vendor/assets/javascripts/bootstrap-table/.DS_Store +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
3
3
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
|
5
|
-
}(this, (function ($) { 'use strict';
|
5
|
+
})(this, (function ($) { 'use strict';
|
6
6
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
8
8
|
|
@@ -27,6 +27,9 @@
|
|
27
27
|
function _createClass(Constructor, protoProps, staticProps) {
|
28
28
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
29
29
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
30
|
+
Object.defineProperty(Constructor, "prototype", {
|
31
|
+
writable: false
|
32
|
+
});
|
30
33
|
return Constructor;
|
31
34
|
}
|
32
35
|
|
@@ -57,6 +60,9 @@
|
|
57
60
|
configurable: true
|
58
61
|
}
|
59
62
|
});
|
63
|
+
Object.defineProperty(subClass, "prototype", {
|
64
|
+
writable: false
|
65
|
+
});
|
60
66
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
61
67
|
}
|
62
68
|
|
@@ -100,6 +106,8 @@
|
|
100
106
|
function _possibleConstructorReturn(self, call) {
|
101
107
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
102
108
|
return call;
|
109
|
+
} else if (call !== void 0) {
|
110
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
103
111
|
}
|
104
112
|
|
105
113
|
return _assertThisInitialized(self);
|
@@ -133,7 +141,7 @@
|
|
133
141
|
return object;
|
134
142
|
}
|
135
143
|
|
136
|
-
function _get(
|
144
|
+
function _get() {
|
137
145
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
138
146
|
_get = Reflect.get;
|
139
147
|
} else {
|
@@ -144,14 +152,14 @@
|
|
144
152
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
145
153
|
|
146
154
|
if (desc.get) {
|
147
|
-
return desc.get.call(receiver);
|
155
|
+
return desc.get.call(arguments.length < 3 ? target : receiver);
|
148
156
|
}
|
149
157
|
|
150
158
|
return desc.value;
|
151
159
|
};
|
152
160
|
}
|
153
161
|
|
154
|
-
return _get(
|
162
|
+
return _get.apply(this, arguments);
|
155
163
|
}
|
156
164
|
|
157
165
|
function _unsupportedIterableToArray(o, minLen) {
|
@@ -172,9 +180,9 @@
|
|
172
180
|
}
|
173
181
|
|
174
182
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
175
|
-
var it;
|
183
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
176
184
|
|
177
|
-
if (
|
185
|
+
if (!it) {
|
178
186
|
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
179
187
|
if (it) o = it;
|
180
188
|
var i = 0;
|
@@ -207,7 +215,7 @@
|
|
207
215
|
err;
|
208
216
|
return {
|
209
217
|
s: function () {
|
210
|
-
it =
|
218
|
+
it = it.call(o);
|
211
219
|
},
|
212
220
|
n: function () {
|
213
221
|
var step = it.next();
|
@@ -240,7 +248,7 @@
|
|
240
248
|
|
241
249
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
242
250
|
var global_1 =
|
243
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
251
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
244
252
|
check(typeof globalThis == 'object' && globalThis) ||
|
245
253
|
check(typeof window == 'object' && window) ||
|
246
254
|
// eslint-disable-next-line no-restricted-globals -- safe
|
@@ -259,12 +267,25 @@
|
|
259
267
|
|
260
268
|
// Detect IE8's incomplete defineProperty implementation
|
261
269
|
var descriptors = !fails(function () {
|
262
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
270
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
263
271
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
264
272
|
});
|
265
273
|
|
274
|
+
var functionBindNative = !fails(function () {
|
275
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
276
|
+
var test = (function () { /* empty */ }).bind();
|
277
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
278
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
279
|
+
});
|
280
|
+
|
281
|
+
var call$2 = Function.prototype.call;
|
282
|
+
|
283
|
+
var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
|
284
|
+
return call$2.apply(call$2, arguments);
|
285
|
+
};
|
286
|
+
|
266
287
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
267
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
288
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
268
289
|
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
269
290
|
|
270
291
|
// Nashorn ~ JDK8 bug
|
@@ -272,13 +293,13 @@
|
|
272
293
|
|
273
294
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
274
295
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
275
|
-
var f$
|
296
|
+
var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
276
297
|
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
277
298
|
return !!descriptor && descriptor.enumerable;
|
278
299
|
} : $propertyIsEnumerable;
|
279
300
|
|
280
301
|
var objectPropertyIsEnumerable = {
|
281
|
-
f: f$
|
302
|
+
f: f$5
|
282
303
|
};
|
283
304
|
|
284
305
|
var createPropertyDescriptor = function (bitmap, value) {
|
@@ -290,27 +311,44 @@
|
|
290
311
|
};
|
291
312
|
};
|
292
313
|
|
293
|
-
var
|
314
|
+
var FunctionPrototype$2 = Function.prototype;
|
315
|
+
var bind$1 = FunctionPrototype$2.bind;
|
316
|
+
var call$1 = FunctionPrototype$2.call;
|
317
|
+
var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
|
318
|
+
|
319
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
320
|
+
return fn && uncurryThis(fn);
|
321
|
+
} : function (fn) {
|
322
|
+
return fn && function () {
|
323
|
+
return call$1.apply(fn, arguments);
|
324
|
+
};
|
325
|
+
};
|
326
|
+
|
327
|
+
var toString$1 = functionUncurryThis({}.toString);
|
328
|
+
var stringSlice$5 = functionUncurryThis(''.slice);
|
294
329
|
|
295
330
|
var classofRaw = function (it) {
|
296
|
-
return toString
|
331
|
+
return stringSlice$5(toString$1(it), 8, -1);
|
297
332
|
};
|
298
333
|
|
299
|
-
var
|
334
|
+
var Object$4 = global_1.Object;
|
335
|
+
var split = functionUncurryThis(''.split);
|
300
336
|
|
301
337
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
302
338
|
var indexedObject = fails(function () {
|
303
339
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
304
340
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
305
|
-
return !Object('z').propertyIsEnumerable(0);
|
341
|
+
return !Object$4('z').propertyIsEnumerable(0);
|
306
342
|
}) ? function (it) {
|
307
|
-
return classofRaw(it) == 'String' ? split
|
308
|
-
} : Object;
|
343
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
|
344
|
+
} : Object$4;
|
345
|
+
|
346
|
+
var TypeError$a = global_1.TypeError;
|
309
347
|
|
310
348
|
// `RequireObjectCoercible` abstract operation
|
311
349
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
312
350
|
var requireObjectCoercible = function (it) {
|
313
|
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
351
|
+
if (it == undefined) throw TypeError$a("Can't call method on " + it);
|
314
352
|
return it;
|
315
353
|
};
|
316
354
|
|
@@ -322,88 +360,310 @@
|
|
322
360
|
return indexedObject(requireObjectCoercible(it));
|
323
361
|
};
|
324
362
|
|
363
|
+
// `IsCallable` abstract operation
|
364
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
365
|
+
var isCallable = function (argument) {
|
366
|
+
return typeof argument == 'function';
|
367
|
+
};
|
368
|
+
|
325
369
|
var isObject = function (it) {
|
326
|
-
return typeof it
|
370
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
327
371
|
};
|
328
372
|
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
var
|
334
|
-
|
373
|
+
var aFunction = function (argument) {
|
374
|
+
return isCallable(argument) ? argument : undefined;
|
375
|
+
};
|
376
|
+
|
377
|
+
var getBuiltIn = function (namespace, method) {
|
378
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
379
|
+
};
|
380
|
+
|
381
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
382
|
+
|
383
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
384
|
+
|
385
|
+
var process = global_1.process;
|
386
|
+
var Deno = global_1.Deno;
|
387
|
+
var versions = process && process.versions || Deno && Deno.version;
|
388
|
+
var v8 = versions && versions.v8;
|
389
|
+
var match, version;
|
390
|
+
|
391
|
+
if (v8) {
|
392
|
+
match = v8.split('.');
|
393
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
394
|
+
// but their correct versions are not interesting for us
|
395
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
396
|
+
}
|
397
|
+
|
398
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
399
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
400
|
+
if (!version && engineUserAgent) {
|
401
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
402
|
+
if (!match || match[1] >= 74) {
|
403
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
404
|
+
if (match) version = +match[1];
|
405
|
+
}
|
406
|
+
}
|
407
|
+
|
408
|
+
var engineV8Version = version;
|
409
|
+
|
410
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
415
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
416
|
+
var symbol = Symbol();
|
417
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
418
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
419
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
420
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
421
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
422
|
+
});
|
423
|
+
|
424
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
425
|
+
|
426
|
+
|
427
|
+
var useSymbolAsUid = nativeSymbol
|
428
|
+
&& !Symbol.sham
|
429
|
+
&& typeof Symbol.iterator == 'symbol';
|
430
|
+
|
431
|
+
var Object$3 = global_1.Object;
|
432
|
+
|
433
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
434
|
+
return typeof it == 'symbol';
|
435
|
+
} : function (it) {
|
436
|
+
var $Symbol = getBuiltIn('Symbol');
|
437
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
|
438
|
+
};
|
439
|
+
|
440
|
+
var String$3 = global_1.String;
|
441
|
+
|
442
|
+
var tryToString = function (argument) {
|
443
|
+
try {
|
444
|
+
return String$3(argument);
|
445
|
+
} catch (error) {
|
446
|
+
return 'Object';
|
447
|
+
}
|
448
|
+
};
|
449
|
+
|
450
|
+
var TypeError$9 = global_1.TypeError;
|
451
|
+
|
452
|
+
// `Assert: IsCallable(argument) is true`
|
453
|
+
var aCallable = function (argument) {
|
454
|
+
if (isCallable(argument)) return argument;
|
455
|
+
throw TypeError$9(tryToString(argument) + ' is not a function');
|
456
|
+
};
|
457
|
+
|
458
|
+
// `GetMethod` abstract operation
|
459
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
460
|
+
var getMethod = function (V, P) {
|
461
|
+
var func = V[P];
|
462
|
+
return func == null ? undefined : aCallable(func);
|
463
|
+
};
|
464
|
+
|
465
|
+
var TypeError$8 = global_1.TypeError;
|
466
|
+
|
467
|
+
// `OrdinaryToPrimitive` abstract operation
|
468
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
469
|
+
var ordinaryToPrimitive = function (input, pref) {
|
335
470
|
var fn, val;
|
336
|
-
if (
|
337
|
-
if (
|
338
|
-
if (
|
339
|
-
throw TypeError("Can't convert object to primitive value");
|
471
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
472
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
473
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
474
|
+
throw TypeError$8("Can't convert object to primitive value");
|
475
|
+
};
|
476
|
+
|
477
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
478
|
+
var defineProperty$1 = Object.defineProperty;
|
479
|
+
|
480
|
+
var setGlobal = function (key, value) {
|
481
|
+
try {
|
482
|
+
defineProperty$1(global_1, key, { value: value, configurable: true, writable: true });
|
483
|
+
} catch (error) {
|
484
|
+
global_1[key] = value;
|
485
|
+
} return value;
|
486
|
+
};
|
487
|
+
|
488
|
+
var SHARED = '__core-js_shared__';
|
489
|
+
var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
|
490
|
+
|
491
|
+
var sharedStore = store$1;
|
492
|
+
|
493
|
+
var shared = createCommonjsModule(function (module) {
|
494
|
+
(module.exports = function (key, value) {
|
495
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
496
|
+
})('versions', []).push({
|
497
|
+
version: '3.22.4',
|
498
|
+
mode: 'global',
|
499
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
500
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
|
501
|
+
source: 'https://github.com/zloirock/core-js'
|
502
|
+
});
|
503
|
+
});
|
504
|
+
|
505
|
+
var Object$2 = global_1.Object;
|
506
|
+
|
507
|
+
// `ToObject` abstract operation
|
508
|
+
// https://tc39.es/ecma262/#sec-toobject
|
509
|
+
var toObject = function (argument) {
|
510
|
+
return Object$2(requireObjectCoercible(argument));
|
511
|
+
};
|
512
|
+
|
513
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
514
|
+
|
515
|
+
// `HasOwnProperty` abstract operation
|
516
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
517
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
518
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
519
|
+
return hasOwnProperty(toObject(it), key);
|
520
|
+
};
|
521
|
+
|
522
|
+
var id = 0;
|
523
|
+
var postfix = Math.random();
|
524
|
+
var toString = functionUncurryThis(1.0.toString);
|
525
|
+
|
526
|
+
var uid = function (key) {
|
527
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
528
|
+
};
|
529
|
+
|
530
|
+
var WellKnownSymbolsStore = shared('wks');
|
531
|
+
var Symbol$1 = global_1.Symbol;
|
532
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
533
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
534
|
+
|
535
|
+
var wellKnownSymbol = function (name) {
|
536
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
537
|
+
var description = 'Symbol.' + name;
|
538
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
539
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
540
|
+
} else if (useSymbolAsUid && symbolFor) {
|
541
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
542
|
+
} else {
|
543
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
544
|
+
}
|
545
|
+
} return WellKnownSymbolsStore[name];
|
340
546
|
};
|
341
547
|
|
342
|
-
var
|
548
|
+
var TypeError$7 = global_1.TypeError;
|
549
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
343
550
|
|
344
|
-
|
345
|
-
|
551
|
+
// `ToPrimitive` abstract operation
|
552
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
553
|
+
var toPrimitive = function (input, pref) {
|
554
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
555
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
556
|
+
var result;
|
557
|
+
if (exoticToPrim) {
|
558
|
+
if (pref === undefined) pref = 'default';
|
559
|
+
result = functionCall(exoticToPrim, input, pref);
|
560
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
561
|
+
throw TypeError$7("Can't convert object to primitive value");
|
562
|
+
}
|
563
|
+
if (pref === undefined) pref = 'number';
|
564
|
+
return ordinaryToPrimitive(input, pref);
|
565
|
+
};
|
566
|
+
|
567
|
+
// `ToPropertyKey` abstract operation
|
568
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
569
|
+
var toPropertyKey = function (argument) {
|
570
|
+
var key = toPrimitive(argument, 'string');
|
571
|
+
return isSymbol(key) ? key : key + '';
|
346
572
|
};
|
347
573
|
|
348
574
|
var document$1 = global_1.document;
|
349
575
|
// typeof document.createElement is 'object' in old IE
|
350
|
-
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
576
|
+
var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
|
351
577
|
|
352
578
|
var documentCreateElement = function (it) {
|
353
|
-
return EXISTS ? document$1.createElement(it) : {};
|
579
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
354
580
|
};
|
355
581
|
|
356
|
-
//
|
582
|
+
// Thanks to IE8 for its funny defineProperty
|
357
583
|
var ie8DomDefine = !descriptors && !fails(function () {
|
358
|
-
// eslint-disable-next-line es/no-object-defineproperty --
|
584
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
359
585
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
360
586
|
get: function () { return 7; }
|
361
587
|
}).a != 7;
|
362
588
|
});
|
363
589
|
|
364
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
365
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
590
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
591
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
366
592
|
|
367
593
|
// `Object.getOwnPropertyDescriptor` method
|
368
594
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
369
|
-
var f$
|
595
|
+
var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
370
596
|
O = toIndexedObject(O);
|
371
|
-
P =
|
597
|
+
P = toPropertyKey(P);
|
372
598
|
if (ie8DomDefine) try {
|
373
|
-
return $getOwnPropertyDescriptor(O, P);
|
599
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
374
600
|
} catch (error) { /* empty */ }
|
375
|
-
if (
|
601
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
376
602
|
};
|
377
603
|
|
378
604
|
var objectGetOwnPropertyDescriptor = {
|
379
|
-
f: f$
|
605
|
+
f: f$4
|
380
606
|
};
|
381
607
|
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
608
|
+
// V8 ~ Chrome 36-
|
609
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
610
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
611
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
612
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
613
|
+
value: 42,
|
614
|
+
writable: false
|
615
|
+
}).prototype != 42;
|
616
|
+
});
|
617
|
+
|
618
|
+
var String$2 = global_1.String;
|
619
|
+
var TypeError$6 = global_1.TypeError;
|
620
|
+
|
621
|
+
// `Assert: Type(argument) is Object`
|
622
|
+
var anObject = function (argument) {
|
623
|
+
if (isObject(argument)) return argument;
|
624
|
+
throw TypeError$6(String$2(argument) + ' is not an object');
|
386
625
|
};
|
387
626
|
|
388
|
-
|
627
|
+
var TypeError$5 = global_1.TypeError;
|
628
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
389
629
|
var $defineProperty = Object.defineProperty;
|
630
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
631
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
632
|
+
var ENUMERABLE = 'enumerable';
|
633
|
+
var CONFIGURABLE$1 = 'configurable';
|
634
|
+
var WRITABLE = 'writable';
|
390
635
|
|
391
636
|
// `Object.defineProperty` method
|
392
637
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
393
|
-
var f$
|
638
|
+
var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
639
|
+
anObject(O);
|
640
|
+
P = toPropertyKey(P);
|
641
|
+
anObject(Attributes);
|
642
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
643
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
644
|
+
if (current && current[WRITABLE]) {
|
645
|
+
O[P] = Attributes.value;
|
646
|
+
Attributes = {
|
647
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
648
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
649
|
+
writable: false
|
650
|
+
};
|
651
|
+
}
|
652
|
+
} return $defineProperty(O, P, Attributes);
|
653
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
394
654
|
anObject(O);
|
395
|
-
P =
|
655
|
+
P = toPropertyKey(P);
|
396
656
|
anObject(Attributes);
|
397
657
|
if (ie8DomDefine) try {
|
398
658
|
return $defineProperty(O, P, Attributes);
|
399
659
|
} catch (error) { /* empty */ }
|
400
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
660
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$5('Accessors not supported');
|
401
661
|
if ('value' in Attributes) O[P] = Attributes.value;
|
402
662
|
return O;
|
403
663
|
};
|
404
664
|
|
405
665
|
var objectDefineProperty = {
|
406
|
-
f: f$
|
666
|
+
f: f$3
|
407
667
|
};
|
408
668
|
|
409
669
|
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
@@ -413,25 +673,27 @@
|
|
413
673
|
return object;
|
414
674
|
};
|
415
675
|
|
416
|
-
var
|
417
|
-
|
418
|
-
|
419
|
-
} catch (error) {
|
420
|
-
global_1[key] = value;
|
421
|
-
} return value;
|
422
|
-
};
|
676
|
+
var FunctionPrototype$1 = Function.prototype;
|
677
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
678
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
423
679
|
|
424
|
-
var
|
425
|
-
|
680
|
+
var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
681
|
+
// additional protection from minified / mangled / dropped function names
|
682
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
683
|
+
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
426
684
|
|
427
|
-
var
|
685
|
+
var functionName = {
|
686
|
+
EXISTS: EXISTS,
|
687
|
+
PROPER: PROPER,
|
688
|
+
CONFIGURABLE: CONFIGURABLE
|
689
|
+
};
|
428
690
|
|
429
|
-
var functionToString = Function.toString;
|
691
|
+
var functionToString = functionUncurryThis(Function.toString);
|
430
692
|
|
431
|
-
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
432
|
-
if (
|
693
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
694
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
433
695
|
sharedStore.inspectSource = function (it) {
|
434
|
-
return functionToString
|
696
|
+
return functionToString(it);
|
435
697
|
};
|
436
698
|
}
|
437
699
|
|
@@ -439,24 +701,7 @@
|
|
439
701
|
|
440
702
|
var WeakMap$1 = global_1.WeakMap;
|
441
703
|
|
442
|
-
var nativeWeakMap =
|
443
|
-
|
444
|
-
var shared = createCommonjsModule(function (module) {
|
445
|
-
(module.exports = function (key, value) {
|
446
|
-
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
447
|
-
})('versions', []).push({
|
448
|
-
version: '3.10.1',
|
449
|
-
mode: 'global',
|
450
|
-
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
451
|
-
});
|
452
|
-
});
|
453
|
-
|
454
|
-
var id = 0;
|
455
|
-
var postfix = Math.random();
|
456
|
-
|
457
|
-
var uid = function (key) {
|
458
|
-
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
459
|
-
};
|
704
|
+
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
460
705
|
|
461
706
|
var keys = shared('keys');
|
462
707
|
|
@@ -466,6 +711,8 @@
|
|
466
711
|
|
467
712
|
var hiddenKeys$1 = {};
|
468
713
|
|
714
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
715
|
+
var TypeError$4 = global_1.TypeError;
|
469
716
|
var WeakMap = global_1.WeakMap;
|
470
717
|
var set, get, has;
|
471
718
|
|
@@ -477,40 +724,42 @@
|
|
477
724
|
return function (it) {
|
478
725
|
var state;
|
479
726
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
480
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
727
|
+
throw TypeError$4('Incompatible receiver, ' + TYPE + ' required');
|
481
728
|
} return state;
|
482
729
|
};
|
483
730
|
};
|
484
731
|
|
485
|
-
if (nativeWeakMap) {
|
732
|
+
if (nativeWeakMap || sharedStore.state) {
|
486
733
|
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
487
|
-
var wmget = store.get;
|
488
|
-
var wmhas = store.has;
|
489
|
-
var wmset = store.set;
|
734
|
+
var wmget = functionUncurryThis(store.get);
|
735
|
+
var wmhas = functionUncurryThis(store.has);
|
736
|
+
var wmset = functionUncurryThis(store.set);
|
490
737
|
set = function (it, metadata) {
|
738
|
+
if (wmhas(store, it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
|
491
739
|
metadata.facade = it;
|
492
|
-
wmset
|
740
|
+
wmset(store, it, metadata);
|
493
741
|
return metadata;
|
494
742
|
};
|
495
743
|
get = function (it) {
|
496
|
-
return wmget
|
744
|
+
return wmget(store, it) || {};
|
497
745
|
};
|
498
746
|
has = function (it) {
|
499
|
-
return wmhas
|
747
|
+
return wmhas(store, it);
|
500
748
|
};
|
501
749
|
} else {
|
502
750
|
var STATE = sharedKey('state');
|
503
751
|
hiddenKeys$1[STATE] = true;
|
504
752
|
set = function (it, metadata) {
|
753
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
|
505
754
|
metadata.facade = it;
|
506
755
|
createNonEnumerableProperty(it, STATE, metadata);
|
507
756
|
return metadata;
|
508
757
|
};
|
509
758
|
get = function (it) {
|
510
|
-
return
|
759
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
511
760
|
};
|
512
761
|
has = function (it) {
|
513
|
-
return
|
762
|
+
return hasOwnProperty_1(it, STATE);
|
514
763
|
};
|
515
764
|
}
|
516
765
|
|
@@ -522,29 +771,56 @@
|
|
522
771
|
getterFor: getterFor
|
523
772
|
};
|
524
773
|
|
525
|
-
var
|
526
|
-
var
|
774
|
+
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
775
|
+
var defineProperty = objectDefineProperty.f;
|
776
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
777
|
+
|
778
|
+
|
779
|
+
|
527
780
|
var enforceInternalState = internalState.enforce;
|
781
|
+
var getInternalState = internalState.get;
|
782
|
+
|
783
|
+
var CONFIGURABLE_LENGTH = !fails(function () {
|
784
|
+
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
785
|
+
});
|
786
|
+
|
528
787
|
var TEMPLATE = String(String).split('String');
|
529
788
|
|
530
|
-
|
789
|
+
var makeBuiltIn = module.exports = function (value, name, options) {
|
790
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
791
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
792
|
+
}
|
793
|
+
if (options && options.getter) name = 'get ' + name;
|
794
|
+
if (options && options.setter) name = 'set ' + name;
|
795
|
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
796
|
+
defineProperty(value, 'name', { value: name, configurable: true });
|
797
|
+
}
|
798
|
+
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
799
|
+
defineProperty(value, 'length', { value: options.arity });
|
800
|
+
}
|
801
|
+
var state = enforceInternalState(value);
|
802
|
+
if (!hasOwnProperty_1(state, 'source')) {
|
803
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
804
|
+
} return value;
|
805
|
+
};
|
806
|
+
|
807
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
808
|
+
// eslint-disable-next-line no-extend-native -- required
|
809
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
810
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
811
|
+
}, 'toString');
|
812
|
+
});
|
813
|
+
|
814
|
+
var defineBuiltIn = function (O, key, value, options) {
|
531
815
|
var unsafe = options ? !!options.unsafe : false;
|
532
816
|
var simple = options ? !!options.enumerable : false;
|
533
817
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
534
|
-
var
|
535
|
-
if (
|
536
|
-
if (typeof key == 'string' && !has$1(value, 'name')) {
|
537
|
-
createNonEnumerableProperty(value, 'name', key);
|
538
|
-
}
|
539
|
-
state = enforceInternalState(value);
|
540
|
-
if (!state.source) {
|
541
|
-
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
542
|
-
}
|
543
|
-
}
|
818
|
+
var name = options && options.name !== undefined ? options.name : key;
|
819
|
+
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
544
820
|
if (O === global_1) {
|
545
821
|
if (simple) O[key] = value;
|
546
822
|
else setGlobal(key, value);
|
547
|
-
return;
|
823
|
+
return O;
|
548
824
|
} else if (!unsafe) {
|
549
825
|
delete O[key];
|
550
826
|
} else if (!noTargetGet && O[key]) {
|
@@ -552,56 +828,50 @@
|
|
552
828
|
}
|
553
829
|
if (simple) O[key] = value;
|
554
830
|
else createNonEnumerableProperty(O, key, value);
|
555
|
-
|
556
|
-
})(Function.prototype, 'toString', function toString() {
|
557
|
-
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
558
|
-
});
|
559
|
-
});
|
560
|
-
|
561
|
-
var path = global_1;
|
562
|
-
|
563
|
-
var aFunction$1 = function (variable) {
|
564
|
-
return typeof variable == 'function' ? variable : undefined;
|
565
|
-
};
|
566
|
-
|
567
|
-
var getBuiltIn = function (namespace, method) {
|
568
|
-
return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
|
569
|
-
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
831
|
+
return O;
|
570
832
|
};
|
571
833
|
|
572
834
|
var ceil = Math.ceil;
|
573
835
|
var floor$1 = Math.floor;
|
574
836
|
|
575
|
-
// `
|
576
|
-
// https://tc39.es/ecma262/#sec-
|
577
|
-
var
|
578
|
-
|
837
|
+
// `ToIntegerOrInfinity` abstract operation
|
838
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
839
|
+
var toIntegerOrInfinity = function (argument) {
|
840
|
+
var number = +argument;
|
841
|
+
// eslint-disable-next-line no-self-compare -- safe
|
842
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
|
579
843
|
};
|
580
844
|
|
845
|
+
var max$3 = Math.max;
|
581
846
|
var min$3 = Math.min;
|
582
847
|
|
848
|
+
// Helper for a popular repeating case of the spec:
|
849
|
+
// Let integer be ? ToInteger(index).
|
850
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
851
|
+
var toAbsoluteIndex = function (index, length) {
|
852
|
+
var integer = toIntegerOrInfinity(index);
|
853
|
+
return integer < 0 ? max$3(integer + length, 0) : min$3(integer, length);
|
854
|
+
};
|
855
|
+
|
856
|
+
var min$2 = Math.min;
|
857
|
+
|
583
858
|
// `ToLength` abstract operation
|
584
859
|
// https://tc39.es/ecma262/#sec-tolength
|
585
860
|
var toLength = function (argument) {
|
586
|
-
return argument > 0 ? min$
|
861
|
+
return argument > 0 ? min$2(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
587
862
|
};
|
588
863
|
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
// Let integer be ? ToInteger(index).
|
594
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
595
|
-
var toAbsoluteIndex = function (index, length) {
|
596
|
-
var integer = toInteger(index);
|
597
|
-
return integer < 0 ? max$2(integer + length, 0) : min$2(integer, length);
|
864
|
+
// `LengthOfArrayLike` abstract operation
|
865
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
866
|
+
var lengthOfArrayLike = function (obj) {
|
867
|
+
return toLength(obj.length);
|
598
868
|
};
|
599
869
|
|
600
870
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
601
871
|
var createMethod$2 = function (IS_INCLUDES) {
|
602
872
|
return function ($this, el, fromIndex) {
|
603
873
|
var O = toIndexedObject($this);
|
604
|
-
var length =
|
874
|
+
var length = lengthOfArrayLike(O);
|
605
875
|
var index = toAbsoluteIndex(fromIndex, length);
|
606
876
|
var value;
|
607
877
|
// Array#includes uses SameValueZero equality algorithm
|
@@ -626,18 +896,20 @@
|
|
626
896
|
indexOf: createMethod$2(false)
|
627
897
|
};
|
628
898
|
|
629
|
-
var indexOf = arrayIncludes.indexOf;
|
899
|
+
var indexOf$1 = arrayIncludes.indexOf;
|
630
900
|
|
631
901
|
|
902
|
+
var push$3 = functionUncurryThis([].push);
|
903
|
+
|
632
904
|
var objectKeysInternal = function (object, names) {
|
633
905
|
var O = toIndexedObject(object);
|
634
906
|
var i = 0;
|
635
907
|
var result = [];
|
636
908
|
var key;
|
637
|
-
for (key in O) !
|
909
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$3(result, key);
|
638
910
|
// Don't enum bug & hidden keys
|
639
|
-
while (names.length > i) if (
|
640
|
-
~indexOf(result, key) ||
|
911
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
912
|
+
~indexOf$1(result, key) || push$3(result, key);
|
641
913
|
}
|
642
914
|
return result;
|
643
915
|
};
|
@@ -657,36 +929,40 @@
|
|
657
929
|
|
658
930
|
// `Object.getOwnPropertyNames` method
|
659
931
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
660
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
661
|
-
var f$
|
932
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
933
|
+
var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
662
934
|
return objectKeysInternal(O, hiddenKeys);
|
663
935
|
};
|
664
936
|
|
665
937
|
var objectGetOwnPropertyNames = {
|
666
|
-
f: f$
|
938
|
+
f: f$2
|
667
939
|
};
|
668
940
|
|
669
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
670
|
-
var f = Object.getOwnPropertySymbols;
|
941
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
942
|
+
var f$1 = Object.getOwnPropertySymbols;
|
671
943
|
|
672
944
|
var objectGetOwnPropertySymbols = {
|
673
|
-
f: f
|
945
|
+
f: f$1
|
674
946
|
};
|
675
947
|
|
948
|
+
var concat$2 = functionUncurryThis([].concat);
|
949
|
+
|
676
950
|
// all object keys, includes non-enumerable and symbols
|
677
951
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
678
952
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
679
953
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
680
|
-
return getOwnPropertySymbols ?
|
954
|
+
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
681
955
|
};
|
682
956
|
|
683
|
-
var copyConstructorProperties = function (target, source) {
|
957
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
684
958
|
var keys = ownKeys(source);
|
685
959
|
var defineProperty = objectDefineProperty.f;
|
686
960
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
687
961
|
for (var i = 0; i < keys.length; i++) {
|
688
962
|
var key = keys[i];
|
689
|
-
if (!
|
963
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
964
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
965
|
+
}
|
690
966
|
}
|
691
967
|
};
|
692
968
|
|
@@ -696,7 +972,7 @@
|
|
696
972
|
var value = data[normalize(feature)];
|
697
973
|
return value == POLYFILL ? true
|
698
974
|
: value == NATIVE ? false
|
699
|
-
:
|
975
|
+
: isCallable(detection) ? fails(detection)
|
700
976
|
: !!detection;
|
701
977
|
};
|
702
978
|
|
@@ -730,6 +1006,7 @@
|
|
730
1006
|
options.sham - add a flag to not completely full polyfills
|
731
1007
|
options.enumerable - export as enumerable property
|
732
1008
|
options.noTargetGet - prevent calling a getter on target
|
1009
|
+
options.name - the .name of the function if it does not match the key
|
733
1010
|
*/
|
734
1011
|
var _export = function (options, source) {
|
735
1012
|
var TARGET = options.target;
|
@@ -752,148 +1029,155 @@
|
|
752
1029
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
753
1030
|
// contained in target
|
754
1031
|
if (!FORCED && targetProperty !== undefined) {
|
755
|
-
if (typeof sourceProperty
|
1032
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
756
1033
|
copyConstructorProperties(sourceProperty, targetProperty);
|
757
1034
|
}
|
758
1035
|
// add a flag to not completely full polyfills
|
759
1036
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
760
1037
|
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
761
1038
|
}
|
762
|
-
|
763
|
-
redefine(target, key, sourceProperty, options);
|
1039
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
764
1040
|
}
|
765
1041
|
};
|
766
1042
|
|
767
|
-
var
|
768
|
-
if (typeof it != 'function') {
|
769
|
-
throw TypeError(String(it) + ' is not a function');
|
770
|
-
} return it;
|
771
|
-
};
|
1043
|
+
var bind = functionUncurryThis(functionUncurryThis.bind);
|
772
1044
|
|
773
1045
|
// optional / simple context binding
|
774
|
-
var functionBindContext = function (fn, that
|
775
|
-
|
776
|
-
|
777
|
-
switch (length) {
|
778
|
-
case 0: return function () {
|
779
|
-
return fn.call(that);
|
780
|
-
};
|
781
|
-
case 1: return function (a) {
|
782
|
-
return fn.call(that, a);
|
783
|
-
};
|
784
|
-
case 2: return function (a, b) {
|
785
|
-
return fn.call(that, a, b);
|
786
|
-
};
|
787
|
-
case 3: return function (a, b, c) {
|
788
|
-
return fn.call(that, a, b, c);
|
789
|
-
};
|
790
|
-
}
|
791
|
-
return function (/* ...args */) {
|
1046
|
+
var functionBindContext = function (fn, that) {
|
1047
|
+
aCallable(fn);
|
1048
|
+
return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
|
792
1049
|
return fn.apply(that, arguments);
|
793
1050
|
};
|
794
1051
|
};
|
795
1052
|
|
796
|
-
// `ToObject` abstract operation
|
797
|
-
// https://tc39.es/ecma262/#sec-toobject
|
798
|
-
var toObject = function (argument) {
|
799
|
-
return Object(requireObjectCoercible(argument));
|
800
|
-
};
|
801
|
-
|
802
1053
|
// `IsArray` abstract operation
|
803
1054
|
// https://tc39.es/ecma262/#sec-isarray
|
804
|
-
// eslint-disable-next-line es/no-array-isarray -- safe
|
805
|
-
var isArray = Array.isArray || function isArray(
|
806
|
-
return classofRaw(
|
1055
|
+
// eslint-disable-next-line es-x/no-array-isarray -- safe
|
1056
|
+
var isArray = Array.isArray || function isArray(argument) {
|
1057
|
+
return classofRaw(argument) == 'Array';
|
807
1058
|
};
|
808
1059
|
|
809
|
-
var
|
810
|
-
|
811
|
-
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
1060
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
1061
|
+
var test = {};
|
812
1062
|
|
813
|
-
|
814
|
-
var versions = process && process.versions;
|
815
|
-
var v8 = versions && versions.v8;
|
816
|
-
var match, version;
|
1063
|
+
test[TO_STRING_TAG$1] = 'z';
|
817
1064
|
|
818
|
-
|
819
|
-
match = v8.split('.');
|
820
|
-
version = match[0] + match[1];
|
821
|
-
} else if (engineUserAgent) {
|
822
|
-
match = engineUserAgent.match(/Edge\/(\d+)/);
|
823
|
-
if (!match || match[1] >= 74) {
|
824
|
-
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
825
|
-
if (match) version = match[1];
|
826
|
-
}
|
827
|
-
}
|
1065
|
+
var toStringTagSupport = String(test) === '[object z]';
|
828
1066
|
|
829
|
-
var
|
1067
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
1068
|
+
var Object$1 = global_1.Object;
|
830
1069
|
|
831
|
-
//
|
832
|
-
var
|
833
|
-
// eslint-disable-next-line es/no-symbol -- required for testing
|
834
|
-
return !Symbol.sham &&
|
835
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
836
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
837
|
-
(engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
|
838
|
-
});
|
1070
|
+
// ES3 wrong here
|
1071
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
839
1072
|
|
840
|
-
|
1073
|
+
// fallback for IE11 Script Access Denied error
|
1074
|
+
var tryGet = function (it, key) {
|
1075
|
+
try {
|
1076
|
+
return it[key];
|
1077
|
+
} catch (error) { /* empty */ }
|
1078
|
+
};
|
841
1079
|
|
1080
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
1081
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
1082
|
+
var O, tag, result;
|
1083
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1084
|
+
// @@toStringTag case
|
1085
|
+
: typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
|
1086
|
+
// builtinTag case
|
1087
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
1088
|
+
// ES3 arguments fallback
|
1089
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
1090
|
+
};
|
842
1091
|
|
843
|
-
var
|
844
|
-
|
845
|
-
|
1092
|
+
var noop = function () { /* empty */ };
|
1093
|
+
var empty = [];
|
1094
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
1095
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
1096
|
+
var exec$1 = functionUncurryThis(constructorRegExp.exec);
|
1097
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
846
1098
|
|
847
|
-
var
|
848
|
-
|
849
|
-
|
1099
|
+
var isConstructorModern = function isConstructor(argument) {
|
1100
|
+
if (!isCallable(argument)) return false;
|
1101
|
+
try {
|
1102
|
+
construct(noop, empty, argument);
|
1103
|
+
return true;
|
1104
|
+
} catch (error) {
|
1105
|
+
return false;
|
1106
|
+
}
|
1107
|
+
};
|
850
1108
|
|
851
|
-
var
|
852
|
-
if (!
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
1109
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
1110
|
+
if (!isCallable(argument)) return false;
|
1111
|
+
switch (classof(argument)) {
|
1112
|
+
case 'AsyncFunction':
|
1113
|
+
case 'GeneratorFunction':
|
1114
|
+
case 'AsyncGeneratorFunction': return false;
|
1115
|
+
}
|
1116
|
+
try {
|
1117
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
1118
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
1119
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
1120
|
+
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
|
1121
|
+
} catch (error) {
|
1122
|
+
return true;
|
1123
|
+
}
|
859
1124
|
};
|
860
1125
|
|
1126
|
+
isConstructorLegacy.sham = true;
|
1127
|
+
|
1128
|
+
// `IsConstructor` abstract operation
|
1129
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
1130
|
+
var isConstructor = !construct || fails(function () {
|
1131
|
+
var called;
|
1132
|
+
return isConstructorModern(isConstructorModern.call)
|
1133
|
+
|| !isConstructorModern(Object)
|
1134
|
+
|| !isConstructorModern(function () { called = true; })
|
1135
|
+
|| called;
|
1136
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
1137
|
+
|
861
1138
|
var SPECIES$4 = wellKnownSymbol('species');
|
1139
|
+
var Array$3 = global_1.Array;
|
862
1140
|
|
863
|
-
// `ArraySpeciesCreate` abstract operation
|
1141
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
864
1142
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
865
|
-
var
|
1143
|
+
var arraySpeciesConstructor = function (originalArray) {
|
866
1144
|
var C;
|
867
1145
|
if (isArray(originalArray)) {
|
868
1146
|
C = originalArray.constructor;
|
869
1147
|
// cross-realm fallback
|
870
|
-
if (
|
1148
|
+
if (isConstructor(C) && (C === Array$3 || isArray(C.prototype))) C = undefined;
|
871
1149
|
else if (isObject(C)) {
|
872
1150
|
C = C[SPECIES$4];
|
873
1151
|
if (C === null) C = undefined;
|
874
1152
|
}
|
875
|
-
} return
|
1153
|
+
} return C === undefined ? Array$3 : C;
|
876
1154
|
};
|
877
1155
|
|
878
|
-
|
1156
|
+
// `ArraySpeciesCreate` abstract operation
|
1157
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
1158
|
+
var arraySpeciesCreate = function (originalArray, length) {
|
1159
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
1160
|
+
};
|
1161
|
+
|
1162
|
+
var push$2 = functionUncurryThis([].push);
|
879
1163
|
|
880
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex,
|
1164
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
881
1165
|
var createMethod$1 = function (TYPE) {
|
882
1166
|
var IS_MAP = TYPE == 1;
|
883
1167
|
var IS_FILTER = TYPE == 2;
|
884
1168
|
var IS_SOME = TYPE == 3;
|
885
1169
|
var IS_EVERY = TYPE == 4;
|
886
1170
|
var IS_FIND_INDEX = TYPE == 6;
|
887
|
-
var
|
1171
|
+
var IS_FILTER_REJECT = TYPE == 7;
|
888
1172
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
889
1173
|
return function ($this, callbackfn, that, specificCreate) {
|
890
1174
|
var O = toObject($this);
|
891
1175
|
var self = indexedObject(O);
|
892
|
-
var boundFunction = functionBindContext(callbackfn, that
|
893
|
-
var length =
|
1176
|
+
var boundFunction = functionBindContext(callbackfn, that);
|
1177
|
+
var length = lengthOfArrayLike(self);
|
894
1178
|
var index = 0;
|
895
1179
|
var create = specificCreate || arraySpeciesCreate;
|
896
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ||
|
1180
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
897
1181
|
var value, result;
|
898
1182
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
899
1183
|
value = self[index];
|
@@ -904,10 +1188,10 @@
|
|
904
1188
|
case 3: return true; // some
|
905
1189
|
case 5: return value; // find
|
906
1190
|
case 6: return index; // findIndex
|
907
|
-
case 2: push
|
1191
|
+
case 2: push$2(target, value); // filter
|
908
1192
|
} else switch (TYPE) {
|
909
1193
|
case 4: return false; // every
|
910
|
-
case 7: push
|
1194
|
+
case 7: push$2(target, value); // filterReject
|
911
1195
|
}
|
912
1196
|
}
|
913
1197
|
}
|
@@ -937,33 +1221,47 @@
|
|
937
1221
|
// `Array.prototype.findIndex` method
|
938
1222
|
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
939
1223
|
findIndex: createMethod$1(6),
|
940
|
-
// `Array.prototype.
|
1224
|
+
// `Array.prototype.filterReject` method
|
941
1225
|
// https://github.com/tc39/proposal-array-filtering
|
942
|
-
|
1226
|
+
filterReject: createMethod$1(7)
|
943
1227
|
};
|
944
1228
|
|
945
1229
|
// `Object.keys` method
|
946
1230
|
// https://tc39.es/ecma262/#sec-object.keys
|
947
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
1231
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
948
1232
|
var objectKeys = Object.keys || function keys(O) {
|
949
1233
|
return objectKeysInternal(O, enumBugKeys);
|
950
1234
|
};
|
951
1235
|
|
952
1236
|
// `Object.defineProperties` method
|
953
1237
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
954
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
955
|
-
var
|
1238
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
1239
|
+
var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
956
1240
|
anObject(O);
|
1241
|
+
var props = toIndexedObject(Properties);
|
957
1242
|
var keys = objectKeys(Properties);
|
958
1243
|
var length = keys.length;
|
959
1244
|
var index = 0;
|
960
1245
|
var key;
|
961
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++],
|
1246
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
962
1247
|
return O;
|
963
1248
|
};
|
964
1249
|
|
1250
|
+
var objectDefineProperties = {
|
1251
|
+
f: f
|
1252
|
+
};
|
1253
|
+
|
965
1254
|
var html = getBuiltIn('document', 'documentElement');
|
966
1255
|
|
1256
|
+
/* global ActiveXObject -- old IE, WSH */
|
1257
|
+
|
1258
|
+
|
1259
|
+
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
|
1264
|
+
|
967
1265
|
var GT = '>';
|
968
1266
|
var LT = '<';
|
969
1267
|
var PROTOTYPE = 'prototype';
|
@@ -1010,10 +1308,13 @@
|
|
1010
1308
|
var activeXDocument;
|
1011
1309
|
var NullProtoObject = function () {
|
1012
1310
|
try {
|
1013
|
-
|
1014
|
-
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
1311
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
1015
1312
|
} catch (error) { /* ignore */ }
|
1016
|
-
NullProtoObject =
|
1313
|
+
NullProtoObject = typeof document != 'undefined'
|
1314
|
+
? document.domain && activeXDocument
|
1315
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
1316
|
+
: NullProtoObjectViaIFrame()
|
1317
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
1017
1318
|
var length = enumBugKeys.length;
|
1018
1319
|
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
1019
1320
|
return NullProtoObject();
|
@@ -1023,6 +1324,7 @@
|
|
1023
1324
|
|
1024
1325
|
// `Object.create` method
|
1025
1326
|
// https://tc39.es/ecma262/#sec-object.create
|
1327
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
1026
1328
|
var objectCreate = Object.create || function create(O, Properties) {
|
1027
1329
|
var result;
|
1028
1330
|
if (O !== null) {
|
@@ -1032,7 +1334,7 @@
|
|
1032
1334
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
1033
1335
|
result[IE_PROTO] = O;
|
1034
1336
|
} else result = NullProtoObject();
|
1035
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
1337
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
1036
1338
|
};
|
1037
1339
|
|
1038
1340
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
@@ -1072,11 +1374,31 @@
|
|
1072
1374
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
1073
1375
|
addToUnscopables(FIND);
|
1074
1376
|
|
1377
|
+
// `Object.prototype.toString` method implementation
|
1378
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1379
|
+
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
1380
|
+
return '[object ' + classof(this) + ']';
|
1381
|
+
};
|
1382
|
+
|
1383
|
+
// `Object.prototype.toString` method
|
1384
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1385
|
+
if (!toStringTagSupport) {
|
1386
|
+
defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
|
1387
|
+
}
|
1388
|
+
|
1389
|
+
var String$1 = global_1.String;
|
1390
|
+
|
1391
|
+
var toString_1 = function (argument) {
|
1392
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
1393
|
+
return String$1(argument);
|
1394
|
+
};
|
1395
|
+
|
1075
1396
|
// `RegExp.prototype.flags` getter implementation
|
1076
1397
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
1077
1398
|
var regexpFlags = function () {
|
1078
1399
|
var that = anObject(this);
|
1079
1400
|
var result = '';
|
1401
|
+
if (that.hasIndices) result += 'd';
|
1080
1402
|
if (that.global) result += 'g';
|
1081
1403
|
if (that.ignoreCase) result += 'i';
|
1082
1404
|
if (that.multiline) result += 'm';
|
@@ -1086,71 +1408,118 @@
|
|
1086
1408
|
return result;
|
1087
1409
|
};
|
1088
1410
|
|
1089
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
1090
|
-
|
1091
|
-
function RE(s, f) {
|
1092
|
-
return RegExp(s, f);
|
1093
|
-
}
|
1411
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
1412
|
+
var $RegExp$2 = global_1.RegExp;
|
1094
1413
|
|
1095
1414
|
var UNSUPPORTED_Y$2 = fails(function () {
|
1096
|
-
|
1097
|
-
var re = RE('a', 'y');
|
1415
|
+
var re = $RegExp$2('a', 'y');
|
1098
1416
|
re.lastIndex = 2;
|
1099
1417
|
return re.exec('abcd') != null;
|
1100
1418
|
});
|
1101
1419
|
|
1102
|
-
|
1420
|
+
// UC Browser bug
|
1421
|
+
// https://github.com/zloirock/core-js/issues/1008
|
1422
|
+
var MISSED_STICKY = UNSUPPORTED_Y$2 || fails(function () {
|
1423
|
+
return !$RegExp$2('a', 'y').sticky;
|
1424
|
+
});
|
1425
|
+
|
1426
|
+
var BROKEN_CARET = UNSUPPORTED_Y$2 || fails(function () {
|
1103
1427
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
1104
|
-
var re =
|
1428
|
+
var re = $RegExp$2('^r', 'gy');
|
1105
1429
|
re.lastIndex = 2;
|
1106
1430
|
return re.exec('str') != null;
|
1107
1431
|
});
|
1108
1432
|
|
1109
1433
|
var regexpStickyHelpers = {
|
1110
|
-
|
1111
|
-
|
1434
|
+
BROKEN_CARET: BROKEN_CARET,
|
1435
|
+
MISSED_STICKY: MISSED_STICKY,
|
1436
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$2
|
1112
1437
|
};
|
1113
1438
|
|
1114
|
-
|
1115
|
-
var
|
1439
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
1440
|
+
var $RegExp$1 = global_1.RegExp;
|
1441
|
+
|
1442
|
+
var regexpUnsupportedDotAll = fails(function () {
|
1443
|
+
var re = $RegExp$1('.', 's');
|
1444
|
+
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
1445
|
+
});
|
1446
|
+
|
1447
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
1448
|
+
var $RegExp = global_1.RegExp;
|
1449
|
+
|
1450
|
+
var regexpUnsupportedNcg = fails(function () {
|
1451
|
+
var re = $RegExp('(?<a>b)', 'g');
|
1452
|
+
return re.exec('b').groups.a !== 'b' ||
|
1453
|
+
'b'.replace(re, '$<a>c') !== 'bc';
|
1454
|
+
});
|
1455
|
+
|
1456
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
1457
|
+
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
1458
|
+
|
1459
|
+
|
1116
1460
|
|
1461
|
+
|
1462
|
+
|
1463
|
+
|
1464
|
+
|
1465
|
+
var getInternalState = internalState.get;
|
1466
|
+
|
1467
|
+
|
1468
|
+
|
1469
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
1470
|
+
var nativeExec = RegExp.prototype.exec;
|
1117
1471
|
var patchedExec = nativeExec;
|
1472
|
+
var charAt$3 = functionUncurryThis(''.charAt);
|
1473
|
+
var indexOf = functionUncurryThis(''.indexOf);
|
1474
|
+
var replace$1 = functionUncurryThis(''.replace);
|
1475
|
+
var stringSlice$4 = functionUncurryThis(''.slice);
|
1118
1476
|
|
1119
1477
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
1120
1478
|
var re1 = /a/;
|
1121
1479
|
var re2 = /b*/g;
|
1122
|
-
nativeExec
|
1123
|
-
nativeExec
|
1480
|
+
functionCall(nativeExec, re1, 'a');
|
1481
|
+
functionCall(nativeExec, re2, 'a');
|
1124
1482
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
1125
1483
|
})();
|
1126
1484
|
|
1127
|
-
var UNSUPPORTED_Y$1 = regexpStickyHelpers.
|
1485
|
+
var UNSUPPORTED_Y$1 = regexpStickyHelpers.BROKEN_CARET;
|
1128
1486
|
|
1129
1487
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
1130
|
-
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
1131
1488
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
1132
1489
|
|
1133
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
1490
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || regexpUnsupportedDotAll || regexpUnsupportedNcg;
|
1134
1491
|
|
1135
1492
|
if (PATCH) {
|
1136
|
-
patchedExec = function exec(
|
1493
|
+
patchedExec = function exec(string) {
|
1137
1494
|
var re = this;
|
1138
|
-
var
|
1495
|
+
var state = getInternalState(re);
|
1496
|
+
var str = toString_1(string);
|
1497
|
+
var raw = state.raw;
|
1498
|
+
var result, reCopy, lastIndex, match, i, object, group;
|
1499
|
+
|
1500
|
+
if (raw) {
|
1501
|
+
raw.lastIndex = re.lastIndex;
|
1502
|
+
result = functionCall(patchedExec, raw, str);
|
1503
|
+
re.lastIndex = raw.lastIndex;
|
1504
|
+
return result;
|
1505
|
+
}
|
1506
|
+
|
1507
|
+
var groups = state.groups;
|
1139
1508
|
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
1140
|
-
var flags = regexpFlags
|
1509
|
+
var flags = functionCall(regexpFlags, re);
|
1141
1510
|
var source = re.source;
|
1142
1511
|
var charsAdded = 0;
|
1143
1512
|
var strCopy = str;
|
1144
1513
|
|
1145
1514
|
if (sticky) {
|
1146
|
-
flags =
|
1147
|
-
if (
|
1515
|
+
flags = replace$1(flags, 'y', '');
|
1516
|
+
if (indexOf(flags, 'g') === -1) {
|
1148
1517
|
flags += 'g';
|
1149
1518
|
}
|
1150
1519
|
|
1151
|
-
strCopy =
|
1520
|
+
strCopy = stringSlice$4(str, re.lastIndex);
|
1152
1521
|
// Support anchored sticky behavior.
|
1153
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str
|
1522
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
1154
1523
|
source = '(?: ' + source + ')';
|
1155
1524
|
strCopy = ' ' + strCopy;
|
1156
1525
|
charsAdded++;
|
@@ -1165,12 +1534,12 @@
|
|
1165
1534
|
}
|
1166
1535
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
1167
1536
|
|
1168
|
-
match = nativeExec
|
1537
|
+
match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
|
1169
1538
|
|
1170
1539
|
if (sticky) {
|
1171
1540
|
if (match) {
|
1172
|
-
match.input = match.input
|
1173
|
-
match[0] = match[0]
|
1541
|
+
match.input = stringSlice$4(match.input, charsAdded);
|
1542
|
+
match[0] = stringSlice$4(match[0], charsAdded);
|
1174
1543
|
match.index = re.lastIndex;
|
1175
1544
|
re.lastIndex += match[0].length;
|
1176
1545
|
} else re.lastIndex = 0;
|
@@ -1180,13 +1549,21 @@
|
|
1180
1549
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
1181
1550
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
1182
1551
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
1183
|
-
nativeReplace
|
1552
|
+
functionCall(nativeReplace, match[0], reCopy, function () {
|
1184
1553
|
for (i = 1; i < arguments.length - 2; i++) {
|
1185
1554
|
if (arguments[i] === undefined) match[i] = undefined;
|
1186
1555
|
}
|
1187
1556
|
});
|
1188
1557
|
}
|
1189
1558
|
|
1559
|
+
if (match && groups) {
|
1560
|
+
match.groups = object = objectCreate(null);
|
1561
|
+
for (i = 0; i < groups.length; i++) {
|
1562
|
+
group = groups[i];
|
1563
|
+
object[group[0]] = match[group[1]];
|
1564
|
+
}
|
1565
|
+
}
|
1566
|
+
|
1190
1567
|
return match;
|
1191
1568
|
};
|
1192
1569
|
}
|
@@ -1199,56 +1576,28 @@
|
|
1199
1576
|
exec: regexpExec
|
1200
1577
|
});
|
1201
1578
|
|
1202
|
-
|
1579
|
+
var FunctionPrototype = Function.prototype;
|
1580
|
+
var apply = FunctionPrototype.apply;
|
1581
|
+
var call = FunctionPrototype.call;
|
1203
1582
|
|
1583
|
+
// eslint-disable-next-line es-x/no-reflect -- safe
|
1584
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
|
1585
|
+
return call.apply(apply, arguments);
|
1586
|
+
});
|
1204
1587
|
|
1588
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
1205
1589
|
|
1206
1590
|
|
1207
1591
|
|
1208
1592
|
|
1209
|
-
var SPECIES$3 = wellKnownSymbol('species');
|
1210
1593
|
|
1211
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
1212
|
-
// #replace needs built-in support for named groups.
|
1213
|
-
// #match works fine because it just return the exec results, even if it has
|
1214
|
-
// a "grops" property.
|
1215
|
-
var re = /./;
|
1216
|
-
re.exec = function () {
|
1217
|
-
var result = [];
|
1218
|
-
result.groups = { a: '7' };
|
1219
|
-
return result;
|
1220
|
-
};
|
1221
|
-
return ''.replace(re, '$<a>') !== '7';
|
1222
|
-
});
|
1223
1594
|
|
1224
|
-
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1225
|
-
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1226
|
-
var REPLACE_KEEPS_$0 = (function () {
|
1227
|
-
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
1228
|
-
return 'a'.replace(/./, '$0') === '$0';
|
1229
|
-
})();
|
1230
1595
|
|
1231
|
-
var REPLACE = wellKnownSymbol('replace');
|
1232
|
-
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
1233
|
-
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
1234
|
-
if (/./[REPLACE]) {
|
1235
|
-
return /./[REPLACE]('a', '$0') === '';
|
1236
|
-
}
|
1237
|
-
return false;
|
1238
|
-
})();
|
1239
1596
|
|
1240
|
-
|
1241
|
-
|
1242
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
1243
|
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
1244
|
-
var re = /(?:)/;
|
1245
|
-
var originalExec = re.exec;
|
1246
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
1247
|
-
var result = 'ab'.split(re);
|
1248
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
1249
|
-
});
|
1597
|
+
var SPECIES$3 = wellKnownSymbol('species');
|
1598
|
+
var RegExpPrototype = RegExp.prototype;
|
1250
1599
|
|
1251
|
-
var fixRegexpWellKnownSymbolLogic = function (KEY,
|
1600
|
+
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
1252
1601
|
var SYMBOL = wellKnownSymbol(KEY);
|
1253
1602
|
|
1254
1603
|
var DELEGATES_TO_SYMBOL = !fails(function () {
|
@@ -1285,44 +1634,29 @@
|
|
1285
1634
|
if (
|
1286
1635
|
!DELEGATES_TO_SYMBOL ||
|
1287
1636
|
!DELEGATES_TO_EXEC ||
|
1288
|
-
|
1289
|
-
REPLACE_SUPPORTS_NAMED_GROUPS &&
|
1290
|
-
REPLACE_KEEPS_$0 &&
|
1291
|
-
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
1292
|
-
)) ||
|
1293
|
-
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
1637
|
+
FORCED
|
1294
1638
|
) {
|
1295
|
-
var
|
1639
|
+
var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
|
1296
1640
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
1297
|
-
|
1641
|
+
var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
|
1642
|
+
var $exec = regexp.exec;
|
1643
|
+
if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
|
1298
1644
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
1299
1645
|
// The native String method already delegates to @@method (this
|
1300
1646
|
// polyfilled function), leasing to infinite recursion.
|
1301
1647
|
// We avoid it by directly calling the native @@method method.
|
1302
|
-
return { done: true, value:
|
1648
|
+
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
1303
1649
|
}
|
1304
|
-
return { done: true, value:
|
1650
|
+
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
1305
1651
|
}
|
1306
1652
|
return { done: false };
|
1307
|
-
}, {
|
1308
|
-
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
|
1309
|
-
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
1310
1653
|
});
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
redefine(String.prototype, KEY, stringMethod);
|
1315
|
-
redefine(RegExp.prototype, SYMBOL, length == 2
|
1316
|
-
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1317
|
-
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1318
|
-
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1319
|
-
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1320
|
-
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1321
|
-
: function (string) { return regexMethod.call(string, this); }
|
1322
|
-
);
|
1654
|
+
|
1655
|
+
defineBuiltIn(String.prototype, KEY, methods[0]);
|
1656
|
+
defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
|
1323
1657
|
}
|
1324
1658
|
|
1325
|
-
if (
|
1659
|
+
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
1326
1660
|
};
|
1327
1661
|
|
1328
1662
|
var MATCH = wellKnownSymbol('match');
|
@@ -1334,6 +1668,14 @@
|
|
1334
1668
|
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1335
1669
|
};
|
1336
1670
|
|
1671
|
+
var TypeError$3 = global_1.TypeError;
|
1672
|
+
|
1673
|
+
// `Assert: IsConstructor(argument) is true`
|
1674
|
+
var aConstructor = function (argument) {
|
1675
|
+
if (isConstructor(argument)) return argument;
|
1676
|
+
throw TypeError$3(tryToString(argument) + ' is not a constructor');
|
1677
|
+
};
|
1678
|
+
|
1337
1679
|
var SPECIES$2 = wellKnownSymbol('species');
|
1338
1680
|
|
1339
1681
|
// `SpeciesConstructor` abstract operation
|
@@ -1341,22 +1683,29 @@
|
|
1341
1683
|
var speciesConstructor = function (O, defaultConstructor) {
|
1342
1684
|
var C = anObject(O).constructor;
|
1343
1685
|
var S;
|
1344
|
-
return C === undefined || (S = anObject(C)[SPECIES$2]) == undefined ? defaultConstructor :
|
1686
|
+
return C === undefined || (S = anObject(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S);
|
1345
1687
|
};
|
1346
1688
|
|
1347
|
-
|
1689
|
+
var charAt$2 = functionUncurryThis(''.charAt);
|
1690
|
+
var charCodeAt = functionUncurryThis(''.charCodeAt);
|
1691
|
+
var stringSlice$3 = functionUncurryThis(''.slice);
|
1692
|
+
|
1348
1693
|
var createMethod = function (CONVERT_TO_STRING) {
|
1349
1694
|
return function ($this, pos) {
|
1350
|
-
var S =
|
1351
|
-
var position =
|
1695
|
+
var S = toString_1(requireObjectCoercible($this));
|
1696
|
+
var position = toIntegerOrInfinity(pos);
|
1352
1697
|
var size = S.length;
|
1353
1698
|
var first, second;
|
1354
1699
|
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1355
|
-
first =
|
1700
|
+
first = charCodeAt(S, position);
|
1356
1701
|
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1357
|
-
|| (second =
|
1358
|
-
? CONVERT_TO_STRING
|
1359
|
-
|
1702
|
+
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
1703
|
+
? CONVERT_TO_STRING
|
1704
|
+
? charAt$2(S, position)
|
1705
|
+
: first
|
1706
|
+
: CONVERT_TO_STRING
|
1707
|
+
? stringSlice$3(S, position, position + 2)
|
1708
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1360
1709
|
};
|
1361
1710
|
};
|
1362
1711
|
|
@@ -1369,40 +1718,69 @@
|
|
1369
1718
|
charAt: createMethod(true)
|
1370
1719
|
};
|
1371
1720
|
|
1372
|
-
var charAt = stringMultibyte.charAt;
|
1721
|
+
var charAt$1 = stringMultibyte.charAt;
|
1373
1722
|
|
1374
1723
|
// `AdvanceStringIndex` abstract operation
|
1375
1724
|
// https://tc39.es/ecma262/#sec-advancestringindex
|
1376
1725
|
var advanceStringIndex = function (S, index, unicode) {
|
1377
|
-
return index + (unicode ? charAt(S, index).length : 1);
|
1726
|
+
return index + (unicode ? charAt$1(S, index).length : 1);
|
1727
|
+
};
|
1728
|
+
|
1729
|
+
var createProperty = function (object, key, value) {
|
1730
|
+
var propertyKey = toPropertyKey(key);
|
1731
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
1732
|
+
else object[propertyKey] = value;
|
1378
1733
|
};
|
1379
1734
|
|
1735
|
+
var Array$2 = global_1.Array;
|
1736
|
+
var max$2 = Math.max;
|
1737
|
+
|
1738
|
+
var arraySliceSimple = function (O, start, end) {
|
1739
|
+
var length = lengthOfArrayLike(O);
|
1740
|
+
var k = toAbsoluteIndex(start, length);
|
1741
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
1742
|
+
var result = Array$2(max$2(fin - k, 0));
|
1743
|
+
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
1744
|
+
result.length = n;
|
1745
|
+
return result;
|
1746
|
+
};
|
1747
|
+
|
1748
|
+
var TypeError$2 = global_1.TypeError;
|
1749
|
+
|
1380
1750
|
// `RegExpExec` abstract operation
|
1381
1751
|
// https://tc39.es/ecma262/#sec-regexpexec
|
1382
1752
|
var regexpExecAbstract = function (R, S) {
|
1383
1753
|
var exec = R.exec;
|
1384
|
-
if (
|
1385
|
-
var result = exec
|
1386
|
-
if (
|
1387
|
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
1388
|
-
}
|
1754
|
+
if (isCallable(exec)) {
|
1755
|
+
var result = functionCall(exec, R, S);
|
1756
|
+
if (result !== null) anObject(result);
|
1389
1757
|
return result;
|
1390
1758
|
}
|
1391
|
-
|
1392
|
-
|
1393
|
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
1394
|
-
}
|
1395
|
-
|
1396
|
-
return regexpExec.call(R, S);
|
1759
|
+
if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
|
1760
|
+
throw TypeError$2('RegExp#exec called on incompatible receiver');
|
1397
1761
|
};
|
1398
1762
|
|
1399
1763
|
var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y;
|
1400
|
-
var arrayPush = [].push;
|
1401
|
-
var min$1 = Math.min;
|
1402
1764
|
var MAX_UINT32 = 0xFFFFFFFF;
|
1765
|
+
var min$1 = Math.min;
|
1766
|
+
var $push = [].push;
|
1767
|
+
var exec = functionUncurryThis(/./.exec);
|
1768
|
+
var push$1 = functionUncurryThis($push);
|
1769
|
+
var stringSlice$2 = functionUncurryThis(''.slice);
|
1770
|
+
|
1771
|
+
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
1772
|
+
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
1773
|
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
1774
|
+
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
1775
|
+
var re = /(?:)/;
|
1776
|
+
var originalExec = re.exec;
|
1777
|
+
re.exec = function () { return originalExec.apply(this, arguments); };
|
1778
|
+
var result = 'ab'.split(re);
|
1779
|
+
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
1780
|
+
});
|
1403
1781
|
|
1404
1782
|
// @@split logic
|
1405
|
-
fixRegexpWellKnownSymbolLogic('split',
|
1783
|
+
fixRegexpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
|
1406
1784
|
var internalSplit;
|
1407
1785
|
if (
|
1408
1786
|
'abbc'.split(/(b)*/)[1] == 'c' ||
|
@@ -1410,19 +1788,19 @@
|
|
1410
1788
|
'test'.split(/(?:)/, -1).length != 4 ||
|
1411
1789
|
'ab'.split(/(?:ab)*/).length != 2 ||
|
1412
1790
|
'.'.split(/(.?)(.?)/).length != 4 ||
|
1413
|
-
// eslint-disable-next-line regexp/no-
|
1791
|
+
// eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
|
1414
1792
|
'.'.split(/()()/).length > 1 ||
|
1415
1793
|
''.split(/.?/).length
|
1416
1794
|
) {
|
1417
1795
|
// based on es5-shim implementation, need to rework it
|
1418
1796
|
internalSplit = function (separator, limit) {
|
1419
|
-
var string =
|
1797
|
+
var string = toString_1(requireObjectCoercible(this));
|
1420
1798
|
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1421
1799
|
if (lim === 0) return [];
|
1422
1800
|
if (separator === undefined) return [string];
|
1423
1801
|
// If `separator` is not a regex, use native split
|
1424
1802
|
if (!isRegexp(separator)) {
|
1425
|
-
return nativeSplit
|
1803
|
+
return functionCall(nativeSplit, string, separator, lim);
|
1426
1804
|
}
|
1427
1805
|
var output = [];
|
1428
1806
|
var flags = (separator.ignoreCase ? 'i' : '') +
|
@@ -1433,11 +1811,11 @@
|
|
1433
1811
|
// Make `global` and avoid `lastIndex` issues by working with a copy
|
1434
1812
|
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
1435
1813
|
var match, lastIndex, lastLength;
|
1436
|
-
while (match = regexpExec
|
1814
|
+
while (match = functionCall(regexpExec, separatorCopy, string)) {
|
1437
1815
|
lastIndex = separatorCopy.lastIndex;
|
1438
1816
|
if (lastIndex > lastLastIndex) {
|
1439
|
-
|
1440
|
-
if (match.length > 1 && match.index < string.length)
|
1817
|
+
push$1(output, stringSlice$2(string, lastLastIndex, match.index));
|
1818
|
+
if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySliceSimple(match, 1));
|
1441
1819
|
lastLength = match[0].length;
|
1442
1820
|
lastLastIndex = lastIndex;
|
1443
1821
|
if (output.length >= lim) break;
|
@@ -1445,14 +1823,14 @@
|
|
1445
1823
|
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
1446
1824
|
}
|
1447
1825
|
if (lastLastIndex === string.length) {
|
1448
|
-
if (lastLength || !separatorCopy
|
1449
|
-
} else
|
1450
|
-
return output.length > lim ? output
|
1826
|
+
if (lastLength || !exec(separatorCopy, '')) push$1(output, '');
|
1827
|
+
} else push$1(output, stringSlice$2(string, lastLastIndex));
|
1828
|
+
return output.length > lim ? arraySliceSimple(output, 0, lim) : output;
|
1451
1829
|
};
|
1452
1830
|
// Chakra, V8
|
1453
1831
|
} else if ('0'.split(undefined, 0).length) {
|
1454
1832
|
internalSplit = function (separator, limit) {
|
1455
|
-
return separator === undefined && limit === 0 ? [] : nativeSplit
|
1833
|
+
return separator === undefined && limit === 0 ? [] : functionCall(nativeSplit, this, separator, limit);
|
1456
1834
|
};
|
1457
1835
|
} else internalSplit = nativeSplit;
|
1458
1836
|
|
@@ -1461,22 +1839,23 @@
|
|
1461
1839
|
// https://tc39.es/ecma262/#sec-string.prototype.split
|
1462
1840
|
function split(separator, limit) {
|
1463
1841
|
var O = requireObjectCoercible(this);
|
1464
|
-
var splitter = separator == undefined ? undefined : separator
|
1465
|
-
return splitter
|
1466
|
-
? splitter
|
1467
|
-
: internalSplit
|
1842
|
+
var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);
|
1843
|
+
return splitter
|
1844
|
+
? functionCall(splitter, separator, O, limit)
|
1845
|
+
: functionCall(internalSplit, toString_1(O), separator, limit);
|
1468
1846
|
},
|
1469
1847
|
// `RegExp.prototype[@@split]` method
|
1470
1848
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
1471
1849
|
//
|
1472
1850
|
// NOTE: This cannot be properly polyfilled in engines that don't support
|
1473
1851
|
// the 'y' flag.
|
1474
|
-
function (
|
1475
|
-
var
|
1852
|
+
function (string, limit) {
|
1853
|
+
var rx = anObject(this);
|
1854
|
+
var S = toString_1(string);
|
1855
|
+
var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
|
1856
|
+
|
1476
1857
|
if (res.done) return res.value;
|
1477
1858
|
|
1478
|
-
var rx = anObject(regexp);
|
1479
|
-
var S = String(this);
|
1480
1859
|
var C = speciesConstructor(rx, RegExp);
|
1481
1860
|
|
1482
1861
|
var unicodeMatching = rx.unicode;
|
@@ -1496,7 +1875,7 @@
|
|
1496
1875
|
var A = [];
|
1497
1876
|
while (q < S.length) {
|
1498
1877
|
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
1499
|
-
var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? S
|
1878
|
+
var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? stringSlice$2(S, q) : S);
|
1500
1879
|
var e;
|
1501
1880
|
if (
|
1502
1881
|
z === null ||
|
@@ -1504,26 +1883,29 @@
|
|
1504
1883
|
) {
|
1505
1884
|
q = advanceStringIndex(S, q, unicodeMatching);
|
1506
1885
|
} else {
|
1507
|
-
|
1886
|
+
push$1(A, stringSlice$2(S, p, q));
|
1508
1887
|
if (A.length === lim) return A;
|
1509
1888
|
for (var i = 1; i <= z.length - 1; i++) {
|
1510
|
-
|
1889
|
+
push$1(A, z[i]);
|
1511
1890
|
if (A.length === lim) return A;
|
1512
1891
|
}
|
1513
1892
|
q = p = e;
|
1514
1893
|
}
|
1515
1894
|
}
|
1516
|
-
|
1895
|
+
push$1(A, stringSlice$2(S, p));
|
1517
1896
|
return A;
|
1518
1897
|
}
|
1519
1898
|
];
|
1520
|
-
}, UNSUPPORTED_Y);
|
1899
|
+
}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
|
1521
1900
|
|
1522
1901
|
var floor = Math.floor;
|
1523
|
-
var
|
1902
|
+
var charAt = functionUncurryThis(''.charAt);
|
1903
|
+
var replace = functionUncurryThis(''.replace);
|
1904
|
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
1524
1905
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
1525
1906
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
1526
1907
|
|
1908
|
+
// `GetSubstitution` abstract operation
|
1527
1909
|
// https://tc39.es/ecma262/#sec-getsubstitution
|
1528
1910
|
var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
|
1529
1911
|
var tailPos = position + matched.length;
|
@@ -1533,15 +1915,15 @@
|
|
1533
1915
|
namedCaptures = toObject(namedCaptures);
|
1534
1916
|
symbols = SUBSTITUTION_SYMBOLS;
|
1535
1917
|
}
|
1536
|
-
return replace
|
1918
|
+
return replace(replacement, symbols, function (match, ch) {
|
1537
1919
|
var capture;
|
1538
|
-
switch (
|
1920
|
+
switch (charAt(ch, 0)) {
|
1539
1921
|
case '$': return '$';
|
1540
1922
|
case '&': return matched;
|
1541
|
-
case '`': return str
|
1542
|
-
case "'": return str
|
1923
|
+
case '`': return stringSlice$1(str, 0, position);
|
1924
|
+
case "'": return stringSlice$1(str, tailPos);
|
1543
1925
|
case '<':
|
1544
|
-
capture = namedCaptures[ch
|
1926
|
+
capture = namedCaptures[stringSlice$1(ch, 1, -1)];
|
1545
1927
|
break;
|
1546
1928
|
default: // \d\d?
|
1547
1929
|
var n = +ch;
|
@@ -1549,7 +1931,7 @@
|
|
1549
1931
|
if (n > m) {
|
1550
1932
|
var f = floor(n / 10);
|
1551
1933
|
if (f === 0) return match;
|
1552
|
-
if (f <= m) return captures[f - 1] === undefined ?
|
1934
|
+
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
1553
1935
|
return match;
|
1554
1936
|
}
|
1555
1937
|
capture = captures[n - 1];
|
@@ -1558,17 +1940,46 @@
|
|
1558
1940
|
});
|
1559
1941
|
};
|
1560
1942
|
|
1943
|
+
var REPLACE = wellKnownSymbol('replace');
|
1561
1944
|
var max$1 = Math.max;
|
1562
1945
|
var min = Math.min;
|
1946
|
+
var concat$1 = functionUncurryThis([].concat);
|
1947
|
+
var push = functionUncurryThis([].push);
|
1948
|
+
var stringIndexOf = functionUncurryThis(''.indexOf);
|
1949
|
+
var stringSlice = functionUncurryThis(''.slice);
|
1563
1950
|
|
1564
1951
|
var maybeToString = function (it) {
|
1565
1952
|
return it === undefined ? it : String(it);
|
1566
1953
|
};
|
1567
1954
|
|
1955
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1956
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1957
|
+
var REPLACE_KEEPS_$0 = (function () {
|
1958
|
+
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
1959
|
+
return 'a'.replace(/./, '$0') === '$0';
|
1960
|
+
})();
|
1961
|
+
|
1962
|
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
1963
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
1964
|
+
if (/./[REPLACE]) {
|
1965
|
+
return /./[REPLACE]('a', '$0') === '';
|
1966
|
+
}
|
1967
|
+
return false;
|
1968
|
+
})();
|
1969
|
+
|
1970
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
1971
|
+
var re = /./;
|
1972
|
+
re.exec = function () {
|
1973
|
+
var result = [];
|
1974
|
+
result.groups = { a: '7' };
|
1975
|
+
return result;
|
1976
|
+
};
|
1977
|
+
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
1978
|
+
return ''.replace(re, '$<a>') !== '7';
|
1979
|
+
});
|
1980
|
+
|
1568
1981
|
// @@replace logic
|
1569
|
-
fixRegexpWellKnownSymbolLogic('replace',
|
1570
|
-
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
|
1571
|
-
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
|
1982
|
+
fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
1572
1983
|
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
1573
1984
|
|
1574
1985
|
return [
|
@@ -1576,27 +1987,28 @@
|
|
1576
1987
|
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
1577
1988
|
function replace(searchValue, replaceValue) {
|
1578
1989
|
var O = requireObjectCoercible(this);
|
1579
|
-
var replacer = searchValue == undefined ? undefined : searchValue
|
1580
|
-
return replacer
|
1581
|
-
? replacer
|
1582
|
-
: nativeReplace
|
1990
|
+
var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
|
1991
|
+
return replacer
|
1992
|
+
? functionCall(replacer, searchValue, O, replaceValue)
|
1993
|
+
: functionCall(nativeReplace, toString_1(O), searchValue, replaceValue);
|
1583
1994
|
},
|
1584
1995
|
// `RegExp.prototype[@@replace]` method
|
1585
1996
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
1586
|
-
function (
|
1997
|
+
function (string, replaceValue) {
|
1998
|
+
var rx = anObject(this);
|
1999
|
+
var S = toString_1(string);
|
2000
|
+
|
1587
2001
|
if (
|
1588
|
-
|
1589
|
-
(
|
2002
|
+
typeof replaceValue == 'string' &&
|
2003
|
+
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
2004
|
+
stringIndexOf(replaceValue, '$<') === -1
|
1590
2005
|
) {
|
1591
|
-
var res = maybeCallNative(nativeReplace,
|
2006
|
+
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
1592
2007
|
if (res.done) return res.value;
|
1593
2008
|
}
|
1594
2009
|
|
1595
|
-
var
|
1596
|
-
|
1597
|
-
|
1598
|
-
var functionalReplace = typeof replaceValue === 'function';
|
1599
|
-
if (!functionalReplace) replaceValue = String(replaceValue);
|
2010
|
+
var functionalReplace = isCallable(replaceValue);
|
2011
|
+
if (!functionalReplace) replaceValue = toString_1(replaceValue);
|
1600
2012
|
|
1601
2013
|
var global = rx.global;
|
1602
2014
|
if (global) {
|
@@ -1608,10 +2020,10 @@
|
|
1608
2020
|
var result = regexpExecAbstract(rx, S);
|
1609
2021
|
if (result === null) break;
|
1610
2022
|
|
1611
|
-
|
2023
|
+
push(results, result);
|
1612
2024
|
if (!global) break;
|
1613
2025
|
|
1614
|
-
var matchStr =
|
2026
|
+
var matchStr = toString_1(result[0]);
|
1615
2027
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1616
2028
|
}
|
1617
2029
|
|
@@ -1620,38 +2032,32 @@
|
|
1620
2032
|
for (var i = 0; i < results.length; i++) {
|
1621
2033
|
result = results[i];
|
1622
2034
|
|
1623
|
-
var matched =
|
1624
|
-
var position = max$1(min(
|
2035
|
+
var matched = toString_1(result[0]);
|
2036
|
+
var position = max$1(min(toIntegerOrInfinity(result.index), S.length), 0);
|
1625
2037
|
var captures = [];
|
1626
2038
|
// NOTE: This is equivalent to
|
1627
2039
|
// captures = result.slice(1).map(maybeToString)
|
1628
2040
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
1629
2041
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
1630
2042
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
1631
|
-
for (var j = 1; j < result.length; j++)
|
2043
|
+
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
1632
2044
|
var namedCaptures = result.groups;
|
1633
2045
|
if (functionalReplace) {
|
1634
|
-
var replacerArgs = [matched]
|
1635
|
-
if (namedCaptures !== undefined)
|
1636
|
-
var replacement =
|
2046
|
+
var replacerArgs = concat$1([matched], captures, position, S);
|
2047
|
+
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
2048
|
+
var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs));
|
1637
2049
|
} else {
|
1638
2050
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
1639
2051
|
}
|
1640
2052
|
if (position >= nextSourcePosition) {
|
1641
|
-
accumulatedResult += S
|
2053
|
+
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
1642
2054
|
nextSourcePosition = position + matched.length;
|
1643
2055
|
}
|
1644
2056
|
}
|
1645
|
-
return accumulatedResult + S
|
2057
|
+
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
1646
2058
|
}
|
1647
2059
|
];
|
1648
|
-
});
|
1649
|
-
|
1650
|
-
var createProperty = function (object, key, value) {
|
1651
|
-
var propertyKey = toPrimitive(key);
|
1652
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
1653
|
-
else object[propertyKey] = value;
|
1654
|
-
};
|
2060
|
+
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
1655
2061
|
|
1656
2062
|
var SPECIES$1 = wellKnownSymbol('species');
|
1657
2063
|
|
@@ -1669,10 +2075,12 @@
|
|
1669
2075
|
});
|
1670
2076
|
};
|
1671
2077
|
|
2078
|
+
var arraySlice = functionUncurryThis([].slice);
|
2079
|
+
|
1672
2080
|
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');
|
1673
2081
|
|
1674
2082
|
var SPECIES = wellKnownSymbol('species');
|
1675
|
-
var
|
2083
|
+
var Array$1 = global_1.Array;
|
1676
2084
|
var max = Math.max;
|
1677
2085
|
|
1678
2086
|
// `Array.prototype.slice` method
|
@@ -1681,7 +2089,7 @@
|
|
1681
2089
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
|
1682
2090
|
slice: function slice(start, end) {
|
1683
2091
|
var O = toIndexedObject(this);
|
1684
|
-
var length =
|
2092
|
+
var length = lengthOfArrayLike(O);
|
1685
2093
|
var k = toAbsoluteIndex(start, length);
|
1686
2094
|
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
1687
2095
|
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
@@ -1689,17 +2097,17 @@
|
|
1689
2097
|
if (isArray(O)) {
|
1690
2098
|
Constructor = O.constructor;
|
1691
2099
|
// cross-realm fallback
|
1692
|
-
if (
|
2100
|
+
if (isConstructor(Constructor) && (Constructor === Array$1 || isArray(Constructor.prototype))) {
|
1693
2101
|
Constructor = undefined;
|
1694
2102
|
} else if (isObject(Constructor)) {
|
1695
2103
|
Constructor = Constructor[SPECIES];
|
1696
2104
|
if (Constructor === null) Constructor = undefined;
|
1697
2105
|
}
|
1698
|
-
if (Constructor === Array || Constructor === undefined) {
|
1699
|
-
return
|
2106
|
+
if (Constructor === Array$1 || Constructor === undefined) {
|
2107
|
+
return arraySlice(O, k, fin);
|
1700
2108
|
}
|
1701
2109
|
}
|
1702
|
-
result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
|
2110
|
+
result = new (Constructor === undefined ? Array$1 : Constructor)(max(fin - k, 0));
|
1703
2111
|
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
1704
2112
|
result.length = n;
|
1705
2113
|
return result;
|
@@ -1720,10 +2128,11 @@
|
|
1720
2128
|
}
|
1721
2129
|
});
|
1722
2130
|
|
1723
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
2131
|
+
// eslint-disable-next-line es-x/no-object-assign -- safe
|
1724
2132
|
var $assign = Object.assign;
|
1725
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
2133
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
1726
2134
|
var defineProperty = Object.defineProperty;
|
2135
|
+
var concat = functionUncurryThis([].concat);
|
1727
2136
|
|
1728
2137
|
// `Object.assign` method
|
1729
2138
|
// https://tc39.es/ecma262/#sec-object.assign
|
@@ -1741,7 +2150,7 @@
|
|
1741
2150
|
// should work with symbols and should have deterministic property order (V8 bug)
|
1742
2151
|
var A = {};
|
1743
2152
|
var B = {};
|
1744
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
2153
|
+
// eslint-disable-next-line es-x/no-symbol -- safe
|
1745
2154
|
var symbol = Symbol();
|
1746
2155
|
var alphabet = 'abcdefghijklmnopqrst';
|
1747
2156
|
A[symbol] = 7;
|
@@ -1755,27 +2164,28 @@
|
|
1755
2164
|
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
1756
2165
|
while (argumentsLength > index) {
|
1757
2166
|
var S = indexedObject(arguments[index++]);
|
1758
|
-
var keys = getOwnPropertySymbols ? objectKeys(S)
|
2167
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
1759
2168
|
var length = keys.length;
|
1760
2169
|
var j = 0;
|
1761
2170
|
var key;
|
1762
2171
|
while (length > j) {
|
1763
2172
|
key = keys[j++];
|
1764
|
-
if (!descriptors || propertyIsEnumerable
|
2173
|
+
if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
|
1765
2174
|
}
|
1766
2175
|
} return T;
|
1767
2176
|
} : $assign;
|
1768
2177
|
|
1769
2178
|
// `Object.assign` method
|
1770
2179
|
// https://tc39.es/ecma262/#sec-object.assign
|
1771
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
1772
|
-
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
2180
|
+
// eslint-disable-next-line es-x/no-object-assign -- required for testing
|
2181
|
+
_export({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== objectAssign }, {
|
1773
2182
|
assign: objectAssign
|
1774
2183
|
});
|
1775
2184
|
|
1776
2185
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
1777
2186
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
1778
2187
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
2188
|
+
var TypeError$1 = global_1.TypeError;
|
1779
2189
|
|
1780
2190
|
// We can't use this feature detection in V8 since it causes
|
1781
2191
|
// deoptimization and serious performance degradation
|
@@ -1799,7 +2209,7 @@
|
|
1799
2209
|
// `Array.prototype.concat` method
|
1800
2210
|
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
1801
2211
|
// with adding support of @@isConcatSpreadable and @@species
|
1802
|
-
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
2212
|
+
_export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
1803
2213
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
1804
2214
|
concat: function concat(arg) {
|
1805
2215
|
var O = toObject(this);
|
@@ -1809,11 +2219,11 @@
|
|
1809
2219
|
for (i = -1, length = arguments.length; i < length; i++) {
|
1810
2220
|
E = i === -1 ? O : arguments[i];
|
1811
2221
|
if (isConcatSpreadable(E)) {
|
1812
|
-
len =
|
1813
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
2222
|
+
len = lengthOfArrayLike(E);
|
2223
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1814
2224
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
1815
2225
|
} else {
|
1816
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
2226
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1817
2227
|
createProperty(A, n++, E);
|
1818
2228
|
}
|
1819
2229
|
}
|
@@ -1825,12 +2235,12 @@
|
|
1825
2235
|
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
1826
2236
|
var method = [][METHOD_NAME];
|
1827
2237
|
return !!method && fails(function () {
|
1828
|
-
// eslint-disable-next-line no-useless-call
|
1829
|
-
method.call(null, argument || function () {
|
2238
|
+
// eslint-disable-next-line no-useless-call -- required for testing
|
2239
|
+
method.call(null, argument || function () { return 1; }, 1);
|
1830
2240
|
});
|
1831
2241
|
};
|
1832
2242
|
|
1833
|
-
var
|
2243
|
+
var un$Join = functionUncurryThis([].join);
|
1834
2244
|
|
1835
2245
|
var ES3_STRINGS = indexedObject != Object;
|
1836
2246
|
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
@@ -1839,7 +2249,7 @@
|
|
1839
2249
|
// https://tc39.es/ecma262/#sec-array.prototype.join
|
1840
2250
|
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
1841
2251
|
join: function join(separator) {
|
1842
|
-
return
|
2252
|
+
return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
|
1843
2253
|
}
|
1844
2254
|
});
|
1845
2255
|
|
@@ -1879,6 +2289,14 @@
|
|
1879
2289
|
TouchList: 0
|
1880
2290
|
};
|
1881
2291
|
|
2292
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
2293
|
+
|
2294
|
+
|
2295
|
+
var classList = documentCreateElement('span').classList;
|
2296
|
+
var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
|
2297
|
+
|
2298
|
+
var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
|
2299
|
+
|
1882
2300
|
var $forEach = arrayIteration.forEach;
|
1883
2301
|
|
1884
2302
|
|
@@ -1888,26 +2306,32 @@
|
|
1888
2306
|
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
1889
2307
|
var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
1890
2308
|
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1891
|
-
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
2309
|
+
// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
|
1892
2310
|
} : [].forEach;
|
1893
2311
|
|
1894
|
-
|
1895
|
-
var Collection = global_1[COLLECTION_NAME];
|
1896
|
-
var CollectionPrototype = Collection && Collection.prototype;
|
2312
|
+
var handlePrototype = function (CollectionPrototype) {
|
1897
2313
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
1898
2314
|
if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
|
1899
2315
|
createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
|
1900
2316
|
} catch (error) {
|
1901
2317
|
CollectionPrototype.forEach = arrayForEach;
|
1902
2318
|
}
|
2319
|
+
};
|
2320
|
+
|
2321
|
+
for (var COLLECTION_NAME in domIterables) {
|
2322
|
+
if (domIterables[COLLECTION_NAME]) {
|
2323
|
+
handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype);
|
2324
|
+
}
|
1903
2325
|
}
|
1904
2326
|
|
2327
|
+
handlePrototype(domTokenListPrototype);
|
2328
|
+
|
1905
2329
|
/**
|
1906
2330
|
* @author zhixin wen <wenzhixin2010@gmail.com>
|
1907
2331
|
* extensions: https://github.com/hhurz/tableExport.jquery.plugin
|
1908
2332
|
*/
|
1909
2333
|
|
1910
|
-
var Utils = $__default[
|
2334
|
+
var Utils = $__default["default"].fn.bootstrapTable.utils;
|
1911
2335
|
var TYPE_NAME = {
|
1912
2336
|
json: 'JSON',
|
1913
2337
|
xml: 'XML',
|
@@ -1921,7 +2345,7 @@
|
|
1921
2345
|
powerpoint: 'MS-Powerpoint',
|
1922
2346
|
pdf: 'PDF'
|
1923
2347
|
};
|
1924
|
-
$__default[
|
2348
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
|
1925
2349
|
showExport: false,
|
1926
2350
|
exportDataType: 'basic',
|
1927
2351
|
// basic, all, selected
|
@@ -1937,36 +2361,36 @@
|
|
1937
2361
|
},
|
1938
2362
|
exportFooter: false
|
1939
2363
|
});
|
1940
|
-
$__default[
|
2364
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.columnDefaults, {
|
1941
2365
|
forceExport: false,
|
1942
2366
|
forceHide: false
|
1943
2367
|
});
|
1944
|
-
$__default[
|
2368
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
|
1945
2369
|
export: {
|
1946
2370
|
bootstrap3: 'glyphicon-export icon-share',
|
1947
2371
|
bootstrap5: 'bi-download',
|
1948
2372
|
materialize: 'file_download',
|
1949
2373
|
'bootstrap-table': 'icon-download'
|
1950
|
-
}[$__default[
|
2374
|
+
}[$__default["default"].fn.bootstrapTable.theme] || 'fa-download'
|
1951
2375
|
});
|
1952
|
-
$__default[
|
2376
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
|
1953
2377
|
formatExport: function formatExport() {
|
1954
2378
|
return 'Export data';
|
1955
2379
|
}
|
1956
2380
|
});
|
1957
|
-
$__default[
|
1958
|
-
$__default[
|
1959
|
-
$__default[
|
2381
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
|
2382
|
+
$__default["default"].fn.bootstrapTable.methods.push('exportTable');
|
2383
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
|
1960
2384
|
// eslint-disable-next-line no-unused-vars
|
1961
2385
|
onExportSaved: function onExportSaved(exportedRows) {
|
1962
2386
|
return false;
|
1963
2387
|
}
|
1964
2388
|
});
|
1965
|
-
$__default[
|
2389
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
|
1966
2390
|
'export-saved.bs.table': 'onExportSaved'
|
1967
2391
|
});
|
1968
2392
|
|
1969
|
-
$__default[
|
2393
|
+
$__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
|
1970
2394
|
_inherits(_class, _$$BootstrapTable);
|
1971
2395
|
|
1972
2396
|
var _super = _createSuper(_class);
|
@@ -1995,6 +2419,10 @@
|
|
1995
2419
|
});
|
1996
2420
|
}
|
1997
2421
|
|
2422
|
+
if (typeof o.exportOptions === 'string') {
|
2423
|
+
o.exportOptions = Utils.calculateObjectValue(null, o.exportOptions);
|
2424
|
+
}
|
2425
|
+
|
1998
2426
|
this.$export = this.$toolbar.find('>.columns div.export');
|
1999
2427
|
|
2000
2428
|
if (this.$export.length) {
|
@@ -2020,7 +2448,7 @@
|
|
2020
2448
|
var type = _step.value;
|
2021
2449
|
|
2022
2450
|
if (TYPE_NAME.hasOwnProperty(type)) {
|
2023
|
-
var $item = $__default[
|
2451
|
+
var $item = $__default["default"](Utils.sprintf(_this.constants.html.pageDropdownItem, '', TYPE_NAME[type]));
|
2024
2452
|
$item.attr('data-type', type);
|
2025
2453
|
html.push($item.prop('outerHTML'));
|
2026
2454
|
}
|
@@ -2051,9 +2479,15 @@
|
|
2051
2479
|
}
|
2052
2480
|
|
2053
2481
|
this.updateExportButton();
|
2054
|
-
this.$export.find('[data-type]')
|
2482
|
+
var $exportButtons = this.$export.find('[data-type]');
|
2483
|
+
|
2484
|
+
if (exportTypes.length === 1) {
|
2485
|
+
$exportButtons = this.$export;
|
2486
|
+
}
|
2487
|
+
|
2488
|
+
$exportButtons.click(function (e) {
|
2055
2489
|
e.preventDefault();
|
2056
|
-
var type = $__default[
|
2490
|
+
var type = $__default["default"](e.currentTarget).data('type');
|
2057
2491
|
var exportOptions = {
|
2058
2492
|
type: type,
|
2059
2493
|
escape: false
|
@@ -2110,8 +2544,8 @@
|
|
2110
2544
|
|
2111
2545
|
var footerData = {};
|
2112
2546
|
var footerHtml = [];
|
2113
|
-
$__default[
|
2114
|
-
var footerCellHtml = $__default[
|
2547
|
+
$__default["default"].each($footerRow.children(), function (index, footerCell) {
|
2548
|
+
var footerCellHtml = $__default["default"](footerCell).children('.th-inner').first().html();
|
2115
2549
|
footerData[_this2.columns[index].field] = footerCellHtml === ' ' ? null : footerCellHtml; // grab footer cell text into cell index-based array
|
2116
2550
|
|
2117
2551
|
footerHtml.push(footerCellHtml);
|
@@ -2121,8 +2555,8 @@
|
|
2121
2555
|
|
2122
2556
|
var $lastTableRow = _this2.$body.children().last();
|
2123
2557
|
|
2124
|
-
$__default[
|
2125
|
-
$__default[
|
2558
|
+
$__default["default"].each($lastTableRow.children(), function (index, lastTableRowCell) {
|
2559
|
+
$__default["default"](lastTableRowCell).html(footerHtml[index]);
|
2126
2560
|
});
|
2127
2561
|
}
|
2128
2562
|
|
@@ -2138,7 +2572,7 @@
|
|
2138
2572
|
options.fileName = o.exportOptions.fileName();
|
2139
2573
|
}
|
2140
2574
|
|
2141
|
-
_this2.$el.tableExport($__default[
|
2575
|
+
_this2.$el.tableExport($__default["default"].extend({
|
2142
2576
|
onAfterSaveToFile: function onAfterSaveToFile() {
|
2143
2577
|
if (o.exportFooter) {
|
2144
2578
|
_this2.load(data);
|
@@ -2238,6 +2672,6 @@
|
|
2238
2672
|
}]);
|
2239
2673
|
|
2240
2674
|
return _class;
|
2241
|
-
}($__default[
|
2675
|
+
}($__default["default"].BootstrapTable);
|
2242
2676
|
|
2243
|
-
}))
|
2677
|
+
}));
|