bootstrap-table-rails 1.15.4 → 1.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +147 -54
  3. data/lib/bootstrap-table-rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +876 -83
  5. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +684 -208
  6. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +686 -210
  7. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +66 -11
  8. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +1347 -727
  9. data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +254 -88
  10. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +139 -66
  11. data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1309 -258
  12. data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +139 -64
  13. data/vendor/assets/javascripts/bootstrap-table/extensions/{accent-neutralise/bootstrap-table-accent-neutralise.js → custom-view/bootstrap-table-custom-view.js} +582 -752
  14. data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +83 -42
  15. data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1219 -208
  16. data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +409 -210
  17. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css +1 -1
  18. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +1369 -904
  19. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +2361 -0
  20. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css +12 -14
  21. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +589 -423
  22. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +494 -107
  23. data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +3 -3
  24. data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +217 -73
  25. data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +143 -66
  26. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +374 -138
  27. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +137 -65
  28. data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +87 -42
  29. data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +388 -148
  30. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +643 -255
  31. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +348 -136
  32. data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +84 -44
  33. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +0 -1
  34. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +209 -76
  35. data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +490 -202
  36. data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +221 -115
  37. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +92 -42
  38. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +92 -42
  39. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +771 -0
  40. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +92 -42
  41. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +92 -42
  42. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +92 -42
  43. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +92 -42
  44. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +92 -42
  45. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +92 -42
  46. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +114 -63
  47. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +92 -42
  48. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +92 -42
  49. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +92 -42
  50. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +92 -42
  51. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +92 -42
  52. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +92 -42
  53. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +92 -42
  54. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +92 -42
  55. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +92 -42
  56. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +92 -42
  57. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +92 -42
  58. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +92 -42
  59. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +93 -43
  60. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +92 -42
  61. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +92 -42
  62. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +92 -42
  63. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +92 -42
  64. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +92 -42
  65. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +107 -57
  66. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +92 -42
  67. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +92 -42
  68. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +92 -42
  69. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +92 -42
  70. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +92 -42
  71. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +93 -43
  72. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +92 -42
  73. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +92 -42
  74. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +96 -45
  75. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +92 -42
  76. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +92 -42
  77. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +92 -42
  78. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +92 -42
  79. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +771 -0
  80. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +771 -0
  81. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +92 -42
  82. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +92 -42
  83. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +92 -42
  84. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +92 -42
  85. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +92 -42
  86. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +92 -42
  87. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +92 -42
  88. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +92 -42
  89. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +92 -42
  90. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +768 -0
  91. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +1049 -0
  92. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.eot +0 -0
  93. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.svg +28 -0
  94. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.ttf +0 -0
  95. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.woff +0 -0
  96. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +80 -12
  97. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +161 -63
  98. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +79 -14
  99. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +166 -65
  100. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +74 -10
  101. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +165 -67
  102. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +80 -14
  103. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +165 -67
  104. metadata +13 -16
  105. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.css +0 -3
  106. data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.css +0 -12
  107. data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +0 -2087
  108. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.css +0 -53
  109. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.js +0 -257
  110. data/vendor/assets/javascripts/bootstrap-table/extensions/multi-column-toggle/bootstrap-table-multi-toggle.js +0 -105
  111. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-search/bootstrap-table-multiple-search.js +0 -85
  112. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.css +0 -17
  113. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.js +0 -143
  114. data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +0 -1265
  115. data/vendor/assets/javascripts/bootstrap-table/extensions/select2-filter/bootstrap-table-select2-filter.js +0 -341
  116. data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.css +0 -1
  117. data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js +0 -142
@@ -2,9 +2,9 @@
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
- $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
7
+ $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
8
8
 
9
9
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
10
 
