bootstrap-table-pipeline.js 62 KB

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