bootstrap-table-group-by.js 81 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421
  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 ($$7) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$7);
  8. function _typeof(obj) {
  9. "@babel/helpers - typeof";
  10. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  11. return typeof obj;
  12. } : function (obj) {
  13. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  14. }, _typeof(obj);
  15. }
  16. function _classCallCheck(instance, Constructor) {
  17. if (!(instance instanceof Constructor)) {
  18. throw new TypeError("Cannot call a class as a function");
  19. }
  20. }
  21. function _defineProperties(target, props) {
  22. for (var i = 0; i < props.length; i++) {
  23. var descriptor = props[i];
  24. descriptor.enumerable = descriptor.enumerable || false;
  25. descriptor.configurable = true;
  26. if ("value" in descriptor) descriptor.writable = true;
  27. Object.defineProperty(target, descriptor.key, descriptor);
  28. }
  29. }
  30. function _createClass(Constructor, protoProps, staticProps) {
  31. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  32. if (staticProps) _defineProperties(Constructor, staticProps);
  33. Object.defineProperty(Constructor, "prototype", {
  34. writable: false
  35. });
  36. return Constructor;
  37. }
  38. function _inherits(subClass, superClass) {
  39. if (typeof superClass !== "function" && superClass !== null) {
  40. throw new TypeError("Super expression must either be null or a function");
  41. }
  42. subClass.prototype = Object.create(superClass && superClass.prototype, {
  43. constructor: {
  44. value: subClass,
  45. writable: true,
  46. configurable: true
  47. }
  48. });
  49. Object.defineProperty(subClass, "prototype", {
  50. writable: false
  51. });
  52. if (superClass) _setPrototypeOf(subClass, superClass);
  53. }
  54. function _getPrototypeOf(o) {
  55. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  56. return o.__proto__ || Object.getPrototypeOf(o);
  57. };
  58. return _getPrototypeOf(o);
  59. }
  60. function _setPrototypeOf(o, p) {
  61. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  62. o.__proto__ = p;
  63. return o;
  64. };
  65. return _setPrototypeOf(o, p);
  66. }
  67. function _isNativeReflectConstruct() {
  68. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  69. if (Reflect.construct.sham) return false;
  70. if (typeof Proxy === "function") return true;
  71. try {
  72. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  73. return true;
  74. } catch (e) {
  75. return false;
  76. }
  77. }
  78. function _assertThisInitialized(self) {
  79. if (self === void 0) {
  80. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  81. }
  82. return self;
  83. }
  84. function _possibleConstructorReturn(self, call) {
  85. if (call && (typeof call === "object" || typeof call === "function")) {
  86. return call;
  87. } else if (call !== void 0) {
  88. throw new TypeError("Derived constructors may only return object or undefined");
  89. }
  90. return _assertThisInitialized(self);
  91. }
  92. function _createSuper(Derived) {
  93. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  94. return function _createSuperInternal() {
  95. var Super = _getPrototypeOf(Derived),
  96. result;
  97. if (hasNativeReflectConstruct) {
  98. var NewTarget = _getPrototypeOf(this).constructor;
  99. result = Reflect.construct(Super, arguments, NewTarget);
  100. } else {
  101. result = Super.apply(this, arguments);
  102. }
  103. return _possibleConstructorReturn(this, result);
  104. };
  105. }
  106. function _superPropBase(object, property) {
  107. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  108. object = _getPrototypeOf(object);
  109. if (object === null) break;
  110. }
  111. return object;
  112. }
  113. function _get() {
  114. if (typeof Reflect !== "undefined" && Reflect.get) {
  115. _get = Reflect.get.bind();
  116. } else {
  117. _get = function _get(target, property, receiver) {
  118. var base = _superPropBase(target, property);
  119. if (!base) return;
  120. var desc = Object.getOwnPropertyDescriptor(base, property);
  121. if (desc.get) {
  122. return desc.get.call(arguments.length < 3 ? target : receiver);
  123. }
  124. return desc.value;
  125. };
  126. }
  127. return _get.apply(this, arguments);
  128. }
  129. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  130. var check = function (it) {
  131. return it && it.Math == Math && it;
  132. };
  133. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  134. var global$b =
  135. // eslint-disable-next-line es-x/no-global-this -- safe
  136. check(typeof globalThis == 'object' && globalThis) ||
  137. check(typeof window == 'object' && window) ||
  138. // eslint-disable-next-line no-restricted-globals -- safe
  139. check(typeof self == 'object' && self) ||
  140. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  141. // eslint-disable-next-line no-new-func -- fallback
  142. (function () { return this; })() || Function('return this')();
  143. var shared$3 = {exports: {}};
  144. var global$a = global$b;
  145. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  146. var defineProperty$4 = Object.defineProperty;
  147. var defineGlobalProperty$3 = function (key, value) {
  148. try {
  149. defineProperty$4(global$a, key, { value: value, configurable: true, writable: true });
  150. } catch (error) {
  151. global$a[key] = value;
  152. } return value;
  153. };
  154. var global$9 = global$b;
  155. var defineGlobalProperty$2 = defineGlobalProperty$3;
  156. var SHARED = '__core-js_shared__';
  157. var store$3 = global$9[SHARED] || defineGlobalProperty$2(SHARED, {});
  158. var sharedStore = store$3;
  159. var store$2 = sharedStore;
  160. (shared$3.exports = function (key, value) {
  161. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  162. })('versions', []).push({
  163. version: '3.22.8',
  164. mode: 'global',
  165. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  166. license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
  167. source: 'https://github.com/zloirock/core-js'
  168. });
  169. var fails$e = function (exec) {
  170. try {
  171. return !!exec();
  172. } catch (error) {
  173. return true;
  174. }
  175. };
  176. var fails$d = fails$e;
  177. var functionBindNative = !fails$d(function () {
  178. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  179. var test = (function () { /* empty */ }).bind();
  180. // eslint-disable-next-line no-prototype-builtins -- safe
  181. return typeof test != 'function' || test.hasOwnProperty('prototype');
  182. });
  183. var NATIVE_BIND$2 = functionBindNative;
  184. var FunctionPrototype$2 = Function.prototype;
  185. var bind$2 = FunctionPrototype$2.bind;
  186. var call$5 = FunctionPrototype$2.call;
  187. var uncurryThis$h = NATIVE_BIND$2 && bind$2.bind(call$5, call$5);
  188. var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
  189. return fn && uncurryThis$h(fn);
  190. } : function (fn) {
  191. return fn && function () {
  192. return call$5.apply(fn, arguments);
  193. };
  194. };
  195. var $TypeError$7 = TypeError;
  196. // `RequireObjectCoercible` abstract operation
  197. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  198. var requireObjectCoercible$2 = function (it) {
  199. if (it == undefined) throw $TypeError$7("Can't call method on " + it);
  200. return it;
  201. };
  202. var requireObjectCoercible$1 = requireObjectCoercible$2;
  203. var $Object$3 = Object;
  204. // `ToObject` abstract operation
  205. // https://tc39.es/ecma262/#sec-toobject
  206. var toObject$5 = function (argument) {
  207. return $Object$3(requireObjectCoercible$1(argument));
  208. };
  209. var uncurryThis$g = functionUncurryThis;
  210. var toObject$4 = toObject$5;
  211. var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
  212. // `HasOwnProperty` abstract operation
  213. // https://tc39.es/ecma262/#sec-hasownproperty
  214. // eslint-disable-next-line es-x/no-object-hasown -- safe
  215. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  216. return hasOwnProperty(toObject$4(it), key);
  217. };
  218. var uncurryThis$f = functionUncurryThis;
  219. var id = 0;
  220. var postfix = Math.random();
  221. var toString$4 = uncurryThis$f(1.0.toString);
  222. var uid$2 = function (key) {
  223. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
  224. };
  225. // `IsCallable` abstract operation
  226. // https://tc39.es/ecma262/#sec-iscallable
  227. var isCallable$c = function (argument) {
  228. return typeof argument == 'function';
  229. };
  230. var global$8 = global$b;
  231. var isCallable$b = isCallable$c;
  232. var aFunction = function (argument) {
  233. return isCallable$b(argument) ? argument : undefined;
  234. };
  235. var getBuiltIn$5 = function (namespace, method) {
  236. return arguments.length < 2 ? aFunction(global$8[namespace]) : global$8[namespace] && global$8[namespace][method];
  237. };
  238. var getBuiltIn$4 = getBuiltIn$5;
  239. var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
  240. var global$7 = global$b;
  241. var userAgent$2 = engineUserAgent;
  242. var process = global$7.process;
  243. var Deno = global$7.Deno;
  244. var versions = process && process.versions || Deno && Deno.version;
  245. var v8 = versions && versions.v8;
  246. var match, version;
  247. if (v8) {
  248. match = v8.split('.');
  249. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  250. // but their correct versions are not interesting for us
  251. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  252. }
  253. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  254. // so check `userAgent` even if `.v8` exists, but 0
  255. if (!version && userAgent$2) {
  256. match = userAgent$2.match(/Edge\/(\d+)/);
  257. if (!match || match[1] >= 74) {
  258. match = userAgent$2.match(/Chrome\/(\d+)/);
  259. if (match) version = +match[1];
  260. }
  261. }
  262. var engineV8Version = version;
  263. /* eslint-disable es-x/no-symbol -- required for testing */
  264. var V8_VERSION$2 = engineV8Version;
  265. var fails$c = fails$e;
  266. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  267. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$c(function () {
  268. var symbol = Symbol();
  269. // Chrome 38 Symbol has incorrect toString conversion
  270. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  271. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  272. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  273. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  274. });
  275. /* eslint-disable es-x/no-symbol -- required for testing */
  276. var NATIVE_SYMBOL$1 = nativeSymbol;
  277. var useSymbolAsUid = NATIVE_SYMBOL$1
  278. && !Symbol.sham
  279. && typeof Symbol.iterator == 'symbol';
  280. var global$6 = global$b;
  281. var shared$2 = shared$3.exports;
  282. var hasOwn$6 = hasOwnProperty_1;
  283. var uid$1 = uid$2;
  284. var NATIVE_SYMBOL = nativeSymbol;
  285. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  286. var WellKnownSymbolsStore = shared$2('wks');
  287. var Symbol$1 = global$6.Symbol;
  288. var symbolFor = Symbol$1 && Symbol$1['for'];
  289. var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  290. var wellKnownSymbol$8 = function (name) {
  291. if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  292. var description = 'Symbol.' + name;
  293. if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
  294. WellKnownSymbolsStore[name] = Symbol$1[name];
  295. } else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
  296. WellKnownSymbolsStore[name] = symbolFor(description);
  297. } else {
  298. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  299. }
  300. } return WellKnownSymbolsStore[name];
  301. };
  302. var wellKnownSymbol$7 = wellKnownSymbol$8;
  303. var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
  304. var test$1 = {};
  305. test$1[TO_STRING_TAG$1] = 'z';
  306. var toStringTagSupport = String(test$1) === '[object z]';
  307. var fails$b = fails$e;
  308. // Detect IE8's incomplete defineProperty implementation
  309. var descriptors = !fails$b(function () {
  310. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  311. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  312. });
  313. var objectDefineProperty = {};
  314. var isCallable$a = isCallable$c;
  315. var isObject$8 = function (it) {
  316. return typeof it == 'object' ? it !== null : isCallable$a(it);
  317. };
  318. var global$5 = global$b;
  319. var isObject$7 = isObject$8;
  320. var document$1 = global$5.document;
  321. // typeof document.createElement is 'object' in old IE
  322. var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement);
  323. var documentCreateElement$2 = function (it) {
  324. return EXISTS$1 ? document$1.createElement(it) : {};
  325. };
  326. var DESCRIPTORS$9 = descriptors;
  327. var fails$a = fails$e;
  328. var createElement = documentCreateElement$2;
  329. // Thanks to IE8 for its funny defineProperty
  330. var ie8DomDefine = !DESCRIPTORS$9 && !fails$a(function () {
  331. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  332. return Object.defineProperty(createElement('div'), 'a', {
  333. get: function () { return 7; }
  334. }).a != 7;
  335. });
  336. var DESCRIPTORS$8 = descriptors;
  337. var fails$9 = fails$e;
  338. // V8 ~ Chrome 36-
  339. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  340. var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$9(function () {
  341. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  342. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  343. value: 42,
  344. writable: false
  345. }).prototype != 42;
  346. });
  347. var isObject$6 = isObject$8;
  348. var $String$2 = String;
  349. var $TypeError$6 = TypeError;
  350. // `Assert: Type(argument) is Object`
  351. var anObject$4 = function (argument) {
  352. if (isObject$6(argument)) return argument;
  353. throw $TypeError$6($String$2(argument) + ' is not an object');
  354. };
  355. var NATIVE_BIND$1 = functionBindNative;
  356. var call$4 = Function.prototype.call;
  357. var functionCall = NATIVE_BIND$1 ? call$4.bind(call$4) : function () {
  358. return call$4.apply(call$4, arguments);
  359. };
  360. var uncurryThis$e = functionUncurryThis;
  361. var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
  362. var getBuiltIn$3 = getBuiltIn$5;
  363. var isCallable$9 = isCallable$c;
  364. var isPrototypeOf = objectIsPrototypeOf;
  365. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  366. var $Object$2 = Object;
  367. var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
  368. return typeof it == 'symbol';
  369. } : function (it) {
  370. var $Symbol = getBuiltIn$3('Symbol');
  371. return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
  372. };
  373. var $String$1 = String;
  374. var tryToString$2 = function (argument) {
  375. try {
  376. return $String$1(argument);
  377. } catch (error) {
  378. return 'Object';
  379. }
  380. };
  381. var isCallable$8 = isCallable$c;
  382. var tryToString$1 = tryToString$2;
  383. var $TypeError$5 = TypeError;
  384. // `Assert: IsCallable(argument) is true`
  385. var aCallable$3 = function (argument) {
  386. if (isCallable$8(argument)) return argument;
  387. throw $TypeError$5(tryToString$1(argument) + ' is not a function');
  388. };
  389. var aCallable$2 = aCallable$3;
  390. // `GetMethod` abstract operation
  391. // https://tc39.es/ecma262/#sec-getmethod
  392. var getMethod$1 = function (V, P) {
  393. var func = V[P];
  394. return func == null ? undefined : aCallable$2(func);
  395. };
  396. var call$3 = functionCall;
  397. var isCallable$7 = isCallable$c;
  398. var isObject$5 = isObject$8;
  399. var $TypeError$4 = TypeError;
  400. // `OrdinaryToPrimitive` abstract operation
  401. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  402. var ordinaryToPrimitive$1 = function (input, pref) {
  403. var fn, val;
  404. if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$5(val = call$3(fn, input))) return val;
  405. if (isCallable$7(fn = input.valueOf) && !isObject$5(val = call$3(fn, input))) return val;
  406. if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$5(val = call$3(fn, input))) return val;
  407. throw $TypeError$4("Can't convert object to primitive value");
  408. };
  409. var call$2 = functionCall;
  410. var isObject$4 = isObject$8;
  411. var isSymbol$1 = isSymbol$2;
  412. var getMethod = getMethod$1;
  413. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  414. var wellKnownSymbol$6 = wellKnownSymbol$8;
  415. var $TypeError$3 = TypeError;
  416. var TO_PRIMITIVE = wellKnownSymbol$6('toPrimitive');
  417. // `ToPrimitive` abstract operation
  418. // https://tc39.es/ecma262/#sec-toprimitive
  419. var toPrimitive$1 = function (input, pref) {
  420. if (!isObject$4(input) || isSymbol$1(input)) return input;
  421. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  422. var result;
  423. if (exoticToPrim) {
  424. if (pref === undefined) pref = 'default';
  425. result = call$2(exoticToPrim, input, pref);
  426. if (!isObject$4(result) || isSymbol$1(result)) return result;
  427. throw $TypeError$3("Can't convert object to primitive value");
  428. }
  429. if (pref === undefined) pref = 'number';
  430. return ordinaryToPrimitive(input, pref);
  431. };
  432. var toPrimitive = toPrimitive$1;
  433. var isSymbol = isSymbol$2;
  434. // `ToPropertyKey` abstract operation
  435. // https://tc39.es/ecma262/#sec-topropertykey
  436. var toPropertyKey$3 = function (argument) {
  437. var key = toPrimitive(argument, 'string');
  438. return isSymbol(key) ? key : key + '';
  439. };
  440. var DESCRIPTORS$7 = descriptors;
  441. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  442. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  443. var anObject$3 = anObject$4;
  444. var toPropertyKey$2 = toPropertyKey$3;
  445. var $TypeError$2 = TypeError;
  446. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  447. var $defineProperty = Object.defineProperty;
  448. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  449. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  450. var ENUMERABLE = 'enumerable';
  451. var CONFIGURABLE$1 = 'configurable';
  452. var WRITABLE = 'writable';
  453. // `Object.defineProperty` method
  454. // https://tc39.es/ecma262/#sec-object.defineproperty
  455. objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  456. anObject$3(O);
  457. P = toPropertyKey$2(P);
  458. anObject$3(Attributes);
  459. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  460. var current = $getOwnPropertyDescriptor$1(O, P);
  461. if (current && current[WRITABLE]) {
  462. O[P] = Attributes.value;
  463. Attributes = {
  464. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  465. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  466. writable: false
  467. };
  468. }
  469. } return $defineProperty(O, P, Attributes);
  470. } : $defineProperty : function defineProperty(O, P, Attributes) {
  471. anObject$3(O);
  472. P = toPropertyKey$2(P);
  473. anObject$3(Attributes);
  474. if (IE8_DOM_DEFINE$1) try {
  475. return $defineProperty(O, P, Attributes);
  476. } catch (error) { /* empty */ }
  477. if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
  478. if ('value' in Attributes) O[P] = Attributes.value;
  479. return O;
  480. };
  481. var createPropertyDescriptor$3 = function (bitmap, value) {
  482. return {
  483. enumerable: !(bitmap & 1),
  484. configurable: !(bitmap & 2),
  485. writable: !(bitmap & 4),
  486. value: value
  487. };
  488. };
  489. var DESCRIPTORS$6 = descriptors;
  490. var definePropertyModule$3 = objectDefineProperty;
  491. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  492. var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value) {
  493. return definePropertyModule$3.f(object, key, createPropertyDescriptor$2(1, value));
  494. } : function (object, key, value) {
  495. object[key] = value;
  496. return object;
  497. };
  498. var makeBuiltIn$2 = {exports: {}};
  499. var DESCRIPTORS$5 = descriptors;
  500. var hasOwn$5 = hasOwnProperty_1;
  501. var FunctionPrototype$1 = Function.prototype;
  502. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  503. var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
  504. var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
  505. // additional protection from minified / mangled / dropped function names
  506. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  507. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  508. var functionName = {
  509. EXISTS: EXISTS,
  510. PROPER: PROPER,
  511. CONFIGURABLE: CONFIGURABLE
  512. };
  513. var uncurryThis$d = functionUncurryThis;
  514. var isCallable$6 = isCallable$c;
  515. var store$1 = sharedStore;
  516. var functionToString$1 = uncurryThis$d(Function.toString);
  517. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  518. if (!isCallable$6(store$1.inspectSource)) {
  519. store$1.inspectSource = function (it) {
  520. return functionToString$1(it);
  521. };
  522. }
  523. var inspectSource$3 = store$1.inspectSource;
  524. var global$4 = global$b;
  525. var isCallable$5 = isCallable$c;
  526. var inspectSource$2 = inspectSource$3;
  527. var WeakMap$1 = global$4.WeakMap;
  528. var nativeWeakMap = isCallable$5(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
  529. var shared$1 = shared$3.exports;
  530. var uid = uid$2;
  531. var keys = shared$1('keys');
  532. var sharedKey$2 = function (key) {
  533. return keys[key] || (keys[key] = uid(key));
  534. };
  535. var hiddenKeys$4 = {};
  536. var NATIVE_WEAK_MAP = nativeWeakMap;
  537. var global$3 = global$b;
  538. var uncurryThis$c = functionUncurryThis;
  539. var isObject$3 = isObject$8;
  540. var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
  541. var hasOwn$4 = hasOwnProperty_1;
  542. var shared = sharedStore;
  543. var sharedKey$1 = sharedKey$2;
  544. var hiddenKeys$3 = hiddenKeys$4;
  545. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  546. var TypeError$1 = global$3.TypeError;
  547. var WeakMap = global$3.WeakMap;
  548. var set, get, has;
  549. var enforce = function (it) {
  550. return has(it) ? get(it) : set(it, {});
  551. };
  552. var getterFor = function (TYPE) {
  553. return function (it) {
  554. var state;
  555. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  556. throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  557. } return state;
  558. };
  559. };
  560. if (NATIVE_WEAK_MAP || shared.state) {
  561. var store = shared.state || (shared.state = new WeakMap());
  562. var wmget = uncurryThis$c(store.get);
  563. var wmhas = uncurryThis$c(store.has);
  564. var wmset = uncurryThis$c(store.set);
  565. set = function (it, metadata) {
  566. if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  567. metadata.facade = it;
  568. wmset(store, it, metadata);
  569. return metadata;
  570. };
  571. get = function (it) {
  572. return wmget(store, it) || {};
  573. };
  574. has = function (it) {
  575. return wmhas(store, it);
  576. };
  577. } else {
  578. var STATE = sharedKey$1('state');
  579. hiddenKeys$3[STATE] = true;
  580. set = function (it, metadata) {
  581. if (hasOwn$4(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  582. metadata.facade = it;
  583. createNonEnumerableProperty$3(it, STATE, metadata);
  584. return metadata;
  585. };
  586. get = function (it) {
  587. return hasOwn$4(it, STATE) ? it[STATE] : {};
  588. };
  589. has = function (it) {
  590. return hasOwn$4(it, STATE);
  591. };
  592. }
  593. var internalState = {
  594. set: set,
  595. get: get,
  596. has: has,
  597. enforce: enforce,
  598. getterFor: getterFor
  599. };
  600. var fails$8 = fails$e;
  601. var isCallable$4 = isCallable$c;
  602. var hasOwn$3 = hasOwnProperty_1;
  603. var DESCRIPTORS$4 = descriptors;
  604. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  605. var inspectSource$1 = inspectSource$3;
  606. var InternalStateModule = internalState;
  607. var enforceInternalState = InternalStateModule.enforce;
  608. var getInternalState = InternalStateModule.get;
  609. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  610. var defineProperty$3 = Object.defineProperty;
  611. var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$8(function () {
  612. return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  613. });
  614. var TEMPLATE = String(String).split('String');
  615. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  616. if (String(name).slice(0, 7) === 'Symbol(') {
  617. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  618. }
  619. if (options && options.getter) name = 'get ' + name;
  620. if (options && options.setter) name = 'set ' + name;
  621. if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  622. defineProperty$3(value, 'name', { value: name, configurable: true });
  623. }
  624. if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
  625. defineProperty$3(value, 'length', { value: options.arity });
  626. }
  627. try {
  628. if (options && hasOwn$3(options, 'constructor') && options.constructor) {
  629. if (DESCRIPTORS$4) defineProperty$3(value, 'prototype', { writable: false });
  630. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  631. } else if (value.prototype) value.prototype = undefined;
  632. } catch (error) { /* empty */ }
  633. var state = enforceInternalState(value);
  634. if (!hasOwn$3(state, 'source')) {
  635. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  636. } return value;
  637. };
  638. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  639. // eslint-disable-next-line no-extend-native -- required
  640. Function.prototype.toString = makeBuiltIn$1(function toString() {
  641. return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
  642. }, 'toString');
  643. var isCallable$3 = isCallable$c;
  644. var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
  645. var makeBuiltIn = makeBuiltIn$2.exports;
  646. var defineGlobalProperty$1 = defineGlobalProperty$3;
  647. var defineBuiltIn$2 = function (O, key, value, options) {
  648. if (!options) options = {};
  649. var simple = options.enumerable;
  650. var name = options.name !== undefined ? options.name : key;
  651. if (isCallable$3(value)) makeBuiltIn(value, name, options);
  652. if (options.global) {
  653. if (simple) O[key] = value;
  654. else defineGlobalProperty$1(key, value);
  655. } else {
  656. if (!options.unsafe) delete O[key];
  657. else if (O[key]) simple = true;
  658. if (simple) O[key] = value;
  659. else createNonEnumerableProperty$2(O, key, value);
  660. } return O;
  661. };
  662. var uncurryThis$b = functionUncurryThis;
  663. var toString$3 = uncurryThis$b({}.toString);
  664. var stringSlice = uncurryThis$b(''.slice);
  665. var classofRaw$1 = function (it) {
  666. return stringSlice(toString$3(it), 8, -1);
  667. };
  668. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  669. var isCallable$2 = isCallable$c;
  670. var classofRaw = classofRaw$1;
  671. var wellKnownSymbol$5 = wellKnownSymbol$8;
  672. var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
  673. var $Object$1 = Object;
  674. // ES3 wrong here
  675. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  676. // fallback for IE11 Script Access Denied error
  677. var tryGet = function (it, key) {
  678. try {
  679. return it[key];
  680. } catch (error) { /* empty */ }
  681. };
  682. // getting tag from ES6+ `Object.prototype.toString`
  683. var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  684. var O, tag, result;
  685. return it === undefined ? 'Undefined' : it === null ? 'Null'
  686. // @@toStringTag case
  687. : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  688. // builtinTag case
  689. : CORRECT_ARGUMENTS ? classofRaw(O)
  690. // ES3 arguments fallback
  691. : (result = classofRaw(O)) == 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
  692. };
  693. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  694. var classof$4 = classof$5;
  695. // `Object.prototype.toString` method implementation
  696. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  697. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  698. return '[object ' + classof$4(this) + ']';
  699. };
  700. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  701. var defineBuiltIn$1 = defineBuiltIn$2;
  702. var toString$2 = objectToString;
  703. // `Object.prototype.toString` method
  704. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  705. if (!TO_STRING_TAG_SUPPORT) {
  706. defineBuiltIn$1(Object.prototype, 'toString', toString$2, { unsafe: true });
  707. }
  708. // iterable DOM collections
  709. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  710. var domIterables = {
  711. CSSRuleList: 0,
  712. CSSStyleDeclaration: 0,
  713. CSSValueList: 0,
  714. ClientRectList: 0,
  715. DOMRectList: 0,
  716. DOMStringList: 0,
  717. DOMTokenList: 1,
  718. DataTransferItemList: 0,
  719. FileList: 0,
  720. HTMLAllCollection: 0,
  721. HTMLCollection: 0,
  722. HTMLFormElement: 0,
  723. HTMLSelectElement: 0,
  724. MediaList: 0,
  725. MimeTypeArray: 0,
  726. NamedNodeMap: 0,
  727. NodeList: 1,
  728. PaintRequestList: 0,
  729. Plugin: 0,
  730. PluginArray: 0,
  731. SVGLengthList: 0,
  732. SVGNumberList: 0,
  733. SVGPathSegList: 0,
  734. SVGPointList: 0,
  735. SVGStringList: 0,
  736. SVGTransformList: 0,
  737. SourceBufferList: 0,
  738. StyleSheetList: 0,
  739. TextTrackCueList: 0,
  740. TextTrackList: 0,
  741. TouchList: 0
  742. };
  743. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  744. var documentCreateElement$1 = documentCreateElement$2;
  745. var classList = documentCreateElement$1('span').classList;
  746. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  747. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  748. var uncurryThis$a = functionUncurryThis;
  749. var aCallable$1 = aCallable$3;
  750. var NATIVE_BIND = functionBindNative;
  751. var bind$1 = uncurryThis$a(uncurryThis$a.bind);
  752. // optional / simple context binding
  753. var functionBindContext = function (fn, that) {
  754. aCallable$1(fn);
  755. return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
  756. return fn.apply(that, arguments);
  757. };
  758. };
  759. var uncurryThis$9 = functionUncurryThis;
  760. var fails$7 = fails$e;
  761. var classof$3 = classofRaw$1;
  762. var $Object = Object;
  763. var split = uncurryThis$9(''.split);
  764. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  765. var indexedObject = fails$7(function () {
  766. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  767. // eslint-disable-next-line no-prototype-builtins -- safe
  768. return !$Object('z').propertyIsEnumerable(0);
  769. }) ? function (it) {
  770. return classof$3(it) == 'String' ? split(it, '') : $Object(it);
  771. } : $Object;
  772. var ceil = Math.ceil;
  773. var floor$1 = Math.floor;
  774. // `Math.trunc` method
  775. // https://tc39.es/ecma262/#sec-math.trunc
  776. // eslint-disable-next-line es-x/no-math-trunc -- safe
  777. var mathTrunc = Math.trunc || function trunc(x) {
  778. var n = +x;
  779. return (n > 0 ? floor$1 : ceil)(n);
  780. };
  781. var trunc = mathTrunc;
  782. // `ToIntegerOrInfinity` abstract operation
  783. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  784. var toIntegerOrInfinity$2 = function (argument) {
  785. var number = +argument;
  786. // eslint-disable-next-line no-self-compare -- NaN check
  787. return number !== number || number === 0 ? 0 : trunc(number);
  788. };
  789. var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
  790. var min$1 = Math.min;
  791. // `ToLength` abstract operation
  792. // https://tc39.es/ecma262/#sec-tolength
  793. var toLength$1 = function (argument) {
  794. return argument > 0 ? min$1(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  795. };
  796. var toLength = toLength$1;
  797. // `LengthOfArrayLike` abstract operation
  798. // https://tc39.es/ecma262/#sec-lengthofarraylike
  799. var lengthOfArrayLike$6 = function (obj) {
  800. return toLength(obj.length);
  801. };
  802. var classof$2 = classofRaw$1;
  803. // `IsArray` abstract operation
  804. // https://tc39.es/ecma262/#sec-isarray
  805. // eslint-disable-next-line es-x/no-array-isarray -- safe
  806. var isArray$3 = Array.isArray || function isArray(argument) {
  807. return classof$2(argument) == 'Array';
  808. };
  809. var uncurryThis$8 = functionUncurryThis;
  810. var fails$6 = fails$e;
  811. var isCallable$1 = isCallable$c;
  812. var classof$1 = classof$5;
  813. var getBuiltIn$2 = getBuiltIn$5;
  814. var inspectSource = inspectSource$3;
  815. var noop = function () { /* empty */ };
  816. var empty = [];
  817. var construct = getBuiltIn$2('Reflect', 'construct');
  818. var constructorRegExp = /^\s*(?:class|function)\b/;
  819. var exec = uncurryThis$8(constructorRegExp.exec);
  820. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  821. var isConstructorModern = function isConstructor(argument) {
  822. if (!isCallable$1(argument)) return false;
  823. try {
  824. construct(noop, empty, argument);
  825. return true;
  826. } catch (error) {
  827. return false;
  828. }
  829. };
  830. var isConstructorLegacy = function isConstructor(argument) {
  831. if (!isCallable$1(argument)) return false;
  832. switch (classof$1(argument)) {
  833. case 'AsyncFunction':
  834. case 'GeneratorFunction':
  835. case 'AsyncGeneratorFunction': return false;
  836. }
  837. try {
  838. // we can't check .prototype since constructors produced by .bind haven't it
  839. // `Function#toString` throws on some built-it function in some legacy engines
  840. // (for example, `DOMQuad` and similar in FF41-)
  841. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  842. } catch (error) {
  843. return true;
  844. }
  845. };
  846. isConstructorLegacy.sham = true;
  847. // `IsConstructor` abstract operation
  848. // https://tc39.es/ecma262/#sec-isconstructor
  849. var isConstructor$2 = !construct || fails$6(function () {
  850. var called;
  851. return isConstructorModern(isConstructorModern.call)
  852. || !isConstructorModern(Object)
  853. || !isConstructorModern(function () { called = true; })
  854. || called;
  855. }) ? isConstructorLegacy : isConstructorModern;
  856. var isArray$2 = isArray$3;
  857. var isConstructor$1 = isConstructor$2;
  858. var isObject$2 = isObject$8;
  859. var wellKnownSymbol$4 = wellKnownSymbol$8;
  860. var SPECIES$2 = wellKnownSymbol$4('species');
  861. var $Array$2 = Array;
  862. // a part of `ArraySpeciesCreate` abstract operation
  863. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  864. var arraySpeciesConstructor$1 = function (originalArray) {
  865. var C;
  866. if (isArray$2(originalArray)) {
  867. C = originalArray.constructor;
  868. // cross-realm fallback
  869. if (isConstructor$1(C) && (C === $Array$2 || isArray$2(C.prototype))) C = undefined;
  870. else if (isObject$2(C)) {
  871. C = C[SPECIES$2];
  872. if (C === null) C = undefined;
  873. }
  874. } return C === undefined ? $Array$2 : C;
  875. };
  876. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  877. // `ArraySpeciesCreate` abstract operation
  878. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  879. var arraySpeciesCreate$2 = function (originalArray, length) {
  880. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  881. };
  882. var bind = functionBindContext;
  883. var uncurryThis$7 = functionUncurryThis;
  884. var IndexedObject$3 = indexedObject;
  885. var toObject$3 = toObject$5;
  886. var lengthOfArrayLike$5 = lengthOfArrayLike$6;
  887. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  888. var push$2 = uncurryThis$7([].push);
  889. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  890. var createMethod$1 = function (TYPE) {
  891. var IS_MAP = TYPE == 1;
  892. var IS_FILTER = TYPE == 2;
  893. var IS_SOME = TYPE == 3;
  894. var IS_EVERY = TYPE == 4;
  895. var IS_FIND_INDEX = TYPE == 6;
  896. var IS_FILTER_REJECT = TYPE == 7;
  897. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  898. return function ($this, callbackfn, that, specificCreate) {
  899. var O = toObject$3($this);
  900. var self = IndexedObject$3(O);
  901. var boundFunction = bind(callbackfn, that);
  902. var length = lengthOfArrayLike$5(self);
  903. var index = 0;
  904. var create = specificCreate || arraySpeciesCreate$1;
  905. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  906. var value, result;
  907. for (;length > index; index++) if (NO_HOLES || index in self) {
  908. value = self[index];
  909. result = boundFunction(value, index, O);
  910. if (TYPE) {
  911. if (IS_MAP) target[index] = result; // map
  912. else if (result) switch (TYPE) {
  913. case 3: return true; // some
  914. case 5: return value; // find
  915. case 6: return index; // findIndex
  916. case 2: push$2(target, value); // filter
  917. } else switch (TYPE) {
  918. case 4: return false; // every
  919. case 7: push$2(target, value); // filterReject
  920. }
  921. }
  922. }
  923. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  924. };
  925. };
  926. var arrayIteration = {
  927. // `Array.prototype.forEach` method
  928. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  929. forEach: createMethod$1(0),
  930. // `Array.prototype.map` method
  931. // https://tc39.es/ecma262/#sec-array.prototype.map
  932. map: createMethod$1(1),
  933. // `Array.prototype.filter` method
  934. // https://tc39.es/ecma262/#sec-array.prototype.filter
  935. filter: createMethod$1(2),
  936. // `Array.prototype.some` method
  937. // https://tc39.es/ecma262/#sec-array.prototype.some
  938. some: createMethod$1(3),
  939. // `Array.prototype.every` method
  940. // https://tc39.es/ecma262/#sec-array.prototype.every
  941. every: createMethod$1(4),
  942. // `Array.prototype.find` method
  943. // https://tc39.es/ecma262/#sec-array.prototype.find
  944. find: createMethod$1(5),
  945. // `Array.prototype.findIndex` method
  946. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  947. findIndex: createMethod$1(6),
  948. // `Array.prototype.filterReject` method
  949. // https://github.com/tc39/proposal-array-filtering
  950. filterReject: createMethod$1(7)
  951. };
  952. var fails$5 = fails$e;
  953. var arrayMethodIsStrict$3 = function (METHOD_NAME, argument) {
  954. var method = [][METHOD_NAME];
  955. return !!method && fails$5(function () {
  956. // eslint-disable-next-line no-useless-call -- required for testing
  957. method.call(null, argument || function () { return 1; }, 1);
  958. });
  959. };
  960. var $forEach = arrayIteration.forEach;
  961. var arrayMethodIsStrict$2 = arrayMethodIsStrict$3;
  962. var STRICT_METHOD$2 = arrayMethodIsStrict$2('forEach');
  963. // `Array.prototype.forEach` method implementation
  964. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  965. var arrayForEach = !STRICT_METHOD$2 ? function forEach(callbackfn /* , thisArg */) {
  966. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  967. // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
  968. } : [].forEach;
  969. var global$2 = global$b;
  970. var DOMIterables = domIterables;
  971. var DOMTokenListPrototype = domTokenListPrototype;
  972. var forEach = arrayForEach;
  973. var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
  974. var handlePrototype = function (CollectionPrototype) {
  975. // some Chrome versions have non-configurable methods on DOMTokenList
  976. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  977. createNonEnumerableProperty$1(CollectionPrototype, 'forEach', forEach);
  978. } catch (error) {
  979. CollectionPrototype.forEach = forEach;
  980. }
  981. };
  982. for (var COLLECTION_NAME in DOMIterables) {
  983. if (DOMIterables[COLLECTION_NAME]) {
  984. handlePrototype(global$2[COLLECTION_NAME] && global$2[COLLECTION_NAME].prototype);
  985. }
  986. }
  987. handlePrototype(DOMTokenListPrototype);
  988. var objectGetOwnPropertyDescriptor = {};
  989. var objectPropertyIsEnumerable = {};
  990. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  991. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  992. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  993. // Nashorn ~ JDK8 bug
  994. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  995. // `Object.prototype.propertyIsEnumerable` method implementation
  996. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  997. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  998. var descriptor = getOwnPropertyDescriptor$1(this, V);
  999. return !!descriptor && descriptor.enumerable;
  1000. } : $propertyIsEnumerable;
  1001. // toObject with fallback for non-array-like ES3 strings
  1002. var IndexedObject$2 = indexedObject;
  1003. var requireObjectCoercible = requireObjectCoercible$2;
  1004. var toIndexedObject$6 = function (it) {
  1005. return IndexedObject$2(requireObjectCoercible(it));
  1006. };
  1007. var DESCRIPTORS$3 = descriptors;
  1008. var call$1 = functionCall;
  1009. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  1010. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  1011. var toIndexedObject$5 = toIndexedObject$6;
  1012. var toPropertyKey$1 = toPropertyKey$3;
  1013. var hasOwn$2 = hasOwnProperty_1;
  1014. var IE8_DOM_DEFINE = ie8DomDefine;
  1015. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  1016. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1017. // `Object.getOwnPropertyDescriptor` method
  1018. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  1019. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  1020. O = toIndexedObject$5(O);
  1021. P = toPropertyKey$1(P);
  1022. if (IE8_DOM_DEFINE) try {
  1023. return $getOwnPropertyDescriptor(O, P);
  1024. } catch (error) { /* empty */ }
  1025. if (hasOwn$2(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
  1026. };
  1027. var objectGetOwnPropertyNames = {};
  1028. var toIntegerOrInfinity = toIntegerOrInfinity$2;
  1029. var max$2 = Math.max;
  1030. var min = Math.min;
  1031. // Helper for a popular repeating case of the spec:
  1032. // Let integer be ? ToInteger(index).
  1033. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  1034. var toAbsoluteIndex$3 = function (index, length) {
  1035. var integer = toIntegerOrInfinity(index);
  1036. return integer < 0 ? max$2(integer + length, 0) : min(integer, length);
  1037. };
  1038. var toIndexedObject$4 = toIndexedObject$6;
  1039. var toAbsoluteIndex$2 = toAbsoluteIndex$3;
  1040. var lengthOfArrayLike$4 = lengthOfArrayLike$6;
  1041. // `Array.prototype.{ indexOf, includes }` methods implementation
  1042. var createMethod = function (IS_INCLUDES) {
  1043. return function ($this, el, fromIndex) {
  1044. var O = toIndexedObject$4($this);
  1045. var length = lengthOfArrayLike$4(O);
  1046. var index = toAbsoluteIndex$2(fromIndex, length);
  1047. var value;
  1048. // Array#includes uses SameValueZero equality algorithm
  1049. // eslint-disable-next-line no-self-compare -- NaN check
  1050. if (IS_INCLUDES && el != el) while (length > index) {
  1051. value = O[index++];
  1052. // eslint-disable-next-line no-self-compare -- NaN check
  1053. if (value != value) return true;
  1054. // Array#indexOf ignores holes, Array#includes - not
  1055. } else for (;length > index; index++) {
  1056. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  1057. } return !IS_INCLUDES && -1;
  1058. };
  1059. };
  1060. var arrayIncludes = {
  1061. // `Array.prototype.includes` method
  1062. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1063. includes: createMethod(true),
  1064. // `Array.prototype.indexOf` method
  1065. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1066. indexOf: createMethod(false)
  1067. };
  1068. var uncurryThis$6 = functionUncurryThis;
  1069. var hasOwn$1 = hasOwnProperty_1;
  1070. var toIndexedObject$3 = toIndexedObject$6;
  1071. var indexOf = arrayIncludes.indexOf;
  1072. var hiddenKeys$2 = hiddenKeys$4;
  1073. var push$1 = uncurryThis$6([].push);
  1074. var objectKeysInternal = function (object, names) {
  1075. var O = toIndexedObject$3(object);
  1076. var i = 0;
  1077. var result = [];
  1078. var key;
  1079. for (key in O) !hasOwn$1(hiddenKeys$2, key) && hasOwn$1(O, key) && push$1(result, key);
  1080. // Don't enum bug & hidden keys
  1081. while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
  1082. ~indexOf(result, key) || push$1(result, key);
  1083. }
  1084. return result;
  1085. };
  1086. // IE8- don't enum bug keys
  1087. var enumBugKeys$3 = [
  1088. 'constructor',
  1089. 'hasOwnProperty',
  1090. 'isPrototypeOf',
  1091. 'propertyIsEnumerable',
  1092. 'toLocaleString',
  1093. 'toString',
  1094. 'valueOf'
  1095. ];
  1096. var internalObjectKeys$1 = objectKeysInternal;
  1097. var enumBugKeys$2 = enumBugKeys$3;
  1098. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  1099. // `Object.getOwnPropertyNames` method
  1100. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  1101. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  1102. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  1103. return internalObjectKeys$1(O, hiddenKeys$1);
  1104. };
  1105. var objectGetOwnPropertySymbols = {};
  1106. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  1107. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  1108. var getBuiltIn$1 = getBuiltIn$5;
  1109. var uncurryThis$5 = functionUncurryThis;
  1110. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  1111. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  1112. var anObject$2 = anObject$4;
  1113. var concat$1 = uncurryThis$5([].concat);
  1114. // all object keys, includes non-enumerable and symbols
  1115. var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
  1116. var keys = getOwnPropertyNamesModule.f(anObject$2(it));
  1117. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  1118. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  1119. };
  1120. var hasOwn = hasOwnProperty_1;
  1121. var ownKeys = ownKeys$1;
  1122. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  1123. var definePropertyModule$2 = objectDefineProperty;
  1124. var copyConstructorProperties$1 = function (target, source, exceptions) {
  1125. var keys = ownKeys(source);
  1126. var defineProperty = definePropertyModule$2.f;
  1127. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  1128. for (var i = 0; i < keys.length; i++) {
  1129. var key = keys[i];
  1130. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  1131. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  1132. }
  1133. }
  1134. };
  1135. var fails$4 = fails$e;
  1136. var isCallable = isCallable$c;
  1137. var replacement = /#|\.prototype\./;
  1138. var isForced$1 = function (feature, detection) {
  1139. var value = data[normalize(feature)];
  1140. return value == POLYFILL ? true
  1141. : value == NATIVE ? false
  1142. : isCallable(detection) ? fails$4(detection)
  1143. : !!detection;
  1144. };
  1145. var normalize = isForced$1.normalize = function (string) {
  1146. return String(string).replace(replacement, '.').toLowerCase();
  1147. };
  1148. var data = isForced$1.data = {};
  1149. var NATIVE = isForced$1.NATIVE = 'N';
  1150. var POLYFILL = isForced$1.POLYFILL = 'P';
  1151. var isForced_1 = isForced$1;
  1152. var global$1 = global$b;
  1153. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  1154. var createNonEnumerableProperty = createNonEnumerableProperty$4;
  1155. var defineBuiltIn = defineBuiltIn$2;
  1156. var defineGlobalProperty = defineGlobalProperty$3;
  1157. var copyConstructorProperties = copyConstructorProperties$1;
  1158. var isForced = isForced_1;
  1159. /*
  1160. options.target - name of the target object
  1161. options.global - target is the global object
  1162. options.stat - export as static methods of target
  1163. options.proto - export as prototype methods of target
  1164. options.real - real prototype method for the `pure` version
  1165. options.forced - export even if the native feature is available
  1166. options.bind - bind methods to the target, required for the `pure` version
  1167. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  1168. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  1169. options.sham - add a flag to not completely full polyfills
  1170. options.enumerable - export as enumerable property
  1171. options.dontCallGetSet - prevent calling a getter on target
  1172. options.name - the .name of the function if it does not match the key
  1173. */
  1174. var _export = function (options, source) {
  1175. var TARGET = options.target;
  1176. var GLOBAL = options.global;
  1177. var STATIC = options.stat;
  1178. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  1179. if (GLOBAL) {
  1180. target = global$1;
  1181. } else if (STATIC) {
  1182. target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
  1183. } else {
  1184. target = (global$1[TARGET] || {}).prototype;
  1185. }
  1186. if (target) for (key in source) {
  1187. sourceProperty = source[key];
  1188. if (options.dontCallGetSet) {
  1189. descriptor = getOwnPropertyDescriptor(target, key);
  1190. targetProperty = descriptor && descriptor.value;
  1191. } else targetProperty = target[key];
  1192. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1193. // contained in target
  1194. if (!FORCED && targetProperty !== undefined) {
  1195. if (typeof sourceProperty == typeof targetProperty) continue;
  1196. copyConstructorProperties(sourceProperty, targetProperty);
  1197. }
  1198. // add a flag to not completely full polyfills
  1199. if (options.sham || (targetProperty && targetProperty.sham)) {
  1200. createNonEnumerableProperty(sourceProperty, 'sham', true);
  1201. }
  1202. defineBuiltIn(target, key, sourceProperty, options);
  1203. }
  1204. };
  1205. var toPropertyKey = toPropertyKey$3;
  1206. var definePropertyModule$1 = objectDefineProperty;
  1207. var createPropertyDescriptor = createPropertyDescriptor$3;
  1208. var createProperty$3 = function (object, key, value) {
  1209. var propertyKey = toPropertyKey(key);
  1210. if (propertyKey in object) definePropertyModule$1.f(object, propertyKey, createPropertyDescriptor(0, value));
  1211. else object[propertyKey] = value;
  1212. };
  1213. var fails$3 = fails$e;
  1214. var wellKnownSymbol$3 = wellKnownSymbol$8;
  1215. var V8_VERSION$1 = engineV8Version;
  1216. var SPECIES$1 = wellKnownSymbol$3('species');
  1217. var arrayMethodHasSpeciesSupport$3 = function (METHOD_NAME) {
  1218. // We can't use this feature detection in V8 since it causes
  1219. // deoptimization and serious performance degradation
  1220. // https://github.com/zloirock/core-js/issues/677
  1221. return V8_VERSION$1 >= 51 || !fails$3(function () {
  1222. var array = [];
  1223. var constructor = array.constructor = {};
  1224. constructor[SPECIES$1] = function () {
  1225. return { foo: 1 };
  1226. };
  1227. return array[METHOD_NAME](Boolean).foo !== 1;
  1228. });
  1229. };
  1230. var uncurryThis$4 = functionUncurryThis;
  1231. var arraySlice$1 = uncurryThis$4([].slice);
  1232. var $$6 = _export;
  1233. var isArray$1 = isArray$3;
  1234. var isConstructor = isConstructor$2;
  1235. var isObject$1 = isObject$8;
  1236. var toAbsoluteIndex$1 = toAbsoluteIndex$3;
  1237. var lengthOfArrayLike$3 = lengthOfArrayLike$6;
  1238. var toIndexedObject$2 = toIndexedObject$6;
  1239. var createProperty$2 = createProperty$3;
  1240. var wellKnownSymbol$2 = wellKnownSymbol$8;
  1241. var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$3;
  1242. var un$Slice = arraySlice$1;
  1243. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$2('slice');
  1244. var SPECIES = wellKnownSymbol$2('species');
  1245. var $Array$1 = Array;
  1246. var max$1 = Math.max;
  1247. // `Array.prototype.slice` method
  1248. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1249. // fallback for not array-like ES3 strings and DOM objects
  1250. $$6({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1251. slice: function slice(start, end) {
  1252. var O = toIndexedObject$2(this);
  1253. var length = lengthOfArrayLike$3(O);
  1254. var k = toAbsoluteIndex$1(start, length);
  1255. var fin = toAbsoluteIndex$1(end === undefined ? length : end, length);
  1256. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1257. var Constructor, result, n;
  1258. if (isArray$1(O)) {
  1259. Constructor = O.constructor;
  1260. // cross-realm fallback
  1261. if (isConstructor(Constructor) && (Constructor === $Array$1 || isArray$1(Constructor.prototype))) {
  1262. Constructor = undefined;
  1263. } else if (isObject$1(Constructor)) {
  1264. Constructor = Constructor[SPECIES];
  1265. if (Constructor === null) Constructor = undefined;
  1266. }
  1267. if (Constructor === $Array$1 || Constructor === undefined) {
  1268. return un$Slice(O, k, fin);
  1269. }
  1270. }
  1271. result = new (Constructor === undefined ? $Array$1 : Constructor)(max$1(fin - k, 0));
  1272. for (n = 0; k < fin; k++, n++) if (k in O) createProperty$2(result, n, O[k]);
  1273. result.length = n;
  1274. return result;
  1275. }
  1276. });
  1277. var tryToString = tryToString$2;
  1278. var $TypeError$1 = TypeError;
  1279. var deletePropertyOrThrow$1 = function (O, P) {
  1280. if (!delete O[P]) throw $TypeError$1('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  1281. };
  1282. var classof = classof$5;
  1283. var $String = String;
  1284. var toString$1 = function (argument) {
  1285. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1286. return $String(argument);
  1287. };
  1288. var toAbsoluteIndex = toAbsoluteIndex$3;
  1289. var lengthOfArrayLike$2 = lengthOfArrayLike$6;
  1290. var createProperty$1 = createProperty$3;
  1291. var $Array = Array;
  1292. var max = Math.max;
  1293. var arraySliceSimple = function (O, start, end) {
  1294. var length = lengthOfArrayLike$2(O);
  1295. var k = toAbsoluteIndex(start, length);
  1296. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1297. var result = $Array(max(fin - k, 0));
  1298. for (var n = 0; k < fin; k++, n++) createProperty$1(result, n, O[k]);
  1299. result.length = n;
  1300. return result;
  1301. };
  1302. var arraySlice = arraySliceSimple;
  1303. var floor = Math.floor;
  1304. var mergeSort = function (array, comparefn) {
  1305. var length = array.length;
  1306. var middle = floor(length / 2);
  1307. return length < 8 ? insertionSort(array, comparefn) : merge(
  1308. array,
  1309. mergeSort(arraySlice(array, 0, middle), comparefn),
  1310. mergeSort(arraySlice(array, middle), comparefn),
  1311. comparefn
  1312. );
  1313. };
  1314. var insertionSort = function (array, comparefn) {
  1315. var length = array.length;
  1316. var i = 1;
  1317. var element, j;
  1318. while (i < length) {
  1319. j = i;
  1320. element = array[i];
  1321. while (j && comparefn(array[j - 1], element) > 0) {
  1322. array[j] = array[--j];
  1323. }
  1324. if (j !== i++) array[j] = element;
  1325. } return array;
  1326. };
  1327. var merge = function (array, left, right, comparefn) {
  1328. var llength = left.length;
  1329. var rlength = right.length;
  1330. var lindex = 0;
  1331. var rindex = 0;
  1332. while (lindex < llength || rindex < rlength) {
  1333. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  1334. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  1335. : lindex < llength ? left[lindex++] : right[rindex++];
  1336. } return array;
  1337. };
  1338. var arraySort = mergeSort;
  1339. var userAgent$1 = engineUserAgent;
  1340. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  1341. var engineFfVersion = !!firefox && +firefox[1];
  1342. var UA = engineUserAgent;
  1343. var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
  1344. var userAgent = engineUserAgent;
  1345. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  1346. var engineWebkitVersion = !!webkit && +webkit[1];
  1347. var $$5 = _export;
  1348. var uncurryThis$3 = functionUncurryThis;
  1349. var aCallable = aCallable$3;
  1350. var toObject$2 = toObject$5;
  1351. var lengthOfArrayLike$1 = lengthOfArrayLike$6;
  1352. var deletePropertyOrThrow = deletePropertyOrThrow$1;
  1353. var toString = toString$1;
  1354. var fails$2 = fails$e;
  1355. var internalSort = arraySort;
  1356. var arrayMethodIsStrict$1 = arrayMethodIsStrict$3;
  1357. var FF = engineFfVersion;
  1358. var IE_OR_EDGE = engineIsIeOrEdge;
  1359. var V8 = engineV8Version;
  1360. var WEBKIT = engineWebkitVersion;
  1361. var test = [];
  1362. var un$Sort = uncurryThis$3(test.sort);
  1363. var push = uncurryThis$3(test.push);
  1364. // IE8-
  1365. var FAILS_ON_UNDEFINED = fails$2(function () {
  1366. test.sort(undefined);
  1367. });
  1368. // V8 bug
  1369. var FAILS_ON_NULL = fails$2(function () {
  1370. test.sort(null);
  1371. });
  1372. // Old WebKit
  1373. var STRICT_METHOD$1 = arrayMethodIsStrict$1('sort');
  1374. var STABLE_SORT = !fails$2(function () {
  1375. // feature detection can be too slow, so check engines versions
  1376. if (V8) return V8 < 70;
  1377. if (FF && FF > 3) return;
  1378. if (IE_OR_EDGE) return true;
  1379. if (WEBKIT) return WEBKIT < 603;
  1380. var result = '';
  1381. var code, chr, value, index;
  1382. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  1383. for (code = 65; code < 76; code++) {
  1384. chr = String.fromCharCode(code);
  1385. switch (code) {
  1386. case 66: case 69: case 70: case 72: value = 3; break;
  1387. case 68: case 71: value = 4; break;
  1388. default: value = 2;
  1389. }
  1390. for (index = 0; index < 47; index++) {
  1391. test.push({ k: chr + index, v: value });
  1392. }
  1393. }
  1394. test.sort(function (a, b) { return b.v - a.v; });
  1395. for (index = 0; index < test.length; index++) {
  1396. chr = test[index].k.charAt(0);
  1397. if (result.charAt(result.length - 1) !== chr) result += chr;
  1398. }
  1399. return result !== 'DGBEFHACIJK';
  1400. });
  1401. var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT;
  1402. var getSortCompare = function (comparefn) {
  1403. return function (x, y) {
  1404. if (y === undefined) return -1;
  1405. if (x === undefined) return 1;
  1406. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  1407. return toString(x) > toString(y) ? 1 : -1;
  1408. };
  1409. };
  1410. // `Array.prototype.sort` method
  1411. // https://tc39.es/ecma262/#sec-array.prototype.sort
  1412. $$5({ target: 'Array', proto: true, forced: FORCED$1 }, {
  1413. sort: function sort(comparefn) {
  1414. if (comparefn !== undefined) aCallable(comparefn);
  1415. var array = toObject$2(this);
  1416. if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
  1417. var items = [];
  1418. var arrayLength = lengthOfArrayLike$1(array);
  1419. var itemsLength, index;
  1420. for (index = 0; index < arrayLength; index++) {
  1421. if (index in array) push(items, array[index]);
  1422. }
  1423. internalSort(items, getSortCompare(comparefn));
  1424. itemsLength = items.length;
  1425. index = 0;
  1426. while (index < itemsLength) array[index] = items[index++];
  1427. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  1428. return array;
  1429. }
  1430. });
  1431. var $$4 = _export;
  1432. var uncurryThis$2 = functionUncurryThis;
  1433. var IndexedObject$1 = indexedObject;
  1434. var toIndexedObject$1 = toIndexedObject$6;
  1435. var arrayMethodIsStrict = arrayMethodIsStrict$3;
  1436. var un$Join = uncurryThis$2([].join);
  1437. var ES3_STRINGS = IndexedObject$1 != Object;
  1438. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  1439. // `Array.prototype.join` method
  1440. // https://tc39.es/ecma262/#sec-array.prototype.join
  1441. $$4({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  1442. join: function join(separator) {
  1443. return un$Join(toIndexedObject$1(this), separator === undefined ? ',' : separator);
  1444. }
  1445. });
  1446. var DESCRIPTORS$2 = descriptors;
  1447. var FUNCTION_NAME_EXISTS = functionName.EXISTS;
  1448. var uncurryThis$1 = functionUncurryThis;
  1449. var defineProperty$2 = objectDefineProperty.f;
  1450. var FunctionPrototype = Function.prototype;
  1451. var functionToString = uncurryThis$1(FunctionPrototype.toString);
  1452. var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
  1453. var regExpExec = uncurryThis$1(nameRE.exec);
  1454. var NAME = 'name';
  1455. // Function instances `.name` property
  1456. // https://tc39.es/ecma262/#sec-function-instances-name
  1457. if (DESCRIPTORS$2 && !FUNCTION_NAME_EXISTS) {
  1458. defineProperty$2(FunctionPrototype, NAME, {
  1459. configurable: true,
  1460. get: function () {
  1461. try {
  1462. return regExpExec(nameRE, functionToString(this))[1];
  1463. } catch (error) {
  1464. return '';
  1465. }
  1466. }
  1467. });
  1468. }
  1469. var $TypeError = TypeError;
  1470. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1471. var doesNotExceedSafeInteger$1 = function (it) {
  1472. if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
  1473. return it;
  1474. };
  1475. var $$3 = _export;
  1476. var fails$1 = fails$e;
  1477. var isArray = isArray$3;
  1478. var isObject = isObject$8;
  1479. var toObject$1 = toObject$5;
  1480. var lengthOfArrayLike = lengthOfArrayLike$6;
  1481. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1482. var createProperty = createProperty$3;
  1483. var arraySpeciesCreate = arraySpeciesCreate$2;
  1484. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$3;
  1485. var wellKnownSymbol$1 = wellKnownSymbol$8;
  1486. var V8_VERSION = engineV8Version;
  1487. var IS_CONCAT_SPREADABLE = wellKnownSymbol$1('isConcatSpreadable');
  1488. // We can't use this feature detection in V8 since it causes
  1489. // deoptimization and serious performance degradation
  1490. // https://github.com/zloirock/core-js/issues/679
  1491. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$1(function () {
  1492. var array = [];
  1493. array[IS_CONCAT_SPREADABLE] = false;
  1494. return array.concat()[0] !== array;
  1495. });
  1496. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('concat');
  1497. var isConcatSpreadable = function (O) {
  1498. if (!isObject(O)) return false;
  1499. var spreadable = O[IS_CONCAT_SPREADABLE];
  1500. return spreadable !== undefined ? !!spreadable : isArray(O);
  1501. };
  1502. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1503. // `Array.prototype.concat` method
  1504. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1505. // with adding support of @@isConcatSpreadable and @@species
  1506. $$3({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1507. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1508. concat: function concat(arg) {
  1509. var O = toObject$1(this);
  1510. var A = arraySpeciesCreate(O, 0);
  1511. var n = 0;
  1512. var i, k, length, len, E;
  1513. for (i = -1, length = arguments.length; i < length; i++) {
  1514. E = i === -1 ? O : arguments[i];
  1515. if (isConcatSpreadable(E)) {
  1516. len = lengthOfArrayLike(E);
  1517. doesNotExceedSafeInteger(n + len);
  1518. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1519. } else {
  1520. doesNotExceedSafeInteger(n + 1);
  1521. createProperty(A, n++, E);
  1522. }
  1523. }
  1524. A.length = n;
  1525. return A;
  1526. }
  1527. });
  1528. var objectDefineProperties = {};
  1529. var internalObjectKeys = objectKeysInternal;
  1530. var enumBugKeys$1 = enumBugKeys$3;
  1531. // `Object.keys` method
  1532. // https://tc39.es/ecma262/#sec-object.keys
  1533. // eslint-disable-next-line es-x/no-object-keys -- safe
  1534. var objectKeys$2 = Object.keys || function keys(O) {
  1535. return internalObjectKeys(O, enumBugKeys$1);
  1536. };
  1537. var DESCRIPTORS$1 = descriptors;
  1538. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1539. var definePropertyModule = objectDefineProperty;
  1540. var anObject$1 = anObject$4;
  1541. var toIndexedObject = toIndexedObject$6;
  1542. var objectKeys$1 = objectKeys$2;
  1543. // `Object.defineProperties` method
  1544. // https://tc39.es/ecma262/#sec-object.defineproperties
  1545. // eslint-disable-next-line es-x/no-object-defineproperties -- safe
  1546. objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1547. anObject$1(O);
  1548. var props = toIndexedObject(Properties);
  1549. var keys = objectKeys$1(Properties);
  1550. var length = keys.length;
  1551. var index = 0;
  1552. var key;
  1553. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1554. return O;
  1555. };
  1556. var getBuiltIn = getBuiltIn$5;
  1557. var html$1 = getBuiltIn('document', 'documentElement');
  1558. /* global ActiveXObject -- old IE, WSH */
  1559. var anObject = anObject$4;
  1560. var definePropertiesModule = objectDefineProperties;
  1561. var enumBugKeys = enumBugKeys$3;
  1562. var hiddenKeys = hiddenKeys$4;
  1563. var html = html$1;
  1564. var documentCreateElement = documentCreateElement$2;
  1565. var sharedKey = sharedKey$2;
  1566. var GT = '>';
  1567. var LT = '<';
  1568. var PROTOTYPE = 'prototype';
  1569. var SCRIPT = 'script';
  1570. var IE_PROTO = sharedKey('IE_PROTO');
  1571. var EmptyConstructor = function () { /* empty */ };
  1572. var scriptTag = function (content) {
  1573. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1574. };
  1575. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1576. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1577. activeXDocument.write(scriptTag(''));
  1578. activeXDocument.close();
  1579. var temp = activeXDocument.parentWindow.Object;
  1580. activeXDocument = null; // avoid memory leak
  1581. return temp;
  1582. };
  1583. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1584. var NullProtoObjectViaIFrame = function () {
  1585. // Thrash, waste and sodomy: IE GC bug
  1586. var iframe = documentCreateElement('iframe');
  1587. var JS = 'java' + SCRIPT + ':';
  1588. var iframeDocument;
  1589. iframe.style.display = 'none';
  1590. html.appendChild(iframe);
  1591. // https://github.com/zloirock/core-js/issues/475
  1592. iframe.src = String(JS);
  1593. iframeDocument = iframe.contentWindow.document;
  1594. iframeDocument.open();
  1595. iframeDocument.write(scriptTag('document.F=Object'));
  1596. iframeDocument.close();
  1597. return iframeDocument.F;
  1598. };
  1599. // Check for document.domain and active x support
  1600. // No need to use active x approach when document.domain is not set
  1601. // see https://github.com/es-shims/es5-shim/issues/150
  1602. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1603. // avoid IE GC bug
  1604. var activeXDocument;
  1605. var NullProtoObject = function () {
  1606. try {
  1607. activeXDocument = new ActiveXObject('htmlfile');
  1608. } catch (error) { /* ignore */ }
  1609. NullProtoObject = typeof document != 'undefined'
  1610. ? document.domain && activeXDocument
  1611. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1612. : NullProtoObjectViaIFrame()
  1613. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1614. var length = enumBugKeys.length;
  1615. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1616. return NullProtoObject();
  1617. };
  1618. hiddenKeys[IE_PROTO] = true;
  1619. // `Object.create` method
  1620. // https://tc39.es/ecma262/#sec-object.create
  1621. // eslint-disable-next-line es-x/no-object-create -- safe
  1622. var objectCreate = Object.create || function create(O, Properties) {
  1623. var result;
  1624. if (O !== null) {
  1625. EmptyConstructor[PROTOTYPE] = anObject(O);
  1626. result = new EmptyConstructor();
  1627. EmptyConstructor[PROTOTYPE] = null;
  1628. // add "__proto__" for Object.getPrototypeOf polyfill
  1629. result[IE_PROTO] = O;
  1630. } else result = NullProtoObject();
  1631. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1632. };
  1633. var wellKnownSymbol = wellKnownSymbol$8;
  1634. var create = objectCreate;
  1635. var defineProperty$1 = objectDefineProperty.f;
  1636. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1637. var ArrayPrototype = Array.prototype;
  1638. // Array.prototype[@@unscopables]
  1639. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1640. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1641. defineProperty$1(ArrayPrototype, UNSCOPABLES, {
  1642. configurable: true,
  1643. value: create(null)
  1644. });
  1645. }
  1646. // add a key to Array.prototype[@@unscopables]
  1647. var addToUnscopables$1 = function (key) {
  1648. ArrayPrototype[UNSCOPABLES][key] = true;
  1649. };
  1650. var $$2 = _export;
  1651. var $find = arrayIteration.find;
  1652. var addToUnscopables = addToUnscopables$1;
  1653. var FIND = 'find';
  1654. var SKIPS_HOLES = true;
  1655. // Shouldn't skip holes
  1656. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1657. // `Array.prototype.find` method
  1658. // https://tc39.es/ecma262/#sec-array.prototype.find
  1659. $$2({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1660. find: function find(callbackfn /* , that = undefined */) {
  1661. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1662. }
  1663. });
  1664. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1665. addToUnscopables(FIND);
  1666. var $$1 = _export;
  1667. var $filter = arrayIteration.filter;
  1668. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$3;
  1669. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  1670. // `Array.prototype.filter` method
  1671. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1672. // with adding support of @@species
  1673. $$1({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1674. filter: function filter(callbackfn /* , thisArg */) {
  1675. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1676. }
  1677. });
  1678. var DESCRIPTORS = descriptors;
  1679. var uncurryThis = functionUncurryThis;
  1680. var call = functionCall;
  1681. var fails = fails$e;
  1682. var objectKeys = objectKeys$2;
  1683. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1684. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1685. var toObject = toObject$5;
  1686. var IndexedObject = indexedObject;
  1687. // eslint-disable-next-line es-x/no-object-assign -- safe
  1688. var $assign = Object.assign;
  1689. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  1690. var defineProperty = Object.defineProperty;
  1691. var concat = uncurryThis([].concat);
  1692. // `Object.assign` method
  1693. // https://tc39.es/ecma262/#sec-object.assign
  1694. var objectAssign = !$assign || fails(function () {
  1695. // should have correct order of operations (Edge bug)
  1696. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1697. enumerable: true,
  1698. get: function () {
  1699. defineProperty(this, 'b', {
  1700. value: 3,
  1701. enumerable: false
  1702. });
  1703. }
  1704. }), { b: 2 })).b !== 1) return true;
  1705. // should work with symbols and should have deterministic property order (V8 bug)
  1706. var A = {};
  1707. var B = {};
  1708. // eslint-disable-next-line es-x/no-symbol -- safe
  1709. var symbol = Symbol();
  1710. var alphabet = 'abcdefghijklmnopqrst';
  1711. A[symbol] = 7;
  1712. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1713. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  1714. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1715. var T = toObject(target);
  1716. var argumentsLength = arguments.length;
  1717. var index = 1;
  1718. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1719. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1720. while (argumentsLength > index) {
  1721. var S = IndexedObject(arguments[index++]);
  1722. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1723. var length = keys.length;
  1724. var j = 0;
  1725. var key;
  1726. while (length > j) {
  1727. key = keys[j++];
  1728. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  1729. }
  1730. } return T;
  1731. } : $assign;
  1732. var $ = _export;
  1733. var assign = objectAssign;
  1734. // `Object.assign` method
  1735. // https://tc39.es/ecma262/#sec-object.assign
  1736. // eslint-disable-next-line es-x/no-object-assign -- required for testing
  1737. $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1738. assign: assign
  1739. });
  1740. /**
  1741. * @author: Yura Knoxville
  1742. * @version: v1.1.0
  1743. */
  1744. var initBodyCaller;
  1745. var groupBy = function groupBy(array, f) {
  1746. var tmpGroups = {};
  1747. array.forEach(function (o) {
  1748. var groups = f(o);
  1749. tmpGroups[groups] = tmpGroups[groups] || [];
  1750. tmpGroups[groups].push(o);
  1751. });
  1752. return tmpGroups;
  1753. };
  1754. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  1755. collapseGroup: {
  1756. bootstrap3: 'glyphicon-chevron-up',
  1757. bootstrap5: 'bi-chevron-up',
  1758. materialize: 'arrow_drop_down'
  1759. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-angle-up',
  1760. expandGroup: {
  1761. bootstrap3: 'glyphicon-chevron-down',
  1762. bootstrap5: 'bi-chevron-down',
  1763. materialize: 'arrow_drop_up'
  1764. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-angle-down'
  1765. });
  1766. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1767. groupBy: false,
  1768. groupByField: '',
  1769. groupByFormatter: undefined,
  1770. groupByToggle: false,
  1771. groupByShowToggleIcon: false,
  1772. groupByCollapsedGroups: []
  1773. });
  1774. var Utils = $__default["default"].fn.bootstrapTable.utils;
  1775. var BootstrapTable = $__default["default"].fn.bootstrapTable.Constructor;
  1776. var _initSort = BootstrapTable.prototype.initSort;
  1777. var _initBody = BootstrapTable.prototype.initBody;
  1778. var _updateSelected = BootstrapTable.prototype.updateSelected;
  1779. BootstrapTable.prototype.initSort = function () {
  1780. var _this = this;
  1781. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1782. args[_key] = arguments[_key];
  1783. }
  1784. _initSort.apply(this, Array.prototype.slice.apply(args));
  1785. var that = this;
  1786. this.tableGroups = [];
  1787. if (this.options.groupBy && this.options.groupByField !== '') {
  1788. if (this.options.sortName !== this.options.groupByField) {
  1789. if (this.options.customSort) {
  1790. Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]);
  1791. } else {
  1792. this.options.data.sort(function (a, b) {
  1793. var groupByFields = _this.getGroupByFields();
  1794. var fieldValuesA = [];
  1795. var fieldValuesB = [];
  1796. $__default["default"].each(groupByFields, function (i, field) {
  1797. fieldValuesA.push(a[field]);
  1798. fieldValuesB.push(b[field]);
  1799. });
  1800. a = fieldValuesA.join();
  1801. b = fieldValuesB.join();
  1802. return a.localeCompare(b, undefined, {
  1803. numeric: true
  1804. });
  1805. });
  1806. }
  1807. }
  1808. var groups = groupBy(that.data, function (item) {
  1809. var groupByFields = _this.getGroupByFields();
  1810. var groupValues = [];
  1811. $__default["default"].each(groupByFields, function (i, field) {
  1812. var value_ = Utils.getItemField(item, field, that.options.escape, item.escape);
  1813. groupValues.push(value_);
  1814. });
  1815. return groupValues.join(', ');
  1816. });
  1817. var index = 0;
  1818. $__default["default"].each(groups, function (key, value) {
  1819. _this.tableGroups.push({
  1820. id: index,
  1821. name: key,
  1822. data: value
  1823. });
  1824. value.forEach(function (item) {
  1825. if (!item._data) {
  1826. item._data = {};
  1827. }
  1828. if (_this.isCollapsed(key, value)) {
  1829. item._class += ' hidden';
  1830. }
  1831. item._data['parent-index'] = index;
  1832. });
  1833. index++;
  1834. });
  1835. }
  1836. };
  1837. BootstrapTable.prototype.initBody = function () {
  1838. var _this2 = this;
  1839. initBodyCaller = true;
  1840. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1841. args[_key2] = arguments[_key2];
  1842. }
  1843. _initBody.apply(this, Array.prototype.slice.apply(args));
  1844. if (this.options.groupBy && this.options.groupByField !== '') {
  1845. var that = this;
  1846. var checkBox = false;
  1847. var visibleColumns = 0;
  1848. this.columns.forEach(function (column) {
  1849. if (column.checkbox) {
  1850. checkBox = true;
  1851. } else if (column.visible) {
  1852. visibleColumns += 1;
  1853. }
  1854. });
  1855. if (this.options.detailView && !this.options.cardView) {
  1856. visibleColumns += 1;
  1857. }
  1858. this.tableGroups.forEach(function (item) {
  1859. var html = [];
  1860. html.push(Utils.sprintf('<tr class="info groupBy %s" data-group-index="%s">', _this2.options.groupByToggle ? 'expanded' : '', item.id));
  1861. if (that.options.detailView && !that.options.cardView) {
  1862. html.push('<td class="detail"></td>');
  1863. }
  1864. if (checkBox) {
  1865. html.push('<td class="bs-checkbox">', '<input name="btSelectGroup" type="checkbox" />', '</td>');
  1866. }
  1867. var formattedValue = item.name;
  1868. if (that.options.groupByFormatter !== undefined) {
  1869. formattedValue = Utils.calculateObjectValue(that.options, that.options.groupByFormatter, [item.name, item.id, item.data]);
  1870. }
  1871. html.push('<td', Utils.sprintf(' colspan="%s"', visibleColumns), '>', formattedValue);
  1872. var icon = _this2.options.icons.collapseGroup;
  1873. if (_this2.isCollapsed(item.name, item.data)) {
  1874. icon = _this2.options.icons.expandGroup;
  1875. }
  1876. if (_this2.options.groupByToggle && _this2.options.groupByShowToggleIcon) {
  1877. html.push("<span class=\"float-right ".concat(_this2.options.iconsPrefix, " ").concat(icon, "\"></span>"));
  1878. }
  1879. html.push('</td></tr>');
  1880. that.$body.find("tr[data-parent-index=".concat(item.id, "]:first")).before($__default["default"](html.join('')));
  1881. });
  1882. this.$selectGroup = [];
  1883. this.$body.find('[name="btSelectGroup"]').each(function () {
  1884. var self = $__default["default"](this);
  1885. that.$selectGroup.push({
  1886. group: self,
  1887. item: that.$selectItem.filter(function () {
  1888. return $__default["default"](this).closest('tr').data('parent-index') === self.closest('tr').data('group-index');
  1889. })
  1890. });
  1891. });
  1892. if (this.options.groupByToggle) {
  1893. this.$container.off('click', '.groupBy').on('click', '.groupBy', function () {
  1894. var $this = $__default["default"](this);
  1895. var groupIndex = $this.closest('tr').data('group-index');
  1896. var $groupRows = that.$body.find("tr[data-parent-index=".concat(groupIndex, "]"));
  1897. $this.toggleClass('expanded collapsed');
  1898. $this.find('span').toggleClass("".concat(that.options.icons.collapseGroup, " ").concat(that.options.icons.expandGroup));
  1899. $groupRows.toggleClass('hidden');
  1900. $groupRows.each(function (i, element) {
  1901. return that.collapseRow($__default["default"](element).data('index'));
  1902. });
  1903. });
  1904. }
  1905. this.$container.off('click', '[name="btSelectGroup"]').on('click', '[name="btSelectGroup"]', function (event) {
  1906. event.stopImmediatePropagation();
  1907. var self = $__default["default"](this);
  1908. var checked = self.prop('checked');
  1909. that[checked ? 'checkGroup' : 'uncheckGroup']($__default["default"](this).closest('tr').data('group-index'));
  1910. });
  1911. }
  1912. initBodyCaller = false;
  1913. this.updateSelected();
  1914. };
  1915. BootstrapTable.prototype.updateSelected = function () {
  1916. if (!initBodyCaller) {
  1917. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  1918. args[_key3] = arguments[_key3];
  1919. }
  1920. _updateSelected.apply(this, Array.prototype.slice.apply(args));
  1921. if (this.options.groupBy && this.options.groupByField !== '') {
  1922. this.$selectGroup.forEach(function (item) {
  1923. var checkGroup = item.item.filter(':enabled').length === item.item.filter(':enabled').filter(':checked').length;
  1924. item.group.prop('checked', checkGroup);
  1925. });
  1926. }
  1927. }
  1928. };
  1929. BootstrapTable.prototype.checkGroup = function (index) {
  1930. this.checkGroup_(index, true);
  1931. };
  1932. BootstrapTable.prototype.uncheckGroup = function (index) {
  1933. this.checkGroup_(index, false);
  1934. };
  1935. BootstrapTable.prototype.isCollapsed = function (groupKey, items) {
  1936. if (this.options.groupByCollapsedGroups) {
  1937. var collapsedGroups = Utils.calculateObjectValue(this, this.options.groupByCollapsedGroups, [groupKey, items], true);
  1938. if ($__default["default"].inArray(groupKey, collapsedGroups) > -1) {
  1939. return true;
  1940. }
  1941. }
  1942. return false;
  1943. };
  1944. BootstrapTable.prototype.checkGroup_ = function (index, checked) {
  1945. var rowsBefore = this.getSelections();
  1946. var filter = function filter() {
  1947. return $__default["default"](this).closest('tr').data('parent-index') === index;
  1948. };
  1949. this.$selectItem.filter(filter).prop('checked', checked);
  1950. this.updateRows();
  1951. this.updateSelected();
  1952. var rowsAfter = this.getSelections();
  1953. if (checked) {
  1954. this.trigger('check-all', rowsAfter, rowsBefore);
  1955. return;
  1956. }
  1957. this.trigger('uncheck-all', rowsAfter, rowsBefore);
  1958. };
  1959. BootstrapTable.prototype.getGroupByFields = function () {
  1960. var groupByFields = this.options.groupByField;
  1961. if (!$__default["default"].isArray(this.options.groupByField)) {
  1962. groupByFields = [this.options.groupByField];
  1963. }
  1964. return groupByFields;
  1965. };
  1966. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1967. _inherits(_class, _$$BootstrapTable);
  1968. var _super = _createSuper(_class);
  1969. function _class() {
  1970. _classCallCheck(this, _class);
  1971. return _super.apply(this, arguments);
  1972. }
  1973. _createClass(_class, [{
  1974. key: "scrollTo",
  1975. value: function scrollTo(params) {
  1976. if (this.options.groupBy) {
  1977. var options = {
  1978. unit: 'px',
  1979. value: 0
  1980. };
  1981. if (_typeof(params) === 'object') {
  1982. options = Object.assign(options, params);
  1983. }
  1984. if (options.unit === 'rows') {
  1985. var scrollTo = 0;
  1986. this.$body.find("> tr:not(.groupBy):lt(".concat(options.value, ")")).each(function (i, el) {
  1987. scrollTo += $__default["default"](el).outerHeight(true);
  1988. });
  1989. var $targetColumn = this.$body.find("> tr:not(.groupBy):eq(".concat(options.value, ")"));
  1990. $targetColumn.prevAll('.groupBy').each(function (i, el) {
  1991. scrollTo += $__default["default"](el).outerHeight(true);
  1992. });
  1993. this.$tableBody.scrollTop(scrollTo);
  1994. return;
  1995. }
  1996. }
  1997. _get(_getPrototypeOf(_class.prototype), "scrollTo", this).call(this, params);
  1998. }
  1999. }]);
  2000. return _class;
  2001. }($__default["default"].BootstrapTable);
  2002. }));