@@ -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 == O && globalThis) ||
24
- check(typeof window == O && window) ||
25
- check(typeof self == O && self) ||
26
- check(typeof commonjsGlobal == O && 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 hide = descriptors ? function (object, key, value) {
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
- hide(global_1, key, value);
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 store[key] || (store[key] = value !== undefined ? value : {});
218
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
203
219
  })('versions', []).push({
204
- version: '3.1.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
- hide(it, STATE, metadata);
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(functionToString).split('toString');
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')) hide(value, 'name', key);
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 hide(O, key, value);
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 || functionToString.call(this);
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(length, length).
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
- hide(sourceProperty, 'sham', true);
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 PROTOTYPE = 'prototype';
564
- var Empty = function () { /* empty */ };
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 createDict = function () {
595
+ var NullProtoObjectViaIFrame = function () {
568
596
  // Thrash, waste and sodomy: IE GC bug
569
597
  var iframe = documentCreateElement('iframe');
570
- var length = enumBugKeys.length;
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
- iframe.src = String(js);
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(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
606
+ iframeDocument.write(scriptTag('document.F=Object'));
582
607
  iframeDocument.close();
583
- createDict = iframeDocument.F;
584
- while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
585
- return createDict();
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();
586
626
  };
587
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
- Empty[PROTOTYPE] = anObject(O);
594
- result = new Empty();
595
- Empty[PROTOTYPE] = null;
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 = createDict();
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 store$1 = shared('wks');
672
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
632
673
 
633
674
  var wellKnownSymbol = function (name) {
634
- return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
635
- || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
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 JSON = global_1.JSON;
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
- JSON && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {
1004
- var symbol = $Symbol();
1005
- // MS Edge converts symbol values to JSON as {}
1006
- return nativeJSONStringify([symbol]) != '[null]'
1007
- // WebKit converts symbol values to JSON as null
1008
- || nativeJSONStringify({ a: symbol }) != '{}'
1009
- // V8 throws on boxed symbols
1010
- || nativeJSONStringify(Object(symbol)) != '{}';
1011
- }) }, {
1012
- stringify: function stringify(it) {
1013
- var args = [it];
1014
- var index = 1;
1015
- var replacer, $replacer;
1016
- while (arguments.length > index) args.push(arguments[index++]);
1017
- $replacer = replacer = args[1];
1018
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
1019
- if (!isArray(replacer)) replacer = function (key, value) {
1020
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
1021
- if (!isSymbol(value)) return value;
1022
- };
1023
- args[1] = replacer;
1024
- return nativeJSONStringify.apply(JSON, args);
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]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
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
- return !fails(function () {
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
- var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
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
- hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
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)) hide(IteratorPrototype, ITERATOR, returnThis);
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
- hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
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
- hide(IterablePrototype, ITERATOR$1, defaultIterator);
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: !arrayMethodHasSpeciesSupport('map') }, {
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$1)) == '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 = String(test) !== '[object z]' ? function toString() {
1574
+ var objectToString = toStringTagSupport ? {}.toString : function toString() {
1484
1575
  return '[object ' + classof(this) + ']';
1485
- } : test.toString;
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 (objectToString !== ObjectPrototype$2.toString) {
1492
- redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });
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('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
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, str);
1679
+ match = nativeExec.call(sticky ? reCopy : re, strCopy);
1595
1680
 
1596
- if (UPDATES_LAST_INDEX_WRONG && match) {
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
- var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
1755
- if (res.done) return res.value;
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
- hide(CollectionPrototype, 'forEach', arrayForEach);
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
- hide(CollectionPrototype$1, ITERATOR$2, ArrayValues);
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]) hide(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1);
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
- hide(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);
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
  }
@@ -2217,12 +2385,14 @@
2217
2385
  exportFooter: false
2218
2386
  });
2219
2387
  $.extend($.fn.bootstrapTable.columnDefaults, {
2220
- forceExport: false
2388
+ forceExport: false,
2389
+ forceHide: false
2221
2390
  });
2222
2391
  $.extend($.fn.bootstrapTable.defaults.icons, {
2223
2392
  export: {
2224
2393
  bootstrap3: 'glyphicon-export icon-share',
2225
- materialize: 'file_download'
2394
+ materialize: 'file_download',
2395
+ 'bootstrap-table': 'icon-download'
2226
2396
  }[$.fn.bootstrapTable.theme] || 'fa-download'
2227
2397
  });
