bootstrap-table-i18n-enhance.js 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($) { 'use strict';
  6. function _assertThisInitialized(e) {
  7. if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  8. return e;
  9. }
  10. function _callSuper(t, o, e) {
  11. return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
  12. }
  13. function _classCallCheck(a, n) {
  14. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  15. }
  16. function _defineProperties(e, r) {
  17. for (var t = 0; t < r.length; t++) {
  18. var o = r[t];
  19. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
  20. }
  21. }
  22. function _createClass(e, r, t) {
  23. return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
  24. writable: !1
  25. }), e;
  26. }
  27. function _getPrototypeOf(t) {
  28. return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
  29. return t.__proto__ || Object.getPrototypeOf(t);
  30. }, _getPrototypeOf(t);
  31. }
  32. function _inherits(t, e) {
  33. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  34. t.prototype = Object.create(e && e.prototype, {
  35. constructor: {
  36. value: t,
  37. writable: !0,
  38. configurable: !0
  39. }
  40. }), Object.defineProperty(t, "prototype", {
  41. writable: !1
  42. }), e && _setPrototypeOf(t, e);
  43. }
  44. function _isNativeReflectConstruct() {
  45. try {
  46. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  47. } catch (t) {}
  48. return (_isNativeReflectConstruct = function () {
  49. return !!t;
  50. })();
  51. }
  52. function _possibleConstructorReturn(t, e) {
  53. if (e && ("object" == typeof e || "function" == typeof e)) return e;
  54. if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
  55. return _assertThisInitialized(t);
  56. }
  57. function _setPrototypeOf(t, e) {
  58. return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
  59. return t.__proto__ = e, t;
  60. }, _setPrototypeOf(t, e);
  61. }
  62. function _toPrimitive(t, r) {
  63. if ("object" != typeof t || !t) return t;
  64. var e = t[Symbol.toPrimitive];
  65. if (void 0 !== e) {
  66. var i = e.call(t, r);
  67. if ("object" != typeof i) return i;
  68. throw new TypeError("@@toPrimitive must return a primitive value.");
  69. }
  70. return (String )(t);
  71. }
  72. function _toPropertyKey(t) {
  73. var i = _toPrimitive(t, "string");
  74. return "symbol" == typeof i ? i : i + "";
  75. }
  76. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  77. var check = function (it) {
  78. return it && it.Math === Math && it;
  79. };
  80. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  81. var global$a =
  82. // eslint-disable-next-line es/no-global-this -- safe
  83. check(typeof globalThis == 'object' && globalThis) ||
  84. check(typeof window == 'object' && window) ||
  85. // eslint-disable-next-line no-restricted-globals -- safe
  86. check(typeof self == 'object' && self) ||
  87. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  88. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  89. // eslint-disable-next-line no-new-func -- fallback
  90. (function () { return this; })() || Function('return this')();
  91. var sharedStore = {exports: {}};
  92. var global$9 = global$a;
  93. // eslint-disable-next-line es/no-object-defineproperty -- safe
  94. var defineProperty$1 = Object.defineProperty;
  95. var defineGlobalProperty$2 = function (key, value) {
  96. try {
  97. defineProperty$1(global$9, key, { value: value, configurable: true, writable: true });
  98. } catch (error) {
  99. global$9[key] = value;
  100. } return value;
  101. };
  102. var globalThis$1 = global$a;
  103. var defineGlobalProperty$1 = defineGlobalProperty$2;
  104. var SHARED = '__core-js_shared__';
  105. var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$1(SHARED, {});
  106. (store$3.versions || (store$3.versions = [])).push({
  107. version: '3.37.1',
  108. mode: 'global',
  109. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  110. license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
  111. source: 'https://github.com/zloirock/core-js'
  112. });
  113. var sharedStoreExports = sharedStore.exports;
  114. var store$2 = sharedStoreExports;
  115. var shared$3 = function (key, value) {
  116. return store$2[key] || (store$2[key] = value || {});
  117. };
  118. var fails$9 = function (exec) {
  119. try {
  120. return !!exec();
  121. } catch (error) {
  122. return true;
  123. }
  124. };
  125. var fails$8 = fails$9;
  126. var functionBindNative = !fails$8(function () {
  127. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  128. var test = (function () { /* empty */ }).bind();
  129. // eslint-disable-next-line no-prototype-builtins -- safe
  130. return typeof test != 'function' || test.hasOwnProperty('prototype');
  131. });
  132. var NATIVE_BIND$2 = functionBindNative;
  133. var FunctionPrototype$1 = Function.prototype;
  134. var call$3 = FunctionPrototype$1.call;
  135. var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$1.bind.bind(call$3, call$3);
  136. var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
  137. return function () {
  138. return call$3.apply(fn, arguments);
  139. };
  140. };
  141. // we can't use just `it == null` since of `document.all` special case
  142. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  143. var isNullOrUndefined$2 = function (it) {
  144. return it === null || it === undefined;
  145. };
  146. var isNullOrUndefined$1 = isNullOrUndefined$2;
  147. var $TypeError$5 = TypeError;
  148. // `RequireObjectCoercible` abstract operation
  149. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  150. var requireObjectCoercible$1 = function (it) {
  151. if (isNullOrUndefined$1(it)) throw new $TypeError$5("Can't call method on " + it);
  152. return it;
  153. };
  154. var requireObjectCoercible = requireObjectCoercible$1;
  155. var $Object$3 = Object;
  156. // `ToObject` abstract operation
  157. // https://tc39.es/ecma262/#sec-toobject
  158. var toObject$2 = function (argument) {
  159. return $Object$3(requireObjectCoercible(argument));
  160. };
  161. var uncurryThis$a = functionUncurryThis;
  162. var toObject$1 = toObject$2;
  163. var hasOwnProperty = uncurryThis$a({}.hasOwnProperty);
  164. // `HasOwnProperty` abstract operation
  165. // https://tc39.es/ecma262/#sec-hasownproperty
  166. // eslint-disable-next-line es/no-object-hasown -- safe
  167. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  168. return hasOwnProperty(toObject$1(it), key);
  169. };
  170. var uncurryThis$9 = functionUncurryThis;
  171. var id = 0;
  172. var postfix = Math.random();
  173. var toString$2 = uncurryThis$9(1.0.toString);
  174. var uid$2 = function (key) {
  175. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
  176. };
  177. var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
  178. var global$8 = global$a;
  179. var userAgent = engineUserAgent;
  180. var process = global$8.process;
  181. var Deno = global$8.Deno;
  182. var versions = process && process.versions || Deno && Deno.version;
  183. var v8 = versions && versions.v8;
  184. var match, version;
  185. if (v8) {
  186. match = v8.split('.');
  187. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  188. // but their correct versions are not interesting for us
  189. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  190. }
  191. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  192. // so check `userAgent` even if `.v8` exists, but 0
  193. if (!version && userAgent) {
  194. match = userAgent.match(/Edge\/(\d+)/);
  195. if (!match || match[1] >= 74) {
  196. match = userAgent.match(/Chrome\/(\d+)/);
  197. if (match) version = +match[1];
  198. }
  199. }
  200. var engineV8Version = version;
  201. /* eslint-disable es/no-symbol -- required for testing */
  202. var V8_VERSION = engineV8Version;
  203. var fails$7 = fails$9;
  204. var global$7 = global$a;
  205. var $String$3 = global$7.String;
  206. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  207. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(function () {
  208. var symbol = Symbol('symbol detection');
  209. // Chrome 38 Symbol has incorrect toString conversion
  210. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  211. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  212. // of course, fail.
  213. return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
  214. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  215. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  216. });
  217. /* eslint-disable es/no-symbol -- required for testing */
  218. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  219. var useSymbolAsUid = NATIVE_SYMBOL$1
  220. && !Symbol.sham
  221. && typeof Symbol.iterator == 'symbol';
  222. var global$6 = global$a;
  223. var shared$2 = shared$3;
  224. var hasOwn$3 = hasOwnProperty_1;
  225. var uid$1 = uid$2;
  226. var NATIVE_SYMBOL = symbolConstructorDetection;
  227. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  228. var Symbol$1 = global$6.Symbol;
  229. var WellKnownSymbolsStore = shared$2('wks');
  230. var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  231. var wellKnownSymbol$4 = function (name) {
  232. if (!hasOwn$3(WellKnownSymbolsStore, name)) {
  233. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$3(Symbol$1, name)
  234. ? Symbol$1[name]
  235. : createWellKnownSymbol('Symbol.' + name);
  236. } return WellKnownSymbolsStore[name];
  237. };
  238. var wellKnownSymbol$3 = wellKnownSymbol$4;
  239. var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
  240. var test = {};
  241. test[TO_STRING_TAG$1] = 'z';
  242. var toStringTagSupport = String(test) === '[object z]';
  243. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  244. var documentAll = typeof document == 'object' && document.all;
  245. // `IsCallable` abstract operation
  246. // https://tc39.es/ecma262/#sec-iscallable
  247. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  248. var isCallable$b = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  249. return typeof argument == 'function' || argument === documentAll;
  250. } : function (argument) {
  251. return typeof argument == 'function';
  252. };
  253. var objectDefineProperty = {};
  254. var fails$6 = fails$9;
  255. // Detect IE8's incomplete defineProperty implementation
  256. var descriptors = !fails$6(function () {
  257. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  258. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  259. });
  260. var isCallable$a = isCallable$b;
  261. var isObject$6 = function (it) {
  262. return typeof it == 'object' ? it !== null : isCallable$a(it);
  263. };
  264. var global$5 = global$a;
  265. var isObject$5 = isObject$6;
  266. var document$1 = global$5.document;
  267. // typeof document.createElement is 'object' in old IE
  268. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  269. var documentCreateElement$1 = function (it) {
  270. return EXISTS$1 ? document$1.createElement(it) : {};
  271. };
  272. var DESCRIPTORS$5 = descriptors;
  273. var fails$5 = fails$9;
  274. var createElement = documentCreateElement$1;
  275. // Thanks to IE8 for its funny defineProperty
  276. var ie8DomDefine = !DESCRIPTORS$5 && !fails$5(function () {
  277. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  278. return Object.defineProperty(createElement('div'), 'a', {
  279. get: function () { return 7; }
  280. }).a !== 7;
  281. });
  282. var DESCRIPTORS$4 = descriptors;
  283. var fails$4 = fails$9;
  284. // V8 ~ Chrome 36-
  285. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  286. var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$4(function () {
  287. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  288. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  289. value: 42,
  290. writable: false
  291. }).prototype !== 42;
  292. });
  293. var isObject$4 = isObject$6;
  294. var $String$2 = String;
  295. var $TypeError$4 = TypeError;
  296. // `Assert: Type(argument) is Object`
  297. var anObject$1 = function (argument) {
  298. if (isObject$4(argument)) return argument;
  299. throw new $TypeError$4($String$2(argument) + ' is not an object');
  300. };
  301. var NATIVE_BIND$1 = functionBindNative;
  302. var call$2 = Function.prototype.call;
  303. var functionCall = NATIVE_BIND$1 ? call$2.bind(call$2) : function () {
  304. return call$2.apply(call$2, arguments);
  305. };
  306. var global$4 = global$a;
  307. var isCallable$9 = isCallable$b;
  308. var aFunction = function (argument) {
  309. return isCallable$9(argument) ? argument : undefined;
  310. };
  311. var getBuiltIn$2 = function (namespace, method) {
  312. return arguments.length < 2 ? aFunction(global$4[namespace]) : global$4[namespace] && global$4[namespace][method];
  313. };
  314. var uncurryThis$8 = functionUncurryThis;
  315. var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
  316. var getBuiltIn$1 = getBuiltIn$2;
  317. var isCallable$8 = isCallable$b;
  318. var isPrototypeOf = objectIsPrototypeOf;
  319. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  320. var $Object$2 = Object;
  321. var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
  322. return typeof it == 'symbol';
  323. } : function (it) {
  324. var $Symbol = getBuiltIn$1('Symbol');
  325. return isCallable$8($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
  326. };
  327. var $String$1 = String;
  328. var tryToString$1 = function (argument) {
  329. try {
  330. return $String$1(argument);
  331. } catch (error) {
  332. return 'Object';
  333. }
  334. };
  335. var isCallable$7 = isCallable$b;
  336. var tryToString = tryToString$1;
  337. var $TypeError$3 = TypeError;
  338. // `Assert: IsCallable(argument) is true`
  339. var aCallable$2 = function (argument) {
  340. if (isCallable$7(argument)) return argument;
  341. throw new $TypeError$3(tryToString(argument) + ' is not a function');
  342. };
  343. var aCallable$1 = aCallable$2;
  344. var isNullOrUndefined = isNullOrUndefined$2;
  345. // `GetMethod` abstract operation
  346. // https://tc39.es/ecma262/#sec-getmethod
  347. var getMethod$1 = function (V, P) {
  348. var func = V[P];
  349. return isNullOrUndefined(func) ? undefined : aCallable$1(func);
  350. };
  351. var call$1 = functionCall;
  352. var isCallable$6 = isCallable$b;
  353. var isObject$3 = isObject$6;
  354. var $TypeError$2 = TypeError;
  355. // `OrdinaryToPrimitive` abstract operation
  356. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  357. var ordinaryToPrimitive$1 = function (input, pref) {
  358. var fn, val;
  359. if (pref === 'string' && isCallable$6(fn = input.toString) && !isObject$3(val = call$1(fn, input))) return val;
  360. if (isCallable$6(fn = input.valueOf) && !isObject$3(val = call$1(fn, input))) return val;
  361. if (pref !== 'string' && isCallable$6(fn = input.toString) && !isObject$3(val = call$1(fn, input))) return val;
  362. throw new $TypeError$2("Can't convert object to primitive value");
  363. };
  364. var call = functionCall;
  365. var isObject$2 = isObject$6;
  366. var isSymbol$1 = isSymbol$2;
  367. var getMethod = getMethod$1;
  368. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  369. var wellKnownSymbol$2 = wellKnownSymbol$4;
  370. var $TypeError$1 = TypeError;
  371. var TO_PRIMITIVE = wellKnownSymbol$2('toPrimitive');
  372. // `ToPrimitive` abstract operation
  373. // https://tc39.es/ecma262/#sec-toprimitive
  374. var toPrimitive$1 = function (input, pref) {
  375. if (!isObject$2(input) || isSymbol$1(input)) return input;
  376. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  377. var result;
  378. if (exoticToPrim) {
  379. if (pref === undefined) pref = 'default';
  380. result = call(exoticToPrim, input, pref);
  381. if (!isObject$2(result) || isSymbol$1(result)) return result;
  382. throw new $TypeError$1("Can't convert object to primitive value");
  383. }
  384. if (pref === undefined) pref = 'number';
  385. return ordinaryToPrimitive(input, pref);
  386. };
  387. var toPrimitive = toPrimitive$1;
  388. var isSymbol = isSymbol$2;
  389. // `ToPropertyKey` abstract operation
  390. // https://tc39.es/ecma262/#sec-topropertykey
  391. var toPropertyKey$1 = function (argument) {
  392. var key = toPrimitive(argument, 'string');
  393. return isSymbol(key) ? key : key + '';
  394. };
  395. var DESCRIPTORS$3 = descriptors;
  396. var IE8_DOM_DEFINE = ie8DomDefine;
  397. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  398. var anObject = anObject$1;
  399. var toPropertyKey = toPropertyKey$1;
  400. var $TypeError = TypeError;
  401. // eslint-disable-next-line es/no-object-defineproperty -- safe
  402. var $defineProperty = Object.defineProperty;
  403. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  404. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  405. var ENUMERABLE = 'enumerable';
  406. var CONFIGURABLE$1 = 'configurable';
  407. var WRITABLE = 'writable';
  408. // `Object.defineProperty` method
  409. // https://tc39.es/ecma262/#sec-object.defineproperty
  410. objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  411. anObject(O);
  412. P = toPropertyKey(P);
  413. anObject(Attributes);
  414. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  415. var current = $getOwnPropertyDescriptor(O, P);
  416. if (current && current[WRITABLE]) {
  417. O[P] = Attributes.value;
  418. Attributes = {
  419. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  420. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  421. writable: false
  422. };
  423. }
  424. } return $defineProperty(O, P, Attributes);
  425. } : $defineProperty : function defineProperty(O, P, Attributes) {
  426. anObject(O);
  427. P = toPropertyKey(P);
  428. anObject(Attributes);
  429. if (IE8_DOM_DEFINE) try {
  430. return $defineProperty(O, P, Attributes);
  431. } catch (error) { /* empty */ }
  432. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
  433. if ('value' in Attributes) O[P] = Attributes.value;
  434. return O;
  435. };
  436. var makeBuiltIn$2 = {exports: {}};
  437. var DESCRIPTORS$2 = descriptors;
  438. var hasOwn$2 = hasOwnProperty_1;
  439. var FunctionPrototype = Function.prototype;
  440. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  441. var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
  442. var EXISTS = hasOwn$2(FunctionPrototype, 'name');
  443. // additional protection from minified / mangled / dropped function names
  444. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  445. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
  446. var functionName = {
  447. EXISTS: EXISTS,
  448. PROPER: PROPER,
  449. CONFIGURABLE: CONFIGURABLE
  450. };
  451. var uncurryThis$7 = functionUncurryThis;
  452. var isCallable$5 = isCallable$b;
  453. var store$1 = sharedStoreExports;
  454. var functionToString = uncurryThis$7(Function.toString);
  455. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  456. if (!isCallable$5(store$1.inspectSource)) {
  457. store$1.inspectSource = function (it) {
  458. return functionToString(it);
  459. };
  460. }
  461. var inspectSource$2 = store$1.inspectSource;
  462. var global$3 = global$a;
  463. var isCallable$4 = isCallable$b;
  464. var WeakMap$1 = global$3.WeakMap;
  465. var weakMapBasicDetection = isCallable$4(WeakMap$1) && /native code/.test(String(WeakMap$1));
  466. var createPropertyDescriptor$1 = function (bitmap, value) {
  467. return {
  468. enumerable: !(bitmap & 1),
  469. configurable: !(bitmap & 2),
  470. writable: !(bitmap & 4),
  471. value: value
  472. };
  473. };
  474. var DESCRIPTORS$1 = descriptors;
  475. var definePropertyModule$1 = objectDefineProperty;
  476. var createPropertyDescriptor = createPropertyDescriptor$1;
  477. var createNonEnumerableProperty$2 = DESCRIPTORS$1 ? function (object, key, value) {
  478. return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
  479. } : function (object, key, value) {
  480. object[key] = value;
  481. return object;
  482. };
  483. var shared$1 = shared$3;
  484. var uid = uid$2;
  485. var keys = shared$1('keys');
  486. var sharedKey$1 = function (key) {
  487. return keys[key] || (keys[key] = uid(key));
  488. };
  489. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  490. var global$2 = global$a;
  491. var isObject$1 = isObject$6;
  492. var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
  493. var hasOwn$1 = hasOwnProperty_1;
  494. var shared = sharedStoreExports;
  495. var sharedKey = sharedKey$1;
  496. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  497. var TypeError$1 = global$2.TypeError;
  498. var WeakMap = global$2.WeakMap;
  499. var set, get, has;
  500. var enforce = function (it) {
  501. return has(it) ? get(it) : set(it, {});
  502. };
  503. var getterFor = function (TYPE) {
  504. return function (it) {
  505. var state;
  506. if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
  507. throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  508. } return state;
  509. };
  510. };
  511. if (NATIVE_WEAK_MAP || shared.state) {
  512. var store = shared.state || (shared.state = new WeakMap());
  513. /* eslint-disable no-self-assign -- prototype methods protection */
  514. store.get = store.get;
  515. store.has = store.has;
  516. store.set = store.set;
  517. /* eslint-enable no-self-assign -- prototype methods protection */
  518. set = function (it, metadata) {
  519. if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  520. metadata.facade = it;
  521. store.set(it, metadata);
  522. return metadata;
  523. };
  524. get = function (it) {
  525. return store.get(it) || {};
  526. };
  527. has = function (it) {
  528. return store.has(it);
  529. };
  530. } else {
  531. var STATE = sharedKey('state');
  532. set = function (it, metadata) {
  533. if (hasOwn$1(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  534. metadata.facade = it;
  535. createNonEnumerableProperty$1(it, STATE, metadata);
  536. return metadata;
  537. };
  538. get = function (it) {
  539. return hasOwn$1(it, STATE) ? it[STATE] : {};
  540. };
  541. has = function (it) {
  542. return hasOwn$1(it, STATE);
  543. };
  544. }
  545. var internalState = {
  546. set: set,
  547. get: get,
  548. has: has,
  549. enforce: enforce,
  550. getterFor: getterFor
  551. };
  552. var uncurryThis$6 = functionUncurryThis;
  553. var fails$3 = fails$9;
  554. var isCallable$3 = isCallable$b;
  555. var hasOwn = hasOwnProperty_1;
  556. var DESCRIPTORS = descriptors;
  557. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  558. var inspectSource$1 = inspectSource$2;
  559. var InternalStateModule = internalState;
  560. var enforceInternalState = InternalStateModule.enforce;
  561. var getInternalState = InternalStateModule.get;
  562. var $String = String;
  563. // eslint-disable-next-line es/no-object-defineproperty -- safe
  564. var defineProperty = Object.defineProperty;
  565. var stringSlice$1 = uncurryThis$6(''.slice);
  566. var replace = uncurryThis$6(''.replace);
  567. var join = uncurryThis$6([].join);
  568. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails$3(function () {
  569. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  570. });
  571. var TEMPLATE = String(String).split('String');
  572. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  573. if (stringSlice$1($String(name), 0, 7) === 'Symbol(') {
  574. name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  575. }
  576. if (options && options.getter) name = 'get ' + name;
  577. if (options && options.setter) name = 'set ' + name;
  578. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  579. if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
  580. else value.name = name;
  581. }
  582. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  583. defineProperty(value, 'length', { value: options.arity });
  584. }
  585. try {
  586. if (options && hasOwn(options, 'constructor') && options.constructor) {
  587. if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
  588. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  589. } else if (value.prototype) value.prototype = undefined;
  590. } catch (error) { /* empty */ }
  591. var state = enforceInternalState(value);
  592. if (!hasOwn(state, 'source')) {
  593. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  594. } return value;
  595. };
  596. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  597. // eslint-disable-next-line no-extend-native -- required
  598. Function.prototype.toString = makeBuiltIn$1(function toString() {
  599. return isCallable$3(this) && getInternalState(this).source || inspectSource$1(this);
  600. }, 'toString');
  601. var makeBuiltInExports = makeBuiltIn$2.exports;
  602. var isCallable$2 = isCallable$b;
  603. var definePropertyModule = objectDefineProperty;
  604. var makeBuiltIn = makeBuiltInExports;
  605. var defineGlobalProperty = defineGlobalProperty$2;
  606. var defineBuiltIn$1 = function (O, key, value, options) {
  607. if (!options) options = {};
  608. var simple = options.enumerable;
  609. var name = options.name !== undefined ? options.name : key;
  610. if (isCallable$2(value)) makeBuiltIn(value, name, options);
  611. if (options.global) {
  612. if (simple) O[key] = value;
  613. else defineGlobalProperty(key, value);
  614. } else {
  615. try {
  616. if (!options.unsafe) delete O[key];
  617. else if (O[key]) simple = true;
  618. } catch (error) { /* empty */ }
  619. if (simple) O[key] = value;
  620. else definePropertyModule.f(O, key, {
  621. value: value,
  622. enumerable: false,
  623. configurable: !options.nonConfigurable,
  624. writable: !options.nonWritable
  625. });
  626. } return O;
  627. };
  628. var uncurryThis$5 = functionUncurryThis;
  629. var toString$1 = uncurryThis$5({}.toString);
  630. var stringSlice = uncurryThis$5(''.slice);
  631. var classofRaw$2 = function (it) {
  632. return stringSlice(toString$1(it), 8, -1);
  633. };
  634. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  635. var isCallable$1 = isCallable$b;
  636. var classofRaw$1 = classofRaw$2;
  637. var wellKnownSymbol$1 = wellKnownSymbol$4;
  638. var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
  639. var $Object$1 = Object;
  640. // ES3 wrong here
  641. var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
  642. // fallback for IE11 Script Access Denied error
  643. var tryGet = function (it, key) {
  644. try {
  645. return it[key];
  646. } catch (error) { /* empty */ }
  647. };
  648. // getting tag from ES6+ `Object.prototype.toString`
  649. var classof$4 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) {
  650. var O, tag, result;
  651. return it === undefined ? 'Undefined' : it === null ? 'Null'
  652. // @@toStringTag case
  653. : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  654. // builtinTag case
  655. : CORRECT_ARGUMENTS ? classofRaw$1(O)
  656. // ES3 arguments fallback
  657. : (result = classofRaw$1(O)) === 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
  658. };
  659. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  660. var classof$3 = classof$4;
  661. // `Object.prototype.toString` method implementation
  662. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  663. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  664. return '[object ' + classof$3(this) + ']';
  665. };
  666. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  667. var defineBuiltIn = defineBuiltIn$1;
  668. var toString = objectToString;
  669. // `Object.prototype.toString` method
  670. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  671. if (!TO_STRING_TAG_SUPPORT) {
  672. defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
  673. }
  674. // iterable DOM collections
  675. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  676. var domIterables = {
  677. CSSRuleList: 0,
  678. CSSStyleDeclaration: 0,
  679. CSSValueList: 0,
  680. ClientRectList: 0,
  681. DOMRectList: 0,
  682. DOMStringList: 0,
  683. DOMTokenList: 1,
  684. DataTransferItemList: 0,
  685. FileList: 0,
  686. HTMLAllCollection: 0,
  687. HTMLCollection: 0,
  688. HTMLFormElement: 0,
  689. HTMLSelectElement: 0,
  690. MediaList: 0,
  691. MimeTypeArray: 0,
  692. NamedNodeMap: 0,
  693. NodeList: 1,
  694. PaintRequestList: 0,
  695. Plugin: 0,
  696. PluginArray: 0,
  697. SVGLengthList: 0,
  698. SVGNumberList: 0,
  699. SVGPathSegList: 0,
  700. SVGPointList: 0,
  701. SVGStringList: 0,
  702. SVGTransformList: 0,
  703. SourceBufferList: 0,
  704. StyleSheetList: 0,
  705. TextTrackCueList: 0,
  706. TextTrackList: 0,
  707. TouchList: 0
  708. };
  709. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  710. var documentCreateElement = documentCreateElement$1;
  711. var classList = documentCreateElement('span').classList;
  712. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  713. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  714. var classofRaw = classofRaw$2;
  715. var uncurryThis$4 = functionUncurryThis;
  716. var functionUncurryThisClause = function (fn) {
  717. // Nashorn bug:
  718. // https://github.com/zloirock/core-js/issues/1128
  719. // https://github.com/zloirock/core-js/issues/1130
  720. if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
  721. };
  722. var uncurryThis$3 = functionUncurryThisClause;
  723. var aCallable = aCallable$2;
  724. var NATIVE_BIND = functionBindNative;
  725. var bind$1 = uncurryThis$3(uncurryThis$3.bind);
  726. // optional / simple context binding
  727. var functionBindContext = function (fn, that) {
  728. aCallable(fn);
  729. return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
  730. return fn.apply(that, arguments);
  731. };
  732. };
  733. var uncurryThis$2 = functionUncurryThis;
  734. var fails$2 = fails$9;
  735. var classof$2 = classofRaw$2;
  736. var $Object = Object;
  737. var split = uncurryThis$2(''.split);
  738. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  739. var indexedObject = fails$2(function () {
  740. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  741. // eslint-disable-next-line no-prototype-builtins -- safe
  742. return !$Object('z').propertyIsEnumerable(0);
  743. }) ? function (it) {
  744. return classof$2(it) === 'String' ? split(it, '') : $Object(it);
  745. } : $Object;
  746. var ceil = Math.ceil;
  747. var floor = Math.floor;
  748. // `Math.trunc` method
  749. // https://tc39.es/ecma262/#sec-math.trunc
  750. // eslint-disable-next-line es/no-math-trunc -- safe
  751. var mathTrunc = Math.trunc || function trunc(x) {
  752. var n = +x;
  753. return (n > 0 ? floor : ceil)(n);
  754. };
  755. var trunc = mathTrunc;
  756. // `ToIntegerOrInfinity` abstract operation
  757. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  758. var toIntegerOrInfinity$1 = function (argument) {
  759. var number = +argument;
  760. // eslint-disable-next-line no-self-compare -- NaN check
  761. return number !== number || number === 0 ? 0 : trunc(number);
  762. };
  763. var toIntegerOrInfinity = toIntegerOrInfinity$1;
  764. var min = Math.min;
  765. // `ToLength` abstract operation
  766. // https://tc39.es/ecma262/#sec-tolength
  767. var toLength$1 = function (argument) {
  768. var len = toIntegerOrInfinity(argument);
  769. return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  770. };
  771. var toLength = toLength$1;
  772. // `LengthOfArrayLike` abstract operation
  773. // https://tc39.es/ecma262/#sec-lengthofarraylike
  774. var lengthOfArrayLike$1 = function (obj) {
  775. return toLength(obj.length);
  776. };
  777. var classof$1 = classofRaw$2;
  778. // `IsArray` abstract operation
  779. // https://tc39.es/ecma262/#sec-isarray
  780. // eslint-disable-next-line es/no-array-isarray -- safe
  781. var isArray$1 = Array.isArray || function isArray(argument) {
  782. return classof$1(argument) === 'Array';
  783. };
  784. var uncurryThis$1 = functionUncurryThis;
  785. var fails$1 = fails$9;
  786. var isCallable = isCallable$b;
  787. var classof = classof$4;
  788. var getBuiltIn = getBuiltIn$2;
  789. var inspectSource = inspectSource$2;
  790. var noop = function () { /* empty */ };
  791. var construct = getBuiltIn('Reflect', 'construct');
  792. var constructorRegExp = /^\s*(?:class|function)\b/;
  793. var exec = uncurryThis$1(constructorRegExp.exec);
  794. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  795. var isConstructorModern = function isConstructor(argument) {
  796. if (!isCallable(argument)) return false;
  797. try {
  798. construct(noop, [], argument);
  799. return true;
  800. } catch (error) {
  801. return false;
  802. }
  803. };
  804. var isConstructorLegacy = function isConstructor(argument) {
  805. if (!isCallable(argument)) return false;
  806. switch (classof(argument)) {
  807. case 'AsyncFunction':
  808. case 'GeneratorFunction':
  809. case 'AsyncGeneratorFunction': return false;
  810. }
  811. try {
  812. // we can't check .prototype since constructors produced by .bind haven't it
  813. // `Function#toString` throws on some built-it function in some legacy engines
  814. // (for example, `DOMQuad` and similar in FF41-)
  815. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  816. } catch (error) {
  817. return true;
  818. }
  819. };
  820. isConstructorLegacy.sham = true;
  821. // `IsConstructor` abstract operation
  822. // https://tc39.es/ecma262/#sec-isconstructor
  823. var isConstructor$1 = !construct || fails$1(function () {
  824. var called;
  825. return isConstructorModern(isConstructorModern.call)
  826. || !isConstructorModern(Object)
  827. || !isConstructorModern(function () { called = true; })
  828. || called;
  829. }) ? isConstructorLegacy : isConstructorModern;
  830. var isArray = isArray$1;
  831. var isConstructor = isConstructor$1;
  832. var isObject = isObject$6;
  833. var wellKnownSymbol = wellKnownSymbol$4;
  834. var SPECIES = wellKnownSymbol('species');
  835. var $Array = Array;
  836. // a part of `ArraySpeciesCreate` abstract operation
  837. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  838. var arraySpeciesConstructor$1 = function (originalArray) {
  839. var C;
  840. if (isArray(originalArray)) {
  841. C = originalArray.constructor;
  842. // cross-realm fallback
  843. if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
  844. else if (isObject(C)) {
  845. C = C[SPECIES];
  846. if (C === null) C = undefined;
  847. }
  848. } return C === undefined ? $Array : C;
  849. };
  850. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  851. // `ArraySpeciesCreate` abstract operation
  852. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  853. var arraySpeciesCreate$1 = function (originalArray, length) {
  854. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  855. };
  856. var bind = functionBindContext;
  857. var uncurryThis = functionUncurryThis;
  858. var IndexedObject = indexedObject;
  859. var toObject = toObject$2;
  860. var lengthOfArrayLike = lengthOfArrayLike$1;
  861. var arraySpeciesCreate = arraySpeciesCreate$1;
  862. var push = uncurryThis([].push);
  863. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  864. var createMethod = function (TYPE) {
  865. var IS_MAP = TYPE === 1;
  866. var IS_FILTER = TYPE === 2;
  867. var IS_SOME = TYPE === 3;
  868. var IS_EVERY = TYPE === 4;
  869. var IS_FIND_INDEX = TYPE === 6;
  870. var IS_FILTER_REJECT = TYPE === 7;
  871. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  872. return function ($this, callbackfn, that, specificCreate) {
  873. var O = toObject($this);
  874. var self = IndexedObject(O);
  875. var length = lengthOfArrayLike(self);
  876. var boundFunction = bind(callbackfn, that);
  877. var index = 0;
  878. var create = specificCreate || arraySpeciesCreate;
  879. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  880. var value, result;
  881. for (;length > index; index++) if (NO_HOLES || index in self) {
  882. value = self[index];
  883. result = boundFunction(value, index, O);
  884. if (TYPE) {
  885. if (IS_MAP) target[index] = result; // map
  886. else if (result) switch (TYPE) {
  887. case 3: return true; // some
  888. case 5: return value; // find
  889. case 6: return index; // findIndex
  890. case 2: push(target, value); // filter
  891. } else switch (TYPE) {
  892. case 4: return false; // every
  893. case 7: push(target, value); // filterReject
  894. }
  895. }
  896. }
  897. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  898. };
  899. };
  900. var arrayIteration = {
  901. // `Array.prototype.forEach` method
  902. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  903. forEach: createMethod(0),
  904. // `Array.prototype.map` method
  905. // https://tc39.es/ecma262/#sec-array.prototype.map
  906. map: createMethod(1),
  907. // `Array.prototype.filter` method
  908. // https://tc39.es/ecma262/#sec-array.prototype.filter
  909. filter: createMethod(2),
  910. // `Array.prototype.some` method
  911. // https://tc39.es/ecma262/#sec-array.prototype.some
  912. some: createMethod(3),
  913. // `Array.prototype.every` method
  914. // https://tc39.es/ecma262/#sec-array.prototype.every
  915. every: createMethod(4),
  916. // `Array.prototype.find` method
  917. // https://tc39.es/ecma262/#sec-array.prototype.find
  918. find: createMethod(5),
  919. // `Array.prototype.findIndex` method
  920. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  921. findIndex: createMethod(6),
  922. // `Array.prototype.filterReject` method
  923. // https://github.com/tc39/proposal-array-filtering
  924. filterReject: createMethod(7)
  925. };
  926. var fails = fails$9;
  927. var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
  928. var method = [][METHOD_NAME];
  929. return !!method && fails(function () {
  930. // eslint-disable-next-line no-useless-call -- required for testing
  931. method.call(null, argument || function () { return 1; }, 1);
  932. });
  933. };
  934. var $forEach = arrayIteration.forEach;
  935. var arrayMethodIsStrict = arrayMethodIsStrict$1;
  936. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  937. // `Array.prototype.forEach` method implementation
  938. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  939. var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  940. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  941. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  942. } : [].forEach;
  943. var global$1 = global$a;
  944. var DOMIterables = domIterables;
  945. var DOMTokenListPrototype = domTokenListPrototype;
  946. var forEach = arrayForEach;
  947. var createNonEnumerableProperty = createNonEnumerableProperty$2;
  948. var handlePrototype = function (CollectionPrototype) {
  949. // some Chrome versions have non-configurable methods on DOMTokenList
  950. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  951. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  952. } catch (error) {
  953. CollectionPrototype.forEach = forEach;
  954. }
  955. };
  956. for (var COLLECTION_NAME in DOMIterables) {
  957. if (DOMIterables[COLLECTION_NAME]) {
  958. handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype);
  959. }
  960. }
  961. handlePrototype(DOMTokenListPrototype);
  962. /**
  963. * @author: Jewway
  964. * @update zhixin wen <wenzhixin2010@gmail.com>
  965. */
  966. $.fn.bootstrapTable.methods.push('changeTitle');
  967. $.fn.bootstrapTable.methods.push('changeLocale');
  968. $.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  969. function _class() {
  970. _classCallCheck(this, _class);
  971. return _callSuper(this, _class, arguments);
  972. }
  973. _inherits(_class, _$$BootstrapTable);
  974. return _createClass(_class, [{
  975. key: "changeTitle",
  976. value: function changeTitle(locale) {
  977. this.options.columns.forEach(function (columnList) {
  978. columnList.forEach(function (column) {
  979. if (column.field) {
  980. column.title = locale[column.field];
  981. }
  982. });
  983. });
  984. this.initHeader();
  985. this.initBody();
  986. this.initToolbar();
  987. }
  988. }, {
  989. key: "changeLocale",
  990. value: function changeLocale(localeId) {
  991. this.options.locale = localeId;
  992. this.initLocale();
  993. this.initPagination();
  994. this.initBody();
  995. this.initToolbar();
  996. }
  997. }]);
  998. }($.BootstrapTable);
  999. }));