bootstrap-table-multiple-sort.js 107 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613
  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 ($$a) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$a);
  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. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  17. var check = function (it) {
  18. return it && it.Math == Math && it;
  19. };
  20. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  21. var global$b =
  22. // eslint-disable-next-line es/no-global-this -- safe
  23. check(typeof globalThis == 'object' && globalThis) ||
  24. check(typeof window == 'object' && window) ||
  25. // eslint-disable-next-line no-restricted-globals -- safe
  26. check(typeof self == 'object' && self) ||
  27. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  28. // eslint-disable-next-line no-new-func -- fallback
  29. (function () { return this; })() || Function('return this')();
  30. var objectGetOwnPropertyDescriptor = {};
  31. var fails$h = function (exec) {
  32. try {
  33. return !!exec();
  34. } catch (error) {
  35. return true;
  36. }
  37. };
  38. var fails$g = fails$h;
  39. // Detect IE8's incomplete defineProperty implementation
  40. var descriptors = !fails$g(function () {
  41. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  42. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  43. });
  44. var fails$f = fails$h;
  45. var functionBindNative = !fails$f(function () {
  46. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  47. var test = (function () { /* empty */ }).bind();
  48. // eslint-disable-next-line no-prototype-builtins -- safe
  49. return typeof test != 'function' || test.hasOwnProperty('prototype');
  50. });
  51. var NATIVE_BIND$2 = functionBindNative;
  52. var call$6 = Function.prototype.call;
  53. var functionCall = NATIVE_BIND$2 ? call$6.bind(call$6) : function () {
  54. return call$6.apply(call$6, arguments);
  55. };
  56. var objectPropertyIsEnumerable = {};
  57. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  58. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  59. var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
  60. // Nashorn ~ JDK8 bug
  61. var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  62. // `Object.prototype.propertyIsEnumerable` method implementation
  63. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  64. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  65. var descriptor = getOwnPropertyDescriptor$2(this, V);
  66. return !!descriptor && descriptor.enumerable;
  67. } : $propertyIsEnumerable;
  68. var createPropertyDescriptor$3 = function (bitmap, value) {
  69. return {
  70. enumerable: !(bitmap & 1),
  71. configurable: !(bitmap & 2),
  72. writable: !(bitmap & 4),
  73. value: value
  74. };
  75. };
  76. var NATIVE_BIND$1 = functionBindNative;
  77. var FunctionPrototype$1 = Function.prototype;
  78. var call$5 = FunctionPrototype$1.call;
  79. var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$5, call$5);
  80. var functionUncurryThisRaw = function (fn) {
  81. return NATIVE_BIND$1 ? uncurryThisWithBind(fn) : function () {
  82. return call$5.apply(fn, arguments);
  83. };
  84. };
  85. var uncurryThisRaw$1 = functionUncurryThisRaw;
  86. var toString$6 = uncurryThisRaw$1({}.toString);
  87. var stringSlice = uncurryThisRaw$1(''.slice);
  88. var classofRaw$2 = function (it) {
  89. return stringSlice(toString$6(it), 8, -1);
  90. };
  91. var classofRaw$1 = classofRaw$2;
  92. var uncurryThisRaw = functionUncurryThisRaw;
  93. var functionUncurryThis = function (fn) {
  94. // Nashorn bug:
  95. // https://github.com/zloirock/core-js/issues/1128
  96. // https://github.com/zloirock/core-js/issues/1130
  97. if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
  98. };
  99. var uncurryThis$f = functionUncurryThis;
  100. var fails$e = fails$h;
  101. var classof$5 = classofRaw$2;
  102. var $Object$3 = Object;
  103. var split = uncurryThis$f(''.split);
  104. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  105. var indexedObject = fails$e(function () {
  106. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  107. // eslint-disable-next-line no-prototype-builtins -- safe
  108. return !$Object$3('z').propertyIsEnumerable(0);
  109. }) ? function (it) {
  110. return classof$5(it) == 'String' ? split(it, '') : $Object$3(it);
  111. } : $Object$3;
  112. // we can't use just `it == null` since of `document.all` special case
  113. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  114. var isNullOrUndefined$2 = function (it) {
  115. return it === null || it === undefined;
  116. };
  117. var isNullOrUndefined$1 = isNullOrUndefined$2;
  118. var $TypeError$8 = TypeError;
  119. // `RequireObjectCoercible` abstract operation
  120. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  121. var requireObjectCoercible$3 = function (it) {
  122. if (isNullOrUndefined$1(it)) throw $TypeError$8("Can't call method on " + it);
  123. return it;
  124. };
  125. // toObject with fallback for non-array-like ES3 strings
  126. var IndexedObject$2 = indexedObject;
  127. var requireObjectCoercible$2 = requireObjectCoercible$3;
  128. var toIndexedObject$5 = function (it) {
  129. return IndexedObject$2(requireObjectCoercible$2(it));
  130. };
  131. var documentAll$2 = typeof document == 'object' && document.all;
  132. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  133. var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
  134. var documentAll_1 = {
  135. all: documentAll$2,
  136. IS_HTMLDDA: IS_HTMLDDA
  137. };
  138. var $documentAll$1 = documentAll_1;
  139. var documentAll$1 = $documentAll$1.all;
  140. // `IsCallable` abstract operation
  141. // https://tc39.es/ecma262/#sec-iscallable
  142. var isCallable$c = $documentAll$1.IS_HTMLDDA ? function (argument) {
  143. return typeof argument == 'function' || argument === documentAll$1;
  144. } : function (argument) {
  145. return typeof argument == 'function';
  146. };
  147. var isCallable$b = isCallable$c;
  148. var $documentAll = documentAll_1;
  149. var documentAll = $documentAll.all;
  150. var isObject$8 = $documentAll.IS_HTMLDDA ? function (it) {
  151. return typeof it == 'object' ? it !== null : isCallable$b(it) || it === documentAll;
  152. } : function (it) {
  153. return typeof it == 'object' ? it !== null : isCallable$b(it);
  154. };
  155. var global$a = global$b;
  156. var isCallable$a = isCallable$c;
  157. var aFunction = function (argument) {
  158. return isCallable$a(argument) ? argument : undefined;
  159. };
  160. var getBuiltIn$5 = function (namespace, method) {
  161. return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
  162. };
  163. var uncurryThis$e = functionUncurryThis;
  164. var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
  165. var getBuiltIn$4 = getBuiltIn$5;
  166. var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
  167. var global$9 = global$b;
  168. var userAgent$2 = engineUserAgent;
  169. var process = global$9.process;
  170. var Deno = global$9.Deno;
  171. var versions = process && process.versions || Deno && Deno.version;
  172. var v8 = versions && versions.v8;
  173. var match, version;
  174. if (v8) {
  175. match = v8.split('.');
  176. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  177. // but their correct versions are not interesting for us
  178. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  179. }
  180. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  181. // so check `userAgent` even if `.v8` exists, but 0
  182. if (!version && userAgent$2) {
  183. match = userAgent$2.match(/Edge\/(\d+)/);
  184. if (!match || match[1] >= 74) {
  185. match = userAgent$2.match(/Chrome\/(\d+)/);
  186. if (match) version = +match[1];
  187. }
  188. }
  189. var engineV8Version = version;
  190. /* eslint-disable es/no-symbol -- required for testing */
  191. var V8_VERSION$2 = engineV8Version;
  192. var fails$d = fails$h;
  193. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  194. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
  195. var symbol = Symbol();
  196. // Chrome 38 Symbol has incorrect toString conversion
  197. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  198. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  199. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  200. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  201. });
  202. /* eslint-disable es/no-symbol -- required for testing */
  203. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  204. var useSymbolAsUid = NATIVE_SYMBOL$1
  205. && !Symbol.sham
  206. && typeof Symbol.iterator == 'symbol';
  207. var getBuiltIn$3 = getBuiltIn$5;
  208. var isCallable$9 = isCallable$c;
  209. var isPrototypeOf$1 = objectIsPrototypeOf;
  210. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  211. var $Object$2 = Object;
  212. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  213. return typeof it == 'symbol';
  214. } : function (it) {
  215. var $Symbol = getBuiltIn$3('Symbol');
  216. return isCallable$9($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
  217. };
  218. var $String$2 = String;
  219. var tryToString$2 = function (argument) {
  220. try {
  221. return $String$2(argument);
  222. } catch (error) {
  223. return 'Object';
  224. }
  225. };
  226. var isCallable$8 = isCallable$c;
  227. var tryToString$1 = tryToString$2;
  228. var $TypeError$7 = TypeError;
  229. // `Assert: IsCallable(argument) is true`
  230. var aCallable$3 = function (argument) {
  231. if (isCallable$8(argument)) return argument;
  232. throw $TypeError$7(tryToString$1(argument) + ' is not a function');
  233. };
  234. var aCallable$2 = aCallable$3;
  235. var isNullOrUndefined = isNullOrUndefined$2;
  236. // `GetMethod` abstract operation
  237. // https://tc39.es/ecma262/#sec-getmethod
  238. var getMethod$1 = function (V, P) {
  239. var func = V[P];
  240. return isNullOrUndefined(func) ? undefined : aCallable$2(func);
  241. };
  242. var call$4 = functionCall;
  243. var isCallable$7 = isCallable$c;
  244. var isObject$7 = isObject$8;
  245. var $TypeError$6 = TypeError;
  246. // `OrdinaryToPrimitive` abstract operation
  247. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  248. var ordinaryToPrimitive$1 = function (input, pref) {
  249. var fn, val;
  250. if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$7(val = call$4(fn, input))) return val;
  251. if (isCallable$7(fn = input.valueOf) && !isObject$7(val = call$4(fn, input))) return val;
  252. if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$7(val = call$4(fn, input))) return val;
  253. throw $TypeError$6("Can't convert object to primitive value");
  254. };
  255. var shared$3 = {exports: {}};
  256. var global$8 = global$b;
  257. // eslint-disable-next-line es/no-object-defineproperty -- safe
  258. var defineProperty$3 = Object.defineProperty;
  259. var defineGlobalProperty$3 = function (key, value) {
  260. try {
  261. defineProperty$3(global$8, key, { value: value, configurable: true, writable: true });
  262. } catch (error) {
  263. global$8[key] = value;
  264. } return value;
  265. };
  266. var global$7 = global$b;
  267. var defineGlobalProperty$2 = defineGlobalProperty$3;
  268. var SHARED = '__core-js_shared__';
  269. var store$3 = global$7[SHARED] || defineGlobalProperty$2(SHARED, {});
  270. var sharedStore = store$3;
  271. var store$2 = sharedStore;
  272. (shared$3.exports = function (key, value) {
  273. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  274. })('versions', []).push({
  275. version: '3.25.5',
  276. mode: 'global',
  277. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  278. license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
  279. source: 'https://github.com/zloirock/core-js'
  280. });
  281. var requireObjectCoercible$1 = requireObjectCoercible$3;
  282. var $Object$1 = Object;
  283. // `ToObject` abstract operation
  284. // https://tc39.es/ecma262/#sec-toobject
  285. var toObject$6 = function (argument) {
  286. return $Object$1(requireObjectCoercible$1(argument));
  287. };
  288. var uncurryThis$d = functionUncurryThis;
  289. var toObject$5 = toObject$6;
  290. var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
  291. // `HasOwnProperty` abstract operation
  292. // https://tc39.es/ecma262/#sec-hasownproperty
  293. // eslint-disable-next-line es/no-object-hasown -- safe
  294. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  295. return hasOwnProperty(toObject$5(it), key);
  296. };
  297. var uncurryThis$c = functionUncurryThis;
  298. var id = 0;
  299. var postfix = Math.random();
  300. var toString$5 = uncurryThis$c(1.0.toString);
  301. var uid$2 = function (key) {
  302. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
  303. };
  304. var global$6 = global$b;
  305. var shared$2 = shared$3.exports;
  306. var hasOwn$7 = hasOwnProperty_1;
  307. var uid$1 = uid$2;
  308. var NATIVE_SYMBOL = symbolConstructorDetection;
  309. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  310. var WellKnownSymbolsStore = shared$2('wks');
  311. var Symbol$2 = global$6.Symbol;
  312. var symbolFor = Symbol$2 && Symbol$2['for'];
  313. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
  314. var wellKnownSymbol$8 = function (name) {
  315. if (!hasOwn$7(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  316. var description = 'Symbol.' + name;
  317. if (NATIVE_SYMBOL && hasOwn$7(Symbol$2, name)) {
  318. WellKnownSymbolsStore[name] = Symbol$2[name];
  319. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  320. WellKnownSymbolsStore[name] = symbolFor(description);
  321. } else {
  322. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  323. }
  324. } return WellKnownSymbolsStore[name];
  325. };
  326. var call$3 = functionCall;
  327. var isObject$6 = isObject$8;
  328. var isSymbol$1 = isSymbol$2;
  329. var getMethod = getMethod$1;
  330. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  331. var wellKnownSymbol$7 = wellKnownSymbol$8;
  332. var $TypeError$5 = TypeError;
  333. var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
  334. // `ToPrimitive` abstract operation
  335. // https://tc39.es/ecma262/#sec-toprimitive
  336. var toPrimitive$1 = function (input, pref) {
  337. if (!isObject$6(input) || isSymbol$1(input)) return input;
  338. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  339. var result;
  340. if (exoticToPrim) {
  341. if (pref === undefined) pref = 'default';
  342. result = call$3(exoticToPrim, input, pref);
  343. if (!isObject$6(result) || isSymbol$1(result)) return result;
  344. throw $TypeError$5("Can't convert object to primitive value");
  345. }
  346. if (pref === undefined) pref = 'number';
  347. return ordinaryToPrimitive(input, pref);
  348. };
  349. var toPrimitive = toPrimitive$1;
  350. var isSymbol = isSymbol$2;
  351. // `ToPropertyKey` abstract operation
  352. // https://tc39.es/ecma262/#sec-topropertykey
  353. var toPropertyKey$3 = function (argument) {
  354. var key = toPrimitive(argument, 'string');
  355. return isSymbol(key) ? key : key + '';
  356. };
  357. var global$5 = global$b;
  358. var isObject$5 = isObject$8;
  359. var document$1 = global$5.document;
  360. // typeof document.createElement is 'object' in old IE
  361. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  362. var documentCreateElement$1 = function (it) {
  363. return EXISTS$1 ? document$1.createElement(it) : {};
  364. };
  365. var DESCRIPTORS$9 = descriptors;
  366. var fails$c = fails$h;
  367. var createElement = documentCreateElement$1;
  368. // Thanks to IE8 for its funny defineProperty
  369. var ie8DomDefine = !DESCRIPTORS$9 && !fails$c(function () {
  370. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  371. return Object.defineProperty(createElement('div'), 'a', {
  372. get: function () { return 7; }
  373. }).a != 7;
  374. });
  375. var DESCRIPTORS$8 = descriptors;
  376. var call$2 = functionCall;
  377. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  378. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  379. var toIndexedObject$4 = toIndexedObject$5;
  380. var toPropertyKey$2 = toPropertyKey$3;
  381. var hasOwn$6 = hasOwnProperty_1;
  382. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  383. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  384. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  385. // `Object.getOwnPropertyDescriptor` method
  386. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  387. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  388. O = toIndexedObject$4(O);
  389. P = toPropertyKey$2(P);
  390. if (IE8_DOM_DEFINE$1) try {
  391. return $getOwnPropertyDescriptor$1(O, P);
  392. } catch (error) { /* empty */ }
  393. if (hasOwn$6(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
  394. };
  395. var objectDefineProperty = {};
  396. var DESCRIPTORS$7 = descriptors;
  397. var fails$b = fails$h;
  398. // V8 ~ Chrome 36-
  399. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  400. var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$b(function () {
  401. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  402. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  403. value: 42,
  404. writable: false
  405. }).prototype != 42;
  406. });
  407. var isObject$4 = isObject$8;
  408. var $String$1 = String;
  409. var $TypeError$4 = TypeError;
  410. // `Assert: Type(argument) is Object`
  411. var anObject$6 = function (argument) {
  412. if (isObject$4(argument)) return argument;
  413. throw $TypeError$4($String$1(argument) + ' is not an object');
  414. };
  415. var DESCRIPTORS$6 = descriptors;
  416. var IE8_DOM_DEFINE = ie8DomDefine;
  417. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  418. var anObject$5 = anObject$6;
  419. var toPropertyKey$1 = toPropertyKey$3;
  420. var $TypeError$3 = TypeError;
  421. // eslint-disable-next-line es/no-object-defineproperty -- safe
  422. var $defineProperty = Object.defineProperty;
  423. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  424. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  425. var ENUMERABLE = 'enumerable';
  426. var CONFIGURABLE$1 = 'configurable';
  427. var WRITABLE = 'writable';
  428. // `Object.defineProperty` method
  429. // https://tc39.es/ecma262/#sec-object.defineproperty
  430. objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  431. anObject$5(O);
  432. P = toPropertyKey$1(P);
  433. anObject$5(Attributes);
  434. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  435. var current = $getOwnPropertyDescriptor(O, P);
  436. if (current && current[WRITABLE]) {
  437. O[P] = Attributes.value;
  438. Attributes = {
  439. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  440. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  441. writable: false
  442. };
  443. }
  444. } return $defineProperty(O, P, Attributes);
  445. } : $defineProperty : function defineProperty(O, P, Attributes) {
  446. anObject$5(O);
  447. P = toPropertyKey$1(P);
  448. anObject$5(Attributes);
  449. if (IE8_DOM_DEFINE) try {
  450. return $defineProperty(O, P, Attributes);
  451. } catch (error) { /* empty */ }
  452. if ('get' in Attributes || 'set' in Attributes) throw $TypeError$3('Accessors not supported');
  453. if ('value' in Attributes) O[P] = Attributes.value;
  454. return O;
  455. };
  456. var DESCRIPTORS$5 = descriptors;
  457. var definePropertyModule$4 = objectDefineProperty;
  458. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  459. var createNonEnumerableProperty$2 = DESCRIPTORS$5 ? function (object, key, value) {
  460. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  461. } : function (object, key, value) {
  462. object[key] = value;
  463. return object;
  464. };
  465. var makeBuiltIn$2 = {exports: {}};
  466. var DESCRIPTORS$4 = descriptors;
  467. var hasOwn$5 = hasOwnProperty_1;
  468. var FunctionPrototype = Function.prototype;
  469. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  470. var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
  471. var EXISTS = hasOwn$5(FunctionPrototype, 'name');
  472. // additional protection from minified / mangled / dropped function names
  473. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  474. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
  475. var functionName = {
  476. EXISTS: EXISTS,
  477. PROPER: PROPER,
  478. CONFIGURABLE: CONFIGURABLE
  479. };
  480. var uncurryThis$b = functionUncurryThis;
  481. var isCallable$6 = isCallable$c;
  482. var store$1 = sharedStore;
  483. var functionToString = uncurryThis$b(Function.toString);
  484. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  485. if (!isCallable$6(store$1.inspectSource)) {
  486. store$1.inspectSource = function (it) {
  487. return functionToString(it);
  488. };
  489. }
  490. var inspectSource$2 = store$1.inspectSource;
  491. var global$4 = global$b;
  492. var isCallable$5 = isCallable$c;
  493. var WeakMap$1 = global$4.WeakMap;
  494. var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1));
  495. var shared$1 = shared$3.exports;
  496. var uid = uid$2;
  497. var keys = shared$1('keys');
  498. var sharedKey$2 = function (key) {
  499. return keys[key] || (keys[key] = uid(key));
  500. };
  501. var hiddenKeys$4 = {};
  502. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  503. var global$3 = global$b;
  504. var isObject$3 = isObject$8;
  505. var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
  506. var hasOwn$4 = hasOwnProperty_1;
  507. var shared = sharedStore;
  508. var sharedKey$1 = sharedKey$2;
  509. var hiddenKeys$3 = hiddenKeys$4;
  510. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  511. var TypeError$1 = global$3.TypeError;
  512. var WeakMap = global$3.WeakMap;
  513. var set, get, has;
  514. var enforce = function (it) {
  515. return has(it) ? get(it) : set(it, {});
  516. };
  517. var getterFor = function (TYPE) {
  518. return function (it) {
  519. var state;
  520. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  521. throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  522. } return state;
  523. };
  524. };
  525. if (NATIVE_WEAK_MAP || shared.state) {
  526. var store = shared.state || (shared.state = new WeakMap());
  527. /* eslint-disable no-self-assign -- prototype methods protection */
  528. store.get = store.get;
  529. store.has = store.has;
  530. store.set = store.set;
  531. /* eslint-enable no-self-assign -- prototype methods protection */
  532. set = function (it, metadata) {
  533. if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
  534. metadata.facade = it;
  535. store.set(it, metadata);
  536. return metadata;
  537. };
  538. get = function (it) {
  539. return store.get(it) || {};
  540. };
  541. has = function (it) {
  542. return store.has(it);
  543. };
  544. } else {
  545. var STATE = sharedKey$1('state');
  546. hiddenKeys$3[STATE] = true;
  547. set = function (it, metadata) {
  548. if (hasOwn$4(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
  549. metadata.facade = it;
  550. createNonEnumerableProperty$1(it, STATE, metadata);
  551. return metadata;
  552. };
  553. get = function (it) {
  554. return hasOwn$4(it, STATE) ? it[STATE] : {};
  555. };
  556. has = function (it) {
  557. return hasOwn$4(it, STATE);
  558. };
  559. }
  560. var internalState = {
  561. set: set,
  562. get: get,
  563. has: has,
  564. enforce: enforce,
  565. getterFor: getterFor
  566. };
  567. var fails$a = fails$h;
  568. var isCallable$4 = isCallable$c;
  569. var hasOwn$3 = hasOwnProperty_1;
  570. var DESCRIPTORS$3 = descriptors;
  571. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  572. var inspectSource$1 = inspectSource$2;
  573. var InternalStateModule = internalState;
  574. var enforceInternalState = InternalStateModule.enforce;
  575. var getInternalState = InternalStateModule.get;
  576. // eslint-disable-next-line es/no-object-defineproperty -- safe
  577. var defineProperty$2 = Object.defineProperty;
  578. var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$a(function () {
  579. return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  580. });
  581. var TEMPLATE = String(String).split('String');
  582. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  583. if (String(name).slice(0, 7) === 'Symbol(') {
  584. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  585. }
  586. if (options && options.getter) name = 'get ' + name;
  587. if (options && options.setter) name = 'set ' + name;
  588. if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  589. if (DESCRIPTORS$3) defineProperty$2(value, 'name', { value: name, configurable: true });
  590. else value.name = name;
  591. }
  592. if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
  593. defineProperty$2(value, 'length', { value: options.arity });
  594. }
  595. try {
  596. if (options && hasOwn$3(options, 'constructor') && options.constructor) {
  597. if (DESCRIPTORS$3) defineProperty$2(value, 'prototype', { writable: false });
  598. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  599. } else if (value.prototype) value.prototype = undefined;
  600. } catch (error) { /* empty */ }
  601. var state = enforceInternalState(value);
  602. if (!hasOwn$3(state, 'source')) {
  603. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  604. } return value;
  605. };
  606. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  607. // eslint-disable-next-line no-extend-native -- required
  608. Function.prototype.toString = makeBuiltIn$1(function toString() {
  609. return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
  610. }, 'toString');
  611. var isCallable$3 = isCallable$c;
  612. var definePropertyModule$3 = objectDefineProperty;
  613. var makeBuiltIn = makeBuiltIn$2.exports;
  614. var defineGlobalProperty$1 = defineGlobalProperty$3;
  615. var defineBuiltIn$3 = function (O, key, value, options) {
  616. if (!options) options = {};
  617. var simple = options.enumerable;
  618. var name = options.name !== undefined ? options.name : key;
  619. if (isCallable$3(value)) makeBuiltIn(value, name, options);
  620. if (options.global) {
  621. if (simple) O[key] = value;
  622. else defineGlobalProperty$1(key, value);
  623. } else {
  624. try {
  625. if (!options.unsafe) delete O[key];
  626. else if (O[key]) simple = true;
  627. } catch (error) { /* empty */ }
  628. if (simple) O[key] = value;
  629. else definePropertyModule$3.f(O, key, {
  630. value: value,
  631. enumerable: false,
  632. configurable: !options.nonConfigurable,
  633. writable: !options.nonWritable
  634. });
  635. } return O;
  636. };
  637. var objectGetOwnPropertyNames = {};
  638. var ceil = Math.ceil;
  639. var floor$1 = Math.floor;
  640. // `Math.trunc` method
  641. // https://tc39.es/ecma262/#sec-math.trunc
  642. // eslint-disable-next-line es/no-math-trunc -- safe
  643. var mathTrunc = Math.trunc || function trunc(x) {
  644. var n = +x;
  645. return (n > 0 ? floor$1 : ceil)(n);
  646. };
  647. var trunc = mathTrunc;
  648. // `ToIntegerOrInfinity` abstract operation
  649. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  650. var toIntegerOrInfinity$3 = function (argument) {
  651. var number = +argument;
  652. // eslint-disable-next-line no-self-compare -- NaN check
  653. return number !== number || number === 0 ? 0 : trunc(number);
  654. };
  655. var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
  656. var max$3 = Math.max;
  657. var min$2 = Math.min;
  658. // Helper for a popular repeating case of the spec:
  659. // Let integer be ? ToInteger(index).
  660. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  661. var toAbsoluteIndex$4 = function (index, length) {
  662. var integer = toIntegerOrInfinity$2(index);
  663. return integer < 0 ? max$3(integer + length, 0) : min$2(integer, length);
  664. };
  665. var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
  666. var min$1 = Math.min;
  667. // `ToLength` abstract operation
  668. // https://tc39.es/ecma262/#sec-tolength
  669. var toLength$1 = function (argument) {
  670. return argument > 0 ? min$1(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  671. };
  672. var toLength = toLength$1;
  673. // `LengthOfArrayLike` abstract operation
  674. // https://tc39.es/ecma262/#sec-lengthofarraylike
  675. var lengthOfArrayLike$7 = function (obj) {
  676. return toLength(obj.length);
  677. };
  678. var toIndexedObject$3 = toIndexedObject$5;
  679. var toAbsoluteIndex$3 = toAbsoluteIndex$4;
  680. var lengthOfArrayLike$6 = lengthOfArrayLike$7;
  681. // `Array.prototype.{ indexOf, includes }` methods implementation
  682. var createMethod$2 = function (IS_INCLUDES) {
  683. return function ($this, el, fromIndex) {
  684. var O = toIndexedObject$3($this);
  685. var length = lengthOfArrayLike$6(O);
  686. var index = toAbsoluteIndex$3(fromIndex, length);
  687. var value;
  688. // Array#includes uses SameValueZero equality algorithm
  689. // eslint-disable-next-line no-self-compare -- NaN check
  690. if (IS_INCLUDES && el != el) while (length > index) {
  691. value = O[index++];
  692. // eslint-disable-next-line no-self-compare -- NaN check
  693. if (value != value) return true;
  694. // Array#indexOf ignores holes, Array#includes - not
  695. } else for (;length > index; index++) {
  696. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  697. } return !IS_INCLUDES && -1;
  698. };
  699. };
  700. var arrayIncludes = {
  701. // `Array.prototype.includes` method
  702. // https://tc39.es/ecma262/#sec-array.prototype.includes
  703. includes: createMethod$2(true),
  704. // `Array.prototype.indexOf` method
  705. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  706. indexOf: createMethod$2(false)
  707. };
  708. var uncurryThis$a = functionUncurryThis;
  709. var hasOwn$2 = hasOwnProperty_1;
  710. var toIndexedObject$2 = toIndexedObject$5;
  711. var indexOf = arrayIncludes.indexOf;
  712. var hiddenKeys$2 = hiddenKeys$4;
  713. var push$2 = uncurryThis$a([].push);
  714. var objectKeysInternal = function (object, names) {
  715. var O = toIndexedObject$2(object);
  716. var i = 0;
  717. var result = [];
  718. var key;
  719. for (key in O) !hasOwn$2(hiddenKeys$2, key) && hasOwn$2(O, key) && push$2(result, key);
  720. // Don't enum bug & hidden keys
  721. while (names.length > i) if (hasOwn$2(O, key = names[i++])) {
  722. ~indexOf(result, key) || push$2(result, key);
  723. }
  724. return result;
  725. };
  726. // IE8- don't enum bug keys
  727. var enumBugKeys$3 = [
  728. 'constructor',
  729. 'hasOwnProperty',
  730. 'isPrototypeOf',
  731. 'propertyIsEnumerable',
  732. 'toLocaleString',
  733. 'toString',
  734. 'valueOf'
  735. ];
  736. var internalObjectKeys$1 = objectKeysInternal;
  737. var enumBugKeys$2 = enumBugKeys$3;
  738. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  739. // `Object.getOwnPropertyNames` method
  740. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  741. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  742. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  743. return internalObjectKeys$1(O, hiddenKeys$1);
  744. };
  745. var objectGetOwnPropertySymbols = {};
  746. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  747. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  748. var getBuiltIn$2 = getBuiltIn$5;
  749. var uncurryThis$9 = functionUncurryThis;
  750. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  751. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  752. var anObject$4 = anObject$6;
  753. var concat$1 = uncurryThis$9([].concat);
  754. // all object keys, includes non-enumerable and symbols
  755. var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
  756. var keys = getOwnPropertyNamesModule.f(anObject$4(it));
  757. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  758. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  759. };
  760. var hasOwn$1 = hasOwnProperty_1;
  761. var ownKeys = ownKeys$1;
  762. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  763. var definePropertyModule$2 = objectDefineProperty;
  764. var copyConstructorProperties$1 = function (target, source, exceptions) {
  765. var keys = ownKeys(source);
  766. var defineProperty = definePropertyModule$2.f;
  767. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  768. for (var i = 0; i < keys.length; i++) {
  769. var key = keys[i];
  770. if (!hasOwn$1(target, key) && !(exceptions && hasOwn$1(exceptions, key))) {
  771. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  772. }
  773. }
  774. };
  775. var fails$9 = fails$h;
  776. var isCallable$2 = isCallable$c;
  777. var replacement = /#|\.prototype\./;
  778. var isForced$1 = function (feature, detection) {
  779. var value = data[normalize(feature)];
  780. return value == POLYFILL ? true
  781. : value == NATIVE ? false
  782. : isCallable$2(detection) ? fails$9(detection)
  783. : !!detection;
  784. };
  785. var normalize = isForced$1.normalize = function (string) {
  786. return String(string).replace(replacement, '.').toLowerCase();
  787. };
  788. var data = isForced$1.data = {};
  789. var NATIVE = isForced$1.NATIVE = 'N';
  790. var POLYFILL = isForced$1.POLYFILL = 'P';
  791. var isForced_1 = isForced$1;
  792. var global$2 = global$b;
  793. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  794. var createNonEnumerableProperty = createNonEnumerableProperty$2;
  795. var defineBuiltIn$2 = defineBuiltIn$3;
  796. var defineGlobalProperty = defineGlobalProperty$3;
  797. var copyConstructorProperties = copyConstructorProperties$1;
  798. var isForced = isForced_1;
  799. /*
  800. options.target - name of the target object
  801. options.global - target is the global object
  802. options.stat - export as static methods of target
  803. options.proto - export as prototype methods of target
  804. options.real - real prototype method for the `pure` version
  805. options.forced - export even if the native feature is available
  806. options.bind - bind methods to the target, required for the `pure` version
  807. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  808. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  809. options.sham - add a flag to not completely full polyfills
  810. options.enumerable - export as enumerable property
  811. options.dontCallGetSet - prevent calling a getter on target
  812. options.name - the .name of the function if it does not match the key
  813. */
  814. var _export = function (options, source) {
  815. var TARGET = options.target;
  816. var GLOBAL = options.global;
  817. var STATIC = options.stat;
  818. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  819. if (GLOBAL) {
  820. target = global$2;
  821. } else if (STATIC) {
  822. target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
  823. } else {
  824. target = (global$2[TARGET] || {}).prototype;
  825. }
  826. if (target) for (key in source) {
  827. sourceProperty = source[key];
  828. if (options.dontCallGetSet) {
  829. descriptor = getOwnPropertyDescriptor$1(target, key);
  830. targetProperty = descriptor && descriptor.value;
  831. } else targetProperty = target[key];
  832. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  833. // contained in target
  834. if (!FORCED && targetProperty !== undefined) {
  835. if (typeof sourceProperty == typeof targetProperty) continue;
  836. copyConstructorProperties(sourceProperty, targetProperty);
  837. }
  838. // add a flag to not completely full polyfills
  839. if (options.sham || (targetProperty && targetProperty.sham)) {
  840. createNonEnumerableProperty(sourceProperty, 'sham', true);
  841. }
  842. defineBuiltIn$2(target, key, sourceProperty, options);
  843. }
  844. };
  845. var uncurryThis$8 = functionUncurryThis;
  846. var aCallable$1 = aCallable$3;
  847. var NATIVE_BIND = functionBindNative;
  848. var bind$1 = uncurryThis$8(uncurryThis$8.bind);
  849. // optional / simple context binding
  850. var functionBindContext = function (fn, that) {
  851. aCallable$1(fn);
  852. return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
  853. return fn.apply(that, arguments);
  854. };
  855. };
  856. var classof$4 = classofRaw$2;
  857. // `IsArray` abstract operation
  858. // https://tc39.es/ecma262/#sec-isarray
  859. // eslint-disable-next-line es/no-array-isarray -- safe
  860. var isArray$4 = Array.isArray || function isArray(argument) {
  861. return classof$4(argument) == 'Array';
  862. };
  863. var wellKnownSymbol$6 = wellKnownSymbol$8;
  864. var TO_STRING_TAG$1 = wellKnownSymbol$6('toStringTag');
  865. var test$1 = {};
  866. test$1[TO_STRING_TAG$1] = 'z';
  867. var toStringTagSupport = String(test$1) === '[object z]';
  868. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  869. var isCallable$1 = isCallable$c;
  870. var classofRaw = classofRaw$2;
  871. var wellKnownSymbol$5 = wellKnownSymbol$8;
  872. var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
  873. var $Object = Object;
  874. // ES3 wrong here
  875. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  876. // fallback for IE11 Script Access Denied error
  877. var tryGet = function (it, key) {
  878. try {
  879. return it[key];
  880. } catch (error) { /* empty */ }
  881. };
  882. // getting tag from ES6+ `Object.prototype.toString`
  883. var classof$3 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  884. var O, tag, result;
  885. return it === undefined ? 'Undefined' : it === null ? 'Null'
  886. // @@toStringTag case
  887. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  888. // builtinTag case
  889. : CORRECT_ARGUMENTS ? classofRaw(O)
  890. // ES3 arguments fallback
  891. : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
  892. };
  893. var uncurryThis$7 = functionUncurryThis;
  894. var fails$8 = fails$h;
  895. var isCallable = isCallable$c;
  896. var classof$2 = classof$3;
  897. var getBuiltIn$1 = getBuiltIn$5;
  898. var inspectSource = inspectSource$2;
  899. var noop = function () { /* empty */ };
  900. var empty = [];
  901. var construct = getBuiltIn$1('Reflect', 'construct');
  902. var constructorRegExp = /^\s*(?:class|function)\b/;
  903. var exec = uncurryThis$7(constructorRegExp.exec);
  904. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  905. var isConstructorModern = function isConstructor(argument) {
  906. if (!isCallable(argument)) return false;
  907. try {
  908. construct(noop, empty, argument);
  909. return true;
  910. } catch (error) {
  911. return false;
  912. }
  913. };
  914. var isConstructorLegacy = function isConstructor(argument) {
  915. if (!isCallable(argument)) return false;
  916. switch (classof$2(argument)) {
  917. case 'AsyncFunction':
  918. case 'GeneratorFunction':
  919. case 'AsyncGeneratorFunction': return false;
  920. }
  921. try {
  922. // we can't check .prototype since constructors produced by .bind haven't it
  923. // `Function#toString` throws on some built-it function in some legacy engines
  924. // (for example, `DOMQuad` and similar in FF41-)
  925. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  926. } catch (error) {
  927. return true;
  928. }
  929. };
  930. isConstructorLegacy.sham = true;
  931. // `IsConstructor` abstract operation
  932. // https://tc39.es/ecma262/#sec-isconstructor
  933. var isConstructor$2 = !construct || fails$8(function () {
  934. var called;
  935. return isConstructorModern(isConstructorModern.call)
  936. || !isConstructorModern(Object)
  937. || !isConstructorModern(function () { called = true; })
  938. || called;
  939. }) ? isConstructorLegacy : isConstructorModern;
  940. var isArray$3 = isArray$4;
  941. var isConstructor$1 = isConstructor$2;
  942. var isObject$2 = isObject$8;
  943. var wellKnownSymbol$4 = wellKnownSymbol$8;
  944. var SPECIES$2 = wellKnownSymbol$4('species');
  945. var $Array$2 = Array;
  946. // a part of `ArraySpeciesCreate` abstract operation
  947. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  948. var arraySpeciesConstructor$1 = function (originalArray) {
  949. var C;
  950. if (isArray$3(originalArray)) {
  951. C = originalArray.constructor;
  952. // cross-realm fallback
  953. if (isConstructor$1(C) && (C === $Array$2 || isArray$3(C.prototype))) C = undefined;
  954. else if (isObject$2(C)) {
  955. C = C[SPECIES$2];
  956. if (C === null) C = undefined;
  957. }
  958. } return C === undefined ? $Array$2 : C;
  959. };
  960. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  961. // `ArraySpeciesCreate` abstract operation
  962. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  963. var arraySpeciesCreate$3 = function (originalArray, length) {
  964. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  965. };
  966. var bind = functionBindContext;
  967. var uncurryThis$6 = functionUncurryThis;
  968. var IndexedObject$1 = indexedObject;
  969. var toObject$4 = toObject$6;
  970. var lengthOfArrayLike$5 = lengthOfArrayLike$7;
  971. var arraySpeciesCreate$2 = arraySpeciesCreate$3;
  972. var push$1 = uncurryThis$6([].push);
  973. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  974. var createMethod$1 = function (TYPE) {
  975. var IS_MAP = TYPE == 1;
  976. var IS_FILTER = TYPE == 2;
  977. var IS_SOME = TYPE == 3;
  978. var IS_EVERY = TYPE == 4;
  979. var IS_FIND_INDEX = TYPE == 6;
  980. var IS_FILTER_REJECT = TYPE == 7;
  981. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  982. return function ($this, callbackfn, that, specificCreate) {
  983. var O = toObject$4($this);
  984. var self = IndexedObject$1(O);
  985. var boundFunction = bind(callbackfn, that);
  986. var length = lengthOfArrayLike$5(self);
  987. var index = 0;
  988. var create = specificCreate || arraySpeciesCreate$2;
  989. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  990. var value, result;
  991. for (;length > index; index++) if (NO_HOLES || index in self) {
  992. value = self[index];
  993. result = boundFunction(value, index, O);
  994. if (TYPE) {
  995. if (IS_MAP) target[index] = result; // map
  996. else if (result) switch (TYPE) {
  997. case 3: return true; // some
  998. case 5: return value; // find
  999. case 6: return index; // findIndex
  1000. case 2: push$1(target, value); // filter
  1001. } else switch (TYPE) {
  1002. case 4: return false; // every
  1003. case 7: push$1(target, value); // filterReject
  1004. }
  1005. }
  1006. }
  1007. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1008. };
  1009. };
  1010. var arrayIteration = {
  1011. // `Array.prototype.forEach` method
  1012. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1013. forEach: createMethod$1(0),
  1014. // `Array.prototype.map` method
  1015. // https://tc39.es/ecma262/#sec-array.prototype.map
  1016. map: createMethod$1(1),
  1017. // `Array.prototype.filter` method
  1018. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1019. filter: createMethod$1(2),
  1020. // `Array.prototype.some` method
  1021. // https://tc39.es/ecma262/#sec-array.prototype.some
  1022. some: createMethod$1(3),
  1023. // `Array.prototype.every` method
  1024. // https://tc39.es/ecma262/#sec-array.prototype.every
  1025. every: createMethod$1(4),
  1026. // `Array.prototype.find` method
  1027. // https://tc39.es/ecma262/#sec-array.prototype.find
  1028. find: createMethod$1(5),
  1029. // `Array.prototype.findIndex` method
  1030. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1031. findIndex: createMethod$1(6),
  1032. // `Array.prototype.filterReject` method
  1033. // https://github.com/tc39/proposal-array-filtering
  1034. filterReject: createMethod$1(7)
  1035. };
  1036. var objectDefineProperties = {};
  1037. var internalObjectKeys = objectKeysInternal;
  1038. var enumBugKeys$1 = enumBugKeys$3;
  1039. // `Object.keys` method
  1040. // https://tc39.es/ecma262/#sec-object.keys
  1041. // eslint-disable-next-line es/no-object-keys -- safe
  1042. var objectKeys$2 = Object.keys || function keys(O) {
  1043. return internalObjectKeys(O, enumBugKeys$1);
  1044. };
  1045. var DESCRIPTORS$2 = descriptors;
  1046. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1047. var definePropertyModule$1 = objectDefineProperty;
  1048. var anObject$3 = anObject$6;
  1049. var toIndexedObject$1 = toIndexedObject$5;
  1050. var objectKeys$1 = objectKeys$2;
  1051. // `Object.defineProperties` method
  1052. // https://tc39.es/ecma262/#sec-object.defineproperties
  1053. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1054. objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1055. anObject$3(O);
  1056. var props = toIndexedObject$1(Properties);
  1057. var keys = objectKeys$1(Properties);
  1058. var length = keys.length;
  1059. var index = 0;
  1060. var key;
  1061. while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
  1062. return O;
  1063. };
  1064. var getBuiltIn = getBuiltIn$5;
  1065. var html$1 = getBuiltIn('document', 'documentElement');
  1066. /* global ActiveXObject -- old IE, WSH */
  1067. var anObject$2 = anObject$6;
  1068. var definePropertiesModule = objectDefineProperties;
  1069. var enumBugKeys = enumBugKeys$3;
  1070. var hiddenKeys = hiddenKeys$4;
  1071. var html = html$1;
  1072. var documentCreateElement = documentCreateElement$1;
  1073. var sharedKey = sharedKey$2;
  1074. var GT = '>';
  1075. var LT = '<';
  1076. var PROTOTYPE = 'prototype';
  1077. var SCRIPT = 'script';
  1078. var IE_PROTO = sharedKey('IE_PROTO');
  1079. var EmptyConstructor = function () { /* empty */ };
  1080. var scriptTag = function (content) {
  1081. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1082. };
  1083. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1084. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1085. activeXDocument.write(scriptTag(''));
  1086. activeXDocument.close();
  1087. var temp = activeXDocument.parentWindow.Object;
  1088. activeXDocument = null; // avoid memory leak
  1089. return temp;
  1090. };
  1091. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1092. var NullProtoObjectViaIFrame = function () {
  1093. // Thrash, waste and sodomy: IE GC bug
  1094. var iframe = documentCreateElement('iframe');
  1095. var JS = 'java' + SCRIPT + ':';
  1096. var iframeDocument;
  1097. iframe.style.display = 'none';
  1098. html.appendChild(iframe);
  1099. // https://github.com/zloirock/core-js/issues/475
  1100. iframe.src = String(JS);
  1101. iframeDocument = iframe.contentWindow.document;
  1102. iframeDocument.open();
  1103. iframeDocument.write(scriptTag('document.F=Object'));
  1104. iframeDocument.close();
  1105. return iframeDocument.F;
  1106. };
  1107. // Check for document.domain and active x support
  1108. // No need to use active x approach when document.domain is not set
  1109. // see https://github.com/es-shims/es5-shim/issues/150
  1110. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1111. // avoid IE GC bug
  1112. var activeXDocument;
  1113. var NullProtoObject = function () {
  1114. try {
  1115. activeXDocument = new ActiveXObject('htmlfile');
  1116. } catch (error) { /* ignore */ }
  1117. NullProtoObject = typeof document != 'undefined'
  1118. ? document.domain && activeXDocument
  1119. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1120. : NullProtoObjectViaIFrame()
  1121. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1122. var length = enumBugKeys.length;
  1123. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1124. return NullProtoObject();
  1125. };
  1126. hiddenKeys[IE_PROTO] = true;
  1127. // `Object.create` method
  1128. // https://tc39.es/ecma262/#sec-object.create
  1129. // eslint-disable-next-line es/no-object-create -- safe
  1130. var objectCreate = Object.create || function create(O, Properties) {
  1131. var result;
  1132. if (O !== null) {
  1133. EmptyConstructor[PROTOTYPE] = anObject$2(O);
  1134. result = new EmptyConstructor();
  1135. EmptyConstructor[PROTOTYPE] = null;
  1136. // add "__proto__" for Object.getPrototypeOf polyfill
  1137. result[IE_PROTO] = O;
  1138. } else result = NullProtoObject();
  1139. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1140. };
  1141. var wellKnownSymbol$3 = wellKnownSymbol$8;
  1142. var create = objectCreate;
  1143. var defineProperty$1 = objectDefineProperty.f;
  1144. var UNSCOPABLES = wellKnownSymbol$3('unscopables');
  1145. var ArrayPrototype = Array.prototype;
  1146. // Array.prototype[@@unscopables]
  1147. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1148. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1149. defineProperty$1(ArrayPrototype, UNSCOPABLES, {
  1150. configurable: true,
  1151. value: create(null)
  1152. });
  1153. }
  1154. // add a key to Array.prototype[@@unscopables]
  1155. var addToUnscopables$2 = function (key) {
  1156. ArrayPrototype[UNSCOPABLES][key] = true;
  1157. };
  1158. var $$9 = _export;
  1159. var $find = arrayIteration.find;
  1160. var addToUnscopables$1 = addToUnscopables$2;
  1161. var FIND = 'find';
  1162. var SKIPS_HOLES = true;
  1163. // Shouldn't skip holes
  1164. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1165. // `Array.prototype.find` method
  1166. // https://tc39.es/ecma262/#sec-array.prototype.find
  1167. $$9({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1168. find: function find(callbackfn /* , that = undefined */) {
  1169. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1170. }
  1171. });
  1172. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1173. addToUnscopables$1(FIND);
  1174. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1175. var classof$1 = classof$3;
  1176. // `Object.prototype.toString` method implementation
  1177. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1178. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1179. return '[object ' + classof$1(this) + ']';
  1180. };
  1181. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1182. var defineBuiltIn$1 = defineBuiltIn$3;
  1183. var toString$4 = objectToString;
  1184. // `Object.prototype.toString` method
  1185. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1186. if (!TO_STRING_TAG_SUPPORT) {
  1187. defineBuiltIn$1(Object.prototype, 'toString', toString$4, { unsafe: true });
  1188. }
  1189. var fails$7 = fails$h;
  1190. var wellKnownSymbol$2 = wellKnownSymbol$8;
  1191. var V8_VERSION$1 = engineV8Version;
  1192. var SPECIES$1 = wellKnownSymbol$2('species');
  1193. var arrayMethodHasSpeciesSupport$4 = function (METHOD_NAME) {
  1194. // We can't use this feature detection in V8 since it causes
  1195. // deoptimization and serious performance degradation
  1196. // https://github.com/zloirock/core-js/issues/677
  1197. return V8_VERSION$1 >= 51 || !fails$7(function () {
  1198. var array = [];
  1199. var constructor = array.constructor = {};
  1200. constructor[SPECIES$1] = function () {
  1201. return { foo: 1 };
  1202. };
  1203. return array[METHOD_NAME](Boolean).foo !== 1;
  1204. });
  1205. };
  1206. var $$8 = _export;
  1207. var $map = arrayIteration.map;
  1208. var arrayMethodHasSpeciesSupport$3 = arrayMethodHasSpeciesSupport$4;
  1209. var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$3('map');
  1210. // `Array.prototype.map` method
  1211. // https://tc39.es/ecma262/#sec-array.prototype.map
  1212. // with adding support of @@species
  1213. $$8({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
  1214. map: function map(callbackfn /* , thisArg */) {
  1215. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1216. }
  1217. });
  1218. var tryToString = tryToString$2;
  1219. var $TypeError$2 = TypeError;
  1220. var deletePropertyOrThrow$2 = function (O, P) {
  1221. if (!delete O[P]) throw $TypeError$2('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  1222. };
  1223. var classof = classof$3;
  1224. var $String = String;
  1225. var toString$3 = function (argument) {
  1226. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1227. return $String(argument);
  1228. };
  1229. var toPropertyKey = toPropertyKey$3;
  1230. var definePropertyModule = objectDefineProperty;
  1231. var createPropertyDescriptor = createPropertyDescriptor$3;
  1232. var createProperty$4 = function (object, key, value) {
  1233. var propertyKey = toPropertyKey(key);
  1234. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  1235. else object[propertyKey] = value;
  1236. };
  1237. var toAbsoluteIndex$2 = toAbsoluteIndex$4;
  1238. var lengthOfArrayLike$4 = lengthOfArrayLike$7;
  1239. var createProperty$3 = createProperty$4;
  1240. var $Array$1 = Array;
  1241. var max$2 = Math.max;
  1242. var arraySliceSimple = function (O, start, end) {
  1243. var length = lengthOfArrayLike$4(O);
  1244. var k = toAbsoluteIndex$2(start, length);
  1245. var fin = toAbsoluteIndex$2(end === undefined ? length : end, length);
  1246. var result = $Array$1(max$2(fin - k, 0));
  1247. for (var n = 0; k < fin; k++, n++) createProperty$3(result, n, O[k]);
  1248. result.length = n;
  1249. return result;
  1250. };
  1251. var arraySlice$1 = arraySliceSimple;
  1252. var floor = Math.floor;
  1253. var mergeSort = function (array, comparefn) {
  1254. var length = array.length;
  1255. var middle = floor(length / 2);
  1256. return length < 8 ? insertionSort(array, comparefn) : merge(
  1257. array,
  1258. mergeSort(arraySlice$1(array, 0, middle), comparefn),
  1259. mergeSort(arraySlice$1(array, middle), comparefn),
  1260. comparefn
  1261. );
  1262. };
  1263. var insertionSort = function (array, comparefn) {
  1264. var length = array.length;
  1265. var i = 1;
  1266. var element, j;
  1267. while (i < length) {
  1268. j = i;
  1269. element = array[i];
  1270. while (j && comparefn(array[j - 1], element) > 0) {
  1271. array[j] = array[--j];
  1272. }
  1273. if (j !== i++) array[j] = element;
  1274. } return array;
  1275. };
  1276. var merge = function (array, left, right, comparefn) {
  1277. var llength = left.length;
  1278. var rlength = right.length;
  1279. var lindex = 0;
  1280. var rindex = 0;
  1281. while (lindex < llength || rindex < rlength) {
  1282. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  1283. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  1284. : lindex < llength ? left[lindex++] : right[rindex++];
  1285. } return array;
  1286. };
  1287. var arraySort = mergeSort;
  1288. var fails$6 = fails$h;
  1289. var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
  1290. var method = [][METHOD_NAME];
  1291. return !!method && fails$6(function () {
  1292. // eslint-disable-next-line no-useless-call -- required for testing
  1293. method.call(null, argument || function () { return 1; }, 1);
  1294. });
  1295. };
  1296. var userAgent$1 = engineUserAgent;
  1297. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  1298. var engineFfVersion = !!firefox && +firefox[1];
  1299. var UA = engineUserAgent;
  1300. var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
  1301. var userAgent = engineUserAgent;
  1302. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  1303. var engineWebkitVersion = !!webkit && +webkit[1];
  1304. var $$7 = _export;
  1305. var uncurryThis$5 = functionUncurryThis;
  1306. var aCallable = aCallable$3;
  1307. var toObject$3 = toObject$6;
  1308. var lengthOfArrayLike$3 = lengthOfArrayLike$7;
  1309. var deletePropertyOrThrow$1 = deletePropertyOrThrow$2;
  1310. var toString$2 = toString$3;
  1311. var fails$5 = fails$h;
  1312. var internalSort = arraySort;
  1313. var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
  1314. var FF = engineFfVersion;
  1315. var IE_OR_EDGE = engineIsIeOrEdge;
  1316. var V8 = engineV8Version;
  1317. var WEBKIT = engineWebkitVersion;
  1318. var test = [];
  1319. var nativeSort = uncurryThis$5(test.sort);
  1320. var push = uncurryThis$5(test.push);
  1321. // IE8-
  1322. var FAILS_ON_UNDEFINED = fails$5(function () {
  1323. test.sort(undefined);
  1324. });
  1325. // V8 bug
  1326. var FAILS_ON_NULL = fails$5(function () {
  1327. test.sort(null);
  1328. });
  1329. // Old WebKit
  1330. var STRICT_METHOD$1 = arrayMethodIsStrict$1('sort');
  1331. var STABLE_SORT = !fails$5(function () {
  1332. // feature detection can be too slow, so check engines versions
  1333. if (V8) return V8 < 70;
  1334. if (FF && FF > 3) return;
  1335. if (IE_OR_EDGE) return true;
  1336. if (WEBKIT) return WEBKIT < 603;
  1337. var result = '';
  1338. var code, chr, value, index;
  1339. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  1340. for (code = 65; code < 76; code++) {
  1341. chr = String.fromCharCode(code);
  1342. switch (code) {
  1343. case 66: case 69: case 70: case 72: value = 3; break;
  1344. case 68: case 71: value = 4; break;
  1345. default: value = 2;
  1346. }
  1347. for (index = 0; index < 47; index++) {
  1348. test.push({ k: chr + index, v: value });
  1349. }
  1350. }
  1351. test.sort(function (a, b) { return b.v - a.v; });
  1352. for (index = 0; index < test.length; index++) {
  1353. chr = test[index].k.charAt(0);
  1354. if (result.charAt(result.length - 1) !== chr) result += chr;
  1355. }
  1356. return result !== 'DGBEFHACIJK';
  1357. });
  1358. var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT;
  1359. var getSortCompare = function (comparefn) {
  1360. return function (x, y) {
  1361. if (y === undefined) return -1;
  1362. if (x === undefined) return 1;
  1363. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  1364. return toString$2(x) > toString$2(y) ? 1 : -1;
  1365. };
  1366. };
  1367. // `Array.prototype.sort` method
  1368. // https://tc39.es/ecma262/#sec-array.prototype.sort
  1369. $$7({ target: 'Array', proto: true, forced: FORCED$2 }, {
  1370. sort: function sort(comparefn) {
  1371. if (comparefn !== undefined) aCallable(comparefn);
  1372. var array = toObject$3(this);
  1373. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  1374. var items = [];
  1375. var arrayLength = lengthOfArrayLike$3(array);
  1376. var itemsLength, index;
  1377. for (index = 0; index < arrayLength; index++) {
  1378. if (index in array) push(items, array[index]);
  1379. }
  1380. internalSort(items, getSortCompare(comparefn));
  1381. itemsLength = lengthOfArrayLike$3(items);
  1382. index = 0;
  1383. while (index < itemsLength) array[index] = items[index++];
  1384. while (index < arrayLength) deletePropertyOrThrow$1(array, index++);
  1385. return array;
  1386. }
  1387. });
  1388. var $TypeError$1 = TypeError;
  1389. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1390. var doesNotExceedSafeInteger$2 = function (it) {
  1391. if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
  1392. return it;
  1393. };
  1394. var $$6 = _export;
  1395. var fails$4 = fails$h;
  1396. var isArray$2 = isArray$4;
  1397. var isObject$1 = isObject$8;
  1398. var toObject$2 = toObject$6;
  1399. var lengthOfArrayLike$2 = lengthOfArrayLike$7;
  1400. var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$2;
  1401. var createProperty$2 = createProperty$4;
  1402. var arraySpeciesCreate$1 = arraySpeciesCreate$3;
  1403. var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$4;
  1404. var wellKnownSymbol$1 = wellKnownSymbol$8;
  1405. var V8_VERSION = engineV8Version;
  1406. var IS_CONCAT_SPREADABLE = wellKnownSymbol$1('isConcatSpreadable');
  1407. // We can't use this feature detection in V8 since it causes
  1408. // deoptimization and serious performance degradation
  1409. // https://github.com/zloirock/core-js/issues/679
  1410. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$4(function () {
  1411. var array = [];
  1412. array[IS_CONCAT_SPREADABLE] = false;
  1413. return array.concat()[0] !== array;
  1414. });
  1415. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$2('concat');
  1416. var isConcatSpreadable = function (O) {
  1417. if (!isObject$1(O)) return false;
  1418. var spreadable = O[IS_CONCAT_SPREADABLE];
  1419. return spreadable !== undefined ? !!spreadable : isArray$2(O);
  1420. };
  1421. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1422. // `Array.prototype.concat` method
  1423. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1424. // with adding support of @@isConcatSpreadable and @@species
  1425. $$6({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
  1426. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1427. concat: function concat(arg) {
  1428. var O = toObject$2(this);
  1429. var A = arraySpeciesCreate$1(O, 0);
  1430. var n = 0;
  1431. var i, k, length, len, E;
  1432. for (i = -1, length = arguments.length; i < length; i++) {
  1433. E = i === -1 ? O : arguments[i];
  1434. if (isConcatSpreadable(E)) {
  1435. len = lengthOfArrayLike$2(E);
  1436. doesNotExceedSafeInteger$1(n + len);
  1437. for (k = 0; k < len; k++, n++) if (k in E) createProperty$2(A, n, E[k]);
  1438. } else {
  1439. doesNotExceedSafeInteger$1(n + 1);
  1440. createProperty$2(A, n++, E);
  1441. }
  1442. }
  1443. A.length = n;
  1444. return A;
  1445. }
  1446. });
  1447. var $$5 = _export;
  1448. var $includes = arrayIncludes.includes;
  1449. var fails$3 = fails$h;
  1450. var addToUnscopables = addToUnscopables$2;
  1451. // FF99+ bug
  1452. var BROKEN_ON_SPARSE = fails$3(function () {
  1453. return !Array(1).includes();
  1454. });
  1455. // `Array.prototype.includes` method
  1456. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1457. $$5({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1458. includes: function includes(el /* , fromIndex = 0 */) {
  1459. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1460. }
  1461. });
  1462. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1463. addToUnscopables('includes');
  1464. var DESCRIPTORS$1 = descriptors;
  1465. var uncurryThis$4 = functionUncurryThis;
  1466. var call$1 = functionCall;
  1467. var fails$2 = fails$h;
  1468. var objectKeys = objectKeys$2;
  1469. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1470. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1471. var toObject$1 = toObject$6;
  1472. var IndexedObject = indexedObject;
  1473. // eslint-disable-next-line es/no-object-assign -- safe
  1474. var $assign = Object.assign;
  1475. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1476. var defineProperty = Object.defineProperty;
  1477. var concat = uncurryThis$4([].concat);
  1478. // `Object.assign` method
  1479. // https://tc39.es/ecma262/#sec-object.assign
  1480. var objectAssign = !$assign || fails$2(function () {
  1481. // should have correct order of operations (Edge bug)
  1482. if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1483. enumerable: true,
  1484. get: function () {
  1485. defineProperty(this, 'b', {
  1486. value: 3,
  1487. enumerable: false
  1488. });
  1489. }
  1490. }), { b: 2 })).b !== 1) return true;
  1491. // should work with symbols and should have deterministic property order (V8 bug)
  1492. var A = {};
  1493. var B = {};
  1494. // eslint-disable-next-line es/no-symbol -- safe
  1495. var symbol = Symbol();
  1496. var alphabet = 'abcdefghijklmnopqrst';
  1497. A[symbol] = 7;
  1498. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1499. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  1500. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1501. var T = toObject$1(target);
  1502. var argumentsLength = arguments.length;
  1503. var index = 1;
  1504. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1505. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1506. while (argumentsLength > index) {
  1507. var S = IndexedObject(arguments[index++]);
  1508. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1509. var length = keys.length;
  1510. var j = 0;
  1511. var key;
  1512. while (length > j) {
  1513. key = keys[j++];
  1514. if (!DESCRIPTORS$1 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
  1515. }
  1516. } return T;
  1517. } : $assign;
  1518. var $$4 = _export;
  1519. var assign = objectAssign;
  1520. // `Object.assign` method
  1521. // https://tc39.es/ecma262/#sec-object.assign
  1522. // eslint-disable-next-line es/no-object-assign -- required for testing
  1523. $$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1524. assign: assign
  1525. });
  1526. var uncurryThis$3 = functionUncurryThis;
  1527. var arraySlice = uncurryThis$3([].slice);
  1528. var $$3 = _export;
  1529. var isArray$1 = isArray$4;
  1530. var isConstructor = isConstructor$2;
  1531. var isObject = isObject$8;
  1532. var toAbsoluteIndex$1 = toAbsoluteIndex$4;
  1533. var lengthOfArrayLike$1 = lengthOfArrayLike$7;
  1534. var toIndexedObject = toIndexedObject$5;
  1535. var createProperty$1 = createProperty$4;
  1536. var wellKnownSymbol = wellKnownSymbol$8;
  1537. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$4;
  1538. var nativeSlice = arraySlice;
  1539. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('slice');
  1540. var SPECIES = wellKnownSymbol('species');
  1541. var $Array = Array;
  1542. var max$1 = Math.max;
  1543. // `Array.prototype.slice` method
  1544. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1545. // fallback for not array-like ES3 strings and DOM objects
  1546. $$3({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1547. slice: function slice(start, end) {
  1548. var O = toIndexedObject(this);
  1549. var length = lengthOfArrayLike$1(O);
  1550. var k = toAbsoluteIndex$1(start, length);
  1551. var fin = toAbsoluteIndex$1(end === undefined ? length : end, length);
  1552. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1553. var Constructor, result, n;
  1554. if (isArray$1(O)) {
  1555. Constructor = O.constructor;
  1556. // cross-realm fallback
  1557. if (isConstructor(Constructor) && (Constructor === $Array || isArray$1(Constructor.prototype))) {
  1558. Constructor = undefined;
  1559. } else if (isObject(Constructor)) {
  1560. Constructor = Constructor[SPECIES];
  1561. if (Constructor === null) Constructor = undefined;
  1562. }
  1563. if (Constructor === $Array || Constructor === undefined) {
  1564. return nativeSlice(O, k, fin);
  1565. }
  1566. }
  1567. result = new (Constructor === undefined ? $Array : Constructor)(max$1(fin - k, 0));
  1568. for (n = 0; k < fin; k++, n++) if (k in O) createProperty$1(result, n, O[k]);
  1569. result.length = n;
  1570. return result;
  1571. }
  1572. });
  1573. var DESCRIPTORS = descriptors;
  1574. var isArray = isArray$4;
  1575. var $TypeError = TypeError;
  1576. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  1577. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1578. // Safari < 13 does not throw an error in this case
  1579. var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
  1580. // makes no sense without proper strict mode support
  1581. if (this !== undefined) return true;
  1582. try {
  1583. // eslint-disable-next-line es/no-object-defineproperty -- safe
  1584. Object.defineProperty([], 'length', { writable: false }).length = 1;
  1585. } catch (error) {
  1586. return error instanceof TypeError;
  1587. }
  1588. }();
  1589. var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
  1590. if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
  1591. throw $TypeError('Cannot set read only .length');
  1592. } return O.length = length;
  1593. } : function (O, length) {
  1594. return O.length = length;
  1595. };
  1596. var $$2 = _export;
  1597. var toObject = toObject$6;
  1598. var toAbsoluteIndex = toAbsoluteIndex$4;
  1599. var toIntegerOrInfinity = toIntegerOrInfinity$3;
  1600. var lengthOfArrayLike = lengthOfArrayLike$7;
  1601. var setArrayLength = arraySetLength;
  1602. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$2;
  1603. var arraySpeciesCreate = arraySpeciesCreate$3;
  1604. var createProperty = createProperty$4;
  1605. var deletePropertyOrThrow = deletePropertyOrThrow$2;
  1606. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$4;
  1607. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  1608. var max = Math.max;
  1609. var min = Math.min;
  1610. // `Array.prototype.splice` method
  1611. // https://tc39.es/ecma262/#sec-array.prototype.splice
  1612. // with adding support of @@species
  1613. $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1614. splice: function splice(start, deleteCount /* , ...items */) {
  1615. var O = toObject(this);
  1616. var len = lengthOfArrayLike(O);
  1617. var actualStart = toAbsoluteIndex(start, len);
  1618. var argumentsLength = arguments.length;
  1619. var insertCount, actualDeleteCount, A, k, from, to;
  1620. if (argumentsLength === 0) {
  1621. insertCount = actualDeleteCount = 0;
  1622. } else if (argumentsLength === 1) {
  1623. insertCount = 0;
  1624. actualDeleteCount = len - actualStart;
  1625. } else {
  1626. insertCount = argumentsLength - 2;
  1627. actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
  1628. }
  1629. doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
  1630. A = arraySpeciesCreate(O, actualDeleteCount);
  1631. for (k = 0; k < actualDeleteCount; k++) {
  1632. from = actualStart + k;
  1633. if (from in O) createProperty(A, k, O[from]);
  1634. }
  1635. A.length = actualDeleteCount;
  1636. if (insertCount < actualDeleteCount) {
  1637. for (k = actualStart; k < len - actualDeleteCount; k++) {
  1638. from = k + actualDeleteCount;
  1639. to = k + insertCount;
  1640. if (from in O) O[to] = O[from];
  1641. else deletePropertyOrThrow(O, to);
  1642. }
  1643. for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
  1644. } else if (insertCount > actualDeleteCount) {
  1645. for (k = len - actualDeleteCount; k > actualStart; k--) {
  1646. from = k + actualDeleteCount - 1;
  1647. to = k + insertCount - 1;
  1648. if (from in O) O[to] = O[from];
  1649. else deletePropertyOrThrow(O, to);
  1650. }
  1651. }
  1652. for (k = 0; k < insertCount; k++) {
  1653. O[k + actualStart] = arguments[k + 2];
  1654. }
  1655. setArrayLength(O, len - actualDeleteCount + insertCount);
  1656. return A;
  1657. }
  1658. });
  1659. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1660. var $$1 = _export;
  1661. var uncurryThis$2 = functionUncurryThis;
  1662. var $indexOf = arrayIncludes.indexOf;
  1663. var arrayMethodIsStrict = arrayMethodIsStrict$2;
  1664. var nativeIndexOf = uncurryThis$2([].indexOf);
  1665. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  1666. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  1667. // `Array.prototype.indexOf` method
  1668. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1669. $$1({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  1670. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1671. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1672. return NEGATIVE_ZERO
  1673. // convert -0 to +0
  1674. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  1675. : $indexOf(this, searchElement, fromIndex);
  1676. }
  1677. });
  1678. // a string of all valid unicode whitespaces
  1679. var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1680. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1681. var uncurryThis$1 = functionUncurryThis;
  1682. var requireObjectCoercible = requireObjectCoercible$3;
  1683. var toString$1 = toString$3;
  1684. var whitespaces$1 = whitespaces$2;
  1685. var replace = uncurryThis$1(''.replace);
  1686. var whitespace = '[' + whitespaces$1 + ']';
  1687. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  1688. var rtrim = RegExp(whitespace + whitespace + '*$');
  1689. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1690. var createMethod = function (TYPE) {
  1691. return function ($this) {
  1692. var string = toString$1(requireObjectCoercible($this));
  1693. if (TYPE & 1) string = replace(string, ltrim, '');
  1694. if (TYPE & 2) string = replace(string, rtrim, '');
  1695. return string;
  1696. };
  1697. };
  1698. var stringTrim = {
  1699. // `String.prototype.{ trimLeft, trimStart }` methods
  1700. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1701. start: createMethod(1),
  1702. // `String.prototype.{ trimRight, trimEnd }` methods
  1703. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1704. end: createMethod(2),
  1705. // `String.prototype.trim` method
  1706. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1707. trim: createMethod(3)
  1708. };
  1709. var global$1 = global$b;
  1710. var fails$1 = fails$h;
  1711. var uncurryThis = functionUncurryThis;
  1712. var toString = toString$3;
  1713. var trim = stringTrim.trim;
  1714. var whitespaces = whitespaces$2;
  1715. var charAt = uncurryThis(''.charAt);
  1716. var $parseFloat$1 = global$1.parseFloat;
  1717. var Symbol$1 = global$1.Symbol;
  1718. var ITERATOR = Symbol$1 && Symbol$1.iterator;
  1719. var FORCED = 1 / $parseFloat$1(whitespaces + '-0') !== -Infinity
  1720. // MS Edge 18- broken with boxed symbols
  1721. || (ITERATOR && !fails$1(function () { $parseFloat$1(Object(ITERATOR)); }));
  1722. // `parseFloat` method
  1723. // https://tc39.es/ecma262/#sec-parsefloat-string
  1724. var numberParseFloat = FORCED ? function parseFloat(string) {
  1725. var trimmedString = trim(toString(string));
  1726. var result = $parseFloat$1(trimmedString);
  1727. return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;
  1728. } : $parseFloat$1;
  1729. var $ = _export;
  1730. var $parseFloat = numberParseFloat;
  1731. // `parseFloat` method
  1732. // https://tc39.es/ecma262/#sec-parsefloat-string
  1733. $({ global: true, forced: parseFloat != $parseFloat }, {
  1734. parseFloat: $parseFloat
  1735. });
  1736. var anObject$1 = anObject$6;
  1737. // `RegExp.prototype.flags` getter implementation
  1738. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1739. var regexpFlags = function () {
  1740. var that = anObject$1(this);
  1741. var result = '';
  1742. if (that.hasIndices) result += 'd';
  1743. if (that.global) result += 'g';
  1744. if (that.ignoreCase) result += 'i';
  1745. if (that.multiline) result += 'm';
  1746. if (that.dotAll) result += 's';
  1747. if (that.unicode) result += 'u';
  1748. if (that.unicodeSets) result += 'v';
  1749. if (that.sticky) result += 'y';
  1750. return result;
  1751. };
  1752. var call = functionCall;
  1753. var hasOwn = hasOwnProperty_1;
  1754. var isPrototypeOf = objectIsPrototypeOf;
  1755. var regExpFlags = regexpFlags;
  1756. var RegExpPrototype$1 = RegExp.prototype;
  1757. var regexpGetFlags = function (R) {
  1758. var flags = R.flags;
  1759. return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
  1760. ? call(regExpFlags, R) : flags;
  1761. };
  1762. var PROPER_FUNCTION_NAME = functionName.PROPER;
  1763. var defineBuiltIn = defineBuiltIn$3;
  1764. var anObject = anObject$6;
  1765. var $toString = toString$3;
  1766. var fails = fails$h;
  1767. var getRegExpFlags = regexpGetFlags;
  1768. var TO_STRING = 'toString';
  1769. var RegExpPrototype = RegExp.prototype;
  1770. var nativeToString = RegExpPrototype[TO_STRING];
  1771. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  1772. // FF44- RegExp#toString has a wrong name
  1773. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
  1774. // `RegExp.prototype.toString` method
  1775. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  1776. if (NOT_GENERIC || INCORRECT_NAME) {
  1777. defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
  1778. var R = anObject(this);
  1779. var pattern = $toString(R.source);
  1780. var flags = $toString(getRegExpFlags(R));
  1781. return '/' + pattern + '/' + flags;
  1782. }, { unsafe: true });
  1783. }
  1784. /**
  1785. * @author Nadim Basalamah <dimbslmh@gmail.com>
  1786. * @version: v1.1.0
  1787. * https://github.com/dimbslmh/bootstrap-table/tree/master/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js
  1788. * Modification: ErwannNevou <https://github.com/ErwannNevou>
  1789. */
  1790. var isSingleSort = false;
  1791. var Utils = $__default["default"].fn.bootstrapTable.utils;
  1792. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  1793. plus: {
  1794. bootstrap3: 'glyphicon-plus',
  1795. bootstrap4: 'fa-plus',
  1796. bootstrap5: 'bi-plus',
  1797. semantic: 'fa-plus',
  1798. materialize: 'plus',
  1799. foundation: 'fa-plus',
  1800. bulma: 'fa-plus',
  1801. 'bootstrap-table': 'icon-plus'
  1802. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-clock',
  1803. minus: {
  1804. bootstrap3: 'glyphicon-minus',
  1805. bootstrap4: 'fa-minus',
  1806. bootstrap5: 'bi-dash',
  1807. semantic: 'fa-minus',
  1808. materialize: 'minus',
  1809. foundation: 'fa-minus',
  1810. bulma: 'fa-minus',
  1811. 'bootstrap-table': 'icon-minus'
  1812. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-clock',
  1813. sort: {
  1814. bootstrap3: 'glyphicon-sort',
  1815. bootstrap4: 'fa-sort',
  1816. bootstrap5: 'bi-arrow-down-up',
  1817. semantic: 'fa-sort',
  1818. materialize: 'sort',
  1819. foundation: 'fa-sort',
  1820. bulma: 'fa-sort',
  1821. 'bootstrap-table': 'icon-sort-amount-asc'
  1822. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-clock'
  1823. });
  1824. var theme = {
  1825. bootstrap3: {
  1826. html: {
  1827. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" id=\"%sLabel\">%s</h4>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\">\n <button id=\"add\" type=\"button\" class=\"btn btn-default\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-default\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1828. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1829. multipleSortSelect: '<select class="%s %s form-control">'
  1830. }
  1831. },
  1832. bootstrap4: {
  1833. html: {
  1834. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1835. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1836. multipleSortSelect: '<select class="%s %s form-control">'
  1837. }
  1838. },
  1839. bootstrap5: {
  1840. html: {
  1841. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1842. multipleSortButton: '<button class="multi-sort %s" type="button" data-bs-toggle="modal" data-bs-target="#%s" title="%s">%s</button>',
  1843. multipleSortSelect: '<select class="%s %s form-control">'
  1844. }
  1845. },
  1846. semantic: {
  1847. html: {
  1848. multipleSortModal: "\n <div class=\"ui modal tiny\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <i class=\"close icon\"></i>\n <div class=\"header\" id=\"%sLabel\">\n %s\n </div>\n <div class=\"image content\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"ui button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"ui button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <div class=\"ui button deny\">%s</div>\n <div class=\"ui button approve multi-sort-order-button\">%s</div>\n </div>\n </div>\n ",
  1849. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1850. multipleSortSelect: '<select class="%s %s">'
  1851. }
  1852. },
  1853. materialize: {
  1854. html: {
  1855. multipleSortModal: "\n <div id=\"%s\" class=\"modal\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-content\" id=\"%sLabel\">\n <h4>%s</h4>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn\">%s</a>\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn multi-sort-order-button\">%s</a>\n </div>\n </div>\n </div>\n ",
  1856. multipleSortButton: '<a class="multi-sort %s modal-trigger" href="#%s" type="button" data-toggle="modal" title="%s">%s</a>',
  1857. multipleSortSelect: '<select class="%s %s browser-default">'
  1858. }
  1859. },
  1860. foundation: {
  1861. html: {
  1862. multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
  1863. multipleSortButton: '<button class="multi-sort %s" data-open="%s" title="%s">%s</button>',
  1864. multipleSortSelect: '<select class="%s %s browser-default">'
  1865. }
  1866. },
  1867. bulma: {
  1868. html: {
  1869. multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type=\"button\" class=\"waves-effect waves-light button\" data-close>%s</button>\n <button type=\"button\" class=\"waves-effect waves-light button multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n ",
  1870. multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
  1871. multipleSortSelect: '<select class="%s %s browser-default">'
  1872. }
  1873. },
  1874. 'bootstrap-table': {
  1875. html: {
  1876. multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1877. multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
  1878. multipleSortSelect: '<select class="%s %s browser-default">'
  1879. }
  1880. }
  1881. }[$__default["default"].fn.bootstrapTable.theme];
  1882. var showSortModal = function showSortModal(that) {
  1883. var _selector = that.sortModalSelector;
  1884. var _id = "#".concat(_selector);
  1885. var o = that.options;
  1886. if (!$__default["default"](_id).hasClass('modal')) {
  1887. var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
  1888. $__default["default"]('body').append($__default["default"](sModal));
  1889. that.$sortModal = $__default["default"](_id);
  1890. var $rows = that.$sortModal.find('tbody > tr');
  1891. that.$sortModal.off('click', '#add').on('click', '#add', function () {
  1892. var total = that.$sortModal.find('.multi-sort-name:first option').length;
  1893. var current = that.$sortModal.find('tbody tr').length;
  1894. if (current < total) {
  1895. current++;
  1896. that.addLevel();
  1897. that.setButtonStates();
  1898. }
  1899. });
  1900. that.$sortModal.off('click', '#delete').on('click', '#delete', function () {
  1901. var total = that.$sortModal.find('.multi-sort-name:first option').length;
  1902. var current = that.$sortModal.find('tbody tr').length;
  1903. if (current > 1 && current <= total) {
  1904. current--;
  1905. that.$sortModal.find('tbody tr:last').remove();
  1906. that.setButtonStates();
  1907. }
  1908. });
  1909. that.$sortModal.off('click', '.multi-sort-order-button').on('click', '.multi-sort-order-button', function () {
  1910. var $rows = that.$sortModal.find('tbody > tr');
  1911. var $alert = that.$sortModal.find('div.alert');
  1912. var fields = [];
  1913. var results = [];
  1914. var sortPriority = $__default["default"].map($rows, function (row) {
  1915. var $row = $__default["default"](row);
  1916. var name = $row.find('.multi-sort-name').val();
  1917. var order = $row.find('.multi-sort-order').val();
  1918. fields.push(name);
  1919. return {
  1920. sortName: name,
  1921. sortOrder: order
  1922. };
  1923. });
  1924. var sorted_fields = fields.sort();
  1925. for (var i = 0; i < fields.length - 1; i++) {
  1926. if (sorted_fields[i + 1] === sorted_fields[i]) {
  1927. results.push(sorted_fields[i]);
  1928. }
  1929. }
  1930. if (results.length > 0) {
  1931. if ($alert.length === 0) {
  1932. $alert = "<div class=\"alert alert-danger\" role=\"alert\"><strong>".concat(that.options.formatDuplicateAlertTitle(), "</strong> ").concat(that.options.formatDuplicateAlertDescription(), "</div>");
  1933. $__default["default"]($alert).insertBefore(that.$sortModal.find('.bars'));
  1934. }
  1935. } else {
  1936. if ($alert.length === 1) {
  1937. $__default["default"]($alert).remove();
  1938. }
  1939. if (['bootstrap3', 'bootstrap4', 'bootstrap5'].includes($__default["default"].fn.bootstrapTable.theme)) {
  1940. that.$sortModal.modal('hide');
  1941. }
  1942. that.multiSort(sortPriority);
  1943. }
  1944. });
  1945. if (that.options.sortPriority === null || that.options.sortPriority.length === 0) {
  1946. if (that.options.sortName) {
  1947. that.options.sortPriority = [{
  1948. sortName: that.options.sortName,
  1949. sortOrder: that.options.sortOrder
  1950. }];
  1951. }
  1952. }
  1953. if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
  1954. if ($rows.length < that.options.sortPriority.length && _typeof(that.options.sortPriority) === 'object') {
  1955. for (var i = 0; i < that.options.sortPriority.length; i++) {
  1956. that.addLevel(i, that.options.sortPriority[i]);
  1957. }
  1958. }
  1959. } else {
  1960. that.addLevel(0);
  1961. }
  1962. that.setButtonStates();
  1963. }
  1964. };
  1965. $__default["default"].fn.bootstrapTable.methods.push('multipleSort');
  1966. $__default["default"].fn.bootstrapTable.methods.push('multiSort');
  1967. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1968. showMultiSort: false,
  1969. showMultiSortButton: true,
  1970. multiSortStrictSort: false,
  1971. sortPriority: null,
  1972. onMultipleSort: function onMultipleSort() {
  1973. return false;
  1974. }
  1975. });
  1976. $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
  1977. 'multiple-sort.bs.table': 'onMultipleSort'
  1978. });
  1979. $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
  1980. formatMultipleSort: function formatMultipleSort() {
  1981. return 'Multiple Sort';
  1982. },
  1983. formatAddLevel: function formatAddLevel() {
  1984. return 'Add Level';
  1985. },
  1986. formatDeleteLevel: function formatDeleteLevel() {
  1987. return 'Delete Level';
  1988. },
  1989. formatColumn: function formatColumn() {
  1990. return 'Column';
  1991. },
  1992. formatOrder: function formatOrder() {
  1993. return 'Order';
  1994. },
  1995. formatSortBy: function formatSortBy() {
  1996. return 'Sort by';
  1997. },
  1998. formatThenBy: function formatThenBy() {
  1999. return 'Then by';
  2000. },
  2001. formatSort: function formatSort() {
  2002. return 'Sort';
  2003. },
  2004. formatCancel: function formatCancel() {
  2005. return 'Cancel';
  2006. },
  2007. formatDuplicateAlertTitle: function formatDuplicateAlertTitle() {
  2008. return 'Duplicate(s) detected!';
  2009. },
  2010. formatDuplicateAlertDescription: function formatDuplicateAlertDescription() {
  2011. return 'Please remove or change any duplicate column.';
  2012. },
  2013. formatSortOrders: function formatSortOrders() {
  2014. return {
  2015. asc: 'Ascending',
  2016. desc: 'Descending'
  2017. };
  2018. }
  2019. });
  2020. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
  2021. var BootstrapTable = $__default["default"].fn.bootstrapTable.Constructor;
  2022. var _initToolbar = BootstrapTable.prototype.initToolbar;
  2023. var _destroy = BootstrapTable.prototype.destroy;
  2024. BootstrapTable.prototype.initToolbar = function () {
  2025. var _this = this;
  2026. this.showToolbar = this.showToolbar || this.options.showMultiSort;
  2027. var that = this;
  2028. var sortModalSelector = "sortModal_".concat(this.$el.attr('id'));
  2029. var sortModalId = "#".concat(sortModalSelector);
  2030. var $multiSortBtn = this.$toolbar.find('div.multi-sort');
  2031. var o = this.options;
  2032. this.$sortModal = $__default["default"](sortModalId);
  2033. this.sortModalSelector = sortModalSelector;
  2034. if (that.options.sortPriority !== null) {
  2035. that.onMultipleSort();
  2036. }
  2037. if (this.options.showMultiSort && this.options.showMultiSortButton) {
  2038. this.buttons = Object.assign(this.buttons, {
  2039. multipleSort: {
  2040. html: Utils.sprintf(theme.html.multipleSortButton, that.constants.buttonsClass, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort))
  2041. }
  2042. });
  2043. }
  2044. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2045. args[_key] = arguments[_key];
  2046. }
  2047. _initToolbar.apply(this, Array.prototype.slice.apply(args));
  2048. if (that.options.sidePagination === 'server' && !isSingleSort && that.options.sortPriority !== null) {
  2049. var t = that.options.queryParams;
  2050. that.options.queryParams = function (params) {
  2051. params.multiSort = that.options.sortPriority;
  2052. return t(params);
  2053. };
  2054. }
  2055. if (this.options.showMultiSort) {
  2056. if (!$multiSortBtn.length && this.options.showMultiSortButton) {
  2057. if ($__default["default"].fn.bootstrapTable.theme === 'semantic') {
  2058. this.$toolbar.find('.multi-sort').on('click', function () {
  2059. $__default["default"](sortModalId).modal('show');
  2060. });
  2061. } else if ($__default["default"].fn.bootstrapTable.theme === 'materialize') {
  2062. this.$toolbar.find('.multi-sort').on('click', function () {
  2063. $__default["default"](sortModalId).modal();
  2064. });
  2065. } else if ($__default["default"].fn.bootstrapTable.theme === 'bootstrap-table') {
  2066. this.$toolbar.find('.multi-sort').on('click', function () {
  2067. $__default["default"](sortModalId).addClass('show');
  2068. });
  2069. } else if ($__default["default"].fn.bootstrapTable.theme === 'foundation') {
  2070. this.$toolbar.find('.multi-sort').on('click', function () {
  2071. if (!_this.foundationModal) {
  2072. // eslint-disable-next-line no-undef
  2073. _this.foundationModal = new Foundation.Reveal($__default["default"](sortModalId));
  2074. }
  2075. _this.foundationModal.open();
  2076. });
  2077. } else if ($__default["default"].fn.bootstrapTable.theme === 'bulma') {
  2078. this.$toolbar.find('.multi-sort').on('click', function () {
  2079. $__default["default"]('html').toggleClass('is-clipped');
  2080. $__default["default"](sortModalId).toggleClass('is-active');
  2081. $__default["default"]('button[data-close]').one('click', function () {
  2082. $__default["default"]('html').toggleClass('is-clipped');
  2083. $__default["default"](sortModalId).toggleClass('is-active');
  2084. });
  2085. });
  2086. }
  2087. showSortModal(that);
  2088. }
  2089. this.$el.on('sort.bs.table', function () {
  2090. isSingleSort = true;
  2091. });
  2092. this.$el.on('multiple-sort.bs.table', function () {
  2093. isSingleSort = false;
  2094. });
  2095. this.$el.on('load-success.bs.table', function () {
  2096. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
  2097. that.onMultipleSort();
  2098. }
  2099. });
  2100. this.$el.on('column-switch.bs.table', function (field, checked) {
  2101. if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
  2102. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2103. if (that.options.sortPriority[i].sortName === checked) {
  2104. that.options.sortPriority.splice(i, 1);
  2105. }
  2106. }
  2107. that.assignSortableArrows();
  2108. }
  2109. that.$sortModal.remove();
  2110. showSortModal(that);
  2111. });
  2112. this.$el.on('reset-view.bs.table', function () {
  2113. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object') {
  2114. that.assignSortableArrows();
  2115. }
  2116. });
  2117. }
  2118. };
  2119. BootstrapTable.prototype.destroy = function () {
  2120. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2121. args[_key2] = arguments[_key2];
  2122. }
  2123. _destroy.apply(this, Array.prototype.slice.apply(args));
  2124. if (this.options.showMultiSort) {
  2125. this.enableCustomSort = false;
  2126. this.$sortModal.remove();
  2127. }
  2128. };
  2129. BootstrapTable.prototype.multipleSort = function () {
  2130. var that = this;
  2131. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
  2132. that.onMultipleSort();
  2133. }
  2134. };
  2135. BootstrapTable.prototype.onMultipleSort = function () {
  2136. var that = this;
  2137. var cmp = function cmp(x, y) {
  2138. return x > y ? 1 : x < y ? -1 : 0;
  2139. };
  2140. var arrayCmp = function arrayCmp(a, b) {
  2141. var arr1 = [];
  2142. var arr2 = [];
  2143. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2144. var fieldName = that.options.sortPriority[i].sortName;
  2145. var fieldIndex = that.header.fields.indexOf(fieldName);
  2146. var sorterName = that.header.sorters[that.header.fields.indexOf(fieldName)];
  2147. if (that.header.sortNames[fieldIndex]) {
  2148. fieldName = that.header.sortNames[fieldIndex];
  2149. }
  2150. var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
  2151. var aa = Utils.getItemField(a, fieldName);
  2152. var bb = Utils.getItemField(b, fieldName);
  2153. var value1 = $__default["default"].fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb]);
  2154. var value2 = $__default["default"].fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa]);
  2155. if (value1 !== undefined && value2 !== undefined) {
  2156. arr1.push(order * value1);
  2157. arr2.push(order * value2);
  2158. continue;
  2159. }
  2160. if (aa === undefined || aa === null) aa = '';
  2161. if (bb === undefined || bb === null) bb = '';
  2162. if ($__default["default"].isNumeric(aa) && $__default["default"].isNumeric(bb)) {
  2163. aa = parseFloat(aa);
  2164. bb = parseFloat(bb);
  2165. } else {
  2166. aa = aa.toString();
  2167. bb = bb.toString();
  2168. if (that.options.multiSortStrictSort) {
  2169. aa = aa.toLowerCase();
  2170. bb = bb.toLowerCase();
  2171. }
  2172. }
  2173. arr1.push(order * cmp(aa, bb));
  2174. arr2.push(order * cmp(bb, aa));
  2175. }
  2176. return cmp(arr1, arr2);
  2177. };
  2178. this.enableCustomSort = true;
  2179. this.data.sort(function (a, b) {
  2180. return arrayCmp(a, b);
  2181. });
  2182. this.initBody();
  2183. this.assignSortableArrows();
  2184. this.trigger('multiple-sort');
  2185. };
  2186. BootstrapTable.prototype.addLevel = function (index, sortPriority) {
  2187. var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy();
  2188. this.$sortModal.find('tbody').append($__default["default"]('<tr>').append($__default["default"]('<td>').text(text)).append($__default["default"]('<td>').append($__default["default"](Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-name')))).append($__default["default"]('<td>').append($__default["default"](Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-order')))));
  2189. var $multiSortName = this.$sortModal.find('.multi-sort-name').last();
  2190. var $multiSortOrder = this.$sortModal.find('.multi-sort-order').last();
  2191. $__default["default"].each(this.columns, function (i, column) {
  2192. if (column.sortable === false || column.visible === false) {
  2193. return true;
  2194. }
  2195. $multiSortName.append("<option value=\"".concat(column.field, "\">").concat(column.title, "</option>"));
  2196. });
  2197. $__default["default"].each(this.options.formatSortOrders(), function (value, order) {
  2198. $multiSortOrder.append("<option value=\"".concat(value, "\">").concat(order, "</option>"));
  2199. });
  2200. if (sortPriority !== undefined) {
  2201. $multiSortName.find("option[value=\"".concat(sortPriority.sortName, "\"]")).attr('selected', true);
  2202. $multiSortOrder.find("option[value=\"".concat(sortPriority.sortOrder, "\"]")).attr('selected', true);
  2203. }
  2204. };
  2205. BootstrapTable.prototype.assignSortableArrows = function () {
  2206. var that = this;
  2207. var headers = that.$header.find('th');
  2208. for (var i = 0; i < headers.length; i++) {
  2209. for (var c = 0; c < that.options.sortPriority.length; c++) {
  2210. if ($__default["default"](headers[i]).data('field') === that.options.sortPriority[c].sortName) {
  2211. $__default["default"](headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder);
  2212. }
  2213. }
  2214. }
  2215. };
  2216. BootstrapTable.prototype.setButtonStates = function () {
  2217. var total = this.$sortModal.find('.multi-sort-name:first option').length;
  2218. var current = this.$sortModal.find('tbody tr').length;
  2219. if (current === total) {
  2220. this.$sortModal.find('#add').attr('disabled', 'disabled');
  2221. }
  2222. if (current > 1) {
  2223. this.$sortModal.find('#delete').removeAttr('disabled');
  2224. }
  2225. if (current < total) {
  2226. this.$sortModal.find('#add').removeAttr('disabled');
  2227. }
  2228. if (current === 1) {
  2229. this.$sortModal.find('#delete').attr('disabled', 'disabled');
  2230. }
  2231. };
  2232. BootstrapTable.prototype.multiSort = function (sortPriority) {
  2233. var _this2 = this;
  2234. this.options.sortPriority = sortPriority;
  2235. this.options.sortName = undefined;
  2236. if (this.options.sidePagination === 'server') {
  2237. var queryParams = this.options.queryParams;
  2238. this.options.queryParams = function (params) {
  2239. params.multiSort = _this2.options.sortPriority;
  2240. return $__default["default"].fn.bootstrapTable.utils.calculateObjectValue(_this2.options, queryParams, [params]);
  2241. };
  2242. isSingleSort = false;
  2243. this.initServer(this.options.silentSort);
  2244. return;
  2245. }
  2246. this.onMultipleSort();
  2247. };
  2248. }));