2228
2398
  $.extend($.fn.bootstrapTable.locales, {
@@ -2280,9 +2450,6 @@
2280
2450
  }
2281
2451
 
2282
2452
  var $menu = $(this.constants.html.toolbarDropdown.join(''));
2283
- this.$export = $("\n <div class=\"export ".concat(this.constants.classes.buttonsDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\"\n aria-label=\"Export\"\n data-toggle=\"dropdown\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n </div>\n ")).appendTo($btnGroup);
2284
- this.$export.append($menu);
2285
- this.updateExportButton();
2286
2453
  var exportTypes = o.exportTypes;
2287
2454
 
2288
2455
  if (typeof exportTypes === 'string') {
@@ -2290,43 +2457,52 @@
2290
2457
  exportTypes = types.map(function (t) {
2291
2458
  return t.slice(1, -1);
2292
2459
  });
2293
- } // themes support
2294
-
2295
-
2296
- if ($menu.children().length) {
2297
- $menu = $menu.children().eq(0);
2298
2460
  }
2299
2461
 
2300
- var _iteratorNormalCompletion = true;
2301
- var _didIteratorError = false;
2302
- var _iteratorError = undefined;
2462
+ this.$export = $(exportTypes.length === 1 ? "\n <div class=\"export ".concat(this.constants.classes.buttonsDropdown, "\"\n data-type=\"").concat(exportTypes[0], "\">\n <button class=\"").concat(this.constants.buttonsClass, "\"\n aria-label=\"Export\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n </button>\n </div>\n ") : "\n <div class=\"export ".concat(this.constants.classes.buttonsDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\"\n aria-label=\"Export\"\n data-toggle=\"dropdown\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n </div>\n ")).appendTo($btnGroup);
2463
+ var $items = this.$export;
2303
2464
 
2304
- try {
2305
- for (var _iterator = exportTypes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2306
- var type = _step.value;
2465
+ if (exportTypes.length > 1) {
2466
+ this.$export.append($menu); // themes support
2307
2467
 
2308
- if (TYPE_NAME.hasOwnProperty(type)) {
2309
- var $item = $(Utils.sprintf(this.constants.html.pageDropdownItem, '', TYPE_NAME[type]));
2310
- $item.attr('data-type', type);
2311
- $menu.append($item);
2312
- }
2468
+ if ($menu.children().length) {
2469
+ $menu = $menu.children().eq(0);
2313
2470
  }
2314
- } catch (err) {
2315
- _didIteratorError = true;
2316
- _iteratorError = err;
2317
- } finally {
2471
+
2472
+ var _iteratorNormalCompletion = true;
2473
+ var _didIteratorError = false;
2474
+ var _iteratorError = undefined;
2475
+
2318
2476
  try {
2319
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2320
- _iterator.return();
2477
+ for (var _iterator = exportTypes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2478
+ var type = _step.value;
2479
+
2480
+ if (TYPE_NAME.hasOwnProperty(type)) {
2481
+ var $item = $(Utils.sprintf(this.constants.html.pageDropdownItem, '', TYPE_NAME[type]));
2482
+ $item.attr('data-type', type);
2483
+ $menu.append($item);
2484
+ }
2321
2485
  }
2486
+ } catch (err) {
2487
+ _didIteratorError = true;
2488
+ _iteratorError = err;
2322
2489
  } finally {
2323
- if (_didIteratorError) {
2324
- throw _iteratorError;
2490
+ try {
2491
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2492
+ _iterator.return();
2493
+ }
2494
+ } finally {
2495
+ if (_didIteratorError) {
2496
+ throw _iteratorError;
2497
+ }
2325
2498
  }
2326
2499
  }
2500
+
2501
+ $items = $menu.children();
2327
2502
  }
2328
2503
 
2329
- $menu.children().click(function (e) {
2504
+ this.updateExportButton();
2505
+ $items.click(function (e) {
2330
2506
  e.preventDefault();
2331
2507
  var type = $(e.currentTarget).data('type');
2332
2508
  var exportOptions = {
@@ -2373,6 +2549,12 @@
2373
2549
  _this2.toggleView();
2374
2550
  }
2375
2551
 
2552
+ _this2.columns.forEach(function (row) {
2553
+ if (row.forceHide) {
2554
+ _this2.hideColumn(row.field);
2555
+ }
2556
+ });
2557
+
2376
2558
  var data = _this2.getData();
2377
2559
 
2378
2560
  if (o.exportFooter) {
@@ -2427,6 +2609,13 @@
2427
2609
  _this2.hideColumn(row.field);
2428
2610
  }
2429
2611
  });
2612
+
2613
+ _this2.columns.forEach(function (row) {
2614
+ if (row.forceHide) {
2615
+ _this2.showColumn(row.field);
2616
+ }
2617
+ });
2618
+
2430
2619
  if (callback) callback();
2431
2620
  }
2432
2621
  }, o.exportOptions, options));
@@ -2448,6 +2637,7 @@
2448
2637
  } else if (o.exportDataType === 'selected') {
2449
2638
  var data = this.getData();
2450
2639
  var selectedData = this.getSelections();
2640
+ var pagination = o.pagination;
2451
2641
 
2452
2642
  if (!selectedData.length) {
2453
2643
  return;
@@ -2463,7 +2653,16 @@
2463
2653
  }
2464
2654
 
2465
2655
  this.load(selectedData);
2656
+
2657
+ if (pagination) {
2658
+ this.togglePagination();
2659
+ }
2660
+
2466
2661
  doExport(function () {
2662
+ if (pagination) {
2663
+ _this2.togglePagination();
2664
+ }
2665
+
2467
2666
  _this2.load(data);
2468
2667
  });
2469
2668
  this.trigger('export-saved', selectedData);
@@ -2491,4 +2690,4 @@
2491
2690
  return _class;
2492
2691
  }($.BootstrapTable);
2493
2692
 
2494
- }));
2693
+ })));