bootstrap-table-rails 1.18.1 → 1.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/Gemfile.lock +1 -1
- data/README.md +30 -132
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/.DS_Store +0 -0
- data/vendor/assets/.DS_Store +0 -0
- data/vendor/assets/javascripts/.DS_Store +0 -0
- data/vendor/assets/javascripts/bootstrap-table/.DS_Store +0 -0
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +196 -147
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +179 -990
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +180 -991
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +9 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +731 -1114
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +122 -35
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +115 -39
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +458 -911
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +124 -48
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +122 -43
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +66 -24
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +433 -977
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +460 -951
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +275 -140
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +176 -86
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +128 -48
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +164 -75
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +45 -11
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +136 -36
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +227 -141
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +148 -94
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +111 -35
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +93 -49
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +396 -999
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +144 -56
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +104 -33
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +283 -87
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +116 -40
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +456 -1034
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +278 -990
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +69 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +53 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +30 -20
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +8 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +114 -35
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +8 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +109 -30
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +8 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +113 -34
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +8 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +110 -31
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +8 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +107 -28
- metadata +6 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
|
4
|
-
(global = global || self, factory(global.jQuery));
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
|
|
5
5
|
}(this, (function ($) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
|
8
10
|
|
|
9
11
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
10
12
|
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
check(typeof self == 'object' && self) ||
|
|
25
27
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
26
28
|
// eslint-disable-next-line no-new-func
|
|
27
|
-
Function('return this')();
|
|
29
|
+
(function () { return this; })() || Function('return this')();
|
|
28
30
|
|
|
29
31
|
var fails = function (exec) {
|
|
30
32
|
try {
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
|
|
37
39
|
// Thank's IE8 for his funny defineProperty
|
|
38
40
|
var descriptors = !fails(function () {
|
|
39
|
-
return Object.defineProperty({},
|
|
41
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
40
42
|
});
|
|
41
43
|
|
|
42
44
|
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
|
@@ -217,9 +219,9 @@
|
|
|
217
219
|
(module.exports = function (key, value) {
|
|
218
220
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
219
221
|
})('versions', []).push({
|
|
220
|
-
version: '3.
|
|
222
|
+
version: '3.8.1',
|
|
221
223
|
mode: 'global',
|
|
222
|
-
copyright: '©
|
|
224
|
+
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
|
|
223
225
|
});
|
|
224
226
|
});
|
|
225
227
|
|
|
@@ -255,11 +257,12 @@
|
|
|
255
257
|
};
|
|
256
258
|
|
|
257
259
|
if (nativeWeakMap) {
|
|
258
|
-
var store$1 = new WeakMap$1();
|
|
260
|
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
|
|
259
261
|
var wmget = store$1.get;
|
|
260
262
|
var wmhas = store$1.has;
|
|
261
263
|
var wmset = store$1.set;
|
|
262
264
|
set = function (it, metadata) {
|
|
265
|
+
metadata.facade = it;
|
|
263
266
|
wmset.call(store$1, it, metadata);
|
|
264
267
|
return metadata;
|
|
265
268
|
};
|
|
@@ -273,6 +276,7 @@
|
|
|
273
276
|
var STATE = sharedKey('state');
|
|
274
277
|
hiddenKeys[STATE] = true;
|
|
275
278
|
set = function (it, metadata) {
|
|
279
|
+
metadata.facade = it;
|
|
276
280
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
277
281
|
return metadata;
|
|
278
282
|
};
|
|
@@ -301,9 +305,15 @@
|
|
|
301
305
|
var unsafe = options ? !!options.unsafe : false;
|
|
302
306
|
var simple = options ? !!options.enumerable : false;
|
|
303
307
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
308
|
+
var state;
|
|
304
309
|
if (typeof value == 'function') {
|
|
305
|
-
if (typeof key == 'string' && !has(value, 'name'))
|
|
306
|
-
|
|
310
|
+
if (typeof key == 'string' && !has(value, 'name')) {
|
|
311
|
+
createNonEnumerableProperty(value, 'name', key);
|
|
312
|
+
}
|
|
313
|
+
state = enforceInternalState(value);
|
|
314
|
+
if (!state.source) {
|
|
315
|
+
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
|
316
|
+
}
|
|
307
317
|
}
|
|
308
318
|
if (O === global_1) {
|
|
309
319
|
if (simple) O[key] = value;
|
|
@@ -526,18 +536,6 @@
|
|
|
526
536
|
}
|
|
527
537
|
};
|
|
528
538
|
|
|
529
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
530
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
531
|
-
// eslint-disable-next-line no-undef
|
|
532
|
-
return !String(Symbol());
|
|
533
|
-
});
|
|
534
|
-
|
|
535
|
-
var useSymbolAsUid = nativeSymbol
|
|
536
|
-
// eslint-disable-next-line no-undef
|
|
537
|
-
&& !Symbol.sham
|
|
538
|
-
// eslint-disable-next-line no-undef
|
|
539
|
-
&& typeof Symbol() == 'symbol';
|
|
540
|
-
|
|
541
539
|
// `IsArray` abstract operation
|
|
542
540
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
543
541
|
var isArray = Array.isArray || function isArray(arg) {
|
|
@@ -550,126 +548,27 @@
|
|
|
550
548
|
return Object(requireObjectCoercible(argument));
|
|
551
549
|
};
|
|
552
550
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
// `Object.defineProperties` method
|
|
560
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
561
|
-
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
562
|
-
anObject(O);
|
|
563
|
-
var keys = objectKeys(Properties);
|
|
564
|
-
var length = keys.length;
|
|
565
|
-
var index = 0;
|
|
566
|
-
var key;
|
|
567
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
|
568
|
-
return O;
|
|
569
|
-
};
|
|
570
|
-
|
|
571
|
-
var html = getBuiltIn('document', 'documentElement');
|
|
572
|
-
|
|
573
|
-
var GT = '>';
|
|
574
|
-
var LT = '<';
|
|
575
|
-
var PROTOTYPE = 'prototype';
|
|
576
|
-
var SCRIPT = 'script';
|
|
577
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
578
|
-
|
|
579
|
-
var EmptyConstructor = function () { /* empty */ };
|
|
580
|
-
|
|
581
|
-
var scriptTag = function (content) {
|
|
582
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
586
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
587
|
-
activeXDocument.write(scriptTag(''));
|
|
588
|
-
activeXDocument.close();
|
|
589
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
590
|
-
activeXDocument = null; // avoid memory leak
|
|
591
|
-
return temp;
|
|
592
|
-
};
|
|
593
|
-
|
|
594
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
595
|
-
var NullProtoObjectViaIFrame = function () {
|
|
596
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
597
|
-
var iframe = documentCreateElement('iframe');
|
|
598
|
-
var JS = 'java' + SCRIPT + ':';
|
|
599
|
-
var iframeDocument;
|
|
600
|
-
iframe.style.display = 'none';
|
|
601
|
-
html.appendChild(iframe);
|
|
602
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
603
|
-
iframe.src = String(JS);
|
|
604
|
-
iframeDocument = iframe.contentWindow.document;
|
|
605
|
-
iframeDocument.open();
|
|
606
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
607
|
-
iframeDocument.close();
|
|
608
|
-
return iframeDocument.F;
|
|
609
|
-
};
|
|
610
|
-
|
|
611
|
-
// Check for document.domain and active x support
|
|
612
|
-
// No need to use active x approach when document.domain is not set
|
|
613
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
614
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
615
|
-
// avoid IE GC bug
|
|
616
|
-
var activeXDocument;
|
|
617
|
-
var NullProtoObject = function () {
|
|
618
|
-
try {
|
|
619
|
-
/* global ActiveXObject */
|
|
620
|
-
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
|
621
|
-
} catch (error) { /* ignore */ }
|
|
622
|
-
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
|
623
|
-
var length = enumBugKeys.length;
|
|
624
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
625
|
-
return NullProtoObject();
|
|
626
|
-
};
|
|
627
|
-
|
|
628
|
-
hiddenKeys[IE_PROTO] = true;
|
|
629
|
-
|
|
630
|
-
// `Object.create` method
|
|
631
|
-
// https://tc39.github.io/ecma262/#sec-object.create
|
|
632
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
633
|
-
var result;
|
|
634
|
-
if (O !== null) {
|
|
635
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
636
|
-
result = new EmptyConstructor();
|
|
637
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
638
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
639
|
-
result[IE_PROTO] = O;
|
|
640
|
-
} else result = NullProtoObject();
|
|
641
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
645
|
-
|
|
646
|
-
var toString$1 = {}.toString;
|
|
647
|
-
|
|
648
|
-
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
649
|
-
? Object.getOwnPropertyNames(window) : [];
|
|
650
|
-
|
|
651
|
-
var getWindowNames = function (it) {
|
|
652
|
-
try {
|
|
653
|
-
return nativeGetOwnPropertyNames(it);
|
|
654
|
-
} catch (error) {
|
|
655
|
-
return windowNames.slice();
|
|
656
|
-
}
|
|
551
|
+
var createProperty = function (object, key, value) {
|
|
552
|
+
var propertyKey = toPrimitive(key);
|
|
553
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
554
|
+
else object[propertyKey] = value;
|
|
657
555
|
};
|
|
658
556
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
};
|
|
557
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
558
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
559
|
+
// eslint-disable-next-line no-undef
|
|
560
|
+
return !String(Symbol());
|
|
561
|
+
});
|
|
665
562
|
|
|
666
|
-
var
|
|
667
|
-
|
|
668
|
-
|
|
563
|
+
var useSymbolAsUid = nativeSymbol
|
|
564
|
+
// eslint-disable-next-line no-undef
|
|
565
|
+
&& !Symbol.sham
|
|
566
|
+
// eslint-disable-next-line no-undef
|
|
567
|
+
&& typeof Symbol.iterator == 'symbol';
|
|
669
568
|
|
|
670
569
|
var WellKnownSymbolsStore = shared('wks');
|
|
671
570
|
var Symbol$1 = global_1.Symbol;
|
|
672
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
|
571
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
673
572
|
|
|
674
573
|
var wellKnownSymbol = function (name) {
|
|
675
574
|
if (!has(WellKnownSymbolsStore, name)) {
|
|
@@ -678,32 +577,106 @@
|
|
|
678
577
|
} return WellKnownSymbolsStore[name];
|
|
679
578
|
};
|
|
680
579
|
|
|
681
|
-
var
|
|
580
|
+
var SPECIES = wellKnownSymbol('species');
|
|
682
581
|
|
|
683
|
-
|
|
684
|
-
|
|
582
|
+
// `ArraySpeciesCreate` abstract operation
|
|
583
|
+
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
584
|
+
var arraySpeciesCreate = function (originalArray, length) {
|
|
585
|
+
var C;
|
|
586
|
+
if (isArray(originalArray)) {
|
|
587
|
+
C = originalArray.constructor;
|
|
588
|
+
// cross-realm fallback
|
|
589
|
+
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
|
590
|
+
else if (isObject(C)) {
|
|
591
|
+
C = C[SPECIES];
|
|
592
|
+
if (C === null) C = undefined;
|
|
593
|
+
}
|
|
594
|
+
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
685
595
|
};
|
|
686
596
|
|
|
687
|
-
var
|
|
597
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
598
|
+
|
|
599
|
+
var process = global_1.process;
|
|
600
|
+
var versions = process && process.versions;
|
|
601
|
+
var v8 = versions && versions.v8;
|
|
602
|
+
var match, version;
|
|
688
603
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
604
|
+
if (v8) {
|
|
605
|
+
match = v8.split('.');
|
|
606
|
+
version = match[0] + match[1];
|
|
607
|
+
} else if (engineUserAgent) {
|
|
608
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
609
|
+
if (!match || match[1] >= 74) {
|
|
610
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
611
|
+
if (match) version = match[1];
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
var engineV8Version = version && +version;
|
|
616
|
+
|
|
617
|
+
var SPECIES$1 = wellKnownSymbol('species');
|
|
618
|
+
|
|
619
|
+
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
|
620
|
+
// We can't use this feature detection in V8 since it causes
|
|
621
|
+
// deoptimization and serious performance degradation
|
|
622
|
+
// https://github.com/zloirock/core-js/issues/677
|
|
623
|
+
return engineV8Version >= 51 || !fails(function () {
|
|
624
|
+
var array = [];
|
|
625
|
+
var constructor = array.constructor = {};
|
|
626
|
+
constructor[SPECIES$1] = function () {
|
|
627
|
+
return { foo: 1 };
|
|
628
|
+
};
|
|
629
|
+
return array[METHOD_NAME](Boolean).foo !== 1;
|
|
693
630
|
});
|
|
694
631
|
};
|
|
695
632
|
|
|
696
|
-
var
|
|
633
|
+
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
|
634
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
|
635
|
+
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
|
697
636
|
|
|
637
|
+
// We can't use this feature detection in V8 since it causes
|
|
638
|
+
// deoptimization and serious performance degradation
|
|
639
|
+
// https://github.com/zloirock/core-js/issues/679
|
|
640
|
+
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
|
|
641
|
+
var array = [];
|
|
642
|
+
array[IS_CONCAT_SPREADABLE] = false;
|
|
643
|
+
return array.concat()[0] !== array;
|
|
644
|
+
});
|
|
698
645
|
|
|
646
|
+
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
|
699
647
|
|
|
700
|
-
var
|
|
648
|
+
var isConcatSpreadable = function (O) {
|
|
649
|
+
if (!isObject(O)) return false;
|
|
650
|
+
var spreadable = O[IS_CONCAT_SPREADABLE];
|
|
651
|
+
return spreadable !== undefined ? !!spreadable : isArray(O);
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
|
701
655
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
656
|
+
// `Array.prototype.concat` method
|
|
657
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
|
658
|
+
// with adding support of @@isConcatSpreadable and @@species
|
|
659
|
+
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
|
660
|
+
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
|
661
|
+
var O = toObject(this);
|
|
662
|
+
var A = arraySpeciesCreate(O, 0);
|
|
663
|
+
var n = 0;
|
|
664
|
+
var i, k, length, len, E;
|
|
665
|
+
for (i = -1, length = arguments.length; i < length; i++) {
|
|
666
|
+
E = i === -1 ? O : arguments[i];
|
|
667
|
+
if (isConcatSpreadable(E)) {
|
|
668
|
+
len = toLength(E.length);
|
|
669
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
670
|
+
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
671
|
+
} else {
|
|
672
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
673
|
+
createProperty(A, n++, E);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
A.length = n;
|
|
677
|
+
return A;
|
|
705
678
|
}
|
|
706
|
-
};
|
|
679
|
+
});
|
|
707
680
|
|
|
708
681
|
var aFunction$1 = function (it) {
|
|
709
682
|
if (typeof it != 'function') {
|
|
@@ -712,7 +685,7 @@
|
|
|
712
685
|
};
|
|
713
686
|
|
|
714
687
|
// optional / simple context binding
|
|
715
|
-
var
|
|
688
|
+
var functionBindContext = function (fn, that, length) {
|
|
716
689
|
aFunction$1(fn);
|
|
717
690
|
if (that === undefined) return fn;
|
|
718
691
|
switch (length) {
|
|
@@ -734,41 +707,25 @@
|
|
|
734
707
|
};
|
|
735
708
|
};
|
|
736
709
|
|
|
737
|
-
var SPECIES = wellKnownSymbol('species');
|
|
738
|
-
|
|
739
|
-
// `ArraySpeciesCreate` abstract operation
|
|
740
|
-
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
741
|
-
var arraySpeciesCreate = function (originalArray, length) {
|
|
742
|
-
var C;
|
|
743
|
-
if (isArray(originalArray)) {
|
|
744
|
-
C = originalArray.constructor;
|
|
745
|
-
// cross-realm fallback
|
|
746
|
-
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
|
747
|
-
else if (isObject(C)) {
|
|
748
|
-
C = C[SPECIES];
|
|
749
|
-
if (C === null) C = undefined;
|
|
750
|
-
}
|
|
751
|
-
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
752
|
-
};
|
|
753
|
-
|
|
754
710
|
var push = [].push;
|
|
755
711
|
|
|
756
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
|
712
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
|
|
757
713
|
var createMethod$1 = function (TYPE) {
|
|
758
714
|
var IS_MAP = TYPE == 1;
|
|
759
715
|
var IS_FILTER = TYPE == 2;
|
|
760
716
|
var IS_SOME = TYPE == 3;
|
|
761
717
|
var IS_EVERY = TYPE == 4;
|
|
762
718
|
var IS_FIND_INDEX = TYPE == 6;
|
|
719
|
+
var IS_FILTER_OUT = TYPE == 7;
|
|
763
720
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
764
721
|
return function ($this, callbackfn, that, specificCreate) {
|
|
765
722
|
var O = toObject($this);
|
|
766
723
|
var self = indexedObject(O);
|
|
767
|
-
var boundFunction =
|
|
724
|
+
var boundFunction = functionBindContext(callbackfn, that, 3);
|
|
768
725
|
var length = toLength(self.length);
|
|
769
726
|
var index = 0;
|
|
770
727
|
var create = specificCreate || arraySpeciesCreate;
|
|
771
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
|
728
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
|
|
772
729
|
var value, result;
|
|
773
730
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
774
731
|
value = self[index];
|
|
@@ -780,7 +737,10 @@
|
|
|
780
737
|
case 5: return value; // find
|
|
781
738
|
case 6: return index; // findIndex
|
|
782
739
|
case 2: push.call(target, value); // filter
|
|
783
|
-
} else
|
|
740
|
+
} else switch (TYPE) {
|
|
741
|
+
case 4: return false; // every
|
|
742
|
+
case 7: push.call(target, value); // filterOut
|
|
743
|
+
}
|
|
784
744
|
}
|
|
785
745
|
}
|
|
786
746
|
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
|
@@ -808,438 +768,143 @@
|
|
|
808
768
|
find: createMethod$1(5),
|
|
809
769
|
// `Array.prototype.findIndex` method
|
|
810
770
|
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
|
|
811
|
-
findIndex: createMethod$1(6)
|
|
771
|
+
findIndex: createMethod$1(6),
|
|
772
|
+
// `Array.prototype.filterOut` method
|
|
773
|
+
// https://github.com/tc39/proposal-array-filtering
|
|
774
|
+
filterOut: createMethod$1(7)
|
|
812
775
|
};
|
|
813
776
|
|
|
814
|
-
var
|
|
777
|
+
var defineProperty = Object.defineProperty;
|
|
778
|
+
var cache = {};
|
|
815
779
|
|
|
816
|
-
var
|
|
817
|
-
var SYMBOL = 'Symbol';
|
|
818
|
-
var PROTOTYPE$1 = 'prototype';
|
|
819
|
-
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
820
|
-
var setInternalState = internalState.set;
|
|
821
|
-
var getInternalState = internalState.getterFor(SYMBOL);
|
|
822
|
-
var ObjectPrototype = Object[PROTOTYPE$1];
|
|
823
|
-
var $Symbol = global_1.Symbol;
|
|
824
|
-
var $stringify = getBuiltIn('JSON', 'stringify');
|
|
825
|
-
var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
826
|
-
var nativeDefineProperty$1 = objectDefineProperty.f;
|
|
827
|
-
var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
|
|
828
|
-
var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
|
|
829
|
-
var AllSymbols = shared('symbols');
|
|
830
|
-
var ObjectPrototypeSymbols = shared('op-symbols');
|
|
831
|
-
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
|
832
|
-
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
|
833
|
-
var WellKnownSymbolsStore$1 = shared('wks');
|
|
834
|
-
var QObject = global_1.QObject;
|
|
835
|
-
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
836
|
-
var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
|
|
837
|
-
|
|
838
|
-
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
|
839
|
-
var setSymbolDescriptor = descriptors && fails(function () {
|
|
840
|
-
return objectCreate(nativeDefineProperty$1({}, 'a', {
|
|
841
|
-
get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
|
|
842
|
-
})).a != 7;
|
|
843
|
-
}) ? function (O, P, Attributes) {
|
|
844
|
-
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype, P);
|
|
845
|
-
if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
|
|
846
|
-
nativeDefineProperty$1(O, P, Attributes);
|
|
847
|
-
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
|
|
848
|
-
nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);
|
|
849
|
-
}
|
|
850
|
-
} : nativeDefineProperty$1;
|
|
851
|
-
|
|
852
|
-
var wrap = function (tag, description) {
|
|
853
|
-
var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
|
|
854
|
-
setInternalState(symbol, {
|
|
855
|
-
type: SYMBOL,
|
|
856
|
-
tag: tag,
|
|
857
|
-
description: description
|
|
858
|
-
});
|
|
859
|
-
if (!descriptors) symbol.description = description;
|
|
860
|
-
return symbol;
|
|
861
|
-
};
|
|
780
|
+
var thrower = function (it) { throw it; };
|
|
862
781
|
|
|
863
|
-
var
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
|
|
871
|
-
anObject(O);
|
|
872
|
-
var key = toPrimitive(P, true);
|
|
873
|
-
anObject(Attributes);
|
|
874
|
-
if (has(AllSymbols, key)) {
|
|
875
|
-
if (!Attributes.enumerable) {
|
|
876
|
-
if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));
|
|
877
|
-
O[HIDDEN][key] = true;
|
|
878
|
-
} else {
|
|
879
|
-
if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
|
|
880
|
-
Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
|
|
881
|
-
} return setSymbolDescriptor(O, key, Attributes);
|
|
882
|
-
} return nativeDefineProperty$1(O, key, Attributes);
|
|
883
|
-
};
|
|
884
|
-
|
|
885
|
-
var $defineProperties = function defineProperties(O, Properties) {
|
|
886
|
-
anObject(O);
|
|
887
|
-
var properties = toIndexedObject(Properties);
|
|
888
|
-
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
|
889
|
-
$forEach(keys, function (key) {
|
|
890
|
-
if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
|
|
891
|
-
});
|
|
892
|
-
return O;
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
var $create = function create(O, Properties) {
|
|
896
|
-
return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
|
|
897
|
-
};
|
|
782
|
+
var arrayMethodUsesToLength = function (METHOD_NAME, options) {
|
|
783
|
+
if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
|
|
784
|
+
if (!options) options = {};
|
|
785
|
+
var method = [][METHOD_NAME];
|
|
786
|
+
var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
|
|
787
|
+
var argument0 = has(options, 0) ? options[0] : thrower;
|
|
788
|
+
var argument1 = has(options, 1) ? options[1] : undefined;
|
|
898
789
|
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
|
|
903
|
-
return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
|
|
904
|
-
};
|
|
790
|
+
return cache[METHOD_NAME] = !!method && !fails(function () {
|
|
791
|
+
if (ACCESSORS && !descriptors) return true;
|
|
792
|
+
var O = { length: -1 };
|
|
905
793
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
var key = toPrimitive(P, true);
|
|
909
|
-
if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
|
|
910
|
-
var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);
|
|
911
|
-
if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
|
|
912
|
-
descriptor.enumerable = true;
|
|
913
|
-
}
|
|
914
|
-
return descriptor;
|
|
915
|
-
};
|
|
794
|
+
if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
|
|
795
|
+
else O[1] = 1;
|
|
916
796
|
|
|
917
|
-
|
|
918
|
-
var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));
|
|
919
|
-
var result = [];
|
|
920
|
-
$forEach(names, function (key) {
|
|
921
|
-
if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
|
|
797
|
+
method.call(O, argument0, argument1);
|
|
922
798
|
});
|
|
923
|
-
return result;
|
|
924
|
-
};
|
|
925
|
-
|
|
926
|
-
var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
|
|
927
|
-
var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
|
|
928
|
-
var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
|
|
929
|
-
var result = [];
|
|
930
|
-
$forEach(names, function (key) {
|
|
931
|
-
if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
|
|
932
|
-
result.push(AllSymbols[key]);
|
|
933
|
-
}
|
|
934
|
-
});
|
|
935
|
-
return result;
|
|
936
799
|
};
|
|
937
800
|
|
|
938
|
-
|
|
939
|
-
// https://tc39.github.io/ecma262/#sec-symbol-constructor
|
|
940
|
-
if (!nativeSymbol) {
|
|
941
|
-
$Symbol = function Symbol() {
|
|
942
|
-
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
|
943
|
-
var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
|
|
944
|
-
var tag = uid(description);
|
|
945
|
-
var setter = function (value) {
|
|
946
|
-
if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
|
|
947
|
-
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
|
948
|
-
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
|
|
949
|
-
};
|
|
950
|
-
if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
|
951
|
-
return wrap(tag, description);
|
|
952
|
-
};
|
|
953
|
-
|
|
954
|
-
redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
|
|
955
|
-
return getInternalState(this).tag;
|
|
956
|
-
});
|
|
957
|
-
|
|
958
|
-
objectPropertyIsEnumerable.f = $propertyIsEnumerable;
|
|
959
|
-
objectDefineProperty.f = $defineProperty;
|
|
960
|
-
objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
|
|
961
|
-
objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
|
|
962
|
-
objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
|
|
963
|
-
|
|
964
|
-
if (descriptors) {
|
|
965
|
-
// https://github.com/tc39/proposal-Symbol-description
|
|
966
|
-
nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
|
|
967
|
-
configurable: true,
|
|
968
|
-
get: function description() {
|
|
969
|
-
return getInternalState(this).description;
|
|
970
|
-
}
|
|
971
|
-
});
|
|
972
|
-
{
|
|
973
|
-
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
if (!useSymbolAsUid) {
|
|
979
|
-
wrappedWellKnownSymbol.f = function (name) {
|
|
980
|
-
return wrap(wellKnownSymbol(name), name);
|
|
981
|
-
};
|
|
982
|
-
}
|
|
801
|
+
var $filter = arrayIteration.filter;
|
|
983
802
|
|
|
984
|
-
_export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
|
|
985
|
-
Symbol: $Symbol
|
|
986
|
-
});
|
|
987
803
|
|
|
988
|
-
$forEach(objectKeys(WellKnownSymbolsStore$1), function (name) {
|
|
989
|
-
defineWellKnownSymbol(name);
|
|
990
|
-
});
|
|
991
804
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
'for': function (key) {
|
|
996
|
-
var string = String(key);
|
|
997
|
-
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
|
998
|
-
var symbol = $Symbol(string);
|
|
999
|
-
StringToSymbolRegistry[string] = symbol;
|
|
1000
|
-
SymbolToStringRegistry[symbol] = string;
|
|
1001
|
-
return symbol;
|
|
1002
|
-
},
|
|
1003
|
-
// `Symbol.keyFor` method
|
|
1004
|
-
// https://tc39.github.io/ecma262/#sec-symbol.keyfor
|
|
1005
|
-
keyFor: function keyFor(sym) {
|
|
1006
|
-
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
|
1007
|
-
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
|
1008
|
-
},
|
|
1009
|
-
useSetter: function () { USE_SETTER = true; },
|
|
1010
|
-
useSimple: function () { USE_SETTER = false; }
|
|
1011
|
-
});
|
|
1012
|
-
|
|
1013
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
|
|
1014
|
-
// `Object.create` method
|
|
1015
|
-
// https://tc39.github.io/ecma262/#sec-object.create
|
|
1016
|
-
create: $create,
|
|
1017
|
-
// `Object.defineProperty` method
|
|
1018
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
1019
|
-
defineProperty: $defineProperty,
|
|
1020
|
-
// `Object.defineProperties` method
|
|
1021
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
1022
|
-
defineProperties: $defineProperties,
|
|
1023
|
-
// `Object.getOwnPropertyDescriptor` method
|
|
1024
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
|
|
1025
|
-
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
|
1026
|
-
});
|
|
1027
|
-
|
|
1028
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
|
|
1029
|
-
// `Object.getOwnPropertyNames` method
|
|
1030
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
|
1031
|
-
getOwnPropertyNames: $getOwnPropertyNames,
|
|
1032
|
-
// `Object.getOwnPropertySymbols` method
|
|
1033
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
|
|
1034
|
-
getOwnPropertySymbols: $getOwnPropertySymbols
|
|
1035
|
-
});
|
|
805
|
+
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
|
806
|
+
// Edge 14- issue
|
|
807
|
+
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
|
|
1036
808
|
|
|
1037
|
-
//
|
|
1038
|
-
// https://
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
809
|
+
// `Array.prototype.filter` method
|
|
810
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
|
811
|
+
// with adding support of @@species
|
|
812
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
|
813
|
+
filter: function filter(callbackfn /* , thisArg */) {
|
|
814
|
+
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
1042
815
|
}
|
|
1043
816
|
});
|
|
1044
817
|
|
|
1045
|
-
// `
|
|
1046
|
-
// https://tc39.github.io/ecma262/#sec-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
var symbol = $Symbol();
|
|
1050
|
-
// MS Edge converts symbol values to JSON as {}
|
|
1051
|
-
return $stringify([symbol]) != '[null]'
|
|
1052
|
-
// WebKit converts symbol values to JSON as null
|
|
1053
|
-
|| $stringify({ a: symbol }) != '{}'
|
|
1054
|
-
// V8 throws on boxed symbols
|
|
1055
|
-
|| $stringify(Object(symbol)) != '{}';
|
|
1056
|
-
});
|
|
1057
|
-
|
|
1058
|
-
_export({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
|
|
1059
|
-
// eslint-disable-next-line no-unused-vars
|
|
1060
|
-
stringify: function stringify(it, replacer, space) {
|
|
1061
|
-
var args = [it];
|
|
1062
|
-
var index = 1;
|
|
1063
|
-
var $replacer;
|
|
1064
|
-
while (arguments.length > index) args.push(arguments[index++]);
|
|
1065
|
-
$replacer = replacer;
|
|
1066
|
-
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
|
1067
|
-
if (!isArray(replacer)) replacer = function (key, value) {
|
|
1068
|
-
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
|
1069
|
-
if (!isSymbol(value)) return value;
|
|
1070
|
-
};
|
|
1071
|
-
args[1] = replacer;
|
|
1072
|
-
return $stringify.apply(null, args);
|
|
1073
|
-
}
|
|
1074
|
-
});
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
// `Symbol.prototype[@@toPrimitive]` method
|
|
1078
|
-
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
1079
|
-
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
|
|
1080
|
-
createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
|
|
1081
|
-
}
|
|
1082
|
-
// `Symbol.prototype[@@toStringTag]` property
|
|
1083
|
-
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
|
|
1084
|
-
setToStringTag($Symbol, SYMBOL);
|
|
1085
|
-
|
|
1086
|
-
hiddenKeys[HIDDEN] = true;
|
|
1087
|
-
|
|
1088
|
-
var defineProperty$2 = objectDefineProperty.f;
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
var NativeSymbol = global_1.Symbol;
|
|
1092
|
-
|
|
1093
|
-
if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
|
|
1094
|
-
// Safari 12 bug
|
|
1095
|
-
NativeSymbol().description !== undefined
|
|
1096
|
-
)) {
|
|
1097
|
-
var EmptyStringDescriptionStore = {};
|
|
1098
|
-
// wrap Symbol constructor for correct work with undefined description
|
|
1099
|
-
var SymbolWrapper = function Symbol() {
|
|
1100
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
|
|
1101
|
-
var result = this instanceof SymbolWrapper
|
|
1102
|
-
? new NativeSymbol(description)
|
|
1103
|
-
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
1104
|
-
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
1105
|
-
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
1106
|
-
return result;
|
|
1107
|
-
};
|
|
1108
|
-
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
1109
|
-
var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
|
|
1110
|
-
symbolPrototype.constructor = SymbolWrapper;
|
|
1111
|
-
|
|
1112
|
-
var symbolToString = symbolPrototype.toString;
|
|
1113
|
-
var native = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
1114
|
-
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
1115
|
-
defineProperty$2(symbolPrototype, 'description', {
|
|
1116
|
-
configurable: true,
|
|
1117
|
-
get: function description() {
|
|
1118
|
-
var symbol = isObject(this) ? this.valueOf() : this;
|
|
1119
|
-
var string = symbolToString.call(symbol);
|
|
1120
|
-
if (has(EmptyStringDescriptionStore, symbol)) return '';
|
|
1121
|
-
var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
|
|
1122
|
-
return desc === '' ? undefined : desc;
|
|
1123
|
-
}
|
|
1124
|
-
});
|
|
1125
|
-
|
|
1126
|
-
_export({ global: true, forced: true }, {
|
|
1127
|
-
Symbol: SymbolWrapper
|
|
1128
|
-
});
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
// `Symbol.iterator` well-known symbol
|
|
1132
|
-
// https://tc39.github.io/ecma262/#sec-symbol.iterator
|
|
1133
|
-
defineWellKnownSymbol('iterator');
|
|
1134
|
-
|
|
1135
|
-
var createProperty = function (object, key, value) {
|
|
1136
|
-
var propertyKey = toPrimitive(key);
|
|
1137
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
1138
|
-
else object[propertyKey] = value;
|
|
1139
|
-
};
|
|
1140
|
-
|
|
1141
|
-
var userAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
1142
|
-
|
|
1143
|
-
var process = global_1.process;
|
|
1144
|
-
var versions = process && process.versions;
|
|
1145
|
-
var v8 = versions && versions.v8;
|
|
1146
|
-
var match, version;
|
|
1147
|
-
|
|
1148
|
-
if (v8) {
|
|
1149
|
-
match = v8.split('.');
|
|
1150
|
-
version = match[0] + match[1];
|
|
1151
|
-
} else if (userAgent) {
|
|
1152
|
-
match = userAgent.match(/Edge\/(\d+)/);
|
|
1153
|
-
if (!match || match[1] >= 74) {
|
|
1154
|
-
match = userAgent.match(/Chrome\/(\d+)/);
|
|
1155
|
-
if (match) version = match[1];
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
var v8Version = version && +version;
|
|
1160
|
-
|
|
1161
|
-
var SPECIES$1 = wellKnownSymbol('species');
|
|
1162
|
-
|
|
1163
|
-
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
|
1164
|
-
// We can't use this feature detection in V8 since it causes
|
|
1165
|
-
// deoptimization and serious performance degradation
|
|
1166
|
-
// https://github.com/zloirock/core-js/issues/677
|
|
1167
|
-
return v8Version >= 51 || !fails(function () {
|
|
1168
|
-
var array = [];
|
|
1169
|
-
var constructor = array.constructor = {};
|
|
1170
|
-
constructor[SPECIES$1] = function () {
|
|
1171
|
-
return { foo: 1 };
|
|
1172
|
-
};
|
|
1173
|
-
return array[METHOD_NAME](Boolean).foo !== 1;
|
|
1174
|
-
});
|
|
818
|
+
// `Object.keys` method
|
|
819
|
+
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
820
|
+
var objectKeys = Object.keys || function keys(O) {
|
|
821
|
+
return objectKeysInternal(O, enumBugKeys);
|
|
1175
822
|
};
|
|
1176
823
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
var
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
return array.concat()[0] !== array;
|
|
1188
|
-
});
|
|
1189
|
-
|
|
1190
|
-
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
|
1191
|
-
|
|
1192
|
-
var isConcatSpreadable = function (O) {
|
|
1193
|
-
if (!isObject(O)) return false;
|
|
1194
|
-
var spreadable = O[IS_CONCAT_SPREADABLE];
|
|
1195
|
-
return spreadable !== undefined ? !!spreadable : isArray(O);
|
|
824
|
+
// `Object.defineProperties` method
|
|
825
|
+
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
826
|
+
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
827
|
+
anObject(O);
|
|
828
|
+
var keys = objectKeys(Properties);
|
|
829
|
+
var length = keys.length;
|
|
830
|
+
var index = 0;
|
|
831
|
+
var key;
|
|
832
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
|
833
|
+
return O;
|
|
1196
834
|
};
|
|
1197
835
|
|
|
1198
|
-
var
|
|
1199
|
-
|
|
1200
|
-
// `Array.prototype.concat` method
|
|
1201
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
|
1202
|
-
// with adding support of @@isConcatSpreadable and @@species
|
|
1203
|
-
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
|
1204
|
-
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
|
1205
|
-
var O = toObject(this);
|
|
1206
|
-
var A = arraySpeciesCreate(O, 0);
|
|
1207
|
-
var n = 0;
|
|
1208
|
-
var i, k, length, len, E;
|
|
1209
|
-
for (i = -1, length = arguments.length; i < length; i++) {
|
|
1210
|
-
E = i === -1 ? O : arguments[i];
|
|
1211
|
-
if (isConcatSpreadable(E)) {
|
|
1212
|
-
len = toLength(E.length);
|
|
1213
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1214
|
-
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
1215
|
-
} else {
|
|
1216
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1217
|
-
createProperty(A, n++, E);
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
A.length = n;
|
|
1221
|
-
return A;
|
|
1222
|
-
}
|
|
1223
|
-
});
|
|
836
|
+
var html = getBuiltIn('document', 'documentElement');
|
|
1224
837
|
|
|
1225
|
-
var
|
|
838
|
+
var GT = '>';
|
|
839
|
+
var LT = '<';
|
|
840
|
+
var PROTOTYPE = 'prototype';
|
|
841
|
+
var SCRIPT = 'script';
|
|
842
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1226
843
|
|
|
844
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
1227
845
|
|
|
846
|
+
var scriptTag = function (content) {
|
|
847
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
848
|
+
};
|
|
1228
849
|
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
850
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
851
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
852
|
+
activeXDocument.write(scriptTag(''));
|
|
853
|
+
activeXDocument.close();
|
|
854
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
855
|
+
activeXDocument = null; // avoid memory leak
|
|
856
|
+
return temp;
|
|
857
|
+
};
|
|
1234
858
|
|
|
1235
|
-
// `
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
859
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
860
|
+
var NullProtoObjectViaIFrame = function () {
|
|
861
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
862
|
+
var iframe = documentCreateElement('iframe');
|
|
863
|
+
var JS = 'java' + SCRIPT + ':';
|
|
864
|
+
var iframeDocument;
|
|
865
|
+
iframe.style.display = 'none';
|
|
866
|
+
html.appendChild(iframe);
|
|
867
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
868
|
+
iframe.src = String(JS);
|
|
869
|
+
iframeDocument = iframe.contentWindow.document;
|
|
870
|
+
iframeDocument.open();
|
|
871
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
872
|
+
iframeDocument.close();
|
|
873
|
+
return iframeDocument.F;
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
// Check for document.domain and active x support
|
|
877
|
+
// No need to use active x approach when document.domain is not set
|
|
878
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
879
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
880
|
+
// avoid IE GC bug
|
|
881
|
+
var activeXDocument;
|
|
882
|
+
var NullProtoObject = function () {
|
|
883
|
+
try {
|
|
884
|
+
/* global ActiveXObject */
|
|
885
|
+
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
|
886
|
+
} catch (error) { /* ignore */ }
|
|
887
|
+
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
|
888
|
+
var length = enumBugKeys.length;
|
|
889
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
890
|
+
return NullProtoObject();
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
hiddenKeys[IE_PROTO] = true;
|
|
894
|
+
|
|
895
|
+
// `Object.create` method
|
|
896
|
+
// https://tc39.github.io/ecma262/#sec-object.create
|
|
897
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
898
|
+
var result;
|
|
899
|
+
if (O !== null) {
|
|
900
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
901
|
+
result = new EmptyConstructor();
|
|
902
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
903
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
904
|
+
result[IE_PROTO] = O;
|
|
905
|
+
} else result = NullProtoObject();
|
|
906
|
+
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
|
907
|
+
};
|
|
1243
908
|
|
|
1244
909
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
1245
910
|
var ArrayPrototype = Array.prototype;
|
|
@@ -1261,15 +926,18 @@
|
|
|
1261
926
|
var $find = arrayIteration.find;
|
|
1262
927
|
|
|
1263
928
|
|
|
929
|
+
|
|
1264
930
|
var FIND = 'find';
|
|
1265
931
|
var SKIPS_HOLES = true;
|
|
1266
932
|
|
|
933
|
+
var USES_TO_LENGTH$1 = arrayMethodUsesToLength(FIND);
|
|
934
|
+
|
|
1267
935
|
// Shouldn't skip holes
|
|
1268
936
|
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
|
1269
937
|
|
|
1270
938
|
// `Array.prototype.find` method
|
|
1271
939
|
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
|
1272
|
-
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
|
940
|
+
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$1 }, {
|
|
1273
941
|
find: function find(callbackfn /* , that = undefined */) {
|
|
1274
942
|
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
1275
943
|
}
|
|
@@ -1278,227 +946,41 @@
|
|
|
1278
946
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
1279
947
|
addToUnscopables(FIND);
|
|
1280
948
|
|
|
1281
|
-
var
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
|
1288
|
-
var ObjectPrototype$1 = Object.prototype;
|
|
1289
|
-
|
|
1290
|
-
// `Object.getPrototypeOf` method
|
|
1291
|
-
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
1292
|
-
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
|
1293
|
-
O = toObject(O);
|
|
1294
|
-
if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
|
|
1295
|
-
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
|
1296
|
-
return O.constructor.prototype;
|
|
1297
|
-
} return O instanceof Object ? ObjectPrototype$1 : null;
|
|
1298
|
-
};
|
|
1299
|
-
|
|
1300
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
1301
|
-
var BUGGY_SAFARI_ITERATORS = false;
|
|
1302
|
-
|
|
1303
|
-
var returnThis = function () { return this; };
|
|
1304
|
-
|
|
1305
|
-
// `%IteratorPrototype%` object
|
|
1306
|
-
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
|
1307
|
-
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1308
|
-
|
|
1309
|
-
if ([].keys) {
|
|
1310
|
-
arrayIterator = [].keys();
|
|
1311
|
-
// Safari 8 has buggy iterators w/o `next`
|
|
1312
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
|
|
1313
|
-
else {
|
|
1314
|
-
PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
|
|
1315
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
if (IteratorPrototype == undefined) IteratorPrototype = {};
|
|
1320
|
-
|
|
1321
|
-
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
1322
|
-
if ( !has(IteratorPrototype, ITERATOR)) {
|
|
1323
|
-
createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
var iteratorsCore = {
|
|
1327
|
-
IteratorPrototype: IteratorPrototype,
|
|
1328
|
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
|
1329
|
-
};
|
|
1330
|
-
|
|
1331
|
-
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
1332
|
-
|
|
1333
|
-
var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
|
|
1334
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1335
|
-
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
|
|
1336
|
-
setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
|
|
1337
|
-
return IteratorConstructor;
|
|
1338
|
-
};
|
|
1339
|
-
|
|
1340
|
-
var aPossiblePrototype = function (it) {
|
|
1341
|
-
if (!isObject(it) && it !== null) {
|
|
1342
|
-
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
|
1343
|
-
} return it;
|
|
949
|
+
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
950
|
+
var method = [][METHOD_NAME];
|
|
951
|
+
return !!method && fails(function () {
|
|
952
|
+
// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
953
|
+
method.call(null, argument || function () { throw 1; }, 1);
|
|
954
|
+
});
|
|
1344
955
|
};
|
|
1345
956
|
|
|
1346
|
-
|
|
1347
|
-
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
|
|
1348
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1349
|
-
/* eslint-disable no-proto */
|
|
1350
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1351
|
-
var CORRECT_SETTER = false;
|
|
1352
|
-
var test = {};
|
|
1353
|
-
var setter;
|
|
1354
|
-
try {
|
|
1355
|
-
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
|
1356
|
-
setter.call(test, []);
|
|
1357
|
-
CORRECT_SETTER = test instanceof Array;
|
|
1358
|
-
} catch (error) { /* empty */ }
|
|
1359
|
-
return function setPrototypeOf(O, proto) {
|
|
1360
|
-
anObject(O);
|
|
1361
|
-
aPossiblePrototype(proto);
|
|
1362
|
-
if (CORRECT_SETTER) setter.call(O, proto);
|
|
1363
|
-
else O.__proto__ = proto;
|
|
1364
|
-
return O;
|
|
1365
|
-
};
|
|
1366
|
-
}() : undefined);
|
|
1367
|
-
|
|
1368
|
-
var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
|
|
1369
|
-
var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1370
|
-
var ITERATOR$1 = wellKnownSymbol('iterator');
|
|
1371
|
-
var KEYS = 'keys';
|
|
1372
|
-
var VALUES = 'values';
|
|
1373
|
-
var ENTRIES = 'entries';
|
|
1374
|
-
|
|
1375
|
-
var returnThis$1 = function () { return this; };
|
|
1376
|
-
|
|
1377
|
-
var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
1378
|
-
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
1379
|
-
|
|
1380
|
-
var getIterationMethod = function (KIND) {
|
|
1381
|
-
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
1382
|
-
if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
1383
|
-
switch (KIND) {
|
|
1384
|
-
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
1385
|
-
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
1386
|
-
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
1387
|
-
} return function () { return new IteratorConstructor(this); };
|
|
1388
|
-
};
|
|
1389
|
-
|
|
1390
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1391
|
-
var INCORRECT_VALUES_NAME = false;
|
|
1392
|
-
var IterablePrototype = Iterable.prototype;
|
|
1393
|
-
var nativeIterator = IterablePrototype[ITERATOR$1]
|
|
1394
|
-
|| IterablePrototype['@@iterator']
|
|
1395
|
-
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1396
|
-
var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
|
|
1397
|
-
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1398
|
-
var CurrentIteratorPrototype, methods, KEY;
|
|
1399
|
-
|
|
1400
|
-
// fix native
|
|
1401
|
-
if (anyNativeIterator) {
|
|
1402
|
-
CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
1403
|
-
if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
1404
|
-
if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
|
|
1405
|
-
if (objectSetPrototypeOf) {
|
|
1406
|
-
objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
|
|
1407
|
-
} else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
|
|
1408
|
-
createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
// Set @@toStringTag to native iterators
|
|
1412
|
-
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
// fix Array#{values, @@iterator}.name in V8 / FF
|
|
1417
|
-
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1418
|
-
INCORRECT_VALUES_NAME = true;
|
|
1419
|
-
defaultIterator = function values() { return nativeIterator.call(this); };
|
|
1420
|
-
}
|
|
957
|
+
var $forEach = arrayIteration.forEach;
|
|
1421
958
|
|
|
1422
|
-
// define iterator
|
|
1423
|
-
if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
1424
|
-
createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator);
|
|
1425
|
-
}
|
|
1426
959
|
|
|
1427
|
-
// export additional methods
|
|
1428
|
-
if (DEFAULT) {
|
|
1429
|
-
methods = {
|
|
1430
|
-
values: getIterationMethod(VALUES),
|
|
1431
|
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
1432
|
-
entries: getIterationMethod(ENTRIES)
|
|
1433
|
-
};
|
|
1434
|
-
if (FORCED) for (KEY in methods) {
|
|
1435
|
-
if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1436
|
-
redefine(IterablePrototype, KEY, methods[KEY]);
|
|
1437
|
-
}
|
|
1438
|
-
} else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
|
|
1439
|
-
}
|
|
1440
960
|
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1445
|
-
var setInternalState$1 = internalState.set;
|
|
1446
|
-
var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
|
|
1447
|
-
|
|
1448
|
-
// `Array.prototype.entries` method
|
|
1449
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
|
|
1450
|
-
// `Array.prototype.keys` method
|
|
1451
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
|
|
1452
|
-
// `Array.prototype.values` method
|
|
1453
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.values
|
|
1454
|
-
// `Array.prototype[@@iterator]` method
|
|
1455
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
|
|
1456
|
-
// `CreateArrayIterator` internal method
|
|
1457
|
-
// https://tc39.github.io/ecma262/#sec-createarrayiterator
|
|
1458
|
-
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
1459
|
-
setInternalState$1(this, {
|
|
1460
|
-
type: ARRAY_ITERATOR,
|
|
1461
|
-
target: toIndexedObject(iterated), // target
|
|
1462
|
-
index: 0, // next index
|
|
1463
|
-
kind: kind // kind
|
|
1464
|
-
});
|
|
1465
|
-
// `%ArrayIteratorPrototype%.next` method
|
|
1466
|
-
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
|
|
1467
|
-
}, function () {
|
|
1468
|
-
var state = getInternalState$1(this);
|
|
1469
|
-
var target = state.target;
|
|
1470
|
-
var kind = state.kind;
|
|
1471
|
-
var index = state.index++;
|
|
1472
|
-
if (!target || index >= target.length) {
|
|
1473
|
-
state.target = undefined;
|
|
1474
|
-
return { value: undefined, done: true };
|
|
1475
|
-
}
|
|
1476
|
-
if (kind == 'keys') return { value: index, done: false };
|
|
1477
|
-
if (kind == 'values') return { value: target[index], done: false };
|
|
1478
|
-
return { value: [index, target[index]], done: false };
|
|
1479
|
-
}, 'values');
|
|
961
|
+
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
962
|
+
var USES_TO_LENGTH$2 = arrayMethodUsesToLength('forEach');
|
|
1480
963
|
|
|
1481
|
-
//
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
964
|
+
// `Array.prototype.forEach` method implementation
|
|
965
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
966
|
+
var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$2) ? function forEach(callbackfn /* , thisArg */) {
|
|
967
|
+
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
968
|
+
} : [].forEach;
|
|
1485
969
|
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
});
|
|
1492
|
-
};
|
|
970
|
+
// `Array.prototype.forEach` method
|
|
971
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
972
|
+
_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
|
|
973
|
+
forEach: arrayForEach
|
|
974
|
+
});
|
|
1493
975
|
|
|
1494
976
|
var nativeJoin = [].join;
|
|
1495
977
|
|
|
1496
978
|
var ES3_STRINGS = indexedObject != Object;
|
|
1497
|
-
var
|
|
979
|
+
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
1498
980
|
|
|
1499
981
|
// `Array.prototype.join` method
|
|
1500
982
|
// https://tc39.github.io/ecma262/#sec-array.prototype.join
|
|
1501
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS ||
|
|
983
|
+
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
|
1502
984
|
join: function join(separator) {
|
|
1503
985
|
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
1504
986
|
}
|
|
@@ -1510,27 +992,25 @@
|
|
|
1510
992
|
|
|
1511
993
|
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map');
|
|
1512
994
|
// FF49- issue
|
|
1513
|
-
var USES_TO_LENGTH$
|
|
1514
|
-
[].map.call({ length: -1, 0: 1 }, function (it) { throw it; });
|
|
1515
|
-
});
|
|
995
|
+
var USES_TO_LENGTH$3 = arrayMethodUsesToLength('map');
|
|
1516
996
|
|
|
1517
997
|
// `Array.prototype.map` method
|
|
1518
998
|
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
|
1519
999
|
// with adding support of @@species
|
|
1520
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$
|
|
1000
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3 }, {
|
|
1521
1001
|
map: function map(callbackfn /* , thisArg */) {
|
|
1522
1002
|
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
1523
1003
|
}
|
|
1524
1004
|
});
|
|
1525
1005
|
|
|
1526
|
-
var TO_STRING_TAG
|
|
1006
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1527
1007
|
var test = {};
|
|
1528
1008
|
|
|
1529
|
-
test[TO_STRING_TAG
|
|
1009
|
+
test[TO_STRING_TAG] = 'z';
|
|
1530
1010
|
|
|
1531
1011
|
var toStringTagSupport = String(test) === '[object z]';
|
|
1532
1012
|
|
|
1533
|
-
var TO_STRING_TAG$
|
|
1013
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
1534
1014
|
// ES3 wrong here
|
|
1535
1015
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
1536
1016
|
|
|
@@ -1546,7 +1026,7 @@
|
|
|
1546
1026
|
var O, tag, result;
|
|
1547
1027
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1548
1028
|
// @@toStringTag case
|
|
1549
|
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$
|
|
1029
|
+
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
1550
1030
|
// builtinTag case
|
|
1551
1031
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1552
1032
|
// ES3 arguments fallback
|
|
@@ -1712,59 +1192,13 @@
|
|
|
1712
1192
|
}, { unsafe: true });
|
|
1713
1193
|
}
|
|
1714
1194
|
|
|
1715
|
-
//
|
|
1716
|
-
var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
1717
|
-
return function ($this, pos) {
|
|
1718
|
-
var S = String(requireObjectCoercible($this));
|
|
1719
|
-
var position = toInteger(pos);
|
|
1720
|
-
var size = S.length;
|
|
1721
|
-
var first, second;
|
|
1722
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
1723
|
-
first = S.charCodeAt(position);
|
|
1724
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
1725
|
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
|
1726
|
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
|
1727
|
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
1728
|
-
};
|
|
1729
|
-
};
|
|
1195
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
1730
1196
|
|
|
1731
|
-
var stringMultibyte = {
|
|
1732
|
-
// `String.prototype.codePointAt` method
|
|
1733
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
|
1734
|
-
codeAt: createMethod$2(false),
|
|
1735
|
-
// `String.prototype.at` method
|
|
1736
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
|
1737
|
-
charAt: createMethod$2(true)
|
|
1738
|
-
};
|
|
1739
1197
|
|
|
1740
|
-
var charAt = stringMultibyte.charAt;
|
|
1741
1198
|
|
|
1742
1199
|
|
|
1743
1200
|
|
|
1744
|
-
var STRING_ITERATOR = 'String Iterator';
|
|
1745
|
-
var setInternalState$2 = internalState.set;
|
|
1746
|
-
var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
|
|
1747
1201
|
|
|
1748
|
-
// `String.prototype[@@iterator]` method
|
|
1749
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
|
1750
|
-
defineIterator(String, 'String', function (iterated) {
|
|
1751
|
-
setInternalState$2(this, {
|
|
1752
|
-
type: STRING_ITERATOR,
|
|
1753
|
-
string: String(iterated),
|
|
1754
|
-
index: 0
|
|
1755
|
-
});
|
|
1756
|
-
// `%StringIteratorPrototype%.next` method
|
|
1757
|
-
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
|
1758
|
-
}, function next() {
|
|
1759
|
-
var state = getInternalState$2(this);
|
|
1760
|
-
var string = state.string;
|
|
1761
|
-
var index = state.index;
|
|
1762
|
-
var point;
|
|
1763
|
-
if (index >= string.length) return { value: undefined, done: true };
|
|
1764
|
-
point = charAt(string, index);
|
|
1765
|
-
state.index += point.length;
|
|
1766
|
-
return { value: point, done: false };
|
|
1767
|
-
});
|
|
1768
1202
|
|
|
1769
1203
|
var SPECIES$2 = wellKnownSymbol('species');
|
|
1770
1204
|
|
|
@@ -1787,6 +1221,15 @@
|
|
|
1787
1221
|
return 'a'.replace(/./, '$0') === '$0';
|
|
1788
1222
|
})();
|
|
1789
1223
|
|
|
1224
|
+
var REPLACE = wellKnownSymbol('replace');
|
|
1225
|
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
1226
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
1227
|
+
if (/./[REPLACE]) {
|
|
1228
|
+
return /./[REPLACE]('a', '$0') === '';
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
})();
|
|
1232
|
+
|
|
1790
1233
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
1791
1234
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
1792
1235
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
|
@@ -1834,7 +1277,11 @@
|
|
|
1834
1277
|
if (
|
|
1835
1278
|
!DELEGATES_TO_SYMBOL ||
|
|
1836
1279
|
!DELEGATES_TO_EXEC ||
|
|
1837
|
-
(KEY === 'replace' && !(
|
|
1280
|
+
(KEY === 'replace' && !(
|
|
1281
|
+
REPLACE_SUPPORTS_NAMED_GROUPS &&
|
|
1282
|
+
REPLACE_KEEPS_$0 &&
|
|
1283
|
+
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
|
1284
|
+
)) ||
|
|
1838
1285
|
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
|
1839
1286
|
) {
|
|
1840
1287
|
var nativeRegExpMethod = /./[SYMBOL];
|
|
@@ -1849,7 +1296,10 @@
|
|
|
1849
1296
|
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
|
1850
1297
|
}
|
|
1851
1298
|
return { done: false };
|
|
1852
|
-
}, {
|
|
1299
|
+
}, {
|
|
1300
|
+
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
|
|
1301
|
+
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
|
1302
|
+
});
|
|
1853
1303
|
var stringMethod = methods[0];
|
|
1854
1304
|
var regexMethod = methods[1];
|
|
1855
1305
|
|
|
@@ -1867,12 +1317,37 @@
|
|
|
1867
1317
|
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
|
1868
1318
|
};
|
|
1869
1319
|
|
|
1870
|
-
|
|
1320
|
+
// `String.prototype.{ codePointAt, at }` methods implementation
|
|
1321
|
+
var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
1322
|
+
return function ($this, pos) {
|
|
1323
|
+
var S = String(requireObjectCoercible($this));
|
|
1324
|
+
var position = toInteger(pos);
|
|
1325
|
+
var size = S.length;
|
|
1326
|
+
var first, second;
|
|
1327
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
1328
|
+
first = S.charCodeAt(position);
|
|
1329
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
1330
|
+
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
|
1331
|
+
? CONVERT_TO_STRING ? S.charAt(position) : first
|
|
1332
|
+
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
1333
|
+
};
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
var stringMultibyte = {
|
|
1337
|
+
// `String.prototype.codePointAt` method
|
|
1338
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
|
1339
|
+
codeAt: createMethod$2(false),
|
|
1340
|
+
// `String.prototype.at` method
|
|
1341
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
1342
|
+
charAt: createMethod$2(true)
|
|
1343
|
+
};
|
|
1344
|
+
|
|
1345
|
+
var charAt = stringMultibyte.charAt;
|
|
1871
1346
|
|
|
1872
1347
|
// `AdvanceStringIndex` abstract operation
|
|
1873
1348
|
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
|
1874
1349
|
var advanceStringIndex = function (S, index, unicode) {
|
|
1875
|
-
return index + (unicode ? charAt
|
|
1350
|
+
return index + (unicode ? charAt(S, index).length : 1);
|
|
1876
1351
|
};
|
|
1877
1352
|
|
|
1878
1353
|
// `RegExpExec` abstract operation
|
|
@@ -1906,6 +1381,10 @@
|
|
|
1906
1381
|
|
|
1907
1382
|
// @@replace logic
|
|
1908
1383
|
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
|
|
1384
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
|
|
1385
|
+
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
|
|
1386
|
+
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
1387
|
+
|
|
1909
1388
|
return [
|
|
1910
1389
|
// `String.prototype.replace` method
|
|
1911
1390
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
@@ -1919,7 +1398,10 @@
|
|
|
1919
1398
|
// `RegExp.prototype[@@replace]` method
|
|
1920
1399
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
|
1921
1400
|
function (regexp, replaceValue) {
|
|
1922
|
-
if (
|
|
1401
|
+
if (
|
|
1402
|
+
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
|
|
1403
|
+
(typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
|
|
1404
|
+
) {
|
|
1923
1405
|
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
|
1924
1406
|
if (res.done) return res.value;
|
|
1925
1407
|
}
|
|
@@ -2226,15 +1708,6 @@
|
|
|
2226
1708
|
TouchList: 0
|
|
2227
1709
|
};
|
|
2228
1710
|
|
|
2229
|
-
var $forEach$1 = arrayIteration.forEach;
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
// `Array.prototype.forEach` method implementation
|
|
2233
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
2234
|
-
var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
|
|
2235
|
-
return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
2236
|
-
} : [].forEach;
|
|
2237
|
-
|
|
2238
1711
|
for (var COLLECTION_NAME in domIterables) {
|
|
2239
1712
|
var Collection = global_1[COLLECTION_NAME];
|
|
2240
1713
|
var CollectionPrototype = Collection && Collection.prototype;
|
|
@@ -2246,34 +1719,6 @@
|
|
|
2246
1719
|
}
|
|
2247
1720
|
}
|
|
2248
1721
|
|
|
2249
|
-
var ITERATOR$2 = wellKnownSymbol('iterator');
|
|
2250
|
-
var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
|
|
2251
|
-
var ArrayValues = es_array_iterator.values;
|
|
2252
|
-
|
|
2253
|
-
for (var COLLECTION_NAME$1 in domIterables) {
|
|
2254
|
-
var Collection$1 = global_1[COLLECTION_NAME$1];
|
|
2255
|
-
var CollectionPrototype$1 = Collection$1 && Collection$1.prototype;
|
|
2256
|
-
if (CollectionPrototype$1) {
|
|
2257
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
2258
|
-
if (CollectionPrototype$1[ITERATOR$2] !== ArrayValues) try {
|
|
2259
|
-
createNonEnumerableProperty(CollectionPrototype$1, ITERATOR$2, ArrayValues);
|
|
2260
|
-
} catch (error) {
|
|
2261
|
-
CollectionPrototype$1[ITERATOR$2] = ArrayValues;
|
|
2262
|
-
}
|
|
2263
|
-
if (!CollectionPrototype$1[TO_STRING_TAG$3]) {
|
|
2264
|
-
createNonEnumerableProperty(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1);
|
|
2265
|
-
}
|
|
2266
|
-
if (domIterables[COLLECTION_NAME$1]) for (var METHOD_NAME in es_array_iterator) {
|
|
2267
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
2268
|
-
if (CollectionPrototype$1[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
|
|
2269
|
-
createNonEnumerableProperty(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);
|
|
2270
|
-
} catch (error) {
|
|
2271
|
-
CollectionPrototype$1[METHOD_NAME] = es_array_iterator[METHOD_NAME];
|
|
2272
|
-
}
|
|
2273
|
-
}
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
1722
|
function _classCallCheck(instance, Constructor) {
|
|
2278
1723
|
if (!(instance instanceof Constructor)) {
|
|
2279
1724
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -2327,6 +1772,19 @@
|
|
|
2327
1772
|
return _setPrototypeOf(o, p);
|
|
2328
1773
|
}
|
|
2329
1774
|
|
|
1775
|
+
function _isNativeReflectConstruct() {
|
|
1776
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
1777
|
+
if (Reflect.construct.sham) return false;
|
|
1778
|
+
if (typeof Proxy === "function") return true;
|
|
1779
|
+
|
|
1780
|
+
try {
|
|
1781
|
+
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
|
1782
|
+
return true;
|
|
1783
|
+
} catch (e) {
|
|
1784
|
+
return false;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
|
|
2330
1788
|
function _assertThisInitialized(self) {
|
|
2331
1789
|
if (self === void 0) {
|
|
2332
1790
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -2343,6 +1801,25 @@
|
|
|
2343
1801
|
return _assertThisInitialized(self);
|
|
2344
1802
|
}
|
|
2345
1803
|
|
|
1804
|
+
function _createSuper(Derived) {
|
|
1805
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
1806
|
+
|
|
1807
|
+
return function _createSuperInternal() {
|
|
1808
|
+
var Super = _getPrototypeOf(Derived),
|
|
1809
|
+
result;
|
|
1810
|
+
|
|
1811
|
+
if (hasNativeReflectConstruct) {
|
|
1812
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
1813
|
+
|
|
1814
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
1815
|
+
} else {
|
|
1816
|
+
result = Super.apply(this, arguments);
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
return _possibleConstructorReturn(this, result);
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
|
|
2346
1823
|
function _superPropBase(object, property) {
|
|
2347
1824
|
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
2348
1825
|
object = _getPrototypeOf(object);
|
|
@@ -2373,13 +1850,87 @@
|
|
|
2373
1850
|
return _get(target, property, receiver || target);
|
|
2374
1851
|
}
|
|
2375
1852
|
|
|
1853
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1854
|
+
if (!o) return;
|
|
1855
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1856
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1857
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1858
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1859
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
function _arrayLikeToArray(arr, len) {
|
|
1863
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1864
|
+
|
|
1865
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1866
|
+
|
|
1867
|
+
return arr2;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
1871
|
+
var it;
|
|
1872
|
+
|
|
1873
|
+
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
|
|
1874
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
1875
|
+
if (it) o = it;
|
|
1876
|
+
var i = 0;
|
|
1877
|
+
|
|
1878
|
+
var F = function () {};
|
|
1879
|
+
|
|
1880
|
+
return {
|
|
1881
|
+
s: F,
|
|
1882
|
+
n: function () {
|
|
1883
|
+
if (i >= o.length) return {
|
|
1884
|
+
done: true
|
|
1885
|
+
};
|
|
1886
|
+
return {
|
|
1887
|
+
done: false,
|
|
1888
|
+
value: o[i++]
|
|
1889
|
+
};
|
|
1890
|
+
},
|
|
1891
|
+
e: function (e) {
|
|
1892
|
+
throw e;
|
|
1893
|
+
},
|
|
1894
|
+
f: F
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
var normalCompletion = true,
|
|
1902
|
+
didErr = false,
|
|
1903
|
+
err;
|
|
1904
|
+
return {
|
|
1905
|
+
s: function () {
|
|
1906
|
+
it = o[Symbol.iterator]();
|
|
1907
|
+
},
|
|
1908
|
+
n: function () {
|
|
1909
|
+
var step = it.next();
|
|
1910
|
+
normalCompletion = step.done;
|
|
1911
|
+
return step;
|
|
1912
|
+
},
|
|
1913
|
+
e: function (e) {
|
|
1914
|
+
didErr = true;
|
|
1915
|
+
err = e;
|
|
1916
|
+
},
|
|
1917
|
+
f: function () {
|
|
1918
|
+
try {
|
|
1919
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
1920
|
+
} finally {
|
|
1921
|
+
if (didErr) throw err;
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
};
|
|
1925
|
+
}
|
|
1926
|
+
|
|
2376
1927
|
/**
|
|
2377
1928
|
* @author: Dennis Hernández
|
|
2378
1929
|
* @webSite: http://djhvscf.github.io/Blog
|
|
2379
1930
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
|
2380
1931
|
*/
|
|
2381
1932
|
|
|
2382
|
-
var Utils =
|
|
1933
|
+
var Utils = $__default['default'].fn.bootstrapTable.utils;
|
|
2383
1934
|
var UtilsCookie = {
|
|
2384
1935
|
cookieIds: {
|
|
2385
1936
|
sortOrder: 'bs.table.sortOrder',
|
|
@@ -2502,7 +2053,7 @@
|
|
|
2502
2053
|
|
|
2503
2054
|
switch (that.options.cookieStorage) {
|
|
2504
2055
|
case 'cookieStorage':
|
|
2505
|
-
document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : ''].join('');
|
|
2056
|
+
document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
|
|
2506
2057
|
break;
|
|
2507
2058
|
|
|
2508
2059
|
case 'localStorage':
|
|
@@ -2617,11 +2168,11 @@
|
|
|
2617
2168
|
var filterContainer = header;
|
|
2618
2169
|
|
|
2619
2170
|
if (bootstrapTable.options.filterControlContainer) {
|
|
2620
|
-
filterContainer = $("".concat(bootstrapTable.options.filterControlContainer));
|
|
2171
|
+
filterContainer = $__default['default']("".concat(bootstrapTable.options.filterControlContainer));
|
|
2621
2172
|
}
|
|
2622
2173
|
|
|
2623
2174
|
filterContainer.find(searchControls).each(function () {
|
|
2624
|
-
var field = $(this).closest('[data-field]').data('field');
|
|
2175
|
+
var field = $__default['default'](this).closest('[data-field]').data('field');
|
|
2625
2176
|
var filteredCookies = parsedCookieFilters.filter(function (cookie) {
|
|
2626
2177
|
return cookie.field === field;
|
|
2627
2178
|
});
|
|
@@ -2634,7 +2185,7 @@
|
|
|
2634
2185
|
}, 250);
|
|
2635
2186
|
}
|
|
2636
2187
|
};
|
|
2637
|
-
|
|
2188
|
+
$__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
|
|
2638
2189
|
cookie: false,
|
|
2639
2190
|
cookieExpire: '2h',
|
|
2640
2191
|
cookiePath: null,
|
|
@@ -2652,22 +2203,22 @@
|
|
|
2652
2203
|
filterControls: [],
|
|
2653
2204
|
filterControlValuesLoaded: false
|
|
2654
2205
|
});
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2206
|
+
$__default['default'].fn.bootstrapTable.methods.push('getCookies');
|
|
2207
|
+
$__default['default'].fn.bootstrapTable.methods.push('deleteCookie');
|
|
2208
|
+
$__default['default'].extend($__default['default'].fn.bootstrapTable.utils, {
|
|
2658
2209
|
setCookie: UtilsCookie.setCookie,
|
|
2659
2210
|
getCookie: UtilsCookie.getCookie
|
|
2660
2211
|
});
|
|
2661
2212
|
|
|
2662
|
-
|
|
2663
|
-
/*#__PURE__*/
|
|
2664
|
-
function (_$$BootstrapTable) {
|
|
2213
|
+
$__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
|
|
2665
2214
|
_inherits(_class, _$$BootstrapTable);
|
|
2666
2215
|
|
|
2216
|
+
var _super = _createSuper(_class);
|
|
2217
|
+
|
|
2667
2218
|
function _class() {
|
|
2668
2219
|
_classCallCheck(this, _class);
|
|
2669
2220
|
|
|
2670
|
-
return
|
|
2221
|
+
return _super.apply(this, arguments);
|
|
2671
2222
|
}
|
|
2672
2223
|
|
|
2673
2224
|
_createClass(_class, [{
|
|
@@ -2765,6 +2316,12 @@
|
|
|
2765
2316
|
|
|
2766
2317
|
(_get4 = _get(_getPrototypeOf(_class.prototype), "onSort", this)).call.apply(_get4, [this].concat(args));
|
|
2767
2318
|
|
|
2319
|
+
if (this.options.sortName === undefined || this.options.sortOrder === undefined) {
|
|
2320
|
+
UtilsCookie.deleteCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortName);
|
|
2321
|
+
UtilsCookie.deleteCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortOrder);
|
|
2322
|
+
return;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2768
2325
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder);
|
|
2769
2326
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName);
|
|
2770
2327
|
}
|
|
@@ -2949,9 +2506,8 @@
|
|
|
2949
2506
|
this.options.searchText = searchTextCookie ? searchTextCookie : '';
|
|
2950
2507
|
|
|
2951
2508
|
if (columnsCookie) {
|
|
2952
|
-
var
|
|
2953
|
-
|
|
2954
|
-
var _iteratorError = undefined;
|
|
2509
|
+
var _iterator = _createForOfIteratorHelper(this.columns),
|
|
2510
|
+
_step;
|
|
2955
2511
|
|
|
2956
2512
|
try {
|
|
2957
2513
|
var _loop = function _loop() {
|
|
@@ -2975,22 +2531,13 @@
|
|
|
2975
2531
|
}).length > 0 || !column.switchable;
|
|
2976
2532
|
};
|
|
2977
2533
|
|
|
2978
|
-
for (
|
|
2534
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2979
2535
|
_loop();
|
|
2980
2536
|
}
|
|
2981
2537
|
} catch (err) {
|
|
2982
|
-
|
|
2983
|
-
_iteratorError = err;
|
|
2538
|
+
_iterator.e(err);
|
|
2984
2539
|
} finally {
|
|
2985
|
-
|
|
2986
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
2987
|
-
_iterator.return();
|
|
2988
|
-
}
|
|
2989
|
-
} finally {
|
|
2990
|
-
if (_didIteratorError) {
|
|
2991
|
-
throw _iteratorError;
|
|
2992
|
-
}
|
|
2993
|
-
}
|
|
2540
|
+
_iterator.f();
|
|
2994
2541
|
}
|
|
2995
2542
|
}
|
|
2996
2543
|
}
|
|
@@ -2999,7 +2546,7 @@
|
|
|
2999
2546
|
value: function getCookies() {
|
|
3000
2547
|
var bootstrapTable = this;
|
|
3001
2548
|
var cookies = {};
|
|
3002
|
-
|
|
2549
|
+
$__default['default'].each(UtilsCookie.cookieIds, function (key, value) {
|
|
3003
2550
|
cookies[key] = UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, value);
|
|
3004
2551
|
|
|
3005
2552
|
if (key === 'columns') {
|
|
@@ -3020,6 +2567,6 @@
|
|
|
3020
2567
|
}]);
|
|
3021
2568
|
|
|
3022
2569
|
return _class;
|
|
3023
|
-
}(
|
|
2570
|
+
}($__default['default'].BootstrapTable);
|
|
3024
2571
|
|
|
3025
2572
|
})));
|