bootstrap-table-reorder-rows.js 62 KB

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