bootstrap-table-fixed-columns.js 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610
  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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _typeof(obj) {
  9. "@babel/helpers - typeof";
  10. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  11. _typeof = function (obj) {
  12. return typeof obj;
  13. };
  14. } else {
  15. _typeof = function (obj) {
  16. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  17. };
  18. }
  19. return _typeof(obj);
  20. }
  21. function _classCallCheck(instance, Constructor) {
  22. if (!(instance instanceof Constructor)) {
  23. throw new TypeError("Cannot call a class as a function");
  24. }
  25. }
  26. function _defineProperties(target, props) {
  27. for (var i = 0; i < props.length; i++) {
  28. var descriptor = props[i];
  29. descriptor.enumerable = descriptor.enumerable || false;
  30. descriptor.configurable = true;
  31. if ("value" in descriptor) descriptor.writable = true;
  32. Object.defineProperty(target, descriptor.key, descriptor);
  33. }
  34. }
  35. function _createClass(Constructor, protoProps, staticProps) {
  36. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  37. if (staticProps) _defineProperties(Constructor, staticProps);
  38. return Constructor;
  39. }
  40. function _inherits(subClass, superClass) {
  41. if (typeof superClass !== "function" && superClass !== null) {
  42. throw new TypeError("Super expression must either be null or a function");
  43. }
  44. subClass.prototype = Object.create(superClass && superClass.prototype, {
  45. constructor: {
  46. value: subClass,
  47. writable: true,
  48. configurable: true
  49. }
  50. });
  51. if (superClass) _setPrototypeOf(subClass, superClass);
  52. }
  53. function _getPrototypeOf(o) {
  54. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  55. return o.__proto__ || Object.getPrototypeOf(o);
  56. };
  57. return _getPrototypeOf(o);
  58. }
  59. function _setPrototypeOf(o, p) {
  60. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  61. o.__proto__ = p;
  62. return o;
  63. };
  64. return _setPrototypeOf(o, p);
  65. }
  66. function _isNativeReflectConstruct() {
  67. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  68. if (Reflect.construct.sham) return false;
  69. if (typeof Proxy === "function") return true;
  70. try {
  71. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  72. return true;
  73. } catch (e) {
  74. return false;
  75. }
  76. }
  77. function _assertThisInitialized(self) {
  78. if (self === void 0) {
  79. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  80. }
  81. return self;
  82. }
  83. function _possibleConstructorReturn(self, call) {
  84. if (call && (typeof call === "object" || typeof call === "function")) {
  85. return call;
  86. }
  87. return _assertThisInitialized(self);
  88. }
  89. function _createSuper(Derived) {
  90. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  91. return function _createSuperInternal() {
  92. var Super = _getPrototypeOf(Derived),
  93. result;
  94. if (hasNativeReflectConstruct) {
  95. var NewTarget = _getPrototypeOf(this).constructor;
  96. result = Reflect.construct(Super, arguments, NewTarget);
  97. } else {
  98. result = Super.apply(this, arguments);
  99. }
  100. return _possibleConstructorReturn(this, result);
  101. };
  102. }
  103. function _superPropBase(object, property) {
  104. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  105. object = _getPrototypeOf(object);
  106. if (object === null) break;
  107. }
  108. return object;
  109. }
  110. function _get(target, property, receiver) {
  111. if (typeof Reflect !== "undefined" && Reflect.get) {
  112. _get = Reflect.get;
  113. } else {
  114. _get = function _get(target, property, receiver) {
  115. var base = _superPropBase(target, property);
  116. if (!base) return;
  117. var desc = Object.getOwnPropertyDescriptor(base, property);
  118. if (desc.get) {
  119. return desc.get.call(receiver);
  120. }
  121. return desc.value;
  122. };
  123. }
  124. return _get(target, property, receiver || target);
  125. }
  126. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  127. function createCommonjsModule(fn, module) {
  128. return module = { exports: {} }, fn(module, module.exports), module.exports;
  129. }
  130. var check = function (it) {
  131. return it && it.Math == Math && it;
  132. };
  133. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  134. var global_1 =
  135. /* global globalThis -- safe */
  136. check(typeof globalThis == 'object' && globalThis) ||
  137. check(typeof window == 'object' && window) ||
  138. check(typeof self == 'object' && self) ||
  139. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  140. // eslint-disable-next-line no-new-func -- fallback
  141. (function () { return this; })() || Function('return this')();
  142. var fails = function (exec) {
  143. try {
  144. return !!exec();
  145. } catch (error) {
  146. return true;
  147. }
  148. };
  149. // Detect IE8's incomplete defineProperty implementation
  150. var descriptors = !fails(function () {
  151. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  152. });
  153. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  154. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  155. // Nashorn ~ JDK8 bug
  156. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  157. // `Object.prototype.propertyIsEnumerable` method implementation
  158. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  159. var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  160. var descriptor = getOwnPropertyDescriptor$1(this, V);
  161. return !!descriptor && descriptor.enumerable;
  162. } : nativePropertyIsEnumerable;
  163. var objectPropertyIsEnumerable = {
  164. f: f$4
  165. };
  166. var createPropertyDescriptor = function (bitmap, value) {
  167. return {
  168. enumerable: !(bitmap & 1),
  169. configurable: !(bitmap & 2),
  170. writable: !(bitmap & 4),
  171. value: value
  172. };
  173. };
  174. var toString = {}.toString;
  175. var classofRaw = function (it) {
  176. return toString.call(it).slice(8, -1);
  177. };
  178. var split = ''.split;
  179. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  180. var indexedObject = fails(function () {
  181. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  182. // eslint-disable-next-line no-prototype-builtins -- safe
  183. return !Object('z').propertyIsEnumerable(0);
  184. }) ? function (it) {
  185. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  186. } : Object;
  187. // `RequireObjectCoercible` abstract operation
  188. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  189. var requireObjectCoercible = function (it) {
  190. if (it == undefined) throw TypeError("Can't call method on " + it);
  191. return it;
  192. };
  193. // toObject with fallback for non-array-like ES3 strings
  194. var toIndexedObject = function (it) {
  195. return indexedObject(requireObjectCoercible(it));
  196. };
  197. var isObject = function (it) {
  198. return typeof it === 'object' ? it !== null : typeof it === 'function';
  199. };
  200. // `ToPrimitive` abstract operation
  201. // https://tc39.es/ecma262/#sec-toprimitive
  202. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  203. // and the second argument - flag - preferred type is a string
  204. var toPrimitive = function (input, PREFERRED_STRING) {
  205. if (!isObject(input)) return input;
  206. var fn, val;
  207. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  208. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  209. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  210. throw TypeError("Can't convert object to primitive value");
  211. };
  212. var hasOwnProperty = {}.hasOwnProperty;
  213. var has$1 = function (it, key) {
  214. return hasOwnProperty.call(it, key);
  215. };
  216. var document$1 = global_1.document;
  217. // typeof document.createElement is 'object' in old IE
  218. var EXISTS = isObject(document$1) && isObject(document$1.createElement);
  219. var documentCreateElement = function (it) {
  220. return EXISTS ? document$1.createElement(it) : {};
  221. };
  222. // Thank's IE8 for his funny defineProperty
  223. var ie8DomDefine = !descriptors && !fails(function () {
  224. return Object.defineProperty(documentCreateElement('div'), 'a', {
  225. get: function () { return 7; }
  226. }).a != 7;
  227. });
  228. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  229. // `Object.getOwnPropertyDescriptor` method
  230. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  231. var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  232. O = toIndexedObject(O);
  233. P = toPrimitive(P, true);
  234. if (ie8DomDefine) try {
  235. return nativeGetOwnPropertyDescriptor(O, P);
  236. } catch (error) { /* empty */ }
  237. if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  238. };
  239. var objectGetOwnPropertyDescriptor = {
  240. f: f$3
  241. };
  242. var anObject = function (it) {
  243. if (!isObject(it)) {
  244. throw TypeError(String(it) + ' is not an object');
  245. } return it;
  246. };
  247. var nativeDefineProperty = Object.defineProperty;
  248. // `Object.defineProperty` method
  249. // https://tc39.es/ecma262/#sec-object.defineproperty
  250. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  251. anObject(O);
  252. P = toPrimitive(P, true);
  253. anObject(Attributes);
  254. if (ie8DomDefine) try {
  255. return nativeDefineProperty(O, P, Attributes);
  256. } catch (error) { /* empty */ }
  257. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  258. if ('value' in Attributes) O[P] = Attributes.value;
  259. return O;
  260. };
  261. var objectDefineProperty = {
  262. f: f$2
  263. };
  264. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  265. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  266. } : function (object, key, value) {
  267. object[key] = value;
  268. return object;
  269. };
  270. var setGlobal = function (key, value) {
  271. try {
  272. createNonEnumerableProperty(global_1, key, value);
  273. } catch (error) {
  274. global_1[key] = value;
  275. } return value;
  276. };
  277. var SHARED = '__core-js_shared__';
  278. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  279. var sharedStore = store$1;
  280. var functionToString = Function.toString;
  281. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  282. if (typeof sharedStore.inspectSource != 'function') {
  283. sharedStore.inspectSource = function (it) {
  284. return functionToString.call(it);
  285. };
  286. }
  287. var inspectSource = sharedStore.inspectSource;
  288. var WeakMap$1 = global_1.WeakMap;
  289. var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
  290. var shared = createCommonjsModule(function (module) {
  291. (module.exports = function (key, value) {
  292. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  293. })('versions', []).push({
  294. version: '3.9.1',
  295. mode: 'global',
  296. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  297. });
  298. });
  299. var id = 0;
  300. var postfix = Math.random();
  301. var uid = function (key) {
  302. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  303. };
  304. var keys = shared('keys');
  305. var sharedKey = function (key) {
  306. return keys[key] || (keys[key] = uid(key));
  307. };
  308. var hiddenKeys$1 = {};
  309. var WeakMap = global_1.WeakMap;
  310. var set, get, has;
  311. var enforce = function (it) {
  312. return has(it) ? get(it) : set(it, {});
  313. };
  314. var getterFor = function (TYPE) {
  315. return function (it) {
  316. var state;
  317. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  318. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  319. } return state;
  320. };
  321. };
  322. if (nativeWeakMap) {
  323. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  324. var wmget = store.get;
  325. var wmhas = store.has;
  326. var wmset = store.set;
  327. set = function (it, metadata) {
  328. metadata.facade = it;
  329. wmset.call(store, it, metadata);
  330. return metadata;
  331. };
  332. get = function (it) {
  333. return wmget.call(store, it) || {};
  334. };
  335. has = function (it) {
  336. return wmhas.call(store, it);
  337. };
  338. } else {
  339. var STATE = sharedKey('state');
  340. hiddenKeys$1[STATE] = true;
  341. set = function (it, metadata) {
  342. metadata.facade = it;
  343. createNonEnumerableProperty(it, STATE, metadata);
  344. return metadata;
  345. };
  346. get = function (it) {
  347. return has$1(it, STATE) ? it[STATE] : {};
  348. };
  349. has = function (it) {
  350. return has$1(it, STATE);
  351. };
  352. }
  353. var internalState = {
  354. set: set,
  355. get: get,
  356. has: has,
  357. enforce: enforce,
  358. getterFor: getterFor
  359. };
  360. var redefine = createCommonjsModule(function (module) {
  361. var getInternalState = internalState.get;
  362. var enforceInternalState = internalState.enforce;
  363. var TEMPLATE = String(String).split('String');
  364. (module.exports = function (O, key, value, options) {
  365. var unsafe = options ? !!options.unsafe : false;
  366. var simple = options ? !!options.enumerable : false;
  367. var noTargetGet = options ? !!options.noTargetGet : false;
  368. var state;
  369. if (typeof value == 'function') {
  370. if (typeof key == 'string' && !has$1(value, 'name')) {
  371. createNonEnumerableProperty(value, 'name', key);
  372. }
  373. state = enforceInternalState(value);
  374. if (!state.source) {
  375. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  376. }
  377. }
  378. if (O === global_1) {
  379. if (simple) O[key] = value;
  380. else setGlobal(key, value);
  381. return;
  382. } else if (!unsafe) {
  383. delete O[key];
  384. } else if (!noTargetGet && O[key]) {
  385. simple = true;
  386. }
  387. if (simple) O[key] = value;
  388. else createNonEnumerableProperty(O, key, value);
  389. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  390. })(Function.prototype, 'toString', function toString() {
  391. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  392. });
  393. });
  394. var path = global_1;
  395. var aFunction$1 = function (variable) {
  396. return typeof variable == 'function' ? variable : undefined;
  397. };
  398. var getBuiltIn = function (namespace, method) {
  399. return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
  400. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  401. };
  402. var ceil = Math.ceil;
  403. var floor = Math.floor;
  404. // `ToInteger` abstract operation
  405. // https://tc39.es/ecma262/#sec-tointeger
  406. var toInteger = function (argument) {
  407. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  408. };
  409. var min$1 = Math.min;
  410. // `ToLength` abstract operation
  411. // https://tc39.es/ecma262/#sec-tolength
  412. var toLength = function (argument) {
  413. return argument > 0 ? min$1(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  414. };
  415. var max = Math.max;
  416. var min = Math.min;
  417. // Helper for a popular repeating case of the spec:
  418. // Let integer be ? ToInteger(index).
  419. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  420. var toAbsoluteIndex = function (index, length) {
  421. var integer = toInteger(index);
  422. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  423. };
  424. // `Array.prototype.{ indexOf, includes }` methods implementation
  425. var createMethod$2 = function (IS_INCLUDES) {
  426. return function ($this, el, fromIndex) {
  427. var O = toIndexedObject($this);
  428. var length = toLength(O.length);
  429. var index = toAbsoluteIndex(fromIndex, length);
  430. var value;
  431. // Array#includes uses SameValueZero equality algorithm
  432. // eslint-disable-next-line no-self-compare -- NaN check
  433. if (IS_INCLUDES && el != el) while (length > index) {
  434. value = O[index++];
  435. // eslint-disable-next-line no-self-compare -- NaN check
  436. if (value != value) return true;
  437. // Array#indexOf ignores holes, Array#includes - not
  438. } else for (;length > index; index++) {
  439. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  440. } return !IS_INCLUDES && -1;
  441. };
  442. };
  443. var arrayIncludes = {
  444. // `Array.prototype.includes` method
  445. // https://tc39.es/ecma262/#sec-array.prototype.includes
  446. includes: createMethod$2(true),
  447. // `Array.prototype.indexOf` method
  448. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  449. indexOf: createMethod$2(false)
  450. };
  451. var indexOf = arrayIncludes.indexOf;
  452. var objectKeysInternal = function (object, names) {
  453. var O = toIndexedObject(object);
  454. var i = 0;
  455. var result = [];
  456. var key;
  457. for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
  458. // Don't enum bug & hidden keys
  459. while (names.length > i) if (has$1(O, key = names[i++])) {
  460. ~indexOf(result, key) || result.push(key);
  461. }
  462. return result;
  463. };
  464. // IE8- don't enum bug keys
  465. var enumBugKeys = [
  466. 'constructor',
  467. 'hasOwnProperty',
  468. 'isPrototypeOf',
  469. 'propertyIsEnumerable',
  470. 'toLocaleString',
  471. 'toString',
  472. 'valueOf'
  473. ];
  474. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  475. // `Object.getOwnPropertyNames` method
  476. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  477. var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  478. return objectKeysInternal(O, hiddenKeys);
  479. };
  480. var objectGetOwnPropertyNames = {
  481. f: f$1
  482. };
  483. var f = Object.getOwnPropertySymbols;
  484. var objectGetOwnPropertySymbols = {
  485. f: f
  486. };
  487. // all object keys, includes non-enumerable and symbols
  488. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  489. var keys = objectGetOwnPropertyNames.f(anObject(it));
  490. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  491. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  492. };
  493. var copyConstructorProperties = function (target, source) {
  494. var keys = ownKeys(source);
  495. var defineProperty = objectDefineProperty.f;
  496. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  497. for (var i = 0; i < keys.length; i++) {
  498. var key = keys[i];
  499. if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  500. }
  501. };
  502. var replacement = /#|\.prototype\./;
  503. var isForced = function (feature, detection) {
  504. var value = data[normalize(feature)];
  505. return value == POLYFILL ? true
  506. : value == NATIVE ? false
  507. : typeof detection == 'function' ? fails(detection)
  508. : !!detection;
  509. };
  510. var normalize = isForced.normalize = function (string) {
  511. return String(string).replace(replacement, '.').toLowerCase();
  512. };
  513. var data = isForced.data = {};
  514. var NATIVE = isForced.NATIVE = 'N';
  515. var POLYFILL = isForced.POLYFILL = 'P';
  516. var isForced_1 = isForced;
  517. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  518. /*
  519. options.target - name of the target object
  520. options.global - target is the global object
  521. options.stat - export as static methods of target
  522. options.proto - export as prototype methods of target
  523. options.real - real prototype method for the `pure` version
  524. options.forced - export even if the native feature is available
  525. options.bind - bind methods to the target, required for the `pure` version
  526. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  527. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  528. options.sham - add a flag to not completely full polyfills
  529. options.enumerable - export as enumerable property
  530. options.noTargetGet - prevent calling a getter on target
  531. */
  532. var _export = function (options, source) {
  533. var TARGET = options.target;
  534. var GLOBAL = options.global;
  535. var STATIC = options.stat;
  536. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  537. if (GLOBAL) {
  538. target = global_1;
  539. } else if (STATIC) {
  540. target = global_1[TARGET] || setGlobal(TARGET, {});
  541. } else {
  542. target = (global_1[TARGET] || {}).prototype;
  543. }
  544. if (target) for (key in source) {
  545. sourceProperty = source[key];
  546. if (options.noTargetGet) {
  547. descriptor = getOwnPropertyDescriptor(target, key);
  548. targetProperty = descriptor && descriptor.value;
  549. } else targetProperty = target[key];
  550. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  551. // contained in target
  552. if (!FORCED && targetProperty !== undefined) {
  553. if (typeof sourceProperty === typeof targetProperty) continue;
  554. copyConstructorProperties(sourceProperty, targetProperty);
  555. }
  556. // add a flag to not completely full polyfills
  557. if (options.sham || (targetProperty && targetProperty.sham)) {
  558. createNonEnumerableProperty(sourceProperty, 'sham', true);
  559. }
  560. // extend global
  561. redefine(target, key, sourceProperty, options);
  562. }
  563. };
  564. var aFunction = function (it) {
  565. if (typeof it != 'function') {
  566. throw TypeError(String(it) + ' is not a function');
  567. } return it;
  568. };
  569. // optional / simple context binding
  570. var functionBindContext = function (fn, that, length) {
  571. aFunction(fn);
  572. if (that === undefined) return fn;
  573. switch (length) {
  574. case 0: return function () {
  575. return fn.call(that);
  576. };
  577. case 1: return function (a) {
  578. return fn.call(that, a);
  579. };
  580. case 2: return function (a, b) {
  581. return fn.call(that, a, b);
  582. };
  583. case 3: return function (a, b, c) {
  584. return fn.call(that, a, b, c);
  585. };
  586. }
  587. return function (/* ...args */) {
  588. return fn.apply(that, arguments);
  589. };
  590. };
  591. // `ToObject` abstract operation
  592. // https://tc39.es/ecma262/#sec-toobject
  593. var toObject = function (argument) {
  594. return Object(requireObjectCoercible(argument));
  595. };
  596. // `IsArray` abstract operation
  597. // https://tc39.es/ecma262/#sec-isarray
  598. var isArray = Array.isArray || function isArray(arg) {
  599. return classofRaw(arg) == 'Array';
  600. };
  601. var engineIsNode = classofRaw(global_1.process) == 'process';
  602. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  603. var process = global_1.process;
  604. var versions = process && process.versions;
  605. var v8 = versions && versions.v8;
  606. var match, version;
  607. if (v8) {
  608. match = v8.split('.');
  609. version = match[0] + match[1];
  610. } else if (engineUserAgent) {
  611. match = engineUserAgent.match(/Edge\/(\d+)/);
  612. if (!match || match[1] >= 74) {
  613. match = engineUserAgent.match(/Chrome\/(\d+)/);
  614. if (match) version = match[1];
  615. }
  616. }
  617. var engineV8Version = version && +version;
  618. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  619. /* global Symbol -- required for testing */
  620. return !Symbol.sham &&
  621. // Chrome 38 Symbol has incorrect toString conversion
  622. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  623. (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
  624. });
  625. var useSymbolAsUid = nativeSymbol
  626. /* global Symbol -- safe */
  627. && !Symbol.sham
  628. && typeof Symbol.iterator == 'symbol';
  629. var WellKnownSymbolsStore = shared('wks');
  630. var Symbol$1 = global_1.Symbol;
  631. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  632. var wellKnownSymbol = function (name) {
  633. if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  634. if (nativeSymbol && has$1(Symbol$1, name)) {
  635. WellKnownSymbolsStore[name] = Symbol$1[name];
  636. } else {
  637. WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  638. }
  639. } return WellKnownSymbolsStore[name];
  640. };
  641. var SPECIES$1 = wellKnownSymbol('species');
  642. // `ArraySpeciesCreate` abstract operation
  643. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  644. var arraySpeciesCreate = function (originalArray, length) {
  645. var C;
  646. if (isArray(originalArray)) {
  647. C = originalArray.constructor;
  648. // cross-realm fallback
  649. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  650. else if (isObject(C)) {
  651. C = C[SPECIES$1];
  652. if (C === null) C = undefined;
  653. }
  654. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  655. };
  656. var push = [].push;
  657. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  658. var createMethod$1 = function (TYPE) {
  659. var IS_MAP = TYPE == 1;
  660. var IS_FILTER = TYPE == 2;
  661. var IS_SOME = TYPE == 3;
  662. var IS_EVERY = TYPE == 4;
  663. var IS_FIND_INDEX = TYPE == 6;
  664. var IS_FILTER_OUT = TYPE == 7;
  665. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  666. return function ($this, callbackfn, that, specificCreate) {
  667. var O = toObject($this);
  668. var self = indexedObject(O);
  669. var boundFunction = functionBindContext(callbackfn, that, 3);
  670. var length = toLength(self.length);
  671. var index = 0;
  672. var create = specificCreate || arraySpeciesCreate;
  673. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  674. var value, result;
  675. for (;length > index; index++) if (NO_HOLES || index in self) {
  676. value = self[index];
  677. result = boundFunction(value, index, O);
  678. if (TYPE) {
  679. if (IS_MAP) target[index] = result; // map
  680. else if (result) switch (TYPE) {
  681. case 3: return true; // some
  682. case 5: return value; // find
  683. case 6: return index; // findIndex
  684. case 2: push.call(target, value); // filter
  685. } else switch (TYPE) {
  686. case 4: return false; // every
  687. case 7: push.call(target, value); // filterOut
  688. }
  689. }
  690. }
  691. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  692. };
  693. };
  694. var arrayIteration = {
  695. // `Array.prototype.forEach` method
  696. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  697. forEach: createMethod$1(0),
  698. // `Array.prototype.map` method
  699. // https://tc39.es/ecma262/#sec-array.prototype.map
  700. map: createMethod$1(1),
  701. // `Array.prototype.filter` method
  702. // https://tc39.es/ecma262/#sec-array.prototype.filter
  703. filter: createMethod$1(2),
  704. // `Array.prototype.some` method
  705. // https://tc39.es/ecma262/#sec-array.prototype.some
  706. some: createMethod$1(3),
  707. // `Array.prototype.every` method
  708. // https://tc39.es/ecma262/#sec-array.prototype.every
  709. every: createMethod$1(4),
  710. // `Array.prototype.find` method
  711. // https://tc39.es/ecma262/#sec-array.prototype.find
  712. find: createMethod$1(5),
  713. // `Array.prototype.findIndex` method
  714. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  715. findIndex: createMethod$1(6),
  716. // `Array.prototype.filterOut` method
  717. // https://github.com/tc39/proposal-array-filtering
  718. filterOut: createMethod$1(7)
  719. };
  720. // `Object.keys` method
  721. // https://tc39.es/ecma262/#sec-object.keys
  722. var objectKeys = Object.keys || function keys(O) {
  723. return objectKeysInternal(O, enumBugKeys);
  724. };
  725. // `Object.defineProperties` method
  726. // https://tc39.es/ecma262/#sec-object.defineproperties
  727. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  728. anObject(O);
  729. var keys = objectKeys(Properties);
  730. var length = keys.length;
  731. var index = 0;
  732. var key;
  733. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  734. return O;
  735. };
  736. var html = getBuiltIn('document', 'documentElement');
  737. var GT = '>';
  738. var LT = '<';
  739. var PROTOTYPE = 'prototype';
  740. var SCRIPT = 'script';
  741. var IE_PROTO = sharedKey('IE_PROTO');
  742. var EmptyConstructor = function () { /* empty */ };
  743. var scriptTag = function (content) {
  744. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  745. };
  746. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  747. var NullProtoObjectViaActiveX = function (activeXDocument) {
  748. activeXDocument.write(scriptTag(''));
  749. activeXDocument.close();
  750. var temp = activeXDocument.parentWindow.Object;
  751. activeXDocument = null; // avoid memory leak
  752. return temp;
  753. };
  754. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  755. var NullProtoObjectViaIFrame = function () {
  756. // Thrash, waste and sodomy: IE GC bug
  757. var iframe = documentCreateElement('iframe');
  758. var JS = 'java' + SCRIPT + ':';
  759. var iframeDocument;
  760. iframe.style.display = 'none';
  761. html.appendChild(iframe);
  762. // https://github.com/zloirock/core-js/issues/475
  763. iframe.src = String(JS);
  764. iframeDocument = iframe.contentWindow.document;
  765. iframeDocument.open();
  766. iframeDocument.write(scriptTag('document.F=Object'));
  767. iframeDocument.close();
  768. return iframeDocument.F;
  769. };
  770. // Check for document.domain and active x support
  771. // No need to use active x approach when document.domain is not set
  772. // see https://github.com/es-shims/es5-shim/issues/150
  773. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  774. // avoid IE GC bug
  775. var activeXDocument;
  776. var NullProtoObject = function () {
  777. try {
  778. /* global ActiveXObject -- old IE */
  779. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  780. } catch (error) { /* ignore */ }
  781. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  782. var length = enumBugKeys.length;
  783. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  784. return NullProtoObject();
  785. };
  786. hiddenKeys$1[IE_PROTO] = true;
  787. // `Object.create` method
  788. // https://tc39.es/ecma262/#sec-object.create
  789. var objectCreate = Object.create || function create(O, Properties) {
  790. var result;
  791. if (O !== null) {
  792. EmptyConstructor[PROTOTYPE] = anObject(O);
  793. result = new EmptyConstructor();
  794. EmptyConstructor[PROTOTYPE] = null;
  795. // add "__proto__" for Object.getPrototypeOf polyfill
  796. result[IE_PROTO] = O;
  797. } else result = NullProtoObject();
  798. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  799. };
  800. var UNSCOPABLES = wellKnownSymbol('unscopables');
  801. var ArrayPrototype = Array.prototype;
  802. // Array.prototype[@@unscopables]
  803. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  804. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  805. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  806. configurable: true,
  807. value: objectCreate(null)
  808. });
  809. }
  810. // add a key to Array.prototype[@@unscopables]
  811. var addToUnscopables = function (key) {
  812. ArrayPrototype[UNSCOPABLES][key] = true;
  813. };
  814. var $find = arrayIteration.find;
  815. var FIND = 'find';
  816. var SKIPS_HOLES = true;
  817. // Shouldn't skip holes
  818. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  819. // `Array.prototype.find` method
  820. // https://tc39.es/ecma262/#sec-array.prototype.find
  821. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  822. find: function find(callbackfn /* , that = undefined */) {
  823. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  824. }
  825. });
  826. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  827. addToUnscopables(FIND);
  828. var createProperty = function (object, key, value) {
  829. var propertyKey = toPrimitive(key);
  830. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  831. else object[propertyKey] = value;
  832. };
  833. var SPECIES = wellKnownSymbol('species');
  834. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  835. // We can't use this feature detection in V8 since it causes
  836. // deoptimization and serious performance degradation
  837. // https://github.com/zloirock/core-js/issues/677
  838. return engineV8Version >= 51 || !fails(function () {
  839. var array = [];
  840. var constructor = array.constructor = {};
  841. constructor[SPECIES] = function () {
  842. return { foo: 1 };
  843. };
  844. return array[METHOD_NAME](Boolean).foo !== 1;
  845. });
  846. };
  847. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  848. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  849. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  850. // We can't use this feature detection in V8 since it causes
  851. // deoptimization and serious performance degradation
  852. // https://github.com/zloirock/core-js/issues/679
  853. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  854. var array = [];
  855. array[IS_CONCAT_SPREADABLE] = false;
  856. return array.concat()[0] !== array;
  857. });
  858. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  859. var isConcatSpreadable = function (O) {
  860. if (!isObject(O)) return false;
  861. var spreadable = O[IS_CONCAT_SPREADABLE];
  862. return spreadable !== undefined ? !!spreadable : isArray(O);
  863. };
  864. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  865. // `Array.prototype.concat` method
  866. // https://tc39.es/ecma262/#sec-array.prototype.concat
  867. // with adding support of @@isConcatSpreadable and @@species
  868. _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
  869. // eslint-disable-next-line no-unused-vars -- required for `.length`
  870. concat: function concat(arg) {
  871. var O = toObject(this);
  872. var A = arraySpeciesCreate(O, 0);
  873. var n = 0;
  874. var i, k, length, len, E;
  875. for (i = -1, length = arguments.length; i < length; i++) {
  876. E = i === -1 ? O : arguments[i];
  877. if (isConcatSpreadable(E)) {
  878. len = toLength(E.length);
  879. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  880. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  881. } else {
  882. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  883. createProperty(A, n++, E);
  884. }
  885. }
  886. A.length = n;
  887. return A;
  888. }
  889. });
  890. var nativeReverse = [].reverse;
  891. var test = [1, 2];
  892. // `Array.prototype.reverse` method
  893. // https://tc39.es/ecma262/#sec-array.prototype.reverse
  894. // fix for Safari 12.0 bug
  895. // https://bugs.webkit.org/show_bug.cgi?id=188794
  896. _export({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
  897. reverse: function reverse() {
  898. // eslint-disable-next-line no-self-assign -- dirty hack
  899. if (isArray(this)) this.length = this.length;
  900. return nativeReverse.call(this);
  901. }
  902. });
  903. // a string of all valid unicode whitespaces
  904. var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  905. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  906. var whitespace = '[' + whitespaces + ']';
  907. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  908. var rtrim = RegExp(whitespace + whitespace + '*$');
  909. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  910. var createMethod = function (TYPE) {
  911. return function ($this) {
  912. var string = String(requireObjectCoercible($this));
  913. if (TYPE & 1) string = string.replace(ltrim, '');
  914. if (TYPE & 2) string = string.replace(rtrim, '');
  915. return string;
  916. };
  917. };
  918. var stringTrim = {
  919. // `String.prototype.{ trimLeft, trimStart }` methods
  920. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  921. start: createMethod(1),
  922. // `String.prototype.{ trimRight, trimEnd }` methods
  923. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  924. end: createMethod(2),
  925. // `String.prototype.trim` method
  926. // https://tc39.es/ecma262/#sec-string.prototype.trim
  927. trim: createMethod(3)
  928. };
  929. var trim = stringTrim.trim;
  930. var $parseInt = global_1.parseInt;
  931. var hex = /^[+-]?0[Xx]/;
  932. var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;
  933. // `parseInt` method
  934. // https://tc39.es/ecma262/#sec-parseint-string-radix
  935. var numberParseInt = FORCED ? function parseInt(string, radix) {
  936. var S = trim(String(string));
  937. return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
  938. } : $parseInt;
  939. // `parseInt` method
  940. // https://tc39.es/ecma262/#sec-parseint-string-radix
  941. _export({ global: true, forced: parseInt != numberParseInt }, {
  942. parseInt: numberParseInt
  943. });
  944. var arrayMethodIsStrict = function (METHOD_NAME, argument) {
  945. var method = [][METHOD_NAME];
  946. return !!method && fails(function () {
  947. // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
  948. method.call(null, argument || function () { throw 1; }, 1);
  949. });
  950. };
  951. var $indexOf = arrayIncludes.indexOf;
  952. var nativeIndexOf = [].indexOf;
  953. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
  954. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  955. // `Array.prototype.indexOf` method
  956. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  957. _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  958. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  959. return NEGATIVE_ZERO
  960. // convert -0 to +0
  961. ? nativeIndexOf.apply(this, arguments) || 0
  962. : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  963. }
  964. });
  965. /**
  966. * @author zhixin wen <wenzhixin2010@gmail.com>
  967. */
  968. var Utils = $__default['default'].fn.bootstrapTable.utils; // Reasonable defaults
  969. var PIXEL_STEP = 10;
  970. var LINE_HEIGHT = 40;
  971. var PAGE_HEIGHT = 800;
  972. function normalizeWheel(event) {
  973. var sX = 0; // spinX
  974. var sY = 0; // spinY
  975. var pX = 0; // pixelX
  976. var pY = 0; // pixelY
  977. // Legacy
  978. if ('detail' in event) {
  979. sY = event.detail;
  980. }
  981. if ('wheelDelta' in event) {
  982. sY = -event.wheelDelta / 120;
  983. }
  984. if ('wheelDeltaY' in event) {
  985. sY = -event.wheelDeltaY / 120;
  986. }
  987. if ('wheelDeltaX' in event) {
  988. sX = -event.wheelDeltaX / 120;
  989. } // side scrolling on FF with DOMMouseScroll
  990. if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {
  991. sX = sY;
  992. sY = 0;
  993. }
  994. pX = sX * PIXEL_STEP;
  995. pY = sY * PIXEL_STEP;
  996. if ('deltaY' in event) {
  997. pY = event.deltaY;
  998. }
  999. if ('deltaX' in event) {
  1000. pX = event.deltaX;
  1001. }
  1002. if ((pX || pY) && event.deltaMode) {
  1003. if (event.deltaMode === 1) {
  1004. // delta in LINE units
  1005. pX *= LINE_HEIGHT;
  1006. pY *= LINE_HEIGHT;
  1007. } else {
  1008. // delta in PAGE units
  1009. pX *= PAGE_HEIGHT;
  1010. pY *= PAGE_HEIGHT;
  1011. }
  1012. } // Fall-back if spin cannot be determined
  1013. if (pX && !sX) {
  1014. sX = pX < 1 ? -1 : 1;
  1015. }
  1016. if (pY && !sY) {
  1017. sY = pY < 1 ? -1 : 1;
  1018. }
  1019. return {
  1020. spinX: sX,
  1021. spinY: sY,
  1022. pixelX: pX,
  1023. pixelY: pY
  1024. };
  1025. }
  1026. $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
  1027. fixedColumns: false,
  1028. fixedNumber: 0,
  1029. fixedRightNumber: 0
  1030. });
  1031. $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1032. _inherits(_class, _$$BootstrapTable);
  1033. var _super = _createSuper(_class);
  1034. function _class() {
  1035. _classCallCheck(this, _class);
  1036. return _super.apply(this, arguments);
  1037. }
  1038. _createClass(_class, [{
  1039. key: "fixedColumnsSupported",
  1040. value: function fixedColumnsSupported() {
  1041. return this.options.fixedColumns && !this.options.detailView && !this.options.cardView;
  1042. }
  1043. }, {
  1044. key: "initContainer",
  1045. value: function initContainer() {
  1046. _get(_getPrototypeOf(_class.prototype), "initContainer", this).call(this);
  1047. if (!this.fixedColumnsSupported()) {
  1048. return;
  1049. }
  1050. if (this.options.fixedNumber) {
  1051. this.$tableContainer.append('<div class="fixed-columns"></div>');
  1052. this.$fixedColumns = this.$tableContainer.find('.fixed-columns');
  1053. }
  1054. if (this.options.fixedRightNumber) {
  1055. this.$tableContainer.append('<div class="fixed-columns-right"></div>');
  1056. this.$fixedColumnsRight = this.$tableContainer.find('.fixed-columns-right');
  1057. }
  1058. }
  1059. }, {
  1060. key: "initBody",
  1061. value: function initBody() {
  1062. var _get2;
  1063. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1064. args[_key] = arguments[_key];
  1065. }
  1066. (_get2 = _get(_getPrototypeOf(_class.prototype), "initBody", this)).call.apply(_get2, [this].concat(args));
  1067. if (this.$fixedColumns && this.$fixedColumns.length) {
  1068. this.$fixedColumns.toggle(this.fixedColumnsSupported());
  1069. }
  1070. if (this.$fixedColumnsRight && this.$fixedColumnsRight.length) {
  1071. this.$fixedColumnsRight.toggle(this.fixedColumnsSupported());
  1072. }
  1073. if (!this.fixedColumnsSupported()) {
  1074. return;
  1075. }
  1076. if (this.options.showHeader && this.options.height) {
  1077. return;
  1078. }
  1079. this.initFixedColumnsBody();
  1080. this.initFixedColumnsEvents();
  1081. }
  1082. }, {
  1083. key: "trigger",
  1084. value: function trigger() {
  1085. var _get3;
  1086. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1087. args[_key2] = arguments[_key2];
  1088. }
  1089. (_get3 = _get(_getPrototypeOf(_class.prototype), "trigger", this)).call.apply(_get3, [this].concat(args));
  1090. if (!this.fixedColumnsSupported()) {
  1091. return;
  1092. }
  1093. if (args[0] === 'post-header') {
  1094. this.initFixedColumnsHeader();
  1095. } else if (args[0] === 'scroll-body') {
  1096. if (this.needFixedColumns && this.options.fixedNumber) {
  1097. this.$fixedBody.scrollTop(this.$tableBody.scrollTop());
  1098. }
  1099. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1100. this.$fixedBodyRight.scrollTop(this.$tableBody.scrollTop());
  1101. }
  1102. }
  1103. }
  1104. }, {
  1105. key: "updateSelected",
  1106. value: function updateSelected() {
  1107. var _this = this;
  1108. _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this);
  1109. if (!this.fixedColumnsSupported()) {
  1110. return;
  1111. }
  1112. this.$tableBody.find('tr').each(function (i, el) {
  1113. var $el = $__default['default'](el);
  1114. var index = $el.data('index');
  1115. var classes = $el.attr('class');
  1116. var inputSelector = "[name=\"".concat(_this.options.selectItemName, "\"]");
  1117. var $input = $el.find(inputSelector);
  1118. if (_typeof(index) === undefined) {
  1119. return;
  1120. }
  1121. var updateFixedBody = function updateFixedBody($fixedHeader, $fixedBody) {
  1122. var $tr = $fixedBody.find("tr[data-index=\"".concat(index, "\"]"));
  1123. $tr.attr('class', classes);
  1124. if ($input.length) {
  1125. $tr.find(inputSelector).prop('checked', $input.prop('checked'));
  1126. }
  1127. if (_this.$selectAll.length) {
  1128. $fixedHeader.add($fixedBody).find('[name="btSelectAll"]').prop('checked', _this.$selectAll.prop('checked'));
  1129. }
  1130. };
  1131. if (_this.$fixedBody && _this.options.fixedNumber) {
  1132. updateFixedBody(_this.$fixedHeader, _this.$fixedBody);
  1133. }
  1134. if (_this.$fixedBodyRight && _this.options.fixedRightNumber) {
  1135. updateFixedBody(_this.$fixedHeaderRight, _this.$fixedBodyRight);
  1136. }
  1137. });
  1138. }
  1139. }, {
  1140. key: "hideLoading",
  1141. value: function hideLoading() {
  1142. _get(_getPrototypeOf(_class.prototype), "hideLoading", this).call(this);
  1143. if (this.needFixedColumns && this.options.fixedNumber) {
  1144. this.$fixedColumns.find('.fixed-table-loading').hide();
  1145. }
  1146. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1147. this.$fixedColumnsRight.find('.fixed-table-loading').hide();
  1148. }
  1149. }
  1150. }, {
  1151. key: "initFixedColumnsHeader",
  1152. value: function initFixedColumnsHeader() {
  1153. var _this2 = this;
  1154. if (this.options.height) {
  1155. this.needFixedColumns = this.$tableHeader.outerWidth(true) < this.$tableHeader.find('table').outerWidth(true);
  1156. } else {
  1157. this.needFixedColumns = this.$tableBody.outerWidth(true) < this.$tableBody.find('table').outerWidth(true);
  1158. }
  1159. var initFixedHeader = function initFixedHeader($fixedColumns, isRight) {
  1160. $fixedColumns.find('.fixed-table-header').remove();
  1161. $fixedColumns.append(_this2.$tableHeader.clone(true));
  1162. $fixedColumns.css({
  1163. width: _this2.getFixedColumnsWidth(isRight)
  1164. });
  1165. return $fixedColumns.find('.fixed-table-header');
  1166. };
  1167. if (this.needFixedColumns && this.options.fixedNumber) {
  1168. this.$fixedHeader = initFixedHeader(this.$fixedColumns);
  1169. this.$fixedHeader.css('margin-right', '');
  1170. } else if (this.$fixedColumns) {
  1171. this.$fixedColumns.html('').css('width', '');
  1172. }
  1173. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1174. this.$fixedHeaderRight = initFixedHeader(this.$fixedColumnsRight, true);
  1175. this.$fixedHeaderRight.scrollLeft(this.$fixedHeaderRight.find('table').width());
  1176. } else if (this.$fixedColumnsRight) {
  1177. this.$fixedColumnsRight.html('').css('width', '');
  1178. }
  1179. this.initFixedColumnsBody();
  1180. this.initFixedColumnsEvents();
  1181. }
  1182. }, {
  1183. key: "initFixedColumnsBody",
  1184. value: function initFixedColumnsBody() {
  1185. var _this3 = this;
  1186. var initFixedBody = function initFixedBody($fixedColumns, $fixedHeader) {
  1187. $fixedColumns.find('.fixed-table-body').remove();
  1188. $fixedColumns.append(_this3.$tableBody.clone(true));
  1189. var $fixedBody = $fixedColumns.find('.fixed-table-body');
  1190. var tableBody = _this3.$tableBody.get(0);
  1191. var scrollHeight = tableBody.scrollWidth > tableBody.clientWidth ? Utils.getScrollBarWidth() : 0;
  1192. var height = _this3.$tableContainer.outerHeight(true) - scrollHeight - 1;
  1193. $fixedColumns.css({
  1194. height: height
  1195. });
  1196. $fixedBody.css({
  1197. height: height - $fixedHeader.height()
  1198. });
  1199. return $fixedBody;
  1200. };
  1201. if (this.needFixedColumns && this.options.fixedNumber) {
  1202. this.$fixedBody = initFixedBody(this.$fixedColumns, this.$fixedHeader);
  1203. }
  1204. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1205. this.$fixedBodyRight = initFixedBody(this.$fixedColumnsRight, this.$fixedHeaderRight);
  1206. this.$fixedBodyRight.scrollLeft(this.$fixedBodyRight.find('table').width());
  1207. this.$fixedBodyRight.css('overflow-y', this.options.height ? 'auto' : 'hidden');
  1208. }
  1209. }
  1210. }, {
  1211. key: "getFixedColumnsWidth",
  1212. value: function getFixedColumnsWidth(isRight) {
  1213. var visibleFields = this.getVisibleFields();
  1214. var width = 0;
  1215. var fixedNumber = this.options.fixedNumber;
  1216. var marginRight = 0;
  1217. if (isRight) {
  1218. visibleFields = visibleFields.reverse();
  1219. fixedNumber = this.options.fixedRightNumber;
  1220. marginRight = parseInt(this.$tableHeader.css('margin-right'), 10);
  1221. }
  1222. for (var i = 0; i < fixedNumber; i++) {
  1223. width += this.$header.find("th[data-field=\"".concat(visibleFields[i], "\"]")).outerWidth(true);
  1224. }
  1225. return width + marginRight + 1;
  1226. }
  1227. }, {
  1228. key: "initFixedColumnsEvents",
  1229. value: function initFixedColumnsEvents() {
  1230. var _this4 = this;
  1231. var toggleHover = function toggleHover(e, toggle) {
  1232. var tr = "tr[data-index=\"".concat($__default['default'](e.currentTarget).data('index'), "\"]");
  1233. var $trs = _this4.$tableBody.find(tr);
  1234. if (_this4.$fixedBody) {
  1235. $trs = $trs.add(_this4.$fixedBody.find(tr));
  1236. }
  1237. if (_this4.$fixedBodyRight) {
  1238. $trs = $trs.add(_this4.$fixedBodyRight.find(tr));
  1239. }
  1240. $trs.css('background-color', toggle ? $__default['default'](e.currentTarget).css('background-color') : '');
  1241. };
  1242. this.$tableBody.find('tr').hover(function (e) {
  1243. toggleHover(e, true);
  1244. }, function (e) {
  1245. toggleHover(e, false);
  1246. });
  1247. var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
  1248. var mousewheel = isFirefox ? 'DOMMouseScroll' : 'mousewheel';
  1249. var updateScroll = function updateScroll(e, fixedBody) {
  1250. var normalized = normalizeWheel(e);
  1251. var deltaY = Math.ceil(normalized.pixelY);
  1252. var top = _this4.$tableBody.scrollTop() + deltaY;
  1253. if (deltaY < 0 && top > 0 || deltaY > 0 && top < fixedBody.scrollHeight - fixedBody.clientHeight) {
  1254. e.preventDefault();
  1255. }
  1256. _this4.$tableBody.scrollTop(top);
  1257. if (_this4.$fixedBody) {
  1258. _this4.$fixedBody.scrollTop(top);
  1259. }
  1260. if (_this4.$fixedBodyRight) {
  1261. _this4.$fixedBodyRight.scrollTop(top);
  1262. }
  1263. };
  1264. if (this.needFixedColumns && this.options.fixedNumber) {
  1265. this.$fixedBody.find('tr').hover(function (e) {
  1266. toggleHover(e, true);
  1267. }, function (e) {
  1268. toggleHover(e, false);
  1269. });
  1270. this.$fixedBody[0].addEventListener(mousewheel, function (e) {
  1271. updateScroll(e, _this4.$fixedBody[0]);
  1272. });
  1273. }
  1274. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1275. this.$fixedBodyRight.find('tr').hover(function (e) {
  1276. toggleHover(e, true);
  1277. }, function (e) {
  1278. toggleHover(e, false);
  1279. });
  1280. this.$fixedBodyRight.off('scroll').on('scroll', function () {
  1281. var top = _this4.$fixedBodyRight.scrollTop();
  1282. _this4.$tableBody.scrollTop(top);
  1283. if (_this4.$fixedBody) {
  1284. _this4.$fixedBody.scrollTop(top);
  1285. }
  1286. });
  1287. }
  1288. if (this.options.filterControl) {
  1289. $__default['default'](this.$fixedColumns).off('keyup change').on('keyup change', function (e) {
  1290. var $target = $__default['default'](e.target);
  1291. var value = $target.val();
  1292. var field = $target.parents('th').data('field');
  1293. var $coreTh = _this4.$header.find("th[data-field=\"".concat(field, "\"]"));
  1294. if ($target.is('input')) {
  1295. $coreTh.find('input').val(value);
  1296. } else if ($target.is('select')) {
  1297. var $select = $coreTh.find('select');
  1298. $select.find('option[selected]').removeAttr('selected');
  1299. $select.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  1300. }
  1301. _this4.triggerSearch();
  1302. });
  1303. }
  1304. }
  1305. }, {
  1306. key: "renderStickyHeader",
  1307. value: function renderStickyHeader() {
  1308. if (!this.options.stickyHeader) {
  1309. return;
  1310. }
  1311. this.$stickyContainer = this.$container.find('.sticky-header-container');
  1312. _get(_getPrototypeOf(_class.prototype), "renderStickyHeader", this).call(this);
  1313. if (this.needFixedColumns && this.options.fixedNumber) {
  1314. this.$fixedColumns.css('z-index', 101).find('.sticky-header-container').css('right', '').width(this.$fixedColumns.outerWidth());
  1315. }
  1316. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1317. var $stickyHeaderContainerRight = this.$fixedColumnsRight.find('.sticky-header-container');
  1318. this.$fixedColumnsRight.css('z-index', 101);
  1319. $stickyHeaderContainerRight.css('left', '').scrollLeft($stickyHeaderContainerRight.find('.table').outerWidth()).width(this.$fixedColumnsRight.outerWidth());
  1320. }
  1321. }
  1322. }, {
  1323. key: "matchPositionX",
  1324. value: function matchPositionX() {
  1325. if (!this.options.stickyHeader) {
  1326. return;
  1327. }
  1328. this.$stickyContainer.eq(0).scrollLeft(this.$tableBody.scrollLeft());
  1329. }
  1330. }]);
  1331. return _class;
  1332. }($__default['default'].BootstrapTable);
  1333. })));