bootstrap-table-reorder-rows.js 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723
  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 ($$4) { 'use strict';
  6. function _arrayLikeToArray(r, a) {
  7. (null == a || a > r.length) && (a = r.length);
  8. for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  9. return n;
  10. }
  11. function _arrayWithoutHoles(r) {
  12. if (Array.isArray(r)) return _arrayLikeToArray(r);
  13. }
  14. function _assertThisInitialized(e) {
  15. if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  16. return e;
  17. }
  18. function _callSuper(t, o, e) {
  19. return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
  20. }
  21. function _classCallCheck(a, n) {
  22. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  23. }
  24. function _defineProperties(e, r) {
  25. for (var t = 0; t < r.length; t++) {
  26. var o = r[t];
  27. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
  28. }
  29. }
  30. function _createClass(e, r, t) {
  31. return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
  32. writable: !1
  33. }), e;
  34. }
  35. function _get() {
  36. return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
  37. var p = _superPropBase(e, t);
  38. if (p) {
  39. var n = Object.getOwnPropertyDescriptor(p, t);
  40. return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
  41. }
  42. }, _get.apply(null, arguments);
  43. }
  44. function _getPrototypeOf(t) {
  45. return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
  46. return t.__proto__ || Object.getPrototypeOf(t);
  47. }, _getPrototypeOf(t);
  48. }
  49. function _inherits(t, e) {
  50. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  51. t.prototype = Object.create(e && e.prototype, {
  52. constructor: {
  53. value: t,
  54. writable: !0,
  55. configurable: !0
  56. }
  57. }), Object.defineProperty(t, "prototype", {
  58. writable: !1
  59. }), e && _setPrototypeOf(t, e);
  60. }
  61. function _isNativeReflectConstruct() {
  62. try {
  63. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  64. } catch (t) {}
  65. return (_isNativeReflectConstruct = function () {
  66. return !!t;
  67. })();
  68. }
  69. function _iterableToArray(r) {
  70. if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
  71. }
  72. function _nonIterableSpread() {
  73. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  74. }
  75. function _possibleConstructorReturn(t, e) {
  76. if (e && ("object" == typeof e || "function" == typeof e)) return e;
  77. if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
  78. return _assertThisInitialized(t);
  79. }
  80. function _setPrototypeOf(t, e) {
  81. return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
  82. return t.__proto__ = e, t;
  83. }, _setPrototypeOf(t, e);
  84. }
  85. function _superPropBase(t, o) {
  86. for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
  87. return t;
  88. }
  89. function _toConsumableArray(r) {
  90. return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
  91. }
  92. function _toPrimitive(t, r) {
  93. if ("object" != typeof t || !t) return t;
  94. var e = t[Symbol.toPrimitive];
  95. if (void 0 !== e) {
  96. var i = e.call(t, r);
  97. if ("object" != typeof i) return i;
  98. throw new TypeError("@@toPrimitive must return a primitive value.");
  99. }
  100. return (String )(t);
  101. }
  102. function _toPropertyKey(t) {
  103. var i = _toPrimitive(t, "string");
  104. return "symbol" == typeof i ? i : i + "";
  105. }
  106. function _unsupportedIterableToArray(r, a) {
  107. if (r) {
  108. if ("string" == typeof r) return _arrayLikeToArray(r, a);
  109. var t = {}.toString.call(r).slice(8, -1);
  110. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  111. }
  112. }
  113. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  114. var check = function (it) {
  115. return it && it.Math === Math && it;
  116. };
  117. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  118. var global$a =
  119. // eslint-disable-next-line es/no-global-this -- safe
  120. check(typeof globalThis == 'object' && globalThis) ||
  121. check(typeof window == 'object' && window) ||
  122. // eslint-disable-next-line no-restricted-globals -- safe
  123. check(typeof self == 'object' && self) ||
  124. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  125. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  126. // eslint-disable-next-line no-new-func -- fallback
  127. (function () { return this; })() || Function('return this')();
  128. var objectGetOwnPropertyDescriptor = {};
  129. var fails$d = function (exec) {
  130. try {
  131. return !!exec();
  132. } catch (error) {
  133. return true;
  134. }
  135. };
  136. var fails$c = fails$d;
  137. // Detect IE8's incomplete defineProperty implementation
  138. var descriptors = !fails$c(function () {
  139. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  140. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  141. });
  142. var fails$b = fails$d;
  143. var functionBindNative = !fails$b(function () {
  144. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  145. var test = (function () { /* empty */ }).bind();
  146. // eslint-disable-next-line no-prototype-builtins -- safe
  147. return typeof test != 'function' || test.hasOwnProperty('prototype');
  148. });
  149. var NATIVE_BIND$1 = functionBindNative;
  150. var call$5 = Function.prototype.call;
  151. var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
  152. return call$5.apply(call$5, arguments);
  153. };
  154. var objectPropertyIsEnumerable = {};
  155. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  156. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  157. var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
  158. // Nashorn ~ JDK8 bug
  159. var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  160. // `Object.prototype.propertyIsEnumerable` method implementation
  161. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  162. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  163. var descriptor = getOwnPropertyDescriptor$2(this, V);
  164. return !!descriptor && descriptor.enumerable;
  165. } : $propertyIsEnumerable;
  166. var createPropertyDescriptor$3 = function (bitmap, value) {
  167. return {
  168. enumerable: !(bitmap & 1),
  169. configurable: !(bitmap & 2),
  170. writable: !(bitmap & 4),
  171. value: value
  172. };
  173. };
  174. var NATIVE_BIND = functionBindNative;
  175. var FunctionPrototype$1 = Function.prototype;
  176. var call$4 = FunctionPrototype$1.call;
  177. var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
  178. var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  179. return function () {
  180. return call$4.apply(fn, arguments);
  181. };
  182. };
  183. var uncurryThis$c = functionUncurryThis;
  184. var toString$1 = uncurryThis$c({}.toString);
  185. var stringSlice$1 = uncurryThis$c(''.slice);
  186. var classofRaw$2 = function (it) {
  187. return stringSlice$1(toString$1(it), 8, -1);
  188. };
  189. var uncurryThis$b = functionUncurryThis;
  190. var fails$a = fails$d;
  191. var classof$3 = classofRaw$2;
  192. var $Object$3 = Object;
  193. var split = uncurryThis$b(''.split);
  194. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  195. var indexedObject = fails$a(function () {
  196. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  197. // eslint-disable-next-line no-prototype-builtins -- safe
  198. return !$Object$3('z').propertyIsEnumerable(0);
  199. }) ? function (it) {
  200. return classof$3(it) === 'String' ? split(it, '') : $Object$3(it);
  201. } : $Object$3;
  202. // we can't use just `it == null` since of `document.all` special case
  203. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  204. var isNullOrUndefined$2 = function (it) {
  205. return it === null || it === undefined;
  206. };
  207. var isNullOrUndefined$1 = isNullOrUndefined$2;
  208. var $TypeError$8 = TypeError;
  209. // `RequireObjectCoercible` abstract operation
  210. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  211. var requireObjectCoercible$2 = function (it) {
  212. if (isNullOrUndefined$1(it)) throw new $TypeError$8("Can't call method on " + it);
  213. return it;
  214. };
  215. // toObject with fallback for non-array-like ES3 strings
  216. var IndexedObject$1 = indexedObject;
  217. var requireObjectCoercible$1 = requireObjectCoercible$2;
  218. var toIndexedObject$3 = function (it) {
  219. return IndexedObject$1(requireObjectCoercible$1(it));
  220. };
  221. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  222. var documentAll = typeof document == 'object' && document.all;
  223. // `IsCallable` abstract operation
  224. // https://tc39.es/ecma262/#sec-iscallable
  225. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  226. var isCallable$c = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  227. return typeof argument == 'function' || argument === documentAll;
  228. } : function (argument) {
  229. return typeof argument == 'function';
  230. };
  231. var isCallable$b = isCallable$c;
  232. var isObject$7 = function (it) {
  233. return typeof it == 'object' ? it !== null : isCallable$b(it);
  234. };
  235. var global$9 = global$a;
  236. var isCallable$a = isCallable$c;
  237. var aFunction = function (argument) {
  238. return isCallable$a(argument) ? argument : undefined;
  239. };
  240. var getBuiltIn$3 = function (namespace, method) {
  241. return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
  242. };
  243. var uncurryThis$a = functionUncurryThis;
  244. var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
  245. var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
  246. var global$8 = global$a;
  247. var userAgent = engineUserAgent;
  248. var process = global$8.process;
  249. var Deno = global$8.Deno;
  250. var versions = process && process.versions || Deno && Deno.version;
  251. var v8 = versions && versions.v8;
  252. var match, version;
  253. if (v8) {
  254. match = v8.split('.');
  255. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  256. // but their correct versions are not interesting for us
  257. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  258. }
  259. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  260. // so check `userAgent` even if `.v8` exists, but 0
  261. if (!version && userAgent) {
  262. match = userAgent.match(/Edge\/(\d+)/);
  263. if (!match || match[1] >= 74) {
  264. match = userAgent.match(/Chrome\/(\d+)/);
  265. if (match) version = +match[1];
  266. }
  267. }
  268. var engineV8Version = version;
  269. /* eslint-disable es/no-symbol -- required for testing */
  270. var V8_VERSION$2 = engineV8Version;
  271. var fails$9 = fails$d;
  272. var global$7 = global$a;
  273. var $String$3 = global$7.String;
  274. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  275. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () {
  276. var symbol = Symbol('symbol detection');
  277. // Chrome 38 Symbol has incorrect toString conversion
  278. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  279. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  280. // of course, fail.
  281. return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
  282. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  283. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  284. });
  285. /* eslint-disable es/no-symbol -- required for testing */
  286. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  287. var useSymbolAsUid = NATIVE_SYMBOL$1
  288. && !Symbol.sham
  289. && typeof Symbol.iterator == 'symbol';
  290. var getBuiltIn$2 = getBuiltIn$3;
  291. var isCallable$9 = isCallable$c;
  292. var isPrototypeOf = objectIsPrototypeOf;
  293. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  294. var $Object$2 = Object;
  295. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  296. return typeof it == 'symbol';
  297. } : function (it) {
  298. var $Symbol = getBuiltIn$2('Symbol');
  299. return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
  300. };
  301. var $String$2 = String;
  302. var tryToString$2 = function (argument) {
  303. try {
  304. return $String$2(argument);
  305. } catch (error) {
  306. return 'Object';
  307. }
  308. };
  309. var isCallable$8 = isCallable$c;
  310. var tryToString$1 = tryToString$2;
  311. var $TypeError$7 = TypeError;
  312. // `Assert: IsCallable(argument) is true`
  313. var aCallable$1 = function (argument) {
  314. if (isCallable$8(argument)) return argument;
  315. throw new $TypeError$7(tryToString$1(argument) + ' is not a function');
  316. };
  317. var aCallable = aCallable$1;
  318. var isNullOrUndefined = isNullOrUndefined$2;
  319. // `GetMethod` abstract operation
  320. // https://tc39.es/ecma262/#sec-getmethod
  321. var getMethod$1 = function (V, P) {
  322. var func = V[P];
  323. return isNullOrUndefined(func) ? undefined : aCallable(func);
  324. };
  325. var call$3 = functionCall;
  326. var isCallable$7 = isCallable$c;
  327. var isObject$6 = isObject$7;
  328. var $TypeError$6 = TypeError;
  329. // `OrdinaryToPrimitive` abstract operation
  330. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  331. var ordinaryToPrimitive$1 = function (input, pref) {
  332. var fn, val;
  333. if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$3(fn, input))) return val;
  334. if (isCallable$7(fn = input.valueOf) && !isObject$6(val = call$3(fn, input))) return val;
  335. if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$3(fn, input))) return val;
  336. throw new $TypeError$6("Can't convert object to primitive value");
  337. };
  338. var sharedStore = {exports: {}};
  339. var global$6 = global$a;
  340. // eslint-disable-next-line es/no-object-defineproperty -- safe
  341. var defineProperty$2 = Object.defineProperty;
  342. var defineGlobalProperty$3 = function (key, value) {
  343. try {
  344. defineProperty$2(global$6, key, { value: value, configurable: true, writable: true });
  345. } catch (error) {
  346. global$6[key] = value;
  347. } return value;
  348. };
  349. var globalThis$1 = global$a;
  350. var defineGlobalProperty$2 = defineGlobalProperty$3;
  351. var SHARED = '__core-js_shared__';
  352. var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
  353. (store$3.versions || (store$3.versions = [])).push({
  354. version: '3.37.1',
  355. mode: 'global',
  356. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  357. license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
  358. source: 'https://github.com/zloirock/core-js'
  359. });
  360. var sharedStoreExports = sharedStore.exports;
  361. var store$2 = sharedStoreExports;
  362. var shared$3 = function (key, value) {
  363. return store$2[key] || (store$2[key] = value || {});
  364. };
  365. var requireObjectCoercible = requireObjectCoercible$2;
  366. var $Object$1 = Object;
  367. // `ToObject` abstract operation
  368. // https://tc39.es/ecma262/#sec-toobject
  369. var toObject$4 = function (argument) {
  370. return $Object$1(requireObjectCoercible(argument));
  371. };
  372. var uncurryThis$9 = functionUncurryThis;
  373. var toObject$3 = toObject$4;
  374. var hasOwnProperty = uncurryThis$9({}.hasOwnProperty);
  375. // `HasOwnProperty` abstract operation
  376. // https://tc39.es/ecma262/#sec-hasownproperty
  377. // eslint-disable-next-line es/no-object-hasown -- safe
  378. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  379. return hasOwnProperty(toObject$3(it), key);
  380. };
  381. var uncurryThis$8 = functionUncurryThis;
  382. var id = 0;
  383. var postfix = Math.random();
  384. var toString = uncurryThis$8(1.0.toString);
  385. var uid$2 = function (key) {
  386. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  387. };
  388. var global$5 = global$a;
  389. var shared$2 = shared$3;
  390. var hasOwn$6 = hasOwnProperty_1;
  391. var uid$1 = uid$2;
  392. var NATIVE_SYMBOL = symbolConstructorDetection;
  393. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  394. var Symbol$1 = global$5.Symbol;
  395. var WellKnownSymbolsStore = shared$2('wks');
  396. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  397. var wellKnownSymbol$6 = function (name) {
  398. if (!hasOwn$6(WellKnownSymbolsStore, name)) {
  399. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)
  400. ? Symbol$1[name]
  401. : createWellKnownSymbol('Symbol.' + name);
  402. } return WellKnownSymbolsStore[name];
  403. };
  404. var call$2 = functionCall;
  405. var isObject$5 = isObject$7;
  406. var isSymbol$1 = isSymbol$2;
  407. var getMethod = getMethod$1;
  408. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  409. var wellKnownSymbol$5 = wellKnownSymbol$6;
  410. var $TypeError$5 = TypeError;
  411. var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
  412. // `ToPrimitive` abstract operation
  413. // https://tc39.es/ecma262/#sec-toprimitive
  414. var toPrimitive$1 = function (input, pref) {
  415. if (!isObject$5(input) || isSymbol$1(input)) return input;
  416. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  417. var result;
  418. if (exoticToPrim) {
  419. if (pref === undefined) pref = 'default';
  420. result = call$2(exoticToPrim, input, pref);
  421. if (!isObject$5(result) || isSymbol$1(result)) return result;
  422. throw new $TypeError$5("Can't convert object to primitive value");
  423. }
  424. if (pref === undefined) pref = 'number';
  425. return ordinaryToPrimitive(input, pref);
  426. };
  427. var toPrimitive = toPrimitive$1;
  428. var isSymbol = isSymbol$2;
  429. // `ToPropertyKey` abstract operation
  430. // https://tc39.es/ecma262/#sec-topropertykey
  431. var toPropertyKey$2 = function (argument) {
  432. var key = toPrimitive(argument, 'string');
  433. return isSymbol(key) ? key : key + '';
  434. };
  435. var global$4 = global$a;
  436. var isObject$4 = isObject$7;
  437. var document$1 = global$4.document;
  438. // typeof document.createElement is 'object' in old IE
  439. var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
  440. var documentCreateElement = function (it) {
  441. return EXISTS$1 ? document$1.createElement(it) : {};
  442. };
  443. var DESCRIPTORS$9 = descriptors;
  444. var fails$8 = fails$d;
  445. var createElement = documentCreateElement;
  446. // Thanks to IE8 for its funny defineProperty
  447. var ie8DomDefine = !DESCRIPTORS$9 && !fails$8(function () {
  448. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  449. return Object.defineProperty(createElement('div'), 'a', {
  450. get: function () { return 7; }
  451. }).a !== 7;
  452. });
  453. var DESCRIPTORS$8 = descriptors;
  454. var call$1 = functionCall;
  455. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  456. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  457. var toIndexedObject$2 = toIndexedObject$3;
  458. var toPropertyKey$1 = toPropertyKey$2;
  459. var hasOwn$5 = hasOwnProperty_1;
  460. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  461. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  462. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  463. // `Object.getOwnPropertyDescriptor` method
  464. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  465. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  466. O = toIndexedObject$2(O);
  467. P = toPropertyKey$1(P);
  468. if (IE8_DOM_DEFINE$1) try {
  469. return $getOwnPropertyDescriptor$1(O, P);
  470. } catch (error) { /* empty */ }
  471. if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
  472. };
  473. var objectDefineProperty = {};
  474. var DESCRIPTORS$7 = descriptors;
  475. var fails$7 = fails$d;
  476. // V8 ~ Chrome 36-
  477. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  478. var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$7(function () {
  479. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  480. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  481. value: 42,
  482. writable: false
  483. }).prototype !== 42;
  484. });
  485. var isObject$3 = isObject$7;
  486. var $String$1 = String;
  487. var $TypeError$4 = TypeError;
  488. // `Assert: Type(argument) is Object`
  489. var anObject$2 = function (argument) {
  490. if (isObject$3(argument)) return argument;
  491. throw new $TypeError$4($String$1(argument) + ' is not an object');
  492. };
  493. var DESCRIPTORS$6 = descriptors;
  494. var IE8_DOM_DEFINE = ie8DomDefine;
  495. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  496. var anObject$1 = anObject$2;
  497. var toPropertyKey = toPropertyKey$2;
  498. var $TypeError$3 = TypeError;
  499. // eslint-disable-next-line es/no-object-defineproperty -- safe
  500. var $defineProperty = Object.defineProperty;
  501. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  502. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  503. var ENUMERABLE = 'enumerable';
  504. var CONFIGURABLE$1 = 'configurable';
  505. var WRITABLE = 'writable';
  506. // `Object.defineProperty` method
  507. // https://tc39.es/ecma262/#sec-object.defineproperty
  508. objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  509. anObject$1(O);
  510. P = toPropertyKey(P);
  511. anObject$1(Attributes);
  512. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  513. var current = $getOwnPropertyDescriptor(O, P);
  514. if (current && current[WRITABLE]) {
  515. O[P] = Attributes.value;
  516. Attributes = {
  517. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  518. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  519. writable: false
  520. };
  521. }
  522. } return $defineProperty(O, P, Attributes);
  523. } : $defineProperty : function defineProperty(O, P, Attributes) {
  524. anObject$1(O);
  525. P = toPropertyKey(P);
  526. anObject$1(Attributes);
  527. if (IE8_DOM_DEFINE) try {
  528. return $defineProperty(O, P, Attributes);
  529. } catch (error) { /* empty */ }
  530. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported');
  531. if ('value' in Attributes) O[P] = Attributes.value;
  532. return O;
  533. };
  534. var DESCRIPTORS$5 = descriptors;
  535. var definePropertyModule$3 = objectDefineProperty;
  536. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  537. var createNonEnumerableProperty$2 = DESCRIPTORS$5 ? function (object, key, value) {
  538. return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
  539. } : function (object, key, value) {
  540. object[key] = value;
  541. return object;
  542. };
  543. var makeBuiltIn$2 = {exports: {}};
  544. var DESCRIPTORS$4 = descriptors;
  545. var hasOwn$4 = hasOwnProperty_1;
  546. var FunctionPrototype = Function.prototype;
  547. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  548. var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
  549. var EXISTS = hasOwn$4(FunctionPrototype, 'name');
  550. // additional protection from minified / mangled / dropped function names
  551. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  552. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
  553. var functionName = {
  554. EXISTS: EXISTS,
  555. PROPER: PROPER,
  556. CONFIGURABLE: CONFIGURABLE
  557. };
  558. var uncurryThis$7 = functionUncurryThis;
  559. var isCallable$6 = isCallable$c;
  560. var store$1 = sharedStoreExports;
  561. var functionToString = uncurryThis$7(Function.toString);
  562. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  563. if (!isCallable$6(store$1.inspectSource)) {
  564. store$1.inspectSource = function (it) {
  565. return functionToString(it);
  566. };
  567. }
  568. var inspectSource$2 = store$1.inspectSource;
  569. var global$3 = global$a;
  570. var isCallable$5 = isCallable$c;
  571. var WeakMap$1 = global$3.WeakMap;
  572. var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1));
  573. var shared$1 = shared$3;
  574. var uid = uid$2;
  575. var keys = shared$1('keys');
  576. var sharedKey$1 = function (key) {
  577. return keys[key] || (keys[key] = uid(key));
  578. };
  579. var hiddenKeys$3 = {};
  580. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  581. var global$2 = global$a;
  582. var isObject$2 = isObject$7;
  583. var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
  584. var hasOwn$3 = hasOwnProperty_1;
  585. var shared = sharedStoreExports;
  586. var sharedKey = sharedKey$1;
  587. var hiddenKeys$2 = hiddenKeys$3;
  588. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  589. var TypeError$1 = global$2.TypeError;
  590. var WeakMap = global$2.WeakMap;
  591. var set, get, has;
  592. var enforce = function (it) {
  593. return has(it) ? get(it) : set(it, {});
  594. };
  595. var getterFor = function (TYPE) {
  596. return function (it) {
  597. var state;
  598. if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
  599. throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  600. } return state;
  601. };
  602. };
  603. if (NATIVE_WEAK_MAP || shared.state) {
  604. var store = shared.state || (shared.state = new WeakMap());
  605. /* eslint-disable no-self-assign -- prototype methods protection */
  606. store.get = store.get;
  607. store.has = store.has;
  608. store.set = store.set;
  609. /* eslint-enable no-self-assign -- prototype methods protection */
  610. set = function (it, metadata) {
  611. if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  612. metadata.facade = it;
  613. store.set(it, metadata);
  614. return metadata;
  615. };
  616. get = function (it) {
  617. return store.get(it) || {};
  618. };
  619. has = function (it) {
  620. return store.has(it);
  621. };
  622. } else {
  623. var STATE = sharedKey('state');
  624. hiddenKeys$2[STATE] = true;
  625. set = function (it, metadata) {
  626. if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  627. metadata.facade = it;
  628. createNonEnumerableProperty$1(it, STATE, metadata);
  629. return metadata;
  630. };
  631. get = function (it) {
  632. return hasOwn$3(it, STATE) ? it[STATE] : {};
  633. };
  634. has = function (it) {
  635. return hasOwn$3(it, STATE);
  636. };
  637. }
  638. var internalState = {
  639. set: set,
  640. get: get,
  641. has: has,
  642. enforce: enforce,
  643. getterFor: getterFor
  644. };
  645. var uncurryThis$6 = functionUncurryThis;
  646. var fails$6 = fails$d;
  647. var isCallable$4 = isCallable$c;
  648. var hasOwn$2 = hasOwnProperty_1;
  649. var DESCRIPTORS$3 = descriptors;
  650. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  651. var inspectSource$1 = inspectSource$2;
  652. var InternalStateModule = internalState;
  653. var enforceInternalState = InternalStateModule.enforce;
  654. var getInternalState = InternalStateModule.get;
  655. var $String = String;
  656. // eslint-disable-next-line es/no-object-defineproperty -- safe
  657. var defineProperty$1 = Object.defineProperty;
  658. var stringSlice = uncurryThis$6(''.slice);
  659. var replace = uncurryThis$6(''.replace);
  660. var join = uncurryThis$6([].join);
  661. var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$6(function () {
  662. return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  663. });
  664. var TEMPLATE = String(String).split('String');
  665. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  666. if (stringSlice($String(name), 0, 7) === 'Symbol(') {
  667. name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  668. }
  669. if (options && options.getter) name = 'get ' + name;
  670. if (options && options.setter) name = 'set ' + name;
  671. if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  672. if (DESCRIPTORS$3) defineProperty$1(value, 'name', { value: name, configurable: true });
  673. else value.name = name;
  674. }
  675. if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
  676. defineProperty$1(value, 'length', { value: options.arity });
  677. }
  678. try {
  679. if (options && hasOwn$2(options, 'constructor') && options.constructor) {
  680. if (DESCRIPTORS$3) defineProperty$1(value, 'prototype', { writable: false });
  681. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  682. } else if (value.prototype) value.prototype = undefined;
  683. } catch (error) { /* empty */ }
  684. var state = enforceInternalState(value);
  685. if (!hasOwn$2(state, 'source')) {
  686. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  687. } return value;
  688. };
  689. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  690. // eslint-disable-next-line no-extend-native -- required
  691. Function.prototype.toString = makeBuiltIn$1(function toString() {
  692. return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
  693. }, 'toString');
  694. var makeBuiltInExports = makeBuiltIn$2.exports;
  695. var isCallable$3 = isCallable$c;
  696. var definePropertyModule$2 = objectDefineProperty;
  697. var makeBuiltIn = makeBuiltInExports;
  698. var defineGlobalProperty$1 = defineGlobalProperty$3;
  699. var defineBuiltIn$1 = function (O, key, value, options) {
  700. if (!options) options = {};
  701. var simple = options.enumerable;
  702. var name = options.name !== undefined ? options.name : key;
  703. if (isCallable$3(value)) makeBuiltIn(value, name, options);
  704. if (options.global) {
  705. if (simple) O[key] = value;
  706. else defineGlobalProperty$1(key, value);
  707. } else {
  708. try {
  709. if (!options.unsafe) delete O[key];
  710. else if (O[key]) simple = true;
  711. } catch (error) { /* empty */ }
  712. if (simple) O[key] = value;
  713. else definePropertyModule$2.f(O, key, {
  714. value: value,
  715. enumerable: false,
  716. configurable: !options.nonConfigurable,
  717. writable: !options.nonWritable
  718. });
  719. } return O;
  720. };
  721. var objectGetOwnPropertyNames = {};
  722. var ceil = Math.ceil;
  723. var floor = Math.floor;
  724. // `Math.trunc` method
  725. // https://tc39.es/ecma262/#sec-math.trunc
  726. // eslint-disable-next-line es/no-math-trunc -- safe
  727. var mathTrunc = Math.trunc || function trunc(x) {
  728. var n = +x;
  729. return (n > 0 ? floor : ceil)(n);
  730. };
  731. var trunc = mathTrunc;
  732. // `ToIntegerOrInfinity` abstract operation
  733. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  734. var toIntegerOrInfinity$3 = function (argument) {
  735. var number = +argument;
  736. // eslint-disable-next-line no-self-compare -- NaN check
  737. return number !== number || number === 0 ? 0 : trunc(number);
  738. };
  739. var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
  740. var max$1 = Math.max;
  741. var min$2 = Math.min;
  742. // Helper for a popular repeating case of the spec:
  743. // Let integer be ? ToInteger(index).
  744. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  745. var toAbsoluteIndex$2 = function (index, length) {
  746. var integer = toIntegerOrInfinity$2(index);
  747. return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
  748. };
  749. var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
  750. var min$1 = Math.min;
  751. // `ToLength` abstract operation
  752. // https://tc39.es/ecma262/#sec-tolength
  753. var toLength$1 = function (argument) {
  754. var len = toIntegerOrInfinity$1(argument);
  755. return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  756. };
  757. var toLength = toLength$1;
  758. // `LengthOfArrayLike` abstract operation
  759. // https://tc39.es/ecma262/#sec-lengthofarraylike
  760. var lengthOfArrayLike$3 = function (obj) {
  761. return toLength(obj.length);
  762. };
  763. var toIndexedObject$1 = toIndexedObject$3;
  764. var toAbsoluteIndex$1 = toAbsoluteIndex$2;
  765. var lengthOfArrayLike$2 = lengthOfArrayLike$3;
  766. // `Array.prototype.{ indexOf, includes }` methods implementation
  767. var createMethod = function (IS_INCLUDES) {
  768. return function ($this, el, fromIndex) {
  769. var O = toIndexedObject$1($this);
  770. var length = lengthOfArrayLike$2(O);
  771. if (length === 0) return !IS_INCLUDES && -1;
  772. var index = toAbsoluteIndex$1(fromIndex, length);
  773. var value;
  774. // Array#includes uses SameValueZero equality algorithm
  775. // eslint-disable-next-line no-self-compare -- NaN check
  776. if (IS_INCLUDES && el !== el) while (length > index) {
  777. value = O[index++];
  778. // eslint-disable-next-line no-self-compare -- NaN check
  779. if (value !== value) return true;
  780. // Array#indexOf ignores holes, Array#includes - not
  781. } else for (;length > index; index++) {
  782. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  783. } return !IS_INCLUDES && -1;
  784. };
  785. };
  786. var arrayIncludes = {
  787. // `Array.prototype.includes` method
  788. // https://tc39.es/ecma262/#sec-array.prototype.includes
  789. includes: createMethod(true),
  790. // `Array.prototype.indexOf` method
  791. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  792. indexOf: createMethod(false)
  793. };
  794. var uncurryThis$5 = functionUncurryThis;
  795. var hasOwn$1 = hasOwnProperty_1;
  796. var toIndexedObject = toIndexedObject$3;
  797. var indexOf = arrayIncludes.indexOf;
  798. var hiddenKeys$1 = hiddenKeys$3;
  799. var push = uncurryThis$5([].push);
  800. var objectKeysInternal = function (object, names) {
  801. var O = toIndexedObject(object);
  802. var i = 0;
  803. var result = [];
  804. var key;
  805. for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
  806. // Don't enum bug & hidden keys
  807. while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
  808. ~indexOf(result, key) || push(result, key);
  809. }
  810. return result;
  811. };
  812. // IE8- don't enum bug keys
  813. var enumBugKeys$2 = [
  814. 'constructor',
  815. 'hasOwnProperty',
  816. 'isPrototypeOf',
  817. 'propertyIsEnumerable',
  818. 'toLocaleString',
  819. 'toString',
  820. 'valueOf'
  821. ];
  822. var internalObjectKeys$1 = objectKeysInternal;
  823. var enumBugKeys$1 = enumBugKeys$2;
  824. var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
  825. // `Object.getOwnPropertyNames` method
  826. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  827. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  828. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  829. return internalObjectKeys$1(O, hiddenKeys);
  830. };
  831. var objectGetOwnPropertySymbols = {};
  832. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  833. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  834. var getBuiltIn$1 = getBuiltIn$3;
  835. var uncurryThis$4 = functionUncurryThis;
  836. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  837. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  838. var anObject = anObject$2;
  839. var concat$1 = uncurryThis$4([].concat);
  840. // all object keys, includes non-enumerable and symbols
  841. var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
  842. var keys = getOwnPropertyNamesModule.f(anObject(it));
  843. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  844. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  845. };
  846. var hasOwn = hasOwnProperty_1;
  847. var ownKeys = ownKeys$1;
  848. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  849. var definePropertyModule$1 = objectDefineProperty;
  850. var copyConstructorProperties$1 = function (target, source, exceptions) {
  851. var keys = ownKeys(source);
  852. var defineProperty = definePropertyModule$1.f;
  853. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  854. for (var i = 0; i < keys.length; i++) {
  855. var key = keys[i];
  856. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  857. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  858. }
  859. }
  860. };
  861. var fails$5 = fails$d;
  862. var isCallable$2 = isCallable$c;
  863. var replacement = /#|\.prototype\./;
  864. var isForced$1 = function (feature, detection) {
  865. var value = data[normalize(feature)];
  866. return value === POLYFILL ? true
  867. : value === NATIVE ? false
  868. : isCallable$2(detection) ? fails$5(detection)
  869. : !!detection;
  870. };
  871. var normalize = isForced$1.normalize = function (string) {
  872. return String(string).replace(replacement, '.').toLowerCase();
  873. };
  874. var data = isForced$1.data = {};
  875. var NATIVE = isForced$1.NATIVE = 'N';
  876. var POLYFILL = isForced$1.POLYFILL = 'P';
  877. var isForced_1 = isForced$1;
  878. var global$1 = global$a;
  879. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  880. var createNonEnumerableProperty = createNonEnumerableProperty$2;
  881. var defineBuiltIn = defineBuiltIn$1;
  882. var defineGlobalProperty = defineGlobalProperty$3;
  883. var copyConstructorProperties = copyConstructorProperties$1;
  884. var isForced = isForced_1;
  885. /*
  886. options.target - name of the target object
  887. options.global - target is the global object
  888. options.stat - export as static methods of target
  889. options.proto - export as prototype methods of target
  890. options.real - real prototype method for the `pure` version
  891. options.forced - export even if the native feature is available
  892. options.bind - bind methods to the target, required for the `pure` version
  893. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  894. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  895. options.sham - add a flag to not completely full polyfills
  896. options.enumerable - export as enumerable property
  897. options.dontCallGetSet - prevent calling a getter on target
  898. options.name - the .name of the function if it does not match the key
  899. */
  900. var _export = function (options, source) {
  901. var TARGET = options.target;
  902. var GLOBAL = options.global;
  903. var STATIC = options.stat;
  904. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  905. if (GLOBAL) {
  906. target = global$1;
  907. } else if (STATIC) {
  908. target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
  909. } else {
  910. target = global$1[TARGET] && global$1[TARGET].prototype;
  911. }
  912. if (target) for (key in source) {
  913. sourceProperty = source[key];
  914. if (options.dontCallGetSet) {
  915. descriptor = getOwnPropertyDescriptor$1(target, key);
  916. targetProperty = descriptor && descriptor.value;
  917. } else targetProperty = target[key];
  918. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  919. // contained in target
  920. if (!FORCED && targetProperty !== undefined) {
  921. if (typeof sourceProperty == typeof targetProperty) continue;
  922. copyConstructorProperties(sourceProperty, targetProperty);
  923. }
  924. // add a flag to not completely full polyfills
  925. if (options.sham || (targetProperty && targetProperty.sham)) {
  926. createNonEnumerableProperty(sourceProperty, 'sham', true);
  927. }
  928. defineBuiltIn(target, key, sourceProperty, options);
  929. }
  930. };
  931. var classof$2 = classofRaw$2;
  932. // `IsArray` abstract operation
  933. // https://tc39.es/ecma262/#sec-isarray
  934. // eslint-disable-next-line es/no-array-isarray -- safe
  935. var isArray$3 = Array.isArray || function isArray(argument) {
  936. return classof$2(argument) === 'Array';
  937. };
  938. var $TypeError$2 = TypeError;
  939. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  940. var doesNotExceedSafeInteger$2 = function (it) {
  941. if (it > MAX_SAFE_INTEGER) throw $TypeError$2('Maximum allowed index exceeded');
  942. return it;
  943. };
  944. var DESCRIPTORS$2 = descriptors;
  945. var definePropertyModule = objectDefineProperty;
  946. var createPropertyDescriptor = createPropertyDescriptor$3;
  947. var createProperty$2 = function (object, key, value) {
  948. if (DESCRIPTORS$2) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
  949. else object[key] = value;
  950. };
  951. var wellKnownSymbol$4 = wellKnownSymbol$6;
  952. var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
  953. var test = {};
  954. test[TO_STRING_TAG$1] = 'z';
  955. var toStringTagSupport = String(test) === '[object z]';
  956. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  957. var isCallable$1 = isCallable$c;
  958. var classofRaw$1 = classofRaw$2;
  959. var wellKnownSymbol$3 = wellKnownSymbol$6;
  960. var TO_STRING_TAG = wellKnownSymbol$3('toStringTag');
  961. var $Object = Object;
  962. // ES3 wrong here
  963. var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
  964. // fallback for IE11 Script Access Denied error
  965. var tryGet = function (it, key) {
  966. try {
  967. return it[key];
  968. } catch (error) { /* empty */ }
  969. };
  970. // getting tag from ES6+ `Object.prototype.toString`
  971. var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
  972. var O, tag, result;
  973. return it === undefined ? 'Undefined' : it === null ? 'Null'
  974. // @@toStringTag case
  975. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  976. // builtinTag case
  977. : CORRECT_ARGUMENTS ? classofRaw$1(O)
  978. // ES3 arguments fallback
  979. : (result = classofRaw$1(O)) === 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
  980. };
  981. var uncurryThis$3 = functionUncurryThis;
  982. var fails$4 = fails$d;
  983. var isCallable = isCallable$c;
  984. var classof = classof$1;
  985. var getBuiltIn = getBuiltIn$3;
  986. var inspectSource = inspectSource$2;
  987. var noop = function () { /* empty */ };
  988. var construct = getBuiltIn('Reflect', 'construct');
  989. var constructorRegExp = /^\s*(?:class|function)\b/;
  990. var exec = uncurryThis$3(constructorRegExp.exec);
  991. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  992. var isConstructorModern = function isConstructor(argument) {
  993. if (!isCallable(argument)) return false;
  994. try {
  995. construct(noop, [], argument);
  996. return true;
  997. } catch (error) {
  998. return false;
  999. }
  1000. };
  1001. var isConstructorLegacy = function isConstructor(argument) {
  1002. if (!isCallable(argument)) return false;
  1003. switch (classof(argument)) {
  1004. case 'AsyncFunction':
  1005. case 'GeneratorFunction':
  1006. case 'AsyncGeneratorFunction': return false;
  1007. }
  1008. try {
  1009. // we can't check .prototype since constructors produced by .bind haven't it
  1010. // `Function#toString` throws on some built-it function in some legacy engines
  1011. // (for example, `DOMQuad` and similar in FF41-)
  1012. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1013. } catch (error) {
  1014. return true;
  1015. }
  1016. };
  1017. isConstructorLegacy.sham = true;
  1018. // `IsConstructor` abstract operation
  1019. // https://tc39.es/ecma262/#sec-isconstructor
  1020. var isConstructor$1 = !construct || fails$4(function () {
  1021. var called;
  1022. return isConstructorModern(isConstructorModern.call)
  1023. || !isConstructorModern(Object)
  1024. || !isConstructorModern(function () { called = true; })
  1025. || called;
  1026. }) ? isConstructorLegacy : isConstructorModern;
  1027. var isArray$2 = isArray$3;
  1028. var isConstructor = isConstructor$1;
  1029. var isObject$1 = isObject$7;
  1030. var wellKnownSymbol$2 = wellKnownSymbol$6;
  1031. var SPECIES$1 = wellKnownSymbol$2('species');
  1032. var $Array = Array;
  1033. // a part of `ArraySpeciesCreate` abstract operation
  1034. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1035. var arraySpeciesConstructor$1 = function (originalArray) {
  1036. var C;
  1037. if (isArray$2(originalArray)) {
  1038. C = originalArray.constructor;
  1039. // cross-realm fallback
  1040. if (isConstructor(C) && (C === $Array || isArray$2(C.prototype))) C = undefined;
  1041. else if (isObject$1(C)) {
  1042. C = C[SPECIES$1];
  1043. if (C === null) C = undefined;
  1044. }
  1045. } return C === undefined ? $Array : C;
  1046. };
  1047. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1048. // `ArraySpeciesCreate` abstract operation
  1049. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1050. var arraySpeciesCreate$2 = function (originalArray, length) {
  1051. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1052. };
  1053. var fails$3 = fails$d;
  1054. var wellKnownSymbol$1 = wellKnownSymbol$6;
  1055. var V8_VERSION$1 = engineV8Version;
  1056. var SPECIES = wellKnownSymbol$1('species');
  1057. var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
  1058. // We can't use this feature detection in V8 since it causes
  1059. // deoptimization and serious performance degradation
  1060. // https://github.com/zloirock/core-js/issues/677
  1061. return V8_VERSION$1 >= 51 || !fails$3(function () {
  1062. var array = [];
  1063. var constructor = array.constructor = {};
  1064. constructor[SPECIES] = function () {
  1065. return { foo: 1 };
  1066. };
  1067. return array[METHOD_NAME](Boolean).foo !== 1;
  1068. });
  1069. };
  1070. var $$3 = _export;
  1071. var fails$2 = fails$d;
  1072. var isArray$1 = isArray$3;
  1073. var isObject = isObject$7;
  1074. var toObject$2 = toObject$4;
  1075. var lengthOfArrayLike$1 = lengthOfArrayLike$3;
  1076. var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$2;
  1077. var createProperty$1 = createProperty$2;
  1078. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1079. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
  1080. var wellKnownSymbol = wellKnownSymbol$6;
  1081. var V8_VERSION = engineV8Version;
  1082. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1083. // We can't use this feature detection in V8 since it causes
  1084. // deoptimization and serious performance degradation
  1085. // https://github.com/zloirock/core-js/issues/679
  1086. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$2(function () {
  1087. var array = [];
  1088. array[IS_CONCAT_SPREADABLE] = false;
  1089. return array.concat()[0] !== array;
  1090. });
  1091. var isConcatSpreadable = function (O) {
  1092. if (!isObject(O)) return false;
  1093. var spreadable = O[IS_CONCAT_SPREADABLE];
  1094. return spreadable !== undefined ? !!spreadable : isArray$1(O);
  1095. };
  1096. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport$1('concat');
  1097. // `Array.prototype.concat` method
  1098. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1099. // with adding support of @@isConcatSpreadable and @@species
  1100. $$3({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
  1101. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1102. concat: function concat(arg) {
  1103. var O = toObject$2(this);
  1104. var A = arraySpeciesCreate$1(O, 0);
  1105. var n = 0;
  1106. var i, k, length, len, E;
  1107. for (i = -1, length = arguments.length; i < length; i++) {
  1108. E = i === -1 ? O : arguments[i];
  1109. if (isConcatSpreadable(E)) {
  1110. len = lengthOfArrayLike$1(E);
  1111. doesNotExceedSafeInteger$1(n + len);
  1112. for (k = 0; k < len; k++, n++) if (k in E) createProperty$1(A, n, E[k]);
  1113. } else {
  1114. doesNotExceedSafeInteger$1(n + 1);
  1115. createProperty$1(A, n++, E);
  1116. }
  1117. }
  1118. A.length = n;
  1119. return A;
  1120. }
  1121. });
  1122. var classofRaw = classofRaw$2;
  1123. var uncurryThis$2 = functionUncurryThis;
  1124. var functionUncurryThisClause = function (fn) {
  1125. // Nashorn bug:
  1126. // https://github.com/zloirock/core-js/issues/1128
  1127. // https://github.com/zloirock/core-js/issues/1130
  1128. if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
  1129. };
  1130. var fails$1 = fails$d;
  1131. var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
  1132. var method = [][METHOD_NAME];
  1133. return !!method && fails$1(function () {
  1134. // eslint-disable-next-line no-useless-call -- required for testing
  1135. method.call(null, argument || function () { return 1; }, 1);
  1136. });
  1137. };
  1138. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1139. var $$2 = _export;
  1140. var uncurryThis$1 = functionUncurryThisClause;
  1141. var $indexOf = arrayIncludes.indexOf;
  1142. var arrayMethodIsStrict = arrayMethodIsStrict$1;
  1143. var nativeIndexOf = uncurryThis$1([].indexOf);
  1144. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  1145. var FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');
  1146. // `Array.prototype.indexOf` method
  1147. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1148. $$2({ target: 'Array', proto: true, forced: FORCED }, {
  1149. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1150. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1151. return NEGATIVE_ZERO
  1152. // convert -0 to +0
  1153. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  1154. : $indexOf(this, searchElement, fromIndex);
  1155. }
  1156. });
  1157. var DESCRIPTORS$1 = descriptors;
  1158. var isArray = isArray$3;
  1159. var $TypeError$1 = TypeError;
  1160. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  1161. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1162. // Safari < 13 does not throw an error in this case
  1163. var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$1 && !function () {
  1164. // makes no sense without proper strict mode support
  1165. if (this !== undefined) return true;
  1166. try {
  1167. // eslint-disable-next-line es/no-object-defineproperty -- safe
  1168. Object.defineProperty([], 'length', { writable: false }).length = 1;
  1169. } catch (error) {
  1170. return error instanceof TypeError;
  1171. }
  1172. }();
  1173. var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
  1174. if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
  1175. throw new $TypeError$1('Cannot set read only .length');
  1176. } return O.length = length;
  1177. } : function (O, length) {
  1178. return O.length = length;
  1179. };
  1180. var tryToString = tryToString$2;
  1181. var $TypeError = TypeError;
  1182. var deletePropertyOrThrow$1 = function (O, P) {
  1183. if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  1184. };
  1185. var $$1 = _export;
  1186. var toObject$1 = toObject$4;
  1187. var toAbsoluteIndex = toAbsoluteIndex$2;
  1188. var toIntegerOrInfinity = toIntegerOrInfinity$3;
  1189. var lengthOfArrayLike = lengthOfArrayLike$3;
  1190. var setArrayLength = arraySetLength;
  1191. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$2;
  1192. var arraySpeciesCreate = arraySpeciesCreate$2;
  1193. var createProperty = createProperty$2;
  1194. var deletePropertyOrThrow = deletePropertyOrThrow$1;
  1195. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
  1196. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  1197. var max = Math.max;
  1198. var min = Math.min;
  1199. // `Array.prototype.splice` method
  1200. // https://tc39.es/ecma262/#sec-array.prototype.splice
  1201. // with adding support of @@species
  1202. $$1({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1203. splice: function splice(start, deleteCount /* , ...items */) {
  1204. var O = toObject$1(this);
  1205. var len = lengthOfArrayLike(O);
  1206. var actualStart = toAbsoluteIndex(start, len);
  1207. var argumentsLength = arguments.length;
  1208. var insertCount, actualDeleteCount, A, k, from, to;
  1209. if (argumentsLength === 0) {
  1210. insertCount = actualDeleteCount = 0;
  1211. } else if (argumentsLength === 1) {
  1212. insertCount = 0;
  1213. actualDeleteCount = len - actualStart;
  1214. } else {
  1215. insertCount = argumentsLength - 2;
  1216. actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
  1217. }
  1218. doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
  1219. A = arraySpeciesCreate(O, actualDeleteCount);
  1220. for (k = 0; k < actualDeleteCount; k++) {
  1221. from = actualStart + k;
  1222. if (from in O) createProperty(A, k, O[from]);
  1223. }
  1224. A.length = actualDeleteCount;
  1225. if (insertCount < actualDeleteCount) {
  1226. for (k = actualStart; k < len - actualDeleteCount; k++) {
  1227. from = k + actualDeleteCount;
  1228. to = k + insertCount;
  1229. if (from in O) O[to] = O[from];
  1230. else deletePropertyOrThrow(O, to);
  1231. }
  1232. for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
  1233. } else if (insertCount > actualDeleteCount) {
  1234. for (k = len - actualDeleteCount; k > actualStart; k--) {
  1235. from = k + actualDeleteCount - 1;
  1236. to = k + insertCount - 1;
  1237. if (from in O) O[to] = O[from];
  1238. else deletePropertyOrThrow(O, to);
  1239. }
  1240. }
  1241. for (k = 0; k < insertCount; k++) {
  1242. O[k + actualStart] = arguments[k + 2];
  1243. }
  1244. setArrayLength(O, len - actualDeleteCount + insertCount);
  1245. return A;
  1246. }
  1247. });
  1248. var internalObjectKeys = objectKeysInternal;
  1249. var enumBugKeys = enumBugKeys$2;
  1250. // `Object.keys` method
  1251. // https://tc39.es/ecma262/#sec-object.keys
  1252. // eslint-disable-next-line es/no-object-keys -- safe
  1253. var objectKeys$1 = Object.keys || function keys(O) {
  1254. return internalObjectKeys(O, enumBugKeys);
  1255. };
  1256. var DESCRIPTORS = descriptors;
  1257. var uncurryThis = functionUncurryThis;
  1258. var call = functionCall;
  1259. var fails = fails$d;
  1260. var objectKeys = objectKeys$1;
  1261. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1262. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1263. var toObject = toObject$4;
  1264. var IndexedObject = indexedObject;
  1265. // eslint-disable-next-line es/no-object-assign -- safe
  1266. var $assign = Object.assign;
  1267. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1268. var defineProperty = Object.defineProperty;
  1269. var concat = uncurryThis([].concat);
  1270. // `Object.assign` method
  1271. // https://tc39.es/ecma262/#sec-object.assign
  1272. var objectAssign = !$assign || fails(function () {
  1273. // should have correct order of operations (Edge bug)
  1274. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1275. enumerable: true,
  1276. get: function () {
  1277. defineProperty(this, 'b', {
  1278. value: 3,
  1279. enumerable: false
  1280. });
  1281. }
  1282. }), { b: 2 })).b !== 1) return true;
  1283. // should work with symbols and should have deterministic property order (V8 bug)
  1284. var A = {};
  1285. var B = {};
  1286. // eslint-disable-next-line es/no-symbol -- safe
  1287. var symbol = Symbol('assign detection');
  1288. var alphabet = 'abcdefghijklmnopqrst';
  1289. A[symbol] = 7;
  1290. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1291. return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
  1292. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1293. var T = toObject(target);
  1294. var argumentsLength = arguments.length;
  1295. var index = 1;
  1296. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1297. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1298. while (argumentsLength > index) {
  1299. var S = IndexedObject(arguments[index++]);
  1300. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1301. var length = keys.length;
  1302. var j = 0;
  1303. var key;
  1304. while (length > j) {
  1305. key = keys[j++];
  1306. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  1307. }
  1308. } return T;
  1309. } : $assign;
  1310. var $ = _export;
  1311. var assign = objectAssign;
  1312. // `Object.assign` method
  1313. // https://tc39.es/ecma262/#sec-object.assign
  1314. // eslint-disable-next-line es/no-object-assign -- required for testing
  1315. $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1316. assign: assign
  1317. });
  1318. /**
  1319. * @author: Dennis Hernández
  1320. * @update zhixin wen <wenzhixin2010@gmail.com>
  1321. */
  1322. var rowAttr = function rowAttr(row, index) {
  1323. return {
  1324. id: "customId_".concat(index)
  1325. };
  1326. };
  1327. Object.assign($$4.fn.bootstrapTable.defaults, {
  1328. reorderableRows: false,
  1329. onDragStyle: null,
  1330. onDropStyle: null,
  1331. onDragClass: 'reorder-rows-on-drag-class',
  1332. dragHandle: '>tbody>tr>td:not(.bs-checkbox)',
  1333. useRowAttrFunc: false,
  1334. // eslint-disable-next-line no-unused-vars
  1335. onReorderRowsDrag: function onReorderRowsDrag(row) {
  1336. return false;
  1337. },
  1338. // eslint-disable-next-line no-unused-vars
  1339. onReorderRowsDrop: function onReorderRowsDrop(row) {
  1340. return false;
  1341. },
  1342. // eslint-disable-next-line no-unused-vars
  1343. onReorderRow: function onReorderRow(newData) {
  1344. return false;
  1345. },
  1346. onDragStop: function onDragStop() {},
  1347. onAllowDrop: function onAllowDrop() {
  1348. return true;
  1349. }
  1350. });
  1351. Object.assign($$4.fn.bootstrapTable.events, {
  1352. 'reorder-row.bs.table': 'onReorderRow'
  1353. });
  1354. $$4.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1355. function _class() {
  1356. _classCallCheck(this, _class);
  1357. return _callSuper(this, _class, arguments);
  1358. }
  1359. _inherits(_class, _$$BootstrapTable);
  1360. return _createClass(_class, [{
  1361. key: "init",
  1362. value: function init() {
  1363. var _this = this,
  1364. _get3;
  1365. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1366. args[_key] = arguments[_key];
  1367. }
  1368. if (!this.options.reorderableRows) {
  1369. var _get2;
  1370. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  1371. return;
  1372. }
  1373. if (this.options.useRowAttrFunc) {
  1374. this.options.rowAttributes = rowAttr;
  1375. }
  1376. var onPostBody = this.options.onPostBody;
  1377. this.options.onPostBody = function () {
  1378. setTimeout(function () {
  1379. _this.makeRowsReorderable();
  1380. onPostBody.call(_this.options, _this.options.data);
  1381. }, 1);
  1382. };
  1383. (_get3 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get3, [this].concat(args));
  1384. }
  1385. }, {
  1386. key: "makeRowsReorderable",
  1387. value: function makeRowsReorderable() {
  1388. var _this2 = this;
  1389. this.$el.tableDnD({
  1390. onDragStyle: this.options.onDragStyle,
  1391. onDropStyle: this.options.onDropStyle,
  1392. onDragClass: this.options.onDragClass,
  1393. onAllowDrop: function onAllowDrop(hoveredRow, draggedRow) {
  1394. return _this2.onAllowDrop(hoveredRow, draggedRow);
  1395. },
  1396. onDragStop: function onDragStop(table, draggedRow) {
  1397. return _this2.onDragStop(table, draggedRow);
  1398. },
  1399. onDragStart: function onDragStart(table, droppedRow) {
  1400. return _this2.onDropStart(table, droppedRow);
  1401. },
  1402. onDrop: function onDrop(table, droppedRow) {
  1403. return _this2.onDrop(table, droppedRow);
  1404. },
  1405. dragHandle: this.options.dragHandle
  1406. });
  1407. }
  1408. }, {
  1409. key: "onDropStart",
  1410. value: function onDropStart(table, draggingTd) {
  1411. this.$draggingTd = $$4(draggingTd).css('cursor', 'move');
  1412. this.draggingIndex = $$4(this.$draggingTd.parent()).data('index');
  1413. // Call the user defined function
  1414. this.options.onReorderRowsDrag(this.data[this.draggingIndex]);
  1415. }
  1416. }, {
  1417. key: "onDragStop",
  1418. value: function onDragStop(table, draggedRow) {
  1419. var rowIndexDraggedRow = $$4(draggedRow).data('index');
  1420. var draggedRowItem = this.data[rowIndexDraggedRow];
  1421. this.options.onDragStop(table, draggedRowItem, draggedRow);
  1422. }
  1423. }, {
  1424. key: "onAllowDrop",
  1425. value: function onAllowDrop(hoveredRow, draggedRow) {
  1426. var rowIndexDraggedRow = $$4(draggedRow).data('index');
  1427. var rowIndexHoveredRow = $$4(hoveredRow).data('index');
  1428. var draggedRowItem = this.data[rowIndexDraggedRow];
  1429. var hoveredRowItem = this.data[rowIndexHoveredRow];
  1430. return this.options.onAllowDrop(hoveredRowItem, draggedRowItem, hoveredRow, draggedRow);
  1431. }
  1432. }, {
  1433. key: "onDrop",
  1434. value: function onDrop(table) {
  1435. this.$draggingTd.css('cursor', '');
  1436. var pageNum = this.options.pageNumber;
  1437. var pageSize = this.options.pageSize;
  1438. var newData = [];
  1439. for (var i = 0; i < table.tBodies[0].rows.length; i++) {
  1440. var $tr = $$4(table.tBodies[0].rows[i]);
  1441. newData.push(this.data[$tr.data('index')]);
  1442. $tr.data('index', i);
  1443. }
  1444. var draggingRow = this.data[this.draggingIndex];
  1445. var droppedIndex = newData.indexOf(this.data[this.draggingIndex]);
  1446. var droppedRow = this.data[droppedIndex];
  1447. var index = (pageNum - 1) * pageSize + this.options.data.indexOf(this.data[droppedIndex]);
  1448. this.options.data.splice(this.options.data.indexOf(draggingRow), 1);
  1449. this.options.data.splice(index, 0, draggingRow);
  1450. this.initSearch();
  1451. if (this.options.sidePagination === 'server') {
  1452. this.data = _toConsumableArray(this.options.data);
  1453. }
  1454. // Call the user defined function
  1455. this.options.onReorderRowsDrop(droppedRow);
  1456. // Call the event reorder-row
  1457. this.trigger('reorder-row', newData, draggingRow, droppedRow);
  1458. }
  1459. }, {
  1460. key: "initSearch",
  1461. value: function initSearch() {
  1462. this.ignoreInitSort = true;
  1463. _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
  1464. }
  1465. }, {
  1466. key: "initSort",
  1467. value: function initSort() {
  1468. if (this.ignoreInitSort) {
  1469. this.ignoreInitSort = false;
  1470. return;
  1471. }
  1472. _get(_getPrototypeOf(_class.prototype), "initSort", this).call(this);
  1473. }
  1474. }]);
  1475. }($$4.BootstrapTable);
  1476. }));