bootstrap-table-mobile.js 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239
  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. // `IsArray` abstract operation
  438. // https://tc39.github.io/ecma262/#sec-isarray
  439. var isArray = Array.isArray || function isArray(arg) {
  440. return classofRaw(arg) == 'Array';
  441. };
  442. // `ToObject` abstract operation
  443. // https://tc39.github.io/ecma262/#sec-toobject
  444. var toObject = function (argument) {
  445. return Object(requireObjectCoercible(argument));
  446. };
  447. var createProperty = function (object, key, value) {
  448. var propertyKey = toPrimitive(key);
  449. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  450. else object[propertyKey] = value;
  451. };
  452. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  453. // Chrome 38 Symbol has incorrect toString conversion
  454. // eslint-disable-next-line no-undef
  455. return !String(Symbol());
  456. });
  457. var useSymbolAsUid = nativeSymbol
  458. // eslint-disable-next-line no-undef
  459. && !Symbol.sham
  460. // eslint-disable-next-line no-undef
  461. && typeof Symbol() == 'symbol';
  462. var WellKnownSymbolsStore = shared('wks');
  463. var Symbol$1 = global_1.Symbol;
  464. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
  465. var wellKnownSymbol = function (name) {
  466. if (!has(WellKnownSymbolsStore, name)) {
  467. if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
  468. else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  469. } return WellKnownSymbolsStore[name];
  470. };
  471. var SPECIES = wellKnownSymbol('species');
  472. // `ArraySpeciesCreate` abstract operation
  473. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  474. var arraySpeciesCreate = function (originalArray, length) {
  475. var C;
  476. if (isArray(originalArray)) {
  477. C = originalArray.constructor;
  478. // cross-realm fallback
  479. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  480. else if (isObject(C)) {
  481. C = C[SPECIES];
  482. if (C === null) C = undefined;
  483. }
  484. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  485. };
  486. var userAgent = getBuiltIn('navigator', 'userAgent') || '';
  487. var process = global_1.process;
  488. var versions = process && process.versions;
  489. var v8 = versions && versions.v8;
  490. var match, version;
  491. if (v8) {
  492. match = v8.split('.');
  493. version = match[0] + match[1];
  494. } else if (userAgent) {
  495. match = userAgent.match(/Edge\/(\d+)/);
  496. if (!match || match[1] >= 74) {
  497. match = userAgent.match(/Chrome\/(\d+)/);
  498. if (match) version = match[1];
  499. }
  500. }
  501. var v8Version = version && +version;
  502. var SPECIES$1 = wellKnownSymbol('species');
  503. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  504. // We can't use this feature detection in V8 since it causes
  505. // deoptimization and serious performance degradation
  506. // https://github.com/zloirock/core-js/issues/677
  507. return v8Version >= 51 || !fails(function () {
  508. var array = [];
  509. var constructor = array.constructor = {};
  510. constructor[SPECIES$1] = function () {
  511. return { foo: 1 };
  512. };
  513. return array[METHOD_NAME](Boolean).foo !== 1;
  514. });
  515. };
  516. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  517. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  518. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  519. // We can't use this feature detection in V8 since it causes
  520. // deoptimization and serious performance degradation
  521. // https://github.com/zloirock/core-js/issues/679
  522. var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
  523. var array = [];
  524. array[IS_CONCAT_SPREADABLE] = false;
  525. return array.concat()[0] !== array;
  526. });
  527. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  528. var isConcatSpreadable = function (O) {
  529. if (!isObject(O)) return false;
  530. var spreadable = O[IS_CONCAT_SPREADABLE];
  531. return spreadable !== undefined ? !!spreadable : isArray(O);
  532. };
  533. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  534. // `Array.prototype.concat` method
  535. // https://tc39.github.io/ecma262/#sec-array.prototype.concat
  536. // with adding support of @@isConcatSpreadable and @@species
  537. _export({ target: 'Array', proto: true, forced: FORCED }, {
  538. concat: function concat(arg) { // eslint-disable-line no-unused-vars
  539. var O = toObject(this);
  540. var A = arraySpeciesCreate(O, 0);
  541. var n = 0;
  542. var i, k, length, len, E;
  543. for (i = -1, length = arguments.length; i < length; i++) {
  544. E = i === -1 ? O : arguments[i];
  545. if (isConcatSpreadable(E)) {
  546. len = toLength(E.length);
  547. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  548. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  549. } else {
  550. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  551. createProperty(A, n++, E);
  552. }
  553. }
  554. A.length = n;
  555. return A;
  556. }
  557. });
  558. // `Object.keys` method
  559. // https://tc39.github.io/ecma262/#sec-object.keys
  560. var objectKeys = Object.keys || function keys(O) {
  561. return objectKeysInternal(O, enumBugKeys);
  562. };
  563. // `Object.defineProperties` method
  564. // https://tc39.github.io/ecma262/#sec-object.defineproperties
  565. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  566. anObject(O);
  567. var keys = objectKeys(Properties);
  568. var length = keys.length;
  569. var index = 0;
  570. var key;
  571. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  572. return O;
  573. };
  574. var html = getBuiltIn('document', 'documentElement');
  575. var GT = '>';
  576. var LT = '<';
  577. var PROTOTYPE = 'prototype';
  578. var SCRIPT = 'script';
  579. var IE_PROTO = sharedKey('IE_PROTO');
  580. var EmptyConstructor = function () { /* empty */ };
  581. var scriptTag = function (content) {
  582. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  583. };
  584. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  585. var NullProtoObjectViaActiveX = function (activeXDocument) {
  586. activeXDocument.write(scriptTag(''));
  587. activeXDocument.close();
  588. var temp = activeXDocument.parentWindow.Object;
  589. activeXDocument = null; // avoid memory leak
  590. return temp;
  591. };
  592. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  593. var NullProtoObjectViaIFrame = function () {
  594. // Thrash, waste and sodomy: IE GC bug
  595. var iframe = documentCreateElement('iframe');
  596. var JS = 'java' + SCRIPT + ':';
  597. var iframeDocument;
  598. iframe.style.display = 'none';
  599. html.appendChild(iframe);
  600. // https://github.com/zloirock/core-js/issues/475
  601. iframe.src = String(JS);
  602. iframeDocument = iframe.contentWindow.document;
  603. iframeDocument.open();
  604. iframeDocument.write(scriptTag('document.F=Object'));
  605. iframeDocument.close();
  606. return iframeDocument.F;
  607. };
  608. // Check for document.domain and active x support
  609. // No need to use active x approach when document.domain is not set
  610. // see https://github.com/es-shims/es5-shim/issues/150
  611. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  612. // avoid IE GC bug
  613. var activeXDocument;
  614. var NullProtoObject = function () {
  615. try {
  616. /* global ActiveXObject */
  617. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  618. } catch (error) { /* ignore */ }
  619. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  620. var length = enumBugKeys.length;
  621. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  622. return NullProtoObject();
  623. };
  624. hiddenKeys[IE_PROTO] = true;
  625. // `Object.create` method
  626. // https://tc39.github.io/ecma262/#sec-object.create
  627. var objectCreate = Object.create || function create(O, Properties) {
  628. var result;
  629. if (O !== null) {
  630. EmptyConstructor[PROTOTYPE] = anObject(O);
  631. result = new EmptyConstructor();
  632. EmptyConstructor[PROTOTYPE] = null;
  633. // add "__proto__" for Object.getPrototypeOf polyfill
  634. result[IE_PROTO] = O;
  635. } else result = NullProtoObject();
  636. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  637. };
  638. var UNSCOPABLES = wellKnownSymbol('unscopables');
  639. var ArrayPrototype = Array.prototype;
  640. // Array.prototype[@@unscopables]
  641. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  642. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  643. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  644. configurable: true,
  645. value: objectCreate(null)
  646. });
  647. }
  648. // add a key to Array.prototype[@@unscopables]
  649. var addToUnscopables = function (key) {
  650. ArrayPrototype[UNSCOPABLES][key] = true;
  651. };
  652. var $includes = arrayIncludes.includes;
  653. // `Array.prototype.includes` method
  654. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  655. _export({ target: 'Array', proto: true }, {
  656. includes: function includes(el /* , fromIndex = 0 */) {
  657. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  658. }
  659. });
  660. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  661. addToUnscopables('includes');
  662. var MATCH = wellKnownSymbol('match');
  663. // `IsRegExp` abstract operation
  664. // https://tc39.github.io/ecma262/#sec-isregexp
  665. var isRegexp = function (it) {
  666. var isRegExp;
  667. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
  668. };
  669. var notARegexp = function (it) {
  670. if (isRegexp(it)) {
  671. throw TypeError("The method doesn't accept regular expressions");
  672. } return it;
  673. };
  674. var MATCH$1 = wellKnownSymbol('match');
  675. var correctIsRegexpLogic = function (METHOD_NAME) {
  676. var regexp = /./;
  677. try {
  678. '/./'[METHOD_NAME](regexp);
  679. } catch (e) {
  680. try {
  681. regexp[MATCH$1] = false;
  682. return '/./'[METHOD_NAME](regexp);
  683. } catch (f) { /* empty */ }
  684. } return false;
  685. };
  686. // `String.prototype.includes` method
  687. // https://tc39.github.io/ecma262/#sec-string.prototype.includes
  688. _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
  689. includes: function includes(searchString /* , position = 0 */) {
  690. return !!~String(requireObjectCoercible(this))
  691. .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  692. }
  693. });
  694. // iterable DOM collections
  695. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  696. var domIterables = {
  697. CSSRuleList: 0,
  698. CSSStyleDeclaration: 0,
  699. CSSValueList: 0,
  700. ClientRectList: 0,
  701. DOMRectList: 0,
  702. DOMStringList: 0,
  703. DOMTokenList: 1,
  704. DataTransferItemList: 0,
  705. FileList: 0,
  706. HTMLAllCollection: 0,
  707. HTMLCollection: 0,
  708. HTMLFormElement: 0,
  709. HTMLSelectElement: 0,
  710. MediaList: 0,
  711. MimeTypeArray: 0,
  712. NamedNodeMap: 0,
  713. NodeList: 1,
  714. PaintRequestList: 0,
  715. Plugin: 0,
  716. PluginArray: 0,
  717. SVGLengthList: 0,
  718. SVGNumberList: 0,
  719. SVGPathSegList: 0,
  720. SVGPointList: 0,
  721. SVGStringList: 0,
  722. SVGTransformList: 0,
  723. SourceBufferList: 0,
  724. StyleSheetList: 0,
  725. TextTrackCueList: 0,
  726. TextTrackList: 0,
  727. TouchList: 0
  728. };
  729. var aFunction$1 = function (it) {
  730. if (typeof it != 'function') {
  731. throw TypeError(String(it) + ' is not a function');
  732. } return it;
  733. };
  734. // optional / simple context binding
  735. var bindContext = function (fn, that, length) {
  736. aFunction$1(fn);
  737. if (that === undefined) return fn;
  738. switch (length) {
  739. case 0: return function () {
  740. return fn.call(that);
  741. };
  742. case 1: return function (a) {
  743. return fn.call(that, a);
  744. };
  745. case 2: return function (a, b) {
  746. return fn.call(that, a, b);
  747. };
  748. case 3: return function (a, b, c) {
  749. return fn.call(that, a, b, c);
  750. };
  751. }
  752. return function (/* ...args */) {
  753. return fn.apply(that, arguments);
  754. };
  755. };
  756. var push = [].push;
  757. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  758. var createMethod$1 = function (TYPE) {
  759. var IS_MAP = TYPE == 1;
  760. var IS_FILTER = TYPE == 2;
  761. var IS_SOME = TYPE == 3;
  762. var IS_EVERY = TYPE == 4;
  763. var IS_FIND_INDEX = TYPE == 6;
  764. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  765. return function ($this, callbackfn, that, specificCreate) {
  766. var O = toObject($this);
  767. var self = indexedObject(O);
  768. var boundFunction = bindContext(callbackfn, that, 3);
  769. var length = toLength(self.length);
  770. var index = 0;
  771. var create = specificCreate || arraySpeciesCreate;
  772. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  773. var value, result;
  774. for (;length > index; index++) if (NO_HOLES || index in self) {
  775. value = self[index];
  776. result = boundFunction(value, index, O);
  777. if (TYPE) {
  778. if (IS_MAP) target[index] = result; // map
  779. else if (result) switch (TYPE) {
  780. case 3: return true; // some
  781. case 5: return value; // find
  782. case 6: return index; // findIndex
  783. case 2: push.call(target, value); // filter
  784. } else if (IS_EVERY) return false; // every
  785. }
  786. }
  787. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  788. };
  789. };
  790. var arrayIteration = {
  791. // `Array.prototype.forEach` method
  792. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  793. forEach: createMethod$1(0),
  794. // `Array.prototype.map` method
  795. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  796. map: createMethod$1(1),
  797. // `Array.prototype.filter` method
  798. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  799. filter: createMethod$1(2),
  800. // `Array.prototype.some` method
  801. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  802. some: createMethod$1(3),
  803. // `Array.prototype.every` method
  804. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  805. every: createMethod$1(4),
  806. // `Array.prototype.find` method
  807. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  808. find: createMethod$1(5),
  809. // `Array.prototype.findIndex` method
  810. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  811. findIndex: createMethod$1(6)
  812. };
  813. var sloppyArrayMethod = function (METHOD_NAME, argument) {
  814. var method = [][METHOD_NAME];
  815. return !method || !fails(function () {
  816. // eslint-disable-next-line no-useless-call,no-throw-literal
  817. method.call(null, argument || function () { throw 1; }, 1);
  818. });
  819. };
  820. var $forEach = arrayIteration.forEach;
  821. // `Array.prototype.forEach` method implementation
  822. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  823. var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
  824. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  825. } : [].forEach;
  826. for (var COLLECTION_NAME in domIterables) {
  827. var Collection = global_1[COLLECTION_NAME];
  828. var CollectionPrototype = Collection && Collection.prototype;
  829. // some Chrome versions have non-configurable methods on DOMTokenList
  830. if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
  831. createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
  832. } catch (error) {
  833. CollectionPrototype.forEach = arrayForEach;
  834. }
  835. }
  836. function _classCallCheck(instance, Constructor) {
  837. if (!(instance instanceof Constructor)) {
  838. throw new TypeError("Cannot call a class as a function");
  839. }
  840. }
  841. function _defineProperties(target, props) {
  842. for (var i = 0; i < props.length; i++) {
  843. var descriptor = props[i];
  844. descriptor.enumerable = descriptor.enumerable || false;
  845. descriptor.configurable = true;
  846. if ("value" in descriptor) descriptor.writable = true;
  847. Object.defineProperty(target, descriptor.key, descriptor);
  848. }
  849. }
  850. function _createClass(Constructor, protoProps, staticProps) {
  851. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  852. if (staticProps) _defineProperties(Constructor, staticProps);
  853. return Constructor;
  854. }
  855. function _inherits(subClass, superClass) {
  856. if (typeof superClass !== "function" && superClass !== null) {
  857. throw new TypeError("Super expression must either be null or a function");
  858. }
  859. subClass.prototype = Object.create(superClass && superClass.prototype, {
  860. constructor: {
  861. value: subClass,
  862. writable: true,
  863. configurable: true
  864. }
  865. });
  866. if (superClass) _setPrototypeOf(subClass, superClass);
  867. }
  868. function _getPrototypeOf(o) {
  869. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  870. return o.__proto__ || Object.getPrototypeOf(o);
  871. };
  872. return _getPrototypeOf(o);
  873. }
  874. function _setPrototypeOf(o, p) {
  875. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  876. o.__proto__ = p;
  877. return o;
  878. };
  879. return _setPrototypeOf(o, p);
  880. }
  881. function _assertThisInitialized(self) {
  882. if (self === void 0) {
  883. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  884. }
  885. return self;
  886. }
  887. function _possibleConstructorReturn(self, call) {
  888. if (call && (typeof call === "object" || typeof call === "function")) {
  889. return call;
  890. }
  891. return _assertThisInitialized(self);
  892. }
  893. function _superPropBase(object, property) {
  894. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  895. object = _getPrototypeOf(object);
  896. if (object === null) break;
  897. }
  898. return object;
  899. }
  900. function _get(target, property, receiver) {
  901. if (typeof Reflect !== "undefined" && Reflect.get) {
  902. _get = Reflect.get;
  903. } else {
  904. _get = function _get(target, property, receiver) {
  905. var base = _superPropBase(target, property);
  906. if (!base) return;
  907. var desc = Object.getOwnPropertyDescriptor(base, property);
  908. if (desc.get) {
  909. return desc.get.call(receiver);
  910. }
  911. return desc.value;
  912. };
  913. }
  914. return _get(target, property, receiver || target);
  915. }
  916. /**
  917. * @author: Dennis Hernández
  918. * @webSite: http://djhvscf.github.io/Blog
  919. * @update zhixin wen <wenzhixin2010@gmail.com>
  920. */
  921. var debounce = function debounce(func, wait) {
  922. var timeout = 0;
  923. return function () {
  924. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  925. args[_key] = arguments[_key];
  926. }
  927. var later = function later() {
  928. timeout = 0;
  929. func.apply(void 0, args);
  930. };
  931. clearTimeout(timeout);
  932. timeout = setTimeout(later, wait);
  933. };
  934. };
  935. $.extend($.fn.bootstrapTable.defaults, {
  936. mobileResponsive: false,
  937. minWidth: 562,
  938. minHeight: undefined,
  939. heightThreshold: 100,
  940. // just slightly larger than mobile chrome's auto-hiding toolbar
  941. checkOnInit: true,
  942. columnsHidden: []
  943. });
  944. $.BootstrapTable =
  945. /*#__PURE__*/
  946. function (_$$BootstrapTable) {
  947. _inherits(_class, _$$BootstrapTable);
  948. function _class() {
  949. _classCallCheck(this, _class);
  950. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  951. }
  952. _createClass(_class, [{
  953. key: "init",
  954. value: function init() {
  955. var _get2,
  956. _this = this;
  957. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  958. args[_key2] = arguments[_key2];
  959. }
  960. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  961. if (!this.options.mobileResponsive || !this.options.minWidth) {
  962. return;
  963. }
  964. if (this.options.minWidth < 100 && this.options.resizable) {
  965. console.info('The minWidth when the resizable extension is active should be greater or equal than 100');
  966. this.options.minWidth = 100;
  967. }
  968. var old = {
  969. width: $(window).width(),
  970. height: $(window).height()
  971. };
  972. $(window).on('resize orientationchange', debounce(function () {
  973. // reset view if height has only changed by at least the threshold.
  974. var width = $(window).width();
  975. var height = $(window).height();
  976. var $activeElement = $(document.activeElement);
  977. if ($activeElement.length && ['INPUT', 'SELECT', 'TEXTAREA'].includes($activeElement.prop('nodeName'))) {
  978. return;
  979. }
  980. if (Math.abs(old.height - height) > _this.options.heightThreshold || old.width !== width) {
  981. _this.changeView(width, height);
  982. old = {
  983. width: width,
  984. height: height
  985. };
  986. }
  987. }, 200));
  988. if (this.options.checkOnInit) {
  989. var width = $(window).width();
  990. var height = $(window).height();
  991. this.changeView(width, height);
  992. old = {
  993. width: width,
  994. height: height
  995. };
  996. }
  997. }
  998. }, {
  999. key: "conditionCardView",
  1000. value: function conditionCardView() {
  1001. this.changeTableView(false);
  1002. this.showHideColumns(false);
  1003. }
  1004. }, {
  1005. key: "conditionFullView",
  1006. value: function conditionFullView() {
  1007. this.changeTableView(true);
  1008. this.showHideColumns(true);
  1009. }
  1010. }, {
  1011. key: "changeTableView",
  1012. value: function changeTableView(cardViewState) {
  1013. this.options.cardView = cardViewState;
  1014. this.toggleView();
  1015. }
  1016. }, {
  1017. key: "showHideColumns",
  1018. value: function showHideColumns(checked) {
  1019. var _this2 = this;
  1020. if (this.options.columnsHidden.length > 0) {
  1021. this.columns.forEach(function (column) {
  1022. if (_this2.options.columnsHidden.includes(column.field)) {
  1023. if (column.visible !== checked) {
  1024. _this2._toggleColumn(_this2.fieldsColumnsIndex[column.field], checked, true);
  1025. }
  1026. }
  1027. });
  1028. }
  1029. }
  1030. }, {
  1031. key: "changeView",
  1032. value: function changeView(width, height) {
  1033. if (this.options.minHeight) {
  1034. if (width <= this.options.minWidth && height <= this.options.minHeight) {
  1035. this.conditionCardView();
  1036. } else if (width > this.options.minWidth && height > this.options.minHeight) {
  1037. this.conditionFullView();
  1038. }
  1039. } else {
  1040. if (width <= this.options.minWidth) {
  1041. this.conditionCardView();
  1042. } else if (width > this.options.minWidth) {
  1043. this.conditionFullView();
  1044. }
  1045. }
  1046. this.resetView();
  1047. }
  1048. }]);
  1049. return _class;
  1050. }($.BootstrapTable);
  1051. })));