bootstrap-table-materialize.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992
  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 = global || self, factory(global.jQuery));
  5. }(this, (function ($) { 'use strict';
  6. $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  7. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  8. function createCommonjsModule(fn, module) {
  9. return module = { exports: {} }, fn(module, module.exports), module.exports;
  10. }
  11. var check = function (it) {
  12. return it && it.Math == Math && it;
  13. };
  14. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  15. var global_1 =
  16. // eslint-disable-next-line no-undef
  17. check(typeof globalThis == 'object' && globalThis) ||
  18. check(typeof window == 'object' && window) ||
  19. check(typeof self == 'object' && self) ||
  20. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  21. // eslint-disable-next-line no-new-func
  22. Function('return this')();
  23. var fails = function (exec) {
  24. try {
  25. return !!exec();
  26. } catch (error) {
  27. return true;
  28. }
  29. };
  30. // Thank's IE8 for his funny defineProperty
  31. var descriptors = !fails(function () {
  32. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  33. });
  34. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  35. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  36. // Nashorn ~ JDK8 bug
  37. var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  38. // `Object.prototype.propertyIsEnumerable` method implementation
  39. // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
  40. var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  41. var descriptor = getOwnPropertyDescriptor(this, V);
  42. return !!descriptor && descriptor.enumerable;
  43. } : nativePropertyIsEnumerable;
  44. var objectPropertyIsEnumerable = {
  45. f: f
  46. };
  47. var createPropertyDescriptor = function (bitmap, value) {
  48. return {
  49. enumerable: !(bitmap & 1),
  50. configurable: !(bitmap & 2),
  51. writable: !(bitmap & 4),
  52. value: value
  53. };
  54. };
  55. var toString = {}.toString;
  56. var classofRaw = function (it) {
  57. return toString.call(it).slice(8, -1);
  58. };
  59. var split = ''.split;
  60. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  61. var indexedObject = fails(function () {
  62. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  63. // eslint-disable-next-line no-prototype-builtins
  64. return !Object('z').propertyIsEnumerable(0);
  65. }) ? function (it) {
  66. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  67. } : Object;
  68. // `RequireObjectCoercible` abstract operation
  69. // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
  70. var requireObjectCoercible = function (it) {
  71. if (it == undefined) throw TypeError("Can't call method on " + it);
  72. return it;
  73. };
  74. // toObject with fallback for non-array-like ES3 strings
  75. var toIndexedObject = function (it) {
  76. return indexedObject(requireObjectCoercible(it));
  77. };
  78. var isObject = function (it) {
  79. return typeof it === 'object' ? it !== null : typeof it === 'function';
  80. };
  81. // `ToPrimitive` abstract operation
  82. // https://tc39.github.io/ecma262/#sec-toprimitive
  83. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  84. // and the second argument - flag - preferred type is a string
  85. var toPrimitive = function (input, PREFERRED_STRING) {
  86. if (!isObject(input)) return input;
  87. var fn, val;
  88. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  89. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  90. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  91. throw TypeError("Can't convert object to primitive value");
  92. };
  93. var hasOwnProperty = {}.hasOwnProperty;
  94. var has = function (it, key) {
  95. return hasOwnProperty.call(it, key);
  96. };
  97. var document$1 = global_1.document;
  98. // typeof document.createElement is 'object' in old IE
  99. var EXISTS = isObject(document$1) && isObject(document$1.createElement);
  100. var documentCreateElement = function (it) {
  101. return EXISTS ? document$1.createElement(it) : {};
  102. };
  103. // Thank's IE8 for his funny defineProperty
  104. var ie8DomDefine = !descriptors && !fails(function () {
  105. return Object.defineProperty(documentCreateElement('div'), 'a', {
  106. get: function () { return 7; }
  107. }).a != 7;
  108. });
  109. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  110. // `Object.getOwnPropertyDescriptor` method
  111. // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
  112. var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  113. O = toIndexedObject(O);
  114. P = toPrimitive(P, true);
  115. if (ie8DomDefine) try {
  116. return nativeGetOwnPropertyDescriptor(O, P);
  117. } catch (error) { /* empty */ }
  118. if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  119. };
  120. var objectGetOwnPropertyDescriptor = {
  121. f: f$1
  122. };
  123. var anObject = function (it) {
  124. if (!isObject(it)) {
  125. throw TypeError(String(it) + ' is not an object');
  126. } return it;
  127. };
  128. var nativeDefineProperty = Object.defineProperty;
  129. // `Object.defineProperty` method
  130. // https://tc39.github.io/ecma262/#sec-object.defineproperty
  131. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  132. anObject(O);
  133. P = toPrimitive(P, true);
  134. anObject(Attributes);
  135. if (ie8DomDefine) try {
  136. return nativeDefineProperty(O, P, Attributes);
  137. } catch (error) { /* empty */ }
  138. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  139. if ('value' in Attributes) O[P] = Attributes.value;
  140. return O;
  141. };
  142. var objectDefineProperty = {
  143. f: f$2
  144. };
  145. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  146. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  147. } : function (object, key, value) {
  148. object[key] = value;
  149. return object;
  150. };
  151. var setGlobal = function (key, value) {
  152. try {
  153. createNonEnumerableProperty(global_1, key, value);
  154. } catch (error) {
  155. global_1[key] = value;
  156. } return value;
  157. };
  158. var SHARED = '__core-js_shared__';
  159. var store = global_1[SHARED] || setGlobal(SHARED, {});
  160. var sharedStore = store;
  161. var functionToString = Function.toString;
  162. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  163. if (typeof sharedStore.inspectSource != 'function') {
  164. sharedStore.inspectSource = function (it) {
  165. return functionToString.call(it);
  166. };
  167. }
  168. var inspectSource = sharedStore.inspectSource;
  169. var WeakMap = global_1.WeakMap;
  170. var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
  171. var shared = createCommonjsModule(function (module) {
  172. (module.exports = function (key, value) {
  173. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  174. })('versions', []).push({
  175. version: '3.6.0',
  176. mode: 'global',
  177. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  178. });
  179. });
  180. var id = 0;
  181. var postfix = Math.random();
  182. var uid = function (key) {
  183. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  184. };
  185. var keys = shared('keys');
  186. var sharedKey = function (key) {
  187. return keys[key] || (keys[key] = uid(key));
  188. };
  189. var hiddenKeys = {};
  190. var WeakMap$1 = global_1.WeakMap;
  191. var set, get, has$1;
  192. var enforce = function (it) {
  193. return has$1(it) ? get(it) : set(it, {});
  194. };
  195. var getterFor = function (TYPE) {
  196. return function (it) {
  197. var state;
  198. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  199. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  200. } return state;
  201. };
  202. };
  203. if (nativeWeakMap) {
  204. var store$1 = new WeakMap$1();
  205. var wmget = store$1.get;
  206. var wmhas = store$1.has;
  207. var wmset = store$1.set;
  208. set = function (it, metadata) {
  209. wmset.call(store$1, it, metadata);
  210. return metadata;
  211. };
  212. get = function (it) {
  213. return wmget.call(store$1, it) || {};
  214. };
  215. has$1 = function (it) {
  216. return wmhas.call(store$1, it);
  217. };
  218. } else {
  219. var STATE = sharedKey('state');
  220. hiddenKeys[STATE] = true;
  221. set = function (it, metadata) {
  222. createNonEnumerableProperty(it, STATE, metadata);
  223. return metadata;
  224. };
  225. get = function (it) {
  226. return has(it, STATE) ? it[STATE] : {};
  227. };
  228. has$1 = function (it) {
  229. return has(it, STATE);
  230. };
  231. }
  232. var internalState = {
  233. set: set,
  234. get: get,
  235. has: has$1,
  236. enforce: enforce,
  237. getterFor: getterFor
  238. };
  239. var redefine = createCommonjsModule(function (module) {
  240. var getInternalState = internalState.get;
  241. var enforceInternalState = internalState.enforce;
  242. var TEMPLATE = String(String).split('String');
  243. (module.exports = function (O, key, value, options) {
  244. var unsafe = options ? !!options.unsafe : false;
  245. var simple = options ? !!options.enumerable : false;
  246. var noTargetGet = options ? !!options.noTargetGet : false;
  247. if (typeof value == 'function') {
  248. if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
  249. enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  250. }
  251. if (O === global_1) {
  252. if (simple) O[key] = value;
  253. else setGlobal(key, value);
  254. return;
  255. } else if (!unsafe) {
  256. delete O[key];
  257. } else if (!noTargetGet && O[key]) {
  258. simple = true;
  259. }
  260. if (simple) O[key] = value;
  261. else createNonEnumerableProperty(O, key, value);
  262. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  263. })(Function.prototype, 'toString', function toString() {
  264. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  265. });
  266. });
  267. var path = global_1;
  268. var aFunction = function (variable) {
  269. return typeof variable == 'function' ? variable : undefined;
  270. };
  271. var getBuiltIn = function (namespace, method) {
  272. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
  273. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  274. };
  275. var ceil = Math.ceil;
  276. var floor = Math.floor;
  277. // `ToInteger` abstract operation
  278. // https://tc39.github.io/ecma262/#sec-tointeger
  279. var toInteger = function (argument) {
  280. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  281. };
  282. var min = Math.min;
  283. // `ToLength` abstract operation
  284. // https://tc39.github.io/ecma262/#sec-tolength
  285. var toLength = function (argument) {
  286. return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  287. };
  288. var max = Math.max;
  289. var min$1 = Math.min;
  290. // Helper for a popular repeating case of the spec:
  291. // Let integer be ? ToInteger(index).
  292. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  293. var toAbsoluteIndex = function (index, length) {
  294. var integer = toInteger(index);
  295. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  296. };
  297. // `Array.prototype.{ indexOf, includes }` methods implementation
  298. var createMethod = function (IS_INCLUDES) {
  299. return function ($this, el, fromIndex) {
  300. var O = toIndexedObject($this);
  301. var length = toLength(O.length);
  302. var index = toAbsoluteIndex(fromIndex, length);
  303. var value;
  304. // Array#includes uses SameValueZero equality algorithm
  305. // eslint-disable-next-line no-self-compare
  306. if (IS_INCLUDES && el != el) while (length > index) {
  307. value = O[index++];
  308. // eslint-disable-next-line no-self-compare
  309. if (value != value) return true;
  310. // Array#indexOf ignores holes, Array#includes - not
  311. } else for (;length > index; index++) {
  312. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  313. } return !IS_INCLUDES && -1;
  314. };
  315. };
  316. var arrayIncludes = {
  317. // `Array.prototype.includes` method
  318. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  319. includes: createMethod(true),
  320. // `Array.prototype.indexOf` method
  321. // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  322. indexOf: createMethod(false)
  323. };
  324. var indexOf = arrayIncludes.indexOf;
  325. var objectKeysInternal = function (object, names) {
  326. var O = toIndexedObject(object);
  327. var i = 0;
  328. var result = [];
  329. var key;
  330. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  331. // Don't enum bug & hidden keys
  332. while (names.length > i) if (has(O, key = names[i++])) {
  333. ~indexOf(result, key) || result.push(key);
  334. }
  335. return result;
  336. };
  337. // IE8- don't enum bug keys
  338. var enumBugKeys = [
  339. 'constructor',
  340. 'hasOwnProperty',
  341. 'isPrototypeOf',
  342. 'propertyIsEnumerable',
  343. 'toLocaleString',
  344. 'toString',
  345. 'valueOf'
  346. ];
  347. var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
  348. // `Object.getOwnPropertyNames` method
  349. // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
  350. var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  351. return objectKeysInternal(O, hiddenKeys$1);
  352. };
  353. var objectGetOwnPropertyNames = {
  354. f: f$3
  355. };
  356. var f$4 = Object.getOwnPropertySymbols;
  357. var objectGetOwnPropertySymbols = {
  358. f: f$4
  359. };
  360. // all object keys, includes non-enumerable and symbols
  361. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  362. var keys = objectGetOwnPropertyNames.f(anObject(it));
  363. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  364. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  365. };
  366. var copyConstructorProperties = function (target, source) {
  367. var keys = ownKeys(source);
  368. var defineProperty = objectDefineProperty.f;
  369. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  370. for (var i = 0; i < keys.length; i++) {
  371. var key = keys[i];
  372. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  373. }
  374. };
  375. var replacement = /#|\.prototype\./;
  376. var isForced = function (feature, detection) {
  377. var value = data[normalize(feature)];
  378. return value == POLYFILL ? true
  379. : value == NATIVE ? false
  380. : typeof detection == 'function' ? fails(detection)
  381. : !!detection;
  382. };
  383. var normalize = isForced.normalize = function (string) {
  384. return String(string).replace(replacement, '.').toLowerCase();
  385. };
  386. var data = isForced.data = {};
  387. var NATIVE = isForced.NATIVE = 'N';
  388. var POLYFILL = isForced.POLYFILL = 'P';
  389. var isForced_1 = isForced;
  390. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  391. /*
  392. options.target - name of the target object
  393. options.global - target is the global object
  394. options.stat - export as static methods of target
  395. options.proto - export as prototype methods of target
  396. options.real - real prototype method for the `pure` version
  397. options.forced - export even if the native feature is available
  398. options.bind - bind methods to the target, required for the `pure` version
  399. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  400. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  401. options.sham - add a flag to not completely full polyfills
  402. options.enumerable - export as enumerable property
  403. options.noTargetGet - prevent calling a getter on target
  404. */
  405. var _export = function (options, source) {
  406. var TARGET = options.target;
  407. var GLOBAL = options.global;
  408. var STATIC = options.stat;
  409. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  410. if (GLOBAL) {
  411. target = global_1;
  412. } else if (STATIC) {
  413. target = global_1[TARGET] || setGlobal(TARGET, {});
  414. } else {
  415. target = (global_1[TARGET] || {}).prototype;
  416. }
  417. if (target) for (key in source) {
  418. sourceProperty = source[key];
  419. if (options.noTargetGet) {
  420. descriptor = getOwnPropertyDescriptor$1(target, key);
  421. targetProperty = descriptor && descriptor.value;
  422. } else targetProperty = target[key];
  423. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  424. // contained in target
  425. if (!FORCED && targetProperty !== undefined) {
  426. if (typeof sourceProperty === typeof targetProperty) continue;
  427. copyConstructorProperties(sourceProperty, targetProperty);
  428. }
  429. // add a flag to not completely full polyfills
  430. if (options.sham || (targetProperty && targetProperty.sham)) {
  431. createNonEnumerableProperty(sourceProperty, 'sham', true);
  432. }
  433. // extend global
  434. redefine(target, key, sourceProperty, options);
  435. }
  436. };
  437. var aFunction$1 = function (it) {
  438. if (typeof it != 'function') {
  439. throw TypeError(String(it) + ' is not a function');
  440. } return it;
  441. };
  442. // optional / simple context binding
  443. var bindContext = function (fn, that, length) {
  444. aFunction$1(fn);
  445. if (that === undefined) return fn;
  446. switch (length) {
  447. case 0: return function () {
  448. return fn.call(that);
  449. };
  450. case 1: return function (a) {
  451. return fn.call(that, a);
  452. };
  453. case 2: return function (a, b) {
  454. return fn.call(that, a, b);
  455. };
  456. case 3: return function (a, b, c) {
  457. return fn.call(that, a, b, c);
  458. };
  459. }
  460. return function (/* ...args */) {
  461. return fn.apply(that, arguments);
  462. };
  463. };
  464. // `ToObject` abstract operation
  465. // https://tc39.github.io/ecma262/#sec-toobject
  466. var toObject = function (argument) {
  467. return Object(requireObjectCoercible(argument));
  468. };
  469. // `IsArray` abstract operation
  470. // https://tc39.github.io/ecma262/#sec-isarray
  471. var isArray = Array.isArray || function isArray(arg) {
  472. return classofRaw(arg) == 'Array';
  473. };
  474. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  475. // Chrome 38 Symbol has incorrect toString conversion
  476. // eslint-disable-next-line no-undef
  477. return !String(Symbol());
  478. });
  479. var useSymbolAsUid = nativeSymbol
  480. // eslint-disable-next-line no-undef
  481. && !Symbol.sham
  482. // eslint-disable-next-line no-undef
  483. && typeof Symbol() == 'symbol';
  484. var WellKnownSymbolsStore = shared('wks');
  485. var Symbol$1 = global_1.Symbol;
  486. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
  487. var wellKnownSymbol = function (name) {
  488. if (!has(WellKnownSymbolsStore, name)) {
  489. if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
  490. else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  491. } return WellKnownSymbolsStore[name];
  492. };
  493. var SPECIES = wellKnownSymbol('species');
  494. // `ArraySpeciesCreate` abstract operation
  495. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  496. var arraySpeciesCreate = function (originalArray, length) {
  497. var C;
  498. if (isArray(originalArray)) {
  499. C = originalArray.constructor;
  500. // cross-realm fallback
  501. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  502. else if (isObject(C)) {
  503. C = C[SPECIES];
  504. if (C === null) C = undefined;
  505. }
  506. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  507. };
  508. var push = [].push;
  509. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  510. var createMethod$1 = function (TYPE) {
  511. var IS_MAP = TYPE == 1;
  512. var IS_FILTER = TYPE == 2;
  513. var IS_SOME = TYPE == 3;
  514. var IS_EVERY = TYPE == 4;
  515. var IS_FIND_INDEX = TYPE == 6;
  516. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  517. return function ($this, callbackfn, that, specificCreate) {
  518. var O = toObject($this);
  519. var self = indexedObject(O);
  520. var boundFunction = bindContext(callbackfn, that, 3);
  521. var length = toLength(self.length);
  522. var index = 0;
  523. var create = specificCreate || arraySpeciesCreate;
  524. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  525. var value, result;
  526. for (;length > index; index++) if (NO_HOLES || index in self) {
  527. value = self[index];
  528. result = boundFunction(value, index, O);
  529. if (TYPE) {
  530. if (IS_MAP) target[index] = result; // map
  531. else if (result) switch (TYPE) {
  532. case 3: return true; // some
  533. case 5: return value; // find
  534. case 6: return index; // findIndex
  535. case 2: push.call(target, value); // filter
  536. } else if (IS_EVERY) return false; // every
  537. }
  538. }
  539. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  540. };
  541. };
  542. var arrayIteration = {
  543. // `Array.prototype.forEach` method
  544. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  545. forEach: createMethod$1(0),
  546. // `Array.prototype.map` method
  547. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  548. map: createMethod$1(1),
  549. // `Array.prototype.filter` method
  550. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  551. filter: createMethod$1(2),
  552. // `Array.prototype.some` method
  553. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  554. some: createMethod$1(3),
  555. // `Array.prototype.every` method
  556. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  557. every: createMethod$1(4),
  558. // `Array.prototype.find` method
  559. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  560. find: createMethod$1(5),
  561. // `Array.prototype.findIndex` method
  562. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  563. findIndex: createMethod$1(6)
  564. };
  565. // `Object.keys` method
  566. // https://tc39.github.io/ecma262/#sec-object.keys
  567. var objectKeys = Object.keys || function keys(O) {
  568. return objectKeysInternal(O, enumBugKeys);
  569. };
  570. // `Object.defineProperties` method
  571. // https://tc39.github.io/ecma262/#sec-object.defineproperties
  572. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  573. anObject(O);
  574. var keys = objectKeys(Properties);
  575. var length = keys.length;
  576. var index = 0;
  577. var key;
  578. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  579. return O;
  580. };
  581. var html = getBuiltIn('document', 'documentElement');
  582. var GT = '>';
  583. var LT = '<';
  584. var PROTOTYPE = 'prototype';
  585. var SCRIPT = 'script';
  586. var IE_PROTO = sharedKey('IE_PROTO');
  587. var EmptyConstructor = function () { /* empty */ };
  588. var scriptTag = function (content) {
  589. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  590. };
  591. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  592. var NullProtoObjectViaActiveX = function (activeXDocument) {
  593. activeXDocument.write(scriptTag(''));
  594. activeXDocument.close();
  595. var temp = activeXDocument.parentWindow.Object;
  596. activeXDocument = null; // avoid memory leak
  597. return temp;
  598. };
  599. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  600. var NullProtoObjectViaIFrame = function () {
  601. // Thrash, waste and sodomy: IE GC bug
  602. var iframe = documentCreateElement('iframe');
  603. var JS = 'java' + SCRIPT + ':';
  604. var iframeDocument;
  605. iframe.style.display = 'none';
  606. html.appendChild(iframe);
  607. // https://github.com/zloirock/core-js/issues/475
  608. iframe.src = String(JS);
  609. iframeDocument = iframe.contentWindow.document;
  610. iframeDocument.open();
  611. iframeDocument.write(scriptTag('document.F=Object'));
  612. iframeDocument.close();
  613. return iframeDocument.F;
  614. };
  615. // Check for document.domain and active x support
  616. // No need to use active x approach when document.domain is not set
  617. // see https://github.com/es-shims/es5-shim/issues/150
  618. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  619. // avoid IE GC bug
  620. var activeXDocument;
  621. var NullProtoObject = function () {
  622. try {
  623. /* global ActiveXObject */
  624. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  625. } catch (error) { /* ignore */ }
  626. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  627. var length = enumBugKeys.length;
  628. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  629. return NullProtoObject();
  630. };
  631. hiddenKeys[IE_PROTO] = true;
  632. // `Object.create` method
  633. // https://tc39.github.io/ecma262/#sec-object.create
  634. var objectCreate = Object.create || function create(O, Properties) {
  635. var result;
  636. if (O !== null) {
  637. EmptyConstructor[PROTOTYPE] = anObject(O);
  638. result = new EmptyConstructor();
  639. EmptyConstructor[PROTOTYPE] = null;
  640. // add "__proto__" for Object.getPrototypeOf polyfill
  641. result[IE_PROTO] = O;
  642. } else result = NullProtoObject();
  643. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  644. };
  645. var UNSCOPABLES = wellKnownSymbol('unscopables');
  646. var ArrayPrototype = Array.prototype;
  647. // Array.prototype[@@unscopables]
  648. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  649. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  650. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  651. configurable: true,
  652. value: objectCreate(null)
  653. });
  654. }
  655. // add a key to Array.prototype[@@unscopables]
  656. var addToUnscopables = function (key) {
  657. ArrayPrototype[UNSCOPABLES][key] = true;
  658. };
  659. var $find = arrayIteration.find;
  660. var FIND = 'find';
  661. var SKIPS_HOLES = true;
  662. // Shouldn't skip holes
  663. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  664. // `Array.prototype.find` method
  665. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  666. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  667. find: function find(callbackfn /* , that = undefined */) {
  668. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  669. }
  670. });
  671. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  672. addToUnscopables(FIND);
  673. function _classCallCheck(instance, Constructor) {
  674. if (!(instance instanceof Constructor)) {
  675. throw new TypeError("Cannot call a class as a function");
  676. }
  677. }
  678. function _defineProperties(target, props) {
  679. for (var i = 0; i < props.length; i++) {
  680. var descriptor = props[i];
  681. descriptor.enumerable = descriptor.enumerable || false;
  682. descriptor.configurable = true;
  683. if ("value" in descriptor) descriptor.writable = true;
  684. Object.defineProperty(target, descriptor.key, descriptor);
  685. }
  686. }
  687. function _createClass(Constructor, protoProps, staticProps) {
  688. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  689. if (staticProps) _defineProperties(Constructor, staticProps);
  690. return Constructor;
  691. }
  692. function _inherits(subClass, superClass) {
  693. if (typeof superClass !== "function" && superClass !== null) {
  694. throw new TypeError("Super expression must either be null or a function");
  695. }
  696. subClass.prototype = Object.create(superClass && superClass.prototype, {
  697. constructor: {
  698. value: subClass,
  699. writable: true,
  700. configurable: true
  701. }
  702. });
  703. if (superClass) _setPrototypeOf(subClass, superClass);
  704. }
  705. function _getPrototypeOf(o) {
  706. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  707. return o.__proto__ || Object.getPrototypeOf(o);
  708. };
  709. return _getPrototypeOf(o);
  710. }
  711. function _setPrototypeOf(o, p) {
  712. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  713. o.__proto__ = p;
  714. return o;
  715. };
  716. return _setPrototypeOf(o, p);
  717. }
  718. function _assertThisInitialized(self) {
  719. if (self === void 0) {
  720. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  721. }
  722. return self;
  723. }
  724. function _possibleConstructorReturn(self, call) {
  725. if (call && (typeof call === "object" || typeof call === "function")) {
  726. return call;
  727. }
  728. return _assertThisInitialized(self);
  729. }
  730. function _superPropBase(object, property) {
  731. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  732. object = _getPrototypeOf(object);
  733. if (object === null) break;
  734. }
  735. return object;
  736. }
  737. function _get(target, property, receiver) {
  738. if (typeof Reflect !== "undefined" && Reflect.get) {
  739. _get = Reflect.get;
  740. } else {
  741. _get = function _get(target, property, receiver) {
  742. var base = _superPropBase(target, property);
  743. if (!base) return;
  744. var desc = Object.getOwnPropertyDescriptor(base, property);
  745. if (desc.get) {
  746. return desc.get.call(receiver);
  747. }
  748. return desc.value;
  749. };
  750. }
  751. return _get(target, property, receiver || target);
  752. }
  753. /**
  754. * @author zhixin wen <wenzhixin2010@gmail.com>
  755. * https://github.com/wenzhixin/bootstrap-table/
  756. * theme: https://github.com/jgthms/bulma/
  757. */
  758. $.extend($.fn.bootstrapTable.defaults, {
  759. classes: 'table highlight',
  760. buttonsPrefix: '',
  761. buttonsClass: 'waves-effect waves-light btn',
  762. iconsPrefix: 'material-icons',
  763. icons: {
  764. paginationSwitchDown: 'grid_on',
  765. paginationSwitchUp: 'grid_off',
  766. refresh: 'refresh',
  767. toggleOff: 'tablet',
  768. toggleOn: 'tablet_android',
  769. columns: 'view_list',
  770. detailOpen: 'add',
  771. detailClose: 'remove',
  772. fullscreen: 'fullscreen',
  773. sort: 'sort',
  774. search: 'search',
  775. clearSearch: 'delete'
  776. }
  777. });
  778. $.fn.bootstrapTable.theme = 'materialize';
  779. $.BootstrapTable =
  780. /*#__PURE__*/
  781. function (_$$BootstrapTable) {
  782. _inherits(_class, _$$BootstrapTable);
  783. function _class() {
  784. _classCallCheck(this, _class);
  785. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  786. }
  787. _createClass(_class, [{
  788. key: "initConstants",
  789. value: function initConstants() {
  790. _get(_getPrototypeOf(_class.prototype), "initConstants", this).call(this);
  791. this.constants.classes.buttonsGroup = 'button-group';
  792. this.constants.classes.buttonsDropdown = '';
  793. this.constants.classes.input = 'input-field';
  794. this.constants.classes.input = '';
  795. this.constants.classes.paginationDropdown = '';
  796. this.constants.classes.buttonActive = 'green';
  797. this.constants.html.toolbarDropdown = ['<ul id="toolbar-columns-id" class="dropdown-content">', '</ul>'];
  798. this.constants.html.toolbarDropdownItem = '<li class="dropdown-item-marker"><label>%s</label></li>';
  799. this.constants.html.toolbarDropdownSeparator = '<li class="divider" tabindex="-1"></li>';
  800. this.constants.html.pageDropdown = ['<ul id="pagination-list-id" class="dropdown-content">', '</ul>'];
  801. this.constants.html.pageDropdownItem = '<li><a class="%s" href="#">%s</a></li>';
  802. this.constants.html.dropdownCaret = '<i class="material-icons">arrow_drop_down</i>';
  803. this.constants.html.pagination = ['<ul class="pagination%s">', '</ul>'];
  804. this.constants.html.paginationItem = '<li class="waves-effect page-item%s" aria-label="%s"><a href="#">%s</a></li>';
  805. this.constants.html.icon = '<i class="%s">%s</i>';
  806. this.constants.html.inputGroup = '%s%s';
  807. }
  808. }, {
  809. key: "initToolbar",
  810. value: function initToolbar() {
  811. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  812. this.handleToolbar();
  813. }
  814. }, {
  815. key: "handleToolbar",
  816. value: function handleToolbar() {
  817. if (this.$toolbar.find('.dropdown-toggle').length) {
  818. this.$toolbar.find('.dropdown-toggle').each(function (i, el) {
  819. $(el).attr('data-target', $(el).next().attr('id')).dropdown({
  820. alignment: 'right',
  821. constrainWidth: false,
  822. closeOnClick: false
  823. });
  824. });
  825. }
  826. }
  827. }, {
  828. key: "initPagination",
  829. value: function initPagination() {
  830. _get(_getPrototypeOf(_class.prototype), "initPagination", this).call(this);
  831. if (this.options.pagination && !this.options.onlyInfoPagination) {
  832. this.$pagination.find('.dropdown-toggle').attr('data-target', this.$pagination.find('.dropdown-content').attr('id')).dropdown();
  833. }
  834. }
  835. }]);
  836. return _class;
  837. }($.BootstrapTable);
  838. })));