bootstrap-table-rails 1.15.5 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +106 -64
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +678 -208
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +680 -210
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +66 -10
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +742 -489
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +1103 -213
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +226 -80
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +136 -64
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +338 -177
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +402 -110
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +133 -61
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +243 -75
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +347 -179
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +687 -358
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css +12 -14
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +545 -422
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +488 -92
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +2 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +216 -72
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +142 -65
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +345 -137
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +136 -64
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +86 -41
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +218 -123
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +640 -254
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +347 -135
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +83 -43
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +203 -75
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +449 -199
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +207 -114
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +104 -62
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +83 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +83 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +80 -11
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +106 -60
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +79 -13
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +111 -62
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +74 -9
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +109 -63
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +80 -13
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +110 -64
- metadata +1 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +0 -1265
@@ -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 = global || self, factory(global.jQuery));
|
5
|
-
}(this, function ($) { 'use strict';
|
5
|
+
}(this, (function ($) { 'use strict';
|
6
6
|
|
7
7
|
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
8
8
|
|
@@ -12,7 +12,6 @@
|
|
12
12
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
13
13
|
}
|
14
14
|
|
15
|
-
var O = 'object';
|
16
15
|
var check = function (it) {
|
17
16
|
return it && it.Math == Math && it;
|
18
17
|
};
|
@@ -20,10 +19,10 @@
|
|
20
19
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
21
20
|
var global_1 =
|
22
21
|
// eslint-disable-next-line no-undef
|
23
|
-
check(typeof globalThis ==
|
24
|
-
check(typeof window ==
|
25
|
-
check(typeof self ==
|
26
|
-
check(typeof commonjsGlobal ==
|
22
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
23
|
+
check(typeof window == 'object' && window) ||
|
24
|
+
check(typeof self == 'object' && self) ||
|
25
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
27
26
|
// eslint-disable-next-line no-new-func
|
28
27
|
Function('return this')();
|
29
28
|
|
@@ -121,12 +120,12 @@
|
|
121
120
|
return hasOwnProperty.call(it, key);
|
122
121
|
};
|
123
122
|
|
124
|
-
var document = global_1.document;
|
123
|
+
var document$1 = global_1.document;
|
125
124
|
// typeof document.createElement is 'object' in old IE
|
126
|
-
var EXISTS = isObject(document) && isObject(document.createElement);
|
125
|
+
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
127
126
|
|
128
127
|
var documentCreateElement = function (it) {
|
129
|
-
return EXISTS ? document.createElement(it) : {};
|
128
|
+
return EXISTS ? document$1.createElement(it) : {};
|
130
129
|
};
|
131
130
|
|
132
131
|
// Thank's IE8 for his funny defineProperty
|
@@ -179,7 +178,7 @@
|
|
179
178
|
f: f$2
|
180
179
|
};
|
181
180
|
|
182
|
-
var
|
181
|
+
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
183
182
|
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
184
183
|
} : function (object, key, value) {
|
185
184
|
object[key] = value;
|
@@ -188,31 +187,42 @@
|
|
188
187
|
|
189
188
|
var setGlobal = function (key, value) {
|
190
189
|
try {
|
191
|
-
|
190
|
+
createNonEnumerableProperty(global_1, key, value);
|
192
191
|
} catch (error) {
|
193
192
|
global_1[key] = value;
|
194
193
|
} return value;
|
195
194
|
};
|
196
195
|
|
197
|
-
var shared = createCommonjsModule(function (module) {
|
198
196
|
var SHARED = '__core-js_shared__';
|
199
197
|
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
200
198
|
|
199
|
+
var sharedStore = store;
|
200
|
+
|
201
|
+
var functionToString = Function.toString;
|
202
|
+
|
203
|
+
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
204
|
+
if (typeof sharedStore.inspectSource != 'function') {
|
205
|
+
sharedStore.inspectSource = function (it) {
|
206
|
+
return functionToString.call(it);
|
207
|
+
};
|
208
|
+
}
|
209
|
+
|
210
|
+
var inspectSource = sharedStore.inspectSource;
|
211
|
+
|
212
|
+
var WeakMap = global_1.WeakMap;
|
213
|
+
|
214
|
+
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
215
|
+
|
216
|
+
var shared = createCommonjsModule(function (module) {
|
201
217
|
(module.exports = function (key, value) {
|
202
|
-
return
|
218
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
203
219
|
})('versions', []).push({
|
204
|
-
version: '3.
|
220
|
+
version: '3.6.0',
|
205
221
|
mode: 'global',
|
206
222
|
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
207
223
|
});
|
208
224
|
});
|
209
225
|
|
210
|
-
var functionToString = shared('native-function-to-string', Function.toString);
|
211
|
-
|
212
|
-
var WeakMap = global_1.WeakMap;
|
213
|
-
|
214
|
-
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
|
215
|
-
|
216
226
|
var id = 0;
|
217
227
|
var postfix = Math.random();
|
218
228
|
|
@@ -245,25 +255,25 @@
|
|
245
255
|
};
|
246
256
|
|
247
257
|
if (nativeWeakMap) {
|
248
|
-
var store = new WeakMap$1();
|
249
|
-
var wmget = store.get;
|
250
|
-
var wmhas = store.has;
|
251
|
-
var wmset = store.set;
|
258
|
+
var store$1 = new WeakMap$1();
|
259
|
+
var wmget = store$1.get;
|
260
|
+
var wmhas = store$1.has;
|
261
|
+
var wmset = store$1.set;
|
252
262
|
set = function (it, metadata) {
|
253
|
-
wmset.call(store, it, metadata);
|
263
|
+
wmset.call(store$1, it, metadata);
|
254
264
|
return metadata;
|
255
265
|
};
|
256
266
|
get = function (it) {
|
257
|
-
return wmget.call(store, it) || {};
|
267
|
+
return wmget.call(store$1, it) || {};
|
258
268
|
};
|
259
269
|
has$1 = function (it) {
|
260
|
-
return wmhas.call(store, it);
|
270
|
+
return wmhas.call(store$1, it);
|
261
271
|
};
|
262
272
|
} else {
|
263
273
|
var STATE = sharedKey('state');
|
264
274
|
hiddenKeys[STATE] = true;
|
265
275
|
set = function (it, metadata) {
|
266
|
-
|
276
|
+
createNonEnumerableProperty(it, STATE, metadata);
|
267
277
|
return metadata;
|
268
278
|
};
|
269
279
|
get = function (it) {
|
@@ -285,18 +295,14 @@
|
|
285
295
|
var redefine = createCommonjsModule(function (module) {
|
286
296
|
var getInternalState = internalState.get;
|
287
297
|
var enforceInternalState = internalState.enforce;
|
288
|
-
var TEMPLATE = String(
|
289
|
-
|
290
|
-
shared('inspectSource', function (it) {
|
291
|
-
return functionToString.call(it);
|
292
|
-
});
|
298
|
+
var TEMPLATE = String(String).split('String');
|
293
299
|
|
294
300
|
(module.exports = function (O, key, value, options) {
|
295
301
|
var unsafe = options ? !!options.unsafe : false;
|
296
302
|
var simple = options ? !!options.enumerable : false;
|
297
303
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
298
304
|
if (typeof value == 'function') {
|
299
|
-
if (typeof key == 'string' && !has(value, 'name'))
|
305
|
+
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
|
300
306
|
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
301
307
|
}
|
302
308
|
if (O === global_1) {
|
@@ -309,10 +315,10 @@
|
|
309
315
|
simple = true;
|
310
316
|
}
|
311
317
|
if (simple) O[key] = value;
|
312
|
-
else
|
318
|
+
else createNonEnumerableProperty(O, key, value);
|
313
319
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
314
320
|
})(Function.prototype, 'toString', function toString() {
|
315
|
-
return typeof this == 'function' && getInternalState(this).source ||
|
321
|
+
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
316
322
|
});
|
317
323
|
});
|
318
324
|
|
@@ -349,7 +355,7 @@
|
|
349
355
|
|
350
356
|
// Helper for a popular repeating case of the spec:
|
351
357
|
// Let integer be ? ToInteger(index).
|
352
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(
|
358
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
353
359
|
var toAbsoluteIndex = function (index, length) {
|
354
360
|
var integer = toInteger(index);
|
355
361
|
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
@@ -513,7 +519,7 @@
|
|
513
519
|
}
|
514
520
|
// add a flag to not completely full polyfills
|
515
521
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
516
|
-
|
522
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
517
523
|
}
|
518
524
|
// extend global
|
519
525
|
redefine(target, key, sourceProperty, options);
|
@@ -526,6 +532,12 @@
|
|
526
532
|
return !String(Symbol());
|
527
533
|
});
|
528
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
|
+
|
529
541
|
// `IsArray` abstract operation
|
530
542
|
// https://tc39.github.io/ecma262/#sec-isarray
|
531
543
|
var isArray = Array.isArray || function isArray(arg) {
|
@@ -558,49 +570,77 @@
|
|
558
570
|
|
559
571
|
var html = getBuiltIn('document', 'documentElement');
|
560
572
|
|
573
|
+
var GT = '>';
|
574
|
+
var LT = '<';
|
575
|
+
var PROTOTYPE = 'prototype';
|
576
|
+
var SCRIPT = 'script';
|
561
577
|
var IE_PROTO = sharedKey('IE_PROTO');
|
562
578
|
|
563
|
-
var
|
564
|
-
|
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
|
+
};
|
565
593
|
|
566
594
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
567
|
-
var
|
595
|
+
var NullProtoObjectViaIFrame = function () {
|
568
596
|
// Thrash, waste and sodomy: IE GC bug
|
569
597
|
var iframe = documentCreateElement('iframe');
|
570
|
-
var
|
571
|
-
var lt = '<';
|
572
|
-
var script = 'script';
|
573
|
-
var gt = '>';
|
574
|
-
var js = 'java' + script + ':';
|
598
|
+
var JS = 'java' + SCRIPT + ':';
|
575
599
|
var iframeDocument;
|
576
600
|
iframe.style.display = 'none';
|
577
601
|
html.appendChild(iframe);
|
578
|
-
|
602
|
+
// https://github.com/zloirock/core-js/issues/475
|
603
|
+
iframe.src = String(JS);
|
579
604
|
iframeDocument = iframe.contentWindow.document;
|
580
605
|
iframeDocument.open();
|
581
|
-
iframeDocument.write(
|
606
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
582
607
|
iframeDocument.close();
|
583
|
-
|
584
|
-
while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
|
585
|
-
return createDict();
|
608
|
+
return iframeDocument.F;
|
586
609
|
};
|
587
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
|
+
|
588
630
|
// `Object.create` method
|
589
631
|
// https://tc39.github.io/ecma262/#sec-object.create
|
590
632
|
var objectCreate = Object.create || function create(O, Properties) {
|
591
633
|
var result;
|
592
634
|
if (O !== null) {
|
593
|
-
|
594
|
-
result = new
|
595
|
-
|
635
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
636
|
+
result = new EmptyConstructor();
|
637
|
+
EmptyConstructor[PROTOTYPE] = null;
|
596
638
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
597
639
|
result[IE_PROTO] = O;
|
598
|
-
} else result =
|
640
|
+
} else result = NullProtoObject();
|
599
641
|
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
600
642
|
};
|
601
643
|
|
602
|
-
hiddenKeys[IE_PROTO] = true;
|
603
|
-
|
604
644
|
var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
|
605
645
|
|
606
646
|
var toString$1 = {}.toString;
|
@@ -627,12 +667,15 @@
|
|
627
667
|
f: f$5
|
628
668
|
};
|
629
669
|
|
670
|
+
var WellKnownSymbolsStore = shared('wks');
|
630
671
|
var Symbol$1 = global_1.Symbol;
|
631
|
-
var
|
672
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
632
673
|
|
633
674
|
var wellKnownSymbol = function (name) {
|
634
|
-
|
635
|
-
|
675
|
+
if (!has(WellKnownSymbolsStore, name)) {
|
676
|
+
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
|
677
|
+
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
678
|
+
} return WellKnownSymbolsStore[name];
|
636
679
|
};
|
637
680
|
|
638
681
|
var f$6 = wellKnownSymbol;
|
@@ -778,8 +821,7 @@
|
|
778
821
|
var getInternalState = internalState.getterFor(SYMBOL);
|
779
822
|
var ObjectPrototype = Object[PROTOTYPE$1];
|
780
823
|
var $Symbol = global_1.Symbol;
|
781
|
-
var
|
782
|
-
var nativeJSONStringify = JSON && JSON.stringify;
|
824
|
+
var $stringify = getBuiltIn('JSON', 'stringify');
|
783
825
|
var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
784
826
|
var nativeDefineProperty$1 = objectDefineProperty.f;
|
785
827
|
var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
|
@@ -788,7 +830,7 @@
|
|
788
830
|
var ObjectPrototypeSymbols = shared('op-symbols');
|
789
831
|
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
790
832
|
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
791
|
-
var WellKnownSymbolsStore = shared('wks');
|
833
|
+
var WellKnownSymbolsStore$1 = shared('wks');
|
792
834
|
var QObject = global_1.QObject;
|
793
835
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
794
836
|
var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
|
@@ -931,7 +973,9 @@
|
|
931
973
|
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
932
974
|
}
|
933
975
|
}
|
976
|
+
}
|
934
977
|
|
978
|
+
if (!useSymbolAsUid) {
|
935
979
|
wrappedWellKnownSymbol.f = function (name) {
|
936
980
|
return wrap(wellKnownSymbol(name), name);
|
937
981
|
};
|
@@ -941,7 +985,7 @@
|
|
941
985
|
Symbol: $Symbol
|
942
986
|
});
|
943
987
|
|
944
|
-
$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
|
988
|
+
$forEach(objectKeys(WellKnownSymbolsStore$1), function (name) {
|
945
989
|
defineWellKnownSymbol(name);
|
946
990
|
});
|
947
991
|
|
@@ -1000,34 +1044,41 @@
|
|
1000
1044
|
|
1001
1045
|
// `JSON.stringify` method behavior with symbols
|
1002
1046
|
// https://tc39.github.io/ecma262/#sec-json.stringify
|
1003
|
-
|
1004
|
-
var
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1047
|
+
if ($stringify) {
|
1048
|
+
var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
|
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
|
+
}
|
1027
1076
|
|
1028
1077
|
// `Symbol.prototype[@@toPrimitive]` method
|
1029
1078
|
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
|
1030
|
-
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE])
|
1079
|
+
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
|
1080
|
+
createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
|
1081
|
+
}
|
1031
1082
|
// `Symbol.prototype[@@toStringTag]` property
|
1032
1083
|
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
|
1033
1084
|
setToStringTag($Symbol, SYMBOL);
|
@@ -1087,10 +1138,33 @@
|
|
1087
1138
|
else object[propertyKey] = value;
|
1088
1139
|
};
|
1089
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
|
+
|
1090
1161
|
var SPECIES$1 = wellKnownSymbol('species');
|
1091
1162
|
|
1092
1163
|
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
1093
|
-
|
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 () {
|
1094
1168
|
var array = [];
|
1095
1169
|
var constructor = array.constructor = {};
|
1096
1170
|
constructor[SPECIES$1] = function () {
|
@@ -1104,7 +1178,10 @@
|
|
1104
1178
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
1105
1179
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
1106
1180
|
|
1107
|
-
|
1181
|
+
// We can't use this feature detection in V8 since it causes
|
1182
|
+
// deoptimization and serious performance degradation
|
1183
|
+
// https://github.com/zloirock/core-js/issues/679
|
1184
|
+
var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
|
1108
1185
|
var array = [];
|
1109
1186
|
array[IS_CONCAT_SPREADABLE] = false;
|
1110
1187
|
return array.concat()[0] !== array;
|
@@ -1151,7 +1228,10 @@
|
|
1151
1228
|
// Array.prototype[@@unscopables]
|
1152
1229
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
1153
1230
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
1154
|
-
|
1231
|
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
1232
|
+
configurable: true,
|
1233
|
+
value: objectCreate(null)
|
1234
|
+
});
|
1155
1235
|
}
|
1156
1236
|
|
1157
1237
|
// add a key to Array.prototype[@@unscopables]
|
@@ -1220,7 +1300,9 @@
|
|
1220
1300
|
if (IteratorPrototype == undefined) IteratorPrototype = {};
|
1221
1301
|
|
1222
1302
|
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
1223
|
-
if ( !has(IteratorPrototype, ITERATOR))
|
1303
|
+
if ( !has(IteratorPrototype, ITERATOR)) {
|
1304
|
+
createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
|
1305
|
+
}
|
1224
1306
|
|
1225
1307
|
var iteratorsCore = {
|
1226
1308
|
IteratorPrototype: IteratorPrototype,
|
@@ -1304,7 +1386,7 @@
|
|
1304
1386
|
if (objectSetPrototypeOf) {
|
1305
1387
|
objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
|
1306
1388
|
} else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
|
1307
|
-
|
1389
|
+
createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
|
1308
1390
|
}
|
1309
1391
|
}
|
1310
1392
|
// Set @@toStringTag to native iterators
|
@@ -1320,7 +1402,7 @@
|
|
1320
1402
|
|
1321
1403
|
// define iterator
|
1322
1404
|
if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
1323
|
-
|
1405
|
+
createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator);
|
1324
1406
|
}
|
1325
1407
|
|
1326
1408
|
// export additional methods
|
@@ -1406,10 +1488,17 @@
|
|
1406
1488
|
var $map = arrayIteration.map;
|
1407
1489
|
|
1408
1490
|
|
1491
|
+
|
1492
|
+
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
|
1493
|
+
// FF49- issue
|
1494
|
+
var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
|
1495
|
+
[].map.call({ length: -1, 0: 1 }, function (it) { throw it; });
|
1496
|
+
});
|
1497
|
+
|
1409
1498
|
// `Array.prototype.map` method
|
1410
1499
|
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
1411
1500
|
// with adding support of @@species
|
1412
|
-
_export({ target: 'Array', proto: true, forced: !
|
1501
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
1413
1502
|
map: function map(callbackfn /* , thisArg */) {
|
1414
1503
|
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1415
1504
|
}
|
@@ -1451,6 +1540,13 @@
|
|
1451
1540
|
});
|
1452
1541
|
|
1453
1542
|
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
1543
|
+
var test = {};
|
1544
|
+
|
1545
|
+
test[TO_STRING_TAG$1] = 'z';
|
1546
|
+
|
1547
|
+
var toStringTagSupport = String(test) === '[object z]';
|
1548
|
+
|
1549
|
+
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
1454
1550
|
// ES3 wrong here
|
1455
1551
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
1456
1552
|
|
@@ -1462,90 +1558,29 @@
|
|
1462
1558
|
};
|
1463
1559
|
|
1464
1560
|
// getting tag from ES6+ `Object.prototype.toString`
|
1465
|
-
var classof = function (it) {
|
1561
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
1466
1562
|
var O, tag, result;
|
1467
1563
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1468
1564
|
// @@toStringTag case
|
1469
|
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$
|
1565
|
+
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$2)) == 'string' ? tag
|
1470
1566
|
// builtinTag case
|
1471
1567
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
1472
1568
|
// ES3 arguments fallback
|
1473
1569
|
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
1474
1570
|
};
|
1475
1571
|
|
1476
|
-
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
1477
|
-
var test = {};
|
1478
|
-
|
1479
|
-
test[TO_STRING_TAG$2] = 'z';
|
1480
|
-
|
1481
1572
|
// `Object.prototype.toString` method implementation
|
1482
1573
|
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
1483
|
-
var objectToString =
|
1574
|
+
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
1484
1575
|
return '[object ' + classof(this) + ']';
|
1485
|
-
}
|
1486
|
-
|
1487
|
-
var ObjectPrototype$2 = Object.prototype;
|
1576
|
+
};
|
1488
1577
|
|
1489
1578
|
// `Object.prototype.toString` method
|
1490
1579
|
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
1491
|
-
if (
|
1492
|
-
redefine(
|
1580
|
+
if (!toStringTagSupport) {
|
1581
|
+
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
1493
1582
|
}
|
1494
1583
|
|
1495
|
-
// `String.prototype.{ codePointAt, at }` methods implementation
|
1496
|
-
var createMethod$2 = function (CONVERT_TO_STRING) {
|
1497
|
-
return function ($this, pos) {
|
1498
|
-
var S = String(requireObjectCoercible($this));
|
1499
|
-
var position = toInteger(pos);
|
1500
|
-
var size = S.length;
|
1501
|
-
var first, second;
|
1502
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1503
|
-
first = S.charCodeAt(position);
|
1504
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1505
|
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
1506
|
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
1507
|
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1508
|
-
};
|
1509
|
-
};
|
1510
|
-
|
1511
|
-
var stringMultibyte = {
|
1512
|
-
// `String.prototype.codePointAt` method
|
1513
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
1514
|
-
codeAt: createMethod$2(false),
|
1515
|
-
// `String.prototype.at` method
|
1516
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
1517
|
-
charAt: createMethod$2(true)
|
1518
|
-
};
|
1519
|
-
|
1520
|
-
var charAt = stringMultibyte.charAt;
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
var STRING_ITERATOR = 'String Iterator';
|
1525
|
-
var setInternalState$2 = internalState.set;
|
1526
|
-
var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
|
1527
|
-
|
1528
|
-
// `String.prototype[@@iterator]` method
|
1529
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
1530
|
-
defineIterator(String, 'String', function (iterated) {
|
1531
|
-
setInternalState$2(this, {
|
1532
|
-
type: STRING_ITERATOR,
|
1533
|
-
string: String(iterated),
|
1534
|
-
index: 0
|
1535
|
-
});
|
1536
|
-
// `%StringIteratorPrototype%.next` method
|
1537
|
-
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
1538
|
-
}, function next() {
|
1539
|
-
var state = getInternalState$2(this);
|
1540
|
-
var string = state.string;
|
1541
|
-
var index = state.index;
|
1542
|
-
var point;
|
1543
|
-
if (index >= string.length) return { value: undefined, done: true };
|
1544
|
-
point = charAt(string, index);
|
1545
|
-
state.index += point.length;
|
1546
|
-
return { value: point, done: false };
|
1547
|
-
});
|
1548
|
-
|
1549
1584
|
// `RegExp.prototype.flags` getter implementation
|
1550
1585
|
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
1551
1586
|
var regexpFlags = function () {
|
@@ -1560,6 +1595,31 @@
|
|
1560
1595
|
return result;
|
1561
1596
|
};
|
1562
1597
|
|
1598
|
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
1599
|
+
// so we use an intermediate function.
|
1600
|
+
function RE(s, f) {
|
1601
|
+
return RegExp(s, f);
|
1602
|
+
}
|
1603
|
+
|
1604
|
+
var UNSUPPORTED_Y = fails(function () {
|
1605
|
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
1606
|
+
var re = RE('a', 'y');
|
1607
|
+
re.lastIndex = 2;
|
1608
|
+
return re.exec('abcd') != null;
|
1609
|
+
});
|
1610
|
+
|
1611
|
+
var BROKEN_CARET = fails(function () {
|
1612
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
1613
|
+
var re = RE('^r', 'gy');
|
1614
|
+
re.lastIndex = 2;
|
1615
|
+
return re.exec('str') != null;
|
1616
|
+
});
|
1617
|
+
|
1618
|
+
var regexpStickyHelpers = {
|
1619
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y,
|
1620
|
+
BROKEN_CARET: BROKEN_CARET
|
1621
|
+
};
|
1622
|
+
|
1563
1623
|
var nativeExec = RegExp.prototype.exec;
|
1564
1624
|
// This always refers to the native implementation, because the
|
1565
1625
|
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
@@ -1576,24 +1636,56 @@
|
|
1576
1636
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
1577
1637
|
})();
|
1578
1638
|
|
1639
|
+
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
1640
|
+
|
1579
1641
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
1580
1642
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
1581
1643
|
|
1582
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
1644
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
1583
1645
|
|
1584
1646
|
if (PATCH) {
|
1585
1647
|
patchedExec = function exec(str) {
|
1586
1648
|
var re = this;
|
1587
1649
|
var lastIndex, reCopy, match, i;
|
1650
|
+
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
1651
|
+
var flags = regexpFlags.call(re);
|
1652
|
+
var source = re.source;
|
1653
|
+
var charsAdded = 0;
|
1654
|
+
var strCopy = str;
|
1655
|
+
|
1656
|
+
if (sticky) {
|
1657
|
+
flags = flags.replace('y', '');
|
1658
|
+
if (flags.indexOf('g') === -1) {
|
1659
|
+
flags += 'g';
|
1660
|
+
}
|
1661
|
+
|
1662
|
+
strCopy = String(str).slice(re.lastIndex);
|
1663
|
+
// Support anchored sticky behavior.
|
1664
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
|
1665
|
+
source = '(?: ' + source + ')';
|
1666
|
+
strCopy = ' ' + strCopy;
|
1667
|
+
charsAdded++;
|
1668
|
+
}
|
1669
|
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
1670
|
+
// simulate the 'y' flag.
|
1671
|
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
1672
|
+
}
|
1588
1673
|
|
1589
1674
|
if (NPCG_INCLUDED) {
|
1590
|
-
reCopy = new RegExp('^' +
|
1675
|
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
1591
1676
|
}
|
1592
1677
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
1593
1678
|
|
1594
|
-
match = nativeExec.call(re,
|
1679
|
+
match = nativeExec.call(sticky ? reCopy : re, strCopy);
|
1595
1680
|
|
1596
|
-
if (
|
1681
|
+
if (sticky) {
|
1682
|
+
if (match) {
|
1683
|
+
match.input = match.input.slice(charsAdded);
|
1684
|
+
match[0] = match[0].slice(charsAdded);
|
1685
|
+
match.index = re.lastIndex;
|
1686
|
+
re.lastIndex += match[0].length;
|
1687
|
+
} else re.lastIndex = 0;
|
1688
|
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
1597
1689
|
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
1598
1690
|
}
|
1599
1691
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
@@ -1612,6 +1704,64 @@
|
|
1612
1704
|
|
1613
1705
|
var regexpExec = patchedExec;
|
1614
1706
|
|
1707
|
+
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
1708
|
+
exec: regexpExec
|
1709
|
+
});
|
1710
|
+
|
1711
|
+
// `String.prototype.{ codePointAt, at }` methods implementation
|
1712
|
+
var createMethod$2 = function (CONVERT_TO_STRING) {
|
1713
|
+
return function ($this, pos) {
|
1714
|
+
var S = String(requireObjectCoercible($this));
|
1715
|
+
var position = toInteger(pos);
|
1716
|
+
var size = S.length;
|
1717
|
+
var first, second;
|
1718
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1719
|
+
first = S.charCodeAt(position);
|
1720
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1721
|
+
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
1722
|
+
? CONVERT_TO_STRING ? S.charAt(position) : first
|
1723
|
+
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1724
|
+
};
|
1725
|
+
};
|
1726
|
+
|
1727
|
+
var stringMultibyte = {
|
1728
|
+
// `String.prototype.codePointAt` method
|
1729
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
1730
|
+
codeAt: createMethod$2(false),
|
1731
|
+
// `String.prototype.at` method
|
1732
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
1733
|
+
charAt: createMethod$2(true)
|
1734
|
+
};
|
1735
|
+
|
1736
|
+
var charAt = stringMultibyte.charAt;
|
1737
|
+
|
1738
|
+
|
1739
|
+
|
1740
|
+
var STRING_ITERATOR = 'String Iterator';
|
1741
|
+
var setInternalState$2 = internalState.set;
|
1742
|
+
var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
|
1743
|
+
|
1744
|
+
// `String.prototype[@@iterator]` method
|
1745
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
1746
|
+
defineIterator(String, 'String', function (iterated) {
|
1747
|
+
setInternalState$2(this, {
|
1748
|
+
type: STRING_ITERATOR,
|
1749
|
+
string: String(iterated),
|
1750
|
+
index: 0
|
1751
|
+
});
|
1752
|
+
// `%StringIteratorPrototype%.next` method
|
1753
|
+
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
1754
|
+
}, function next() {
|
1755
|
+
var state = getInternalState$2(this);
|
1756
|
+
var string = state.string;
|
1757
|
+
var index = state.index;
|
1758
|
+
var point;
|
1759
|
+
if (index >= string.length) return { value: undefined, done: true };
|
1760
|
+
point = charAt(string, index);
|
1761
|
+
state.index += point.length;
|
1762
|
+
return { value: point, done: false };
|
1763
|
+
});
|
1764
|
+
|
1615
1765
|
var SPECIES$3 = wellKnownSymbol('species');
|
1616
1766
|
|
1617
1767
|
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
@@ -1627,6 +1777,12 @@
|
|
1627
1777
|
return ''.replace(re, '$<a>') !== '7';
|
1628
1778
|
});
|
1629
1779
|
|
1780
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1781
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1782
|
+
var REPLACE_KEEPS_$0 = (function () {
|
1783
|
+
return 'a'.replace(/./, '$0') === '$0';
|
1784
|
+
})();
|
1785
|
+
|
1630
1786
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
1631
1787
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
1632
1788
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
@@ -1651,15 +1807,22 @@
|
|
1651
1807
|
// Symbol-named RegExp methods call .exec
|
1652
1808
|
var execCalled = false;
|
1653
1809
|
var re = /a/;
|
1654
|
-
re.exec = function () { execCalled = true; return null; };
|
1655
1810
|
|
1656
1811
|
if (KEY === 'split') {
|
1812
|
+
// We can't use real regex here since it causes deoptimization
|
1813
|
+
// and serious performance degradation in V8
|
1814
|
+
// https://github.com/zloirock/core-js/issues/306
|
1815
|
+
re = {};
|
1657
1816
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
1658
1817
|
// a new one. We need to return the patched regex when creating the new one.
|
1659
1818
|
re.constructor = {};
|
1660
1819
|
re.constructor[SPECIES$3] = function () { return re; };
|
1820
|
+
re.flags = '';
|
1821
|
+
re[SYMBOL] = /./[SYMBOL];
|
1661
1822
|
}
|
1662
1823
|
|
1824
|
+
re.exec = function () { execCalled = true; return null; };
|
1825
|
+
|
1663
1826
|
re[SYMBOL]('');
|
1664
1827
|
return !execCalled;
|
1665
1828
|
});
|
@@ -1667,7 +1830,7 @@
|
|
1667
1830
|
if (
|
1668
1831
|
!DELEGATES_TO_SYMBOL ||
|
1669
1832
|
!DELEGATES_TO_EXEC ||
|
1670
|
-
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
1833
|
+
(KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) ||
|
1671
1834
|
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
1672
1835
|
) {
|
1673
1836
|
var nativeRegExpMethod = /./[SYMBOL];
|
@@ -1682,7 +1845,7 @@
|
|
1682
1845
|
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
1683
1846
|
}
|
1684
1847
|
return { done: false };
|
1685
|
-
});
|
1848
|
+
}, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 });
|
1686
1849
|
var stringMethod = methods[0];
|
1687
1850
|
var regexMethod = methods[1];
|
1688
1851
|
|
@@ -1695,8 +1858,9 @@
|
|
1695
1858
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1696
1859
|
: function (string) { return regexMethod.call(string, this); }
|
1697
1860
|
);
|
1698
|
-
if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
|
1699
1861
|
}
|
1862
|
+
|
1863
|
+
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
1700
1864
|
};
|
1701
1865
|
|
1702
1866
|
var charAt$1 = stringMultibyte.charAt;
|
@@ -1737,7 +1901,7 @@
|
|
1737
1901
|
};
|
1738
1902
|
|
1739
1903
|
// @@replace logic
|
1740
|
-
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
|
1904
|
+
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
|
1741
1905
|
return [
|
1742
1906
|
// `String.prototype.replace` method
|
1743
1907
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
@@ -1751,8 +1915,10 @@
|
|
1751
1915
|
// `RegExp.prototype[@@replace]` method
|
1752
1916
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
1753
1917
|
function (regexp, replaceValue) {
|
1754
|
-
|
1755
|
-
|
1918
|
+
if (reason.REPLACE_KEEPS_$0 || (typeof replaceValue === 'string' && replaceValue.indexOf('$0') === -1)) {
|
1919
|
+
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
1920
|
+
if (res.done) return res.value;
|
1921
|
+
}
|
1756
1922
|
|
1757
1923
|
var rx = anObject(regexp);
|
1758
1924
|
var S = String(this);
|
@@ -2035,7 +2201,7 @@
|
|
2035
2201
|
var CollectionPrototype = Collection && Collection.prototype;
|
2036
2202
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
2037
2203
|
if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
|
2038
|
-
|
2204
|
+
createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
|
2039
2205
|
} catch (error) {
|
2040
2206
|
CollectionPrototype.forEach = arrayForEach;
|
2041
2207
|
}
|
@@ -2051,15 +2217,17 @@
|
|
2051
2217
|
if (CollectionPrototype$1) {
|
2052
2218
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
2053
2219
|
if (CollectionPrototype$1[ITERATOR$2] !== ArrayValues) try {
|
2054
|
-
|
2220
|
+
createNonEnumerableProperty(CollectionPrototype$1, ITERATOR$2, ArrayValues);
|
2055
2221
|
} catch (error) {
|
2056
2222
|
CollectionPrototype$1[ITERATOR$2] = ArrayValues;
|
2057
2223
|
}
|
2058
|
-
if (!CollectionPrototype$1[TO_STRING_TAG$3])
|
2224
|
+
if (!CollectionPrototype$1[TO_STRING_TAG$3]) {
|
2225
|
+
createNonEnumerableProperty(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1);
|
2226
|
+
}
|
2059
2227
|
if (domIterables[COLLECTION_NAME$1]) for (var METHOD_NAME in es_array_iterator) {
|
2060
2228
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
2061
2229
|
if (CollectionPrototype$1[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
|
2062
|
-
|
2230
|
+
createNonEnumerableProperty(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);
|
2063
2231
|
} catch (error) {
|
2064
2232
|
CollectionPrototype$1[METHOD_NAME] = es_array_iterator[METHOD_NAME];
|
2065
2233
|
}
|
@@ -2497,4 +2665,4 @@
|
|
2497
2665
|
return _class;
|
2498
2666
|
}($.BootstrapTable);
|
2499
2667
|
|
2500
|
-
}));
|
2668
|
+
})));
|