bootstrap-table-export.js 98 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($$7) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$7);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. Object.defineProperty(Constructor, "prototype", {
  26. writable: false
  27. });
  28. return Constructor;
  29. }
  30. function _defineProperty(obj, key, value) {
  31. if (key in obj) {
  32. Object.defineProperty(obj, key, {
  33. value: value,
  34. enumerable: true,
  35. configurable: true,
  36. writable: true
  37. });
  38. } else {
  39. obj[key] = value;
  40. }
  41. return obj;
  42. }
  43. function _inherits(subClass, superClass) {
  44. if (typeof superClass !== "function" && superClass !== null) {
  45. throw new TypeError("Super expression must either be null or a function");
  46. }
  47. subClass.prototype = Object.create(superClass && superClass.prototype, {
  48. constructor: {
  49. value: subClass,
  50. writable: true,
  51. configurable: true
  52. }
  53. });
  54. Object.defineProperty(subClass, "prototype", {
  55. writable: false
  56. });
  57. if (superClass) _setPrototypeOf(subClass, superClass);
  58. }
  59. function _getPrototypeOf(o) {
  60. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  61. return o.__proto__ || Object.getPrototypeOf(o);
  62. };
  63. return _getPrototypeOf(o);
  64. }
  65. function _setPrototypeOf(o, p) {
  66. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  67. o.__proto__ = p;
  68. return o;
  69. };
  70. return _setPrototypeOf(o, p);
  71. }
  72. function _isNativeReflectConstruct() {
  73. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  74. if (Reflect.construct.sham) return false;
  75. if (typeof Proxy === "function") return true;
  76. try {
  77. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  78. return true;
  79. } catch (e) {
  80. return false;
  81. }
  82. }
  83. function _assertThisInitialized(self) {
  84. if (self === void 0) {
  85. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  86. }
  87. return self;
  88. }
  89. function _possibleConstructorReturn(self, call) {
  90. if (call && (typeof call === "object" || typeof call === "function")) {
  91. return call;
  92. } else if (call !== void 0) {
  93. throw new TypeError("Derived constructors may only return object or undefined");
  94. }
  95. return _assertThisInitialized(self);
  96. }
  97. function _createSuper(Derived) {
  98. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  99. return function _createSuperInternal() {
  100. var Super = _getPrototypeOf(Derived),
  101. result;
  102. if (hasNativeReflectConstruct) {
  103. var NewTarget = _getPrototypeOf(this).constructor;
  104. result = Reflect.construct(Super, arguments, NewTarget);
  105. } else {
  106. result = Super.apply(this, arguments);
  107. }
  108. return _possibleConstructorReturn(this, result);
  109. };
  110. }
  111. function _superPropBase(object, property) {
  112. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  113. object = _getPrototypeOf(object);
  114. if (object === null) break;
  115. }
  116. return object;
  117. }
  118. function _get() {
  119. if (typeof Reflect !== "undefined" && Reflect.get) {
  120. _get = Reflect.get.bind();
  121. } else {
  122. _get = function _get(target, property, receiver) {
  123. var base = _superPropBase(target, property);
  124. if (!base) return;
  125. var desc = Object.getOwnPropertyDescriptor(base, property);
  126. if (desc.get) {
  127. return desc.get.call(arguments.length < 3 ? target : receiver);
  128. }
  129. return desc.value;
  130. };
  131. }
  132. return _get.apply(this, arguments);
  133. }
  134. function _unsupportedIterableToArray(o, minLen) {
  135. if (!o) return;
  136. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  137. var n = Object.prototype.toString.call(o).slice(8, -1);
  138. if (n === "Object" && o.constructor) n = o.constructor.name;
  139. if (n === "Map" || n === "Set") return Array.from(o);
  140. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  141. }
  142. function _arrayLikeToArray(arr, len) {
  143. if (len == null || len > arr.length) len = arr.length;
  144. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  145. return arr2;
  146. }
  147. function _createForOfIteratorHelper(o, allowArrayLike) {
  148. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  149. if (!it) {
  150. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  151. if (it) o = it;
  152. var i = 0;
  153. var F = function () {};
  154. return {
  155. s: F,
  156. n: function () {
  157. if (i >= o.length) return {
  158. done: true
  159. };
  160. return {
  161. done: false,
  162. value: o[i++]
  163. };
  164. },
  165. e: function (e) {
  166. throw e;
  167. },
  168. f: F
  169. };
  170. }
  171. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  172. }
  173. var normalCompletion = true,
  174. didErr = false,
  175. err;
  176. return {
  177. s: function () {
  178. it = it.call(o);
  179. },
  180. n: function () {
  181. var step = it.next();
  182. normalCompletion = step.done;
  183. return step;
  184. },
  185. e: function (e) {
  186. didErr = true;
  187. err = e;
  188. },
  189. f: function () {
  190. try {
  191. if (!normalCompletion && it.return != null) it.return();
  192. } finally {
  193. if (didErr) throw err;
  194. }
  195. }
  196. };
  197. }
  198. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  199. var check = function (it) {
  200. return it && it.Math == Math && it;
  201. };
  202. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  203. var global$e =
  204. // eslint-disable-next-line es/no-global-this -- safe
  205. check(typeof globalThis == 'object' && globalThis) ||
  206. check(typeof window == 'object' && window) ||
  207. // eslint-disable-next-line no-restricted-globals -- safe
  208. check(typeof self == 'object' && self) ||
  209. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  210. // eslint-disable-next-line no-new-func -- fallback
  211. (function () { return this; })() || Function('return this')();
  212. var objectGetOwnPropertyDescriptor = {};
  213. var fails$i = function (exec) {
  214. try {
  215. return !!exec();
  216. } catch (error) {
  217. return true;
  218. }
  219. };
  220. var fails$h = fails$i;
  221. // Detect IE8's incomplete defineProperty implementation
  222. var descriptors = !fails$h(function () {
  223. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  224. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  225. });
  226. var fails$g = fails$i;
  227. var functionBindNative = !fails$g(function () {
  228. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  229. var test = (function () { /* empty */ }).bind();
  230. // eslint-disable-next-line no-prototype-builtins -- safe
  231. return typeof test != 'function' || test.hasOwnProperty('prototype');
  232. });
  233. var NATIVE_BIND$3 = functionBindNative;
  234. var call$9 = Function.prototype.call;
  235. var functionCall = NATIVE_BIND$3 ? call$9.bind(call$9) : function () {
  236. return call$9.apply(call$9, arguments);
  237. };
  238. var objectPropertyIsEnumerable = {};
  239. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  240. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  241. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  242. // Nashorn ~ JDK8 bug
  243. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  244. // `Object.prototype.propertyIsEnumerable` method implementation
  245. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  246. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  247. var descriptor = getOwnPropertyDescriptor$1(this, V);
  248. return !!descriptor && descriptor.enumerable;
  249. } : $propertyIsEnumerable;
  250. var createPropertyDescriptor$3 = function (bitmap, value) {
  251. return {
  252. enumerable: !(bitmap & 1),
  253. configurable: !(bitmap & 2),
  254. writable: !(bitmap & 4),
  255. value: value
  256. };
  257. };
  258. var NATIVE_BIND$2 = functionBindNative;
  259. var FunctionPrototype$2 = Function.prototype;
  260. var call$8 = FunctionPrototype$2.call;
  261. var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$8, call$8);
  262. var functionUncurryThisRaw = function (fn) {
  263. return NATIVE_BIND$2 ? uncurryThisWithBind(fn) : function () {
  264. return call$8.apply(fn, arguments);
  265. };
  266. };
  267. var uncurryThisRaw$1 = functionUncurryThisRaw;
  268. var toString$6 = uncurryThisRaw$1({}.toString);
  269. var stringSlice$4 = uncurryThisRaw$1(''.slice);
  270. var classofRaw$2 = function (it) {
  271. return stringSlice$4(toString$6(it), 8, -1);
  272. };
  273. var classofRaw$1 = classofRaw$2;
  274. var uncurryThisRaw = functionUncurryThisRaw;
  275. var functionUncurryThis = function (fn) {
  276. // Nashorn bug:
  277. // https://github.com/zloirock/core-js/issues/1128
  278. // https://github.com/zloirock/core-js/issues/1130
  279. if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
  280. };
  281. var uncurryThis$h = functionUncurryThis;
  282. var fails$f = fails$i;
  283. var classof$6 = classofRaw$2;
  284. var $Object$3 = Object;
  285. var split = uncurryThis$h(''.split);
  286. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  287. var indexedObject = fails$f(function () {
  288. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  289. // eslint-disable-next-line no-prototype-builtins -- safe
  290. return !$Object$3('z').propertyIsEnumerable(0);
  291. }) ? function (it) {
  292. return classof$6(it) == 'String' ? split(it, '') : $Object$3(it);
  293. } : $Object$3;
  294. // we can't use just `it == null` since of `document.all` special case
  295. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  296. var isNullOrUndefined$3 = function (it) {
  297. return it === null || it === undefined;
  298. };
  299. var isNullOrUndefined$2 = isNullOrUndefined$3;
  300. var $TypeError$7 = TypeError;
  301. // `RequireObjectCoercible` abstract operation
  302. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  303. var requireObjectCoercible$4 = function (it) {
  304. if (isNullOrUndefined$2(it)) throw $TypeError$7("Can't call method on " + it);
  305. return it;
  306. };
  307. // toObject with fallback for non-array-like ES3 strings
  308. var IndexedObject$3 = indexedObject;
  309. var requireObjectCoercible$3 = requireObjectCoercible$4;
  310. var toIndexedObject$6 = function (it) {
  311. return IndexedObject$3(requireObjectCoercible$3(it));
  312. };
  313. var documentAll$2 = typeof document == 'object' && document.all;
  314. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  315. var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
  316. var documentAll_1 = {
  317. all: documentAll$2,
  318. IS_HTMLDDA: IS_HTMLDDA
  319. };
  320. var $documentAll$1 = documentAll_1;
  321. var documentAll$1 = $documentAll$1.all;
  322. // `IsCallable` abstract operation
  323. // https://tc39.es/ecma262/#sec-iscallable
  324. var isCallable$e = $documentAll$1.IS_HTMLDDA ? function (argument) {
  325. return typeof argument == 'function' || argument === documentAll$1;
  326. } : function (argument) {
  327. return typeof argument == 'function';
  328. };
  329. var isCallable$d = isCallable$e;
  330. var $documentAll = documentAll_1;
  331. var documentAll = $documentAll.all;
  332. var isObject$8 = $documentAll.IS_HTMLDDA ? function (it) {
  333. return typeof it == 'object' ? it !== null : isCallable$d(it) || it === documentAll;
  334. } : function (it) {
  335. return typeof it == 'object' ? it !== null : isCallable$d(it);
  336. };
  337. var global$d = global$e;
  338. var isCallable$c = isCallable$e;
  339. var aFunction = function (argument) {
  340. return isCallable$c(argument) ? argument : undefined;
  341. };
  342. var getBuiltIn$5 = function (namespace, method) {
  343. return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
  344. };
  345. var uncurryThis$g = functionUncurryThis;
  346. var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
  347. var getBuiltIn$4 = getBuiltIn$5;
  348. var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
  349. var global$c = global$e;
  350. var userAgent = engineUserAgent;
  351. var process = global$c.process;
  352. var Deno = global$c.Deno;
  353. var versions = process && process.versions || Deno && Deno.version;
  354. var v8 = versions && versions.v8;
  355. var match, version;
  356. if (v8) {
  357. match = v8.split('.');
  358. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  359. // but their correct versions are not interesting for us
  360. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  361. }
  362. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  363. // so check `userAgent` even if `.v8` exists, but 0
  364. if (!version && userAgent) {
  365. match = userAgent.match(/Edge\/(\d+)/);
  366. if (!match || match[1] >= 74) {
  367. match = userAgent.match(/Chrome\/(\d+)/);
  368. if (match) version = +match[1];
  369. }
  370. }
  371. var engineV8Version = version;
  372. /* eslint-disable es/no-symbol -- required for testing */
  373. var V8_VERSION$2 = engineV8Version;
  374. var fails$e = fails$i;
  375. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  376. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$e(function () {
  377. var symbol = Symbol();
  378. // Chrome 38 Symbol has incorrect toString conversion
  379. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  380. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  381. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  382. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  383. });
  384. /* eslint-disable es/no-symbol -- required for testing */
  385. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  386. var useSymbolAsUid = NATIVE_SYMBOL$1
  387. && !Symbol.sham
  388. && typeof Symbol.iterator == 'symbol';
  389. var getBuiltIn$3 = getBuiltIn$5;
  390. var isCallable$b = isCallable$e;
  391. var isPrototypeOf = objectIsPrototypeOf;
  392. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  393. var $Object$2 = Object;
  394. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  395. return typeof it == 'symbol';
  396. } : function (it) {
  397. var $Symbol = getBuiltIn$3('Symbol');
  398. return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
  399. };
  400. var $String$2 = String;
  401. var tryToString$1 = function (argument) {
  402. try {
  403. return $String$2(argument);
  404. } catch (error) {
  405. return 'Object';
  406. }
  407. };
  408. var isCallable$a = isCallable$e;
  409. var tryToString = tryToString$1;
  410. var $TypeError$6 = TypeError;
  411. // `Assert: IsCallable(argument) is true`
  412. var aCallable$2 = function (argument) {
  413. if (isCallable$a(argument)) return argument;
  414. throw $TypeError$6(tryToString(argument) + ' is not a function');
  415. };
  416. var aCallable$1 = aCallable$2;
  417. var isNullOrUndefined$1 = isNullOrUndefined$3;
  418. // `GetMethod` abstract operation
  419. // https://tc39.es/ecma262/#sec-getmethod
  420. var getMethod$2 = function (V, P) {
  421. var func = V[P];
  422. return isNullOrUndefined$1(func) ? undefined : aCallable$1(func);
  423. };
  424. var call$7 = functionCall;
  425. var isCallable$9 = isCallable$e;
  426. var isObject$7 = isObject$8;
  427. var $TypeError$5 = TypeError;
  428. // `OrdinaryToPrimitive` abstract operation
  429. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  430. var ordinaryToPrimitive$1 = function (input, pref) {
  431. var fn, val;
  432. if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$7(val = call$7(fn, input))) return val;
  433. if (isCallable$9(fn = input.valueOf) && !isObject$7(val = call$7(fn, input))) return val;
  434. if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$7(val = call$7(fn, input))) return val;
  435. throw $TypeError$5("Can't convert object to primitive value");
  436. };
  437. var shared$4 = {exports: {}};
  438. var global$b = global$e;
  439. // eslint-disable-next-line es/no-object-defineproperty -- safe
  440. var defineProperty$3 = Object.defineProperty;
  441. var defineGlobalProperty$3 = function (key, value) {
  442. try {
  443. defineProperty$3(global$b, key, { value: value, configurable: true, writable: true });
  444. } catch (error) {
  445. global$b[key] = value;
  446. } return value;
  447. };
  448. var global$a = global$e;
  449. var defineGlobalProperty$2 = defineGlobalProperty$3;
  450. var SHARED = '__core-js_shared__';
  451. var store$3 = global$a[SHARED] || defineGlobalProperty$2(SHARED, {});
  452. var sharedStore = store$3;
  453. var store$2 = sharedStore;
  454. (shared$4.exports = function (key, value) {
  455. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  456. })('versions', []).push({
  457. version: '3.25.5',
  458. mode: 'global',
  459. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  460. license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
  461. source: 'https://github.com/zloirock/core-js'
  462. });
  463. var requireObjectCoercible$2 = requireObjectCoercible$4;
  464. var $Object$1 = Object;
  465. // `ToObject` abstract operation
  466. // https://tc39.es/ecma262/#sec-toobject
  467. var toObject$5 = function (argument) {
  468. return $Object$1(requireObjectCoercible$2(argument));
  469. };
  470. var uncurryThis$f = functionUncurryThis;
  471. var toObject$4 = toObject$5;
  472. var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
  473. // `HasOwnProperty` abstract operation
  474. // https://tc39.es/ecma262/#sec-hasownproperty
  475. // eslint-disable-next-line es/no-object-hasown -- safe
  476. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  477. return hasOwnProperty(toObject$4(it), key);
  478. };
  479. var uncurryThis$e = functionUncurryThis;
  480. var id = 0;
  481. var postfix = Math.random();
  482. var toString$5 = uncurryThis$e(1.0.toString);
  483. var uid$2 = function (key) {
  484. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
  485. };
  486. var global$9 = global$e;
  487. var shared$3 = shared$4.exports;
  488. var hasOwn$6 = hasOwnProperty_1;
  489. var uid$1 = uid$2;
  490. var NATIVE_SYMBOL = symbolConstructorDetection;
  491. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  492. var WellKnownSymbolsStore = shared$3('wks');
  493. var Symbol$1 = global$9.Symbol;
  494. var symbolFor = Symbol$1 && Symbol$1['for'];
  495. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  496. var wellKnownSymbol$a = function (name) {
  497. if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  498. var description = 'Symbol.' + name;
  499. if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
  500. WellKnownSymbolsStore[name] = Symbol$1[name];
  501. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  502. WellKnownSymbolsStore[name] = symbolFor(description);
  503. } else {
  504. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  505. }
  506. } return WellKnownSymbolsStore[name];
  507. };
  508. var call$6 = functionCall;
  509. var isObject$6 = isObject$8;
  510. var isSymbol$1 = isSymbol$2;
  511. var getMethod$1 = getMethod$2;
  512. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  513. var wellKnownSymbol$9 = wellKnownSymbol$a;
  514. var $TypeError$4 = TypeError;
  515. var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
  516. // `ToPrimitive` abstract operation
  517. // https://tc39.es/ecma262/#sec-toprimitive
  518. var toPrimitive$1 = function (input, pref) {
  519. if (!isObject$6(input) || isSymbol$1(input)) return input;
  520. var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
  521. var result;
  522. if (exoticToPrim) {
  523. if (pref === undefined) pref = 'default';
  524. result = call$6(exoticToPrim, input, pref);
  525. if (!isObject$6(result) || isSymbol$1(result)) return result;
  526. throw $TypeError$4("Can't convert object to primitive value");
  527. }
  528. if (pref === undefined) pref = 'number';
  529. return ordinaryToPrimitive(input, pref);
  530. };
  531. var toPrimitive = toPrimitive$1;
  532. var isSymbol = isSymbol$2;
  533. // `ToPropertyKey` abstract operation
  534. // https://tc39.es/ecma262/#sec-topropertykey
  535. var toPropertyKey$3 = function (argument) {
  536. var key = toPrimitive(argument, 'string');
  537. return isSymbol(key) ? key : key + '';
  538. };
  539. var global$8 = global$e;
  540. var isObject$5 = isObject$8;
  541. var document$1 = global$8.document;
  542. // typeof document.createElement is 'object' in old IE
  543. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  544. var documentCreateElement$2 = function (it) {
  545. return EXISTS$1 ? document$1.createElement(it) : {};
  546. };
  547. var DESCRIPTORS$8 = descriptors;
  548. var fails$d = fails$i;
  549. var createElement = documentCreateElement$2;
  550. // Thanks to IE8 for its funny defineProperty
  551. var ie8DomDefine = !DESCRIPTORS$8 && !fails$d(function () {
  552. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  553. return Object.defineProperty(createElement('div'), 'a', {
  554. get: function () { return 7; }
  555. }).a != 7;
  556. });
  557. var DESCRIPTORS$7 = descriptors;
  558. var call$5 = functionCall;
  559. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  560. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  561. var toIndexedObject$5 = toIndexedObject$6;
  562. var toPropertyKey$2 = toPropertyKey$3;
  563. var hasOwn$5 = hasOwnProperty_1;
  564. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  565. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  566. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  567. // `Object.getOwnPropertyDescriptor` method
  568. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  569. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  570. O = toIndexedObject$5(O);
  571. P = toPropertyKey$2(P);
  572. if (IE8_DOM_DEFINE$1) try {
  573. return $getOwnPropertyDescriptor$1(O, P);
  574. } catch (error) { /* empty */ }
  575. if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$5(propertyIsEnumerableModule$1.f, O, P), O[P]);
  576. };
  577. var objectDefineProperty = {};
  578. var DESCRIPTORS$6 = descriptors;
  579. var fails$c = fails$i;
  580. // V8 ~ Chrome 36-
  581. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  582. var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$c(function () {
  583. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  584. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  585. value: 42,
  586. writable: false
  587. }).prototype != 42;
  588. });
  589. var isObject$4 = isObject$8;
  590. var $String$1 = String;
  591. var $TypeError$3 = TypeError;
  592. // `Assert: Type(argument) is Object`
  593. var anObject$7 = function (argument) {
  594. if (isObject$4(argument)) return argument;
  595. throw $TypeError$3($String$1(argument) + ' is not an object');
  596. };
  597. var DESCRIPTORS$5 = descriptors;
  598. var IE8_DOM_DEFINE = ie8DomDefine;
  599. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  600. var anObject$6 = anObject$7;
  601. var toPropertyKey$1 = toPropertyKey$3;
  602. var $TypeError$2 = TypeError;
  603. // eslint-disable-next-line es/no-object-defineproperty -- safe
  604. var $defineProperty = Object.defineProperty;
  605. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  606. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  607. var ENUMERABLE = 'enumerable';
  608. var CONFIGURABLE$1 = 'configurable';
  609. var WRITABLE = 'writable';
  610. // `Object.defineProperty` method
  611. // https://tc39.es/ecma262/#sec-object.defineproperty
  612. objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  613. anObject$6(O);
  614. P = toPropertyKey$1(P);
  615. anObject$6(Attributes);
  616. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  617. var current = $getOwnPropertyDescriptor(O, P);
  618. if (current && current[WRITABLE]) {
  619. O[P] = Attributes.value;
  620. Attributes = {
  621. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  622. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  623. writable: false
  624. };
  625. }
  626. } return $defineProperty(O, P, Attributes);
  627. } : $defineProperty : function defineProperty(O, P, Attributes) {
  628. anObject$6(O);
  629. P = toPropertyKey$1(P);
  630. anObject$6(Attributes);
  631. if (IE8_DOM_DEFINE) try {
  632. return $defineProperty(O, P, Attributes);
  633. } catch (error) { /* empty */ }
  634. if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
  635. if ('value' in Attributes) O[P] = Attributes.value;
  636. return O;
  637. };
  638. var DESCRIPTORS$4 = descriptors;
  639. var definePropertyModule$4 = objectDefineProperty;
  640. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  641. var createNonEnumerableProperty$4 = DESCRIPTORS$4 ? function (object, key, value) {
  642. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  643. } : function (object, key, value) {
  644. object[key] = value;
  645. return object;
  646. };
  647. var makeBuiltIn$2 = {exports: {}};
  648. var DESCRIPTORS$3 = descriptors;
  649. var hasOwn$4 = hasOwnProperty_1;
  650. var FunctionPrototype$1 = Function.prototype;
  651. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  652. var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
  653. var EXISTS = hasOwn$4(FunctionPrototype$1, 'name');
  654. // additional protection from minified / mangled / dropped function names
  655. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  656. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  657. var functionName = {
  658. EXISTS: EXISTS,
  659. PROPER: PROPER,
  660. CONFIGURABLE: CONFIGURABLE
  661. };
  662. var uncurryThis$d = functionUncurryThis;
  663. var isCallable$8 = isCallable$e;
  664. var store$1 = sharedStore;
  665. var functionToString = uncurryThis$d(Function.toString);
  666. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  667. if (!isCallable$8(store$1.inspectSource)) {
  668. store$1.inspectSource = function (it) {
  669. return functionToString(it);
  670. };
  671. }
  672. var inspectSource$2 = store$1.inspectSource;
  673. var global$7 = global$e;
  674. var isCallable$7 = isCallable$e;
  675. var WeakMap$1 = global$7.WeakMap;
  676. var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
  677. var shared$2 = shared$4.exports;
  678. var uid = uid$2;
  679. var keys = shared$2('keys');
  680. var sharedKey$2 = function (key) {
  681. return keys[key] || (keys[key] = uid(key));
  682. };
  683. var hiddenKeys$4 = {};
  684. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  685. var global$6 = global$e;
  686. var isObject$3 = isObject$8;
  687. var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
  688. var hasOwn$3 = hasOwnProperty_1;
  689. var shared$1 = sharedStore;
  690. var sharedKey$1 = sharedKey$2;
  691. var hiddenKeys$3 = hiddenKeys$4;
  692. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  693. var TypeError$1 = global$6.TypeError;
  694. var WeakMap = global$6.WeakMap;
  695. var set, get, has;
  696. var enforce = function (it) {
  697. return has(it) ? get(it) : set(it, {});
  698. };
  699. var getterFor = function (TYPE) {
  700. return function (it) {
  701. var state;
  702. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  703. throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  704. } return state;
  705. };
  706. };
  707. if (NATIVE_WEAK_MAP || shared$1.state) {
  708. var store = shared$1.state || (shared$1.state = new WeakMap());
  709. /* eslint-disable no-self-assign -- prototype methods protection */
  710. store.get = store.get;
  711. store.has = store.has;
  712. store.set = store.set;
  713. /* eslint-enable no-self-assign -- prototype methods protection */
  714. set = function (it, metadata) {
  715. if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
  716. metadata.facade = it;
  717. store.set(it, metadata);
  718. return metadata;
  719. };
  720. get = function (it) {
  721. return store.get(it) || {};
  722. };
  723. has = function (it) {
  724. return store.has(it);
  725. };
  726. } else {
  727. var STATE = sharedKey$1('state');
  728. hiddenKeys$3[STATE] = true;
  729. set = function (it, metadata) {
  730. if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
  731. metadata.facade = it;
  732. createNonEnumerableProperty$3(it, STATE, metadata);
  733. return metadata;
  734. };
  735. get = function (it) {
  736. return hasOwn$3(it, STATE) ? it[STATE] : {};
  737. };
  738. has = function (it) {
  739. return hasOwn$3(it, STATE);
  740. };
  741. }
  742. var internalState = {
  743. set: set,
  744. get: get,
  745. has: has,
  746. enforce: enforce,
  747. getterFor: getterFor
  748. };
  749. var fails$b = fails$i;
  750. var isCallable$6 = isCallable$e;
  751. var hasOwn$2 = hasOwnProperty_1;
  752. var DESCRIPTORS$2 = descriptors;
  753. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  754. var inspectSource$1 = inspectSource$2;
  755. var InternalStateModule = internalState;
  756. var enforceInternalState = InternalStateModule.enforce;
  757. var getInternalState$1 = InternalStateModule.get;
  758. // eslint-disable-next-line es/no-object-defineproperty -- safe
  759. var defineProperty$2 = Object.defineProperty;
  760. var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$b(function () {
  761. return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  762. });
  763. var TEMPLATE = String(String).split('String');
  764. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  765. if (String(name).slice(0, 7) === 'Symbol(') {
  766. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  767. }
  768. if (options && options.getter) name = 'get ' + name;
  769. if (options && options.setter) name = 'set ' + name;
  770. if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  771. if (DESCRIPTORS$2) defineProperty$2(value, 'name', { value: name, configurable: true });
  772. else value.name = name;
  773. }
  774. if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
  775. defineProperty$2(value, 'length', { value: options.arity });
  776. }
  777. try {
  778. if (options && hasOwn$2(options, 'constructor') && options.constructor) {
  779. if (DESCRIPTORS$2) defineProperty$2(value, 'prototype', { writable: false });
  780. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  781. } else if (value.prototype) value.prototype = undefined;
  782. } catch (error) { /* empty */ }
  783. var state = enforceInternalState(value);
  784. if (!hasOwn$2(state, 'source')) {
  785. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  786. } return value;
  787. };
  788. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  789. // eslint-disable-next-line no-extend-native -- required
  790. Function.prototype.toString = makeBuiltIn$1(function toString() {
  791. return isCallable$6(this) && getInternalState$1(this).source || inspectSource$1(this);
  792. }, 'toString');
  793. var isCallable$5 = isCallable$e;
  794. var definePropertyModule$3 = objectDefineProperty;
  795. var makeBuiltIn = makeBuiltIn$2.exports;
  796. var defineGlobalProperty$1 = defineGlobalProperty$3;
  797. var defineBuiltIn$3 = function (O, key, value, options) {
  798. if (!options) options = {};
  799. var simple = options.enumerable;
  800. var name = options.name !== undefined ? options.name : key;
  801. if (isCallable$5(value)) makeBuiltIn(value, name, options);
  802. if (options.global) {
  803. if (simple) O[key] = value;
  804. else defineGlobalProperty$1(key, value);
  805. } else {
  806. try {
  807. if (!options.unsafe) delete O[key];
  808. else if (O[key]) simple = true;
  809. } catch (error) { /* empty */ }
  810. if (simple) O[key] = value;
  811. else definePropertyModule$3.f(O, key, {
  812. value: value,
  813. enumerable: false,
  814. configurable: !options.nonConfigurable,
  815. writable: !options.nonWritable
  816. });
  817. } return O;
  818. };
  819. var objectGetOwnPropertyNames = {};
  820. var ceil = Math.ceil;
  821. var floor$1 = Math.floor;
  822. // `Math.trunc` method
  823. // https://tc39.es/ecma262/#sec-math.trunc
  824. // eslint-disable-next-line es/no-math-trunc -- safe
  825. var mathTrunc = Math.trunc || function trunc(x) {
  826. var n = +x;
  827. return (n > 0 ? floor$1 : ceil)(n);
  828. };
  829. var trunc = mathTrunc;
  830. // `ToIntegerOrInfinity` abstract operation
  831. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  832. var toIntegerOrInfinity$4 = function (argument) {
  833. var number = +argument;
  834. // eslint-disable-next-line no-self-compare -- NaN check
  835. return number !== number || number === 0 ? 0 : trunc(number);
  836. };
  837. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  838. var max$2 = Math.max;
  839. var min$2 = Math.min;
  840. // Helper for a popular repeating case of the spec:
  841. // Let integer be ? ToInteger(index).
  842. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  843. var toAbsoluteIndex$2 = function (index, length) {
  844. var integer = toIntegerOrInfinity$3(index);
  845. return integer < 0 ? max$2(integer + length, 0) : min$2(integer, length);
  846. };
  847. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  848. var min$1 = Math.min;
  849. // `ToLength` abstract operation
  850. // https://tc39.es/ecma262/#sec-tolength
  851. var toLength$2 = function (argument) {
  852. return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  853. };
  854. var toLength$1 = toLength$2;
  855. // `LengthOfArrayLike` abstract operation
  856. // https://tc39.es/ecma262/#sec-lengthofarraylike
  857. var lengthOfArrayLike$4 = function (obj) {
  858. return toLength$1(obj.length);
  859. };
  860. var toIndexedObject$4 = toIndexedObject$6;
  861. var toAbsoluteIndex$1 = toAbsoluteIndex$2;
  862. var lengthOfArrayLike$3 = lengthOfArrayLike$4;
  863. // `Array.prototype.{ indexOf, includes }` methods implementation
  864. var createMethod$2 = function (IS_INCLUDES) {
  865. return function ($this, el, fromIndex) {
  866. var O = toIndexedObject$4($this);
  867. var length = lengthOfArrayLike$3(O);
  868. var index = toAbsoluteIndex$1(fromIndex, length);
  869. var value;
  870. // Array#includes uses SameValueZero equality algorithm
  871. // eslint-disable-next-line no-self-compare -- NaN check
  872. if (IS_INCLUDES && el != el) while (length > index) {
  873. value = O[index++];
  874. // eslint-disable-next-line no-self-compare -- NaN check
  875. if (value != value) return true;
  876. // Array#indexOf ignores holes, Array#includes - not
  877. } else for (;length > index; index++) {
  878. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  879. } return !IS_INCLUDES && -1;
  880. };
  881. };
  882. var arrayIncludes = {
  883. // `Array.prototype.includes` method
  884. // https://tc39.es/ecma262/#sec-array.prototype.includes
  885. includes: createMethod$2(true),
  886. // `Array.prototype.indexOf` method
  887. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  888. indexOf: createMethod$2(false)
  889. };
  890. var uncurryThis$c = functionUncurryThis;
  891. var hasOwn$1 = hasOwnProperty_1;
  892. var toIndexedObject$3 = toIndexedObject$6;
  893. var indexOf$1 = arrayIncludes.indexOf;
  894. var hiddenKeys$2 = hiddenKeys$4;
  895. var push$2 = uncurryThis$c([].push);
  896. var objectKeysInternal = function (object, names) {
  897. var O = toIndexedObject$3(object);
  898. var i = 0;
  899. var result = [];
  900. var key;
  901. for (key in O) !hasOwn$1(hiddenKeys$2, key) && hasOwn$1(O, key) && push$2(result, key);
  902. // Don't enum bug & hidden keys
  903. while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
  904. ~indexOf$1(result, key) || push$2(result, key);
  905. }
  906. return result;
  907. };
  908. // IE8- don't enum bug keys
  909. var enumBugKeys$3 = [
  910. 'constructor',
  911. 'hasOwnProperty',
  912. 'isPrototypeOf',
  913. 'propertyIsEnumerable',
  914. 'toLocaleString',
  915. 'toString',
  916. 'valueOf'
  917. ];
  918. var internalObjectKeys$1 = objectKeysInternal;
  919. var enumBugKeys$2 = enumBugKeys$3;
  920. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  921. // `Object.getOwnPropertyNames` method
  922. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  923. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  924. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  925. return internalObjectKeys$1(O, hiddenKeys$1);
  926. };
  927. var objectGetOwnPropertySymbols = {};
  928. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  929. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  930. var getBuiltIn$2 = getBuiltIn$5;
  931. var uncurryThis$b = functionUncurryThis;
  932. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  933. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  934. var anObject$5 = anObject$7;
  935. var concat$2 = uncurryThis$b([].concat);
  936. // all object keys, includes non-enumerable and symbols
  937. var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
  938. var keys = getOwnPropertyNamesModule.f(anObject$5(it));
  939. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  940. return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
  941. };
  942. var hasOwn = hasOwnProperty_1;
  943. var ownKeys = ownKeys$1;
  944. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  945. var definePropertyModule$2 = objectDefineProperty;
  946. var copyConstructorProperties$1 = function (target, source, exceptions) {
  947. var keys = ownKeys(source);
  948. var defineProperty = definePropertyModule$2.f;
  949. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  950. for (var i = 0; i < keys.length; i++) {
  951. var key = keys[i];
  952. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  953. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  954. }
  955. }
  956. };
  957. var fails$a = fails$i;
  958. var isCallable$4 = isCallable$e;
  959. var replacement = /#|\.prototype\./;
  960. var isForced$1 = function (feature, detection) {
  961. var value = data[normalize(feature)];
  962. return value == POLYFILL ? true
  963. : value == NATIVE ? false
  964. : isCallable$4(detection) ? fails$a(detection)
  965. : !!detection;
  966. };
  967. var normalize = isForced$1.normalize = function (string) {
  968. return String(string).replace(replacement, '.').toLowerCase();
  969. };
  970. var data = isForced$1.data = {};
  971. var NATIVE = isForced$1.NATIVE = 'N';
  972. var POLYFILL = isForced$1.POLYFILL = 'P';
  973. var isForced_1 = isForced$1;
  974. var global$5 = global$e;
  975. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  976. var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
  977. var defineBuiltIn$2 = defineBuiltIn$3;
  978. var defineGlobalProperty = defineGlobalProperty$3;
  979. var copyConstructorProperties = copyConstructorProperties$1;
  980. var isForced = isForced_1;
  981. /*
  982. options.target - name of the target object
  983. options.global - target is the global object
  984. options.stat - export as static methods of target
  985. options.proto - export as prototype methods of target
  986. options.real - real prototype method for the `pure` version
  987. options.forced - export even if the native feature is available
  988. options.bind - bind methods to the target, required for the `pure` version
  989. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  990. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  991. options.sham - add a flag to not completely full polyfills
  992. options.enumerable - export as enumerable property
  993. options.dontCallGetSet - prevent calling a getter on target
  994. options.name - the .name of the function if it does not match the key
  995. */
  996. var _export = function (options, source) {
  997. var TARGET = options.target;
  998. var GLOBAL = options.global;
  999. var STATIC = options.stat;
  1000. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  1001. if (GLOBAL) {
  1002. target = global$5;
  1003. } else if (STATIC) {
  1004. target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
  1005. } else {
  1006. target = (global$5[TARGET] || {}).prototype;
  1007. }
  1008. if (target) for (key in source) {
  1009. sourceProperty = source[key];
  1010. if (options.dontCallGetSet) {
  1011. descriptor = getOwnPropertyDescriptor(target, key);
  1012. targetProperty = descriptor && descriptor.value;
  1013. } else targetProperty = target[key];
  1014. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1015. // contained in target
  1016. if (!FORCED && targetProperty !== undefined) {
  1017. if (typeof sourceProperty == typeof targetProperty) continue;
  1018. copyConstructorProperties(sourceProperty, targetProperty);
  1019. }
  1020. // add a flag to not completely full polyfills
  1021. if (options.sham || (targetProperty && targetProperty.sham)) {
  1022. createNonEnumerableProperty$2(sourceProperty, 'sham', true);
  1023. }
  1024. defineBuiltIn$2(target, key, sourceProperty, options);
  1025. }
  1026. };
  1027. var wellKnownSymbol$8 = wellKnownSymbol$a;
  1028. var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
  1029. var test = {};
  1030. test[TO_STRING_TAG$1] = 'z';
  1031. var toStringTagSupport = String(test) === '[object z]';
  1032. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  1033. var isCallable$3 = isCallable$e;
  1034. var classofRaw = classofRaw$2;
  1035. var wellKnownSymbol$7 = wellKnownSymbol$a;
  1036. var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
  1037. var $Object = Object;
  1038. // ES3 wrong here
  1039. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  1040. // fallback for IE11 Script Access Denied error
  1041. var tryGet = function (it, key) {
  1042. try {
  1043. return it[key];
  1044. } catch (error) { /* empty */ }
  1045. };
  1046. // getting tag from ES6+ `Object.prototype.toString`
  1047. var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  1048. var O, tag, result;
  1049. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1050. // @@toStringTag case
  1051. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  1052. // builtinTag case
  1053. : CORRECT_ARGUMENTS ? classofRaw(O)
  1054. // ES3 arguments fallback
  1055. : (result = classofRaw(O)) == 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
  1056. };
  1057. var classof$4 = classof$5;
  1058. var $String = String;
  1059. var toString$4 = function (argument) {
  1060. if (classof$4(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1061. return $String(argument);
  1062. };
  1063. var anObject$4 = anObject$7;
  1064. // `RegExp.prototype.flags` getter implementation
  1065. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1066. var regexpFlags$1 = function () {
  1067. var that = anObject$4(this);
  1068. var result = '';
  1069. if (that.hasIndices) result += 'd';
  1070. if (that.global) result += 'g';
  1071. if (that.ignoreCase) result += 'i';
  1072. if (that.multiline) result += 'm';
  1073. if (that.dotAll) result += 's';
  1074. if (that.unicode) result += 'u';
  1075. if (that.unicodeSets) result += 'v';
  1076. if (that.sticky) result += 'y';
  1077. return result;
  1078. };
  1079. var fails$9 = fails$i;
  1080. var global$4 = global$e;
  1081. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  1082. var $RegExp$2 = global$4.RegExp;
  1083. var UNSUPPORTED_Y$1 = fails$9(function () {
  1084. var re = $RegExp$2('a', 'y');
  1085. re.lastIndex = 2;
  1086. return re.exec('abcd') != null;
  1087. });
  1088. // UC Browser bug
  1089. // https://github.com/zloirock/core-js/issues/1008
  1090. var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$9(function () {
  1091. return !$RegExp$2('a', 'y').sticky;
  1092. });
  1093. var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$9(function () {
  1094. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  1095. var re = $RegExp$2('^r', 'gy');
  1096. re.lastIndex = 2;
  1097. return re.exec('str') != null;
  1098. });
  1099. var regexpStickyHelpers = {
  1100. BROKEN_CARET: BROKEN_CARET,
  1101. MISSED_STICKY: MISSED_STICKY,
  1102. UNSUPPORTED_Y: UNSUPPORTED_Y$1
  1103. };
  1104. var objectDefineProperties = {};
  1105. var internalObjectKeys = objectKeysInternal;
  1106. var enumBugKeys$1 = enumBugKeys$3;
  1107. // `Object.keys` method
  1108. // https://tc39.es/ecma262/#sec-object.keys
  1109. // eslint-disable-next-line es/no-object-keys -- safe
  1110. var objectKeys$2 = Object.keys || function keys(O) {
  1111. return internalObjectKeys(O, enumBugKeys$1);
  1112. };
  1113. var DESCRIPTORS$1 = descriptors;
  1114. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1115. var definePropertyModule$1 = objectDefineProperty;
  1116. var anObject$3 = anObject$7;
  1117. var toIndexedObject$2 = toIndexedObject$6;
  1118. var objectKeys$1 = objectKeys$2;
  1119. // `Object.defineProperties` method
  1120. // https://tc39.es/ecma262/#sec-object.defineproperties
  1121. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1122. objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1123. anObject$3(O);
  1124. var props = toIndexedObject$2(Properties);
  1125. var keys = objectKeys$1(Properties);
  1126. var length = keys.length;
  1127. var index = 0;
  1128. var key;
  1129. while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
  1130. return O;
  1131. };
  1132. var getBuiltIn$1 = getBuiltIn$5;
  1133. var html$1 = getBuiltIn$1('document', 'documentElement');
  1134. /* global ActiveXObject -- old IE, WSH */
  1135. var anObject$2 = anObject$7;
  1136. var definePropertiesModule = objectDefineProperties;
  1137. var enumBugKeys = enumBugKeys$3;
  1138. var hiddenKeys = hiddenKeys$4;
  1139. var html = html$1;
  1140. var documentCreateElement$1 = documentCreateElement$2;
  1141. var sharedKey = sharedKey$2;
  1142. var GT = '>';
  1143. var LT = '<';
  1144. var PROTOTYPE = 'prototype';
  1145. var SCRIPT = 'script';
  1146. var IE_PROTO = sharedKey('IE_PROTO');
  1147. var EmptyConstructor = function () { /* empty */ };
  1148. var scriptTag = function (content) {
  1149. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1150. };
  1151. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1152. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1153. activeXDocument.write(scriptTag(''));
  1154. activeXDocument.close();
  1155. var temp = activeXDocument.parentWindow.Object;
  1156. activeXDocument = null; // avoid memory leak
  1157. return temp;
  1158. };
  1159. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1160. var NullProtoObjectViaIFrame = function () {
  1161. // Thrash, waste and sodomy: IE GC bug
  1162. var iframe = documentCreateElement$1('iframe');
  1163. var JS = 'java' + SCRIPT + ':';
  1164. var iframeDocument;
  1165. iframe.style.display = 'none';
  1166. html.appendChild(iframe);
  1167. // https://github.com/zloirock/core-js/issues/475
  1168. iframe.src = String(JS);
  1169. iframeDocument = iframe.contentWindow.document;
  1170. iframeDocument.open();
  1171. iframeDocument.write(scriptTag('document.F=Object'));
  1172. iframeDocument.close();
  1173. return iframeDocument.F;
  1174. };
  1175. // Check for document.domain and active x support
  1176. // No need to use active x approach when document.domain is not set
  1177. // see https://github.com/es-shims/es5-shim/issues/150
  1178. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1179. // avoid IE GC bug
  1180. var activeXDocument;
  1181. var NullProtoObject = function () {
  1182. try {
  1183. activeXDocument = new ActiveXObject('htmlfile');
  1184. } catch (error) { /* ignore */ }
  1185. NullProtoObject = typeof document != 'undefined'
  1186. ? document.domain && activeXDocument
  1187. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1188. : NullProtoObjectViaIFrame()
  1189. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1190. var length = enumBugKeys.length;
  1191. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1192. return NullProtoObject();
  1193. };
  1194. hiddenKeys[IE_PROTO] = true;
  1195. // `Object.create` method
  1196. // https://tc39.es/ecma262/#sec-object.create
  1197. // eslint-disable-next-line es/no-object-create -- safe
  1198. var objectCreate = Object.create || function create(O, Properties) {
  1199. var result;
  1200. if (O !== null) {
  1201. EmptyConstructor[PROTOTYPE] = anObject$2(O);
  1202. result = new EmptyConstructor();
  1203. EmptyConstructor[PROTOTYPE] = null;
  1204. // add "__proto__" for Object.getPrototypeOf polyfill
  1205. result[IE_PROTO] = O;
  1206. } else result = NullProtoObject();
  1207. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1208. };
  1209. var fails$8 = fails$i;
  1210. var global$3 = global$e;
  1211. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  1212. var $RegExp$1 = global$3.RegExp;
  1213. var regexpUnsupportedDotAll = fails$8(function () {
  1214. var re = $RegExp$1('.', 's');
  1215. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  1216. });
  1217. var fails$7 = fails$i;
  1218. var global$2 = global$e;
  1219. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  1220. var $RegExp = global$2.RegExp;
  1221. var regexpUnsupportedNcg = fails$7(function () {
  1222. var re = $RegExp('(?<a>b)', 'g');
  1223. return re.exec('b').groups.a !== 'b' ||
  1224. 'b'.replace(re, '$<a>c') !== 'bc';
  1225. });
  1226. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1227. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1228. var call$4 = functionCall;
  1229. var uncurryThis$a = functionUncurryThis;
  1230. var toString$3 = toString$4;
  1231. var regexpFlags = regexpFlags$1;
  1232. var stickyHelpers = regexpStickyHelpers;
  1233. var shared = shared$4.exports;
  1234. var create$1 = objectCreate;
  1235. var getInternalState = internalState.get;
  1236. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  1237. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  1238. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1239. var nativeExec = RegExp.prototype.exec;
  1240. var patchedExec = nativeExec;
  1241. var charAt$3 = uncurryThis$a(''.charAt);
  1242. var indexOf = uncurryThis$a(''.indexOf);
  1243. var replace$1 = uncurryThis$a(''.replace);
  1244. var stringSlice$3 = uncurryThis$a(''.slice);
  1245. var UPDATES_LAST_INDEX_WRONG = (function () {
  1246. var re1 = /a/;
  1247. var re2 = /b*/g;
  1248. call$4(nativeExec, re1, 'a');
  1249. call$4(nativeExec, re2, 'a');
  1250. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1251. })();
  1252. var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
  1253. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1254. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1255. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  1256. if (PATCH) {
  1257. patchedExec = function exec(string) {
  1258. var re = this;
  1259. var state = getInternalState(re);
  1260. var str = toString$3(string);
  1261. var raw = state.raw;
  1262. var result, reCopy, lastIndex, match, i, object, group;
  1263. if (raw) {
  1264. raw.lastIndex = re.lastIndex;
  1265. result = call$4(patchedExec, raw, str);
  1266. re.lastIndex = raw.lastIndex;
  1267. return result;
  1268. }
  1269. var groups = state.groups;
  1270. var sticky = UNSUPPORTED_Y && re.sticky;
  1271. var flags = call$4(regexpFlags, re);
  1272. var source = re.source;
  1273. var charsAdded = 0;
  1274. var strCopy = str;
  1275. if (sticky) {
  1276. flags = replace$1(flags, 'y', '');
  1277. if (indexOf(flags, 'g') === -1) {
  1278. flags += 'g';
  1279. }
  1280. strCopy = stringSlice$3(str, re.lastIndex);
  1281. // Support anchored sticky behavior.
  1282. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  1283. source = '(?: ' + source + ')';
  1284. strCopy = ' ' + strCopy;
  1285. charsAdded++;
  1286. }
  1287. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1288. // simulate the 'y' flag.
  1289. reCopy = new RegExp('^(?:' + source + ')', flags);
  1290. }
  1291. if (NPCG_INCLUDED) {
  1292. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1293. }
  1294. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1295. match = call$4(nativeExec, sticky ? reCopy : re, strCopy);
  1296. if (sticky) {
  1297. if (match) {
  1298. match.input = stringSlice$3(match.input, charsAdded);
  1299. match[0] = stringSlice$3(match[0], charsAdded);
  1300. match.index = re.lastIndex;
  1301. re.lastIndex += match[0].length;
  1302. } else re.lastIndex = 0;
  1303. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1304. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1305. }
  1306. if (NPCG_INCLUDED && match && match.length > 1) {
  1307. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1308. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  1309. call$4(nativeReplace, match[0], reCopy, function () {
  1310. for (i = 1; i < arguments.length - 2; i++) {
  1311. if (arguments[i] === undefined) match[i] = undefined;
  1312. }
  1313. });
  1314. }
  1315. if (match && groups) {
  1316. match.groups = object = create$1(null);
  1317. for (i = 0; i < groups.length; i++) {
  1318. group = groups[i];
  1319. object[group[0]] = match[group[1]];
  1320. }
  1321. }
  1322. return match;
  1323. };
  1324. }
  1325. var regexpExec$2 = patchedExec;
  1326. var $$6 = _export;
  1327. var exec$1 = regexpExec$2;
  1328. // `RegExp.prototype.exec` method
  1329. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1330. $$6({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
  1331. exec: exec$1
  1332. });
  1333. var NATIVE_BIND$1 = functionBindNative;
  1334. var FunctionPrototype = Function.prototype;
  1335. var apply$1 = FunctionPrototype.apply;
  1336. var call$3 = FunctionPrototype.call;
  1337. // eslint-disable-next-line es/no-reflect -- safe
  1338. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$3.bind(apply$1) : function () {
  1339. return call$3.apply(apply$1, arguments);
  1340. });
  1341. // TODO: Remove from `core-js@4` since it's moved to entry points
  1342. var uncurryThis$9 = functionUncurryThis;
  1343. var defineBuiltIn$1 = defineBuiltIn$3;
  1344. var regexpExec$1 = regexpExec$2;
  1345. var fails$6 = fails$i;
  1346. var wellKnownSymbol$6 = wellKnownSymbol$a;
  1347. var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
  1348. var SPECIES$3 = wellKnownSymbol$6('species');
  1349. var RegExpPrototype = RegExp.prototype;
  1350. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1351. var SYMBOL = wellKnownSymbol$6(KEY);
  1352. var DELEGATES_TO_SYMBOL = !fails$6(function () {
  1353. // String methods call symbol-named RegEp methods
  1354. var O = {};
  1355. O[SYMBOL] = function () { return 7; };
  1356. return ''[KEY](O) != 7;
  1357. });
  1358. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$6(function () {
  1359. // Symbol-named RegExp methods call .exec
  1360. var execCalled = false;
  1361. var re = /a/;
  1362. if (KEY === 'split') {
  1363. // We can't use real regex here since it causes deoptimization
  1364. // and serious performance degradation in V8
  1365. // https://github.com/zloirock/core-js/issues/306
  1366. re = {};
  1367. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1368. // a new one. We need to return the patched regex when creating the new one.
  1369. re.constructor = {};
  1370. re.constructor[SPECIES$3] = function () { return re; };
  1371. re.flags = '';
  1372. re[SYMBOL] = /./[SYMBOL];
  1373. }
  1374. re.exec = function () { execCalled = true; return null; };
  1375. re[SYMBOL]('');
  1376. return !execCalled;
  1377. });
  1378. if (
  1379. !DELEGATES_TO_SYMBOL ||
  1380. !DELEGATES_TO_EXEC ||
  1381. FORCED
  1382. ) {
  1383. var uncurriedNativeRegExpMethod = uncurryThis$9(/./[SYMBOL]);
  1384. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1385. var uncurriedNativeMethod = uncurryThis$9(nativeMethod);
  1386. var $exec = regexp.exec;
  1387. if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
  1388. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1389. // The native String method already delegates to @@method (this
  1390. // polyfilled function), leasing to infinite recursion.
  1391. // We avoid it by directly calling the native @@method method.
  1392. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  1393. }
  1394. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  1395. }
  1396. return { done: false };
  1397. });
  1398. defineBuiltIn$1(String.prototype, KEY, methods[0]);
  1399. defineBuiltIn$1(RegExpPrototype, SYMBOL, methods[1]);
  1400. }
  1401. if (SHAM) createNonEnumerableProperty$1(RegExpPrototype[SYMBOL], 'sham', true);
  1402. };
  1403. var uncurryThis$8 = functionUncurryThis;
  1404. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  1405. var toString$2 = toString$4;
  1406. var requireObjectCoercible$1 = requireObjectCoercible$4;
  1407. var charAt$2 = uncurryThis$8(''.charAt);
  1408. var charCodeAt = uncurryThis$8(''.charCodeAt);
  1409. var stringSlice$2 = uncurryThis$8(''.slice);
  1410. var createMethod$1 = function (CONVERT_TO_STRING) {
  1411. return function ($this, pos) {
  1412. var S = toString$2(requireObjectCoercible$1($this));
  1413. var position = toIntegerOrInfinity$1(pos);
  1414. var size = S.length;
  1415. var first, second;
  1416. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  1417. first = charCodeAt(S, position);
  1418. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  1419. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  1420. ? CONVERT_TO_STRING
  1421. ? charAt$2(S, position)
  1422. : first
  1423. : CONVERT_TO_STRING
  1424. ? stringSlice$2(S, position, position + 2)
  1425. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  1426. };
  1427. };
  1428. var stringMultibyte = {
  1429. // `String.prototype.codePointAt` method
  1430. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  1431. codeAt: createMethod$1(false),
  1432. // `String.prototype.at` method
  1433. // https://github.com/mathiasbynens/String.prototype.at
  1434. charAt: createMethod$1(true)
  1435. };
  1436. var charAt$1 = stringMultibyte.charAt;
  1437. // `AdvanceStringIndex` abstract operation
  1438. // https://tc39.es/ecma262/#sec-advancestringindex
  1439. var advanceStringIndex$1 = function (S, index, unicode) {
  1440. return index + (unicode ? charAt$1(S, index).length : 1);
  1441. };
  1442. var uncurryThis$7 = functionUncurryThis;
  1443. var toObject$3 = toObject$5;
  1444. var floor = Math.floor;
  1445. var charAt = uncurryThis$7(''.charAt);
  1446. var replace = uncurryThis$7(''.replace);
  1447. var stringSlice$1 = uncurryThis$7(''.slice);
  1448. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  1449. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  1450. // `GetSubstitution` abstract operation
  1451. // https://tc39.es/ecma262/#sec-getsubstitution
  1452. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  1453. var tailPos = position + matched.length;
  1454. var m = captures.length;
  1455. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1456. if (namedCaptures !== undefined) {
  1457. namedCaptures = toObject$3(namedCaptures);
  1458. symbols = SUBSTITUTION_SYMBOLS;
  1459. }
  1460. return replace(replacement, symbols, function (match, ch) {
  1461. var capture;
  1462. switch (charAt(ch, 0)) {
  1463. case '$': return '$';
  1464. case '&': return matched;
  1465. case '`': return stringSlice$1(str, 0, position);
  1466. case "'": return stringSlice$1(str, tailPos);
  1467. case '<':
  1468. capture = namedCaptures[stringSlice$1(ch, 1, -1)];
  1469. break;
  1470. default: // \d\d?
  1471. var n = +ch;
  1472. if (n === 0) return match;
  1473. if (n > m) {
  1474. var f = floor(n / 10);
  1475. if (f === 0) return match;
  1476. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  1477. return match;
  1478. }
  1479. capture = captures[n - 1];
  1480. }
  1481. return capture === undefined ? '' : capture;
  1482. });
  1483. };
  1484. var call$2 = functionCall;
  1485. var anObject$1 = anObject$7;
  1486. var isCallable$2 = isCallable$e;
  1487. var classof$3 = classofRaw$2;
  1488. var regexpExec = regexpExec$2;
  1489. var $TypeError$1 = TypeError;
  1490. // `RegExpExec` abstract operation
  1491. // https://tc39.es/ecma262/#sec-regexpexec
  1492. var regexpExecAbstract = function (R, S) {
  1493. var exec = R.exec;
  1494. if (isCallable$2(exec)) {
  1495. var result = call$2(exec, R, S);
  1496. if (result !== null) anObject$1(result);
  1497. return result;
  1498. }
  1499. if (classof$3(R) === 'RegExp') return call$2(regexpExec, R, S);
  1500. throw $TypeError$1('RegExp#exec called on incompatible receiver');
  1501. };
  1502. var apply = functionApply;
  1503. var call$1 = functionCall;
  1504. var uncurryThis$6 = functionUncurryThis;
  1505. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  1506. var fails$5 = fails$i;
  1507. var anObject = anObject$7;
  1508. var isCallable$1 = isCallable$e;
  1509. var isNullOrUndefined = isNullOrUndefined$3;
  1510. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  1511. var toLength = toLength$2;
  1512. var toString$1 = toString$4;
  1513. var requireObjectCoercible = requireObjectCoercible$4;
  1514. var advanceStringIndex = advanceStringIndex$1;
  1515. var getMethod = getMethod$2;
  1516. var getSubstitution = getSubstitution$1;
  1517. var regExpExec = regexpExecAbstract;
  1518. var wellKnownSymbol$5 = wellKnownSymbol$a;
  1519. var REPLACE = wellKnownSymbol$5('replace');
  1520. var max$1 = Math.max;
  1521. var min = Math.min;
  1522. var concat$1 = uncurryThis$6([].concat);
  1523. var push$1 = uncurryThis$6([].push);
  1524. var stringIndexOf = uncurryThis$6(''.indexOf);
  1525. var stringSlice = uncurryThis$6(''.slice);
  1526. var maybeToString = function (it) {
  1527. return it === undefined ? it : String(it);
  1528. };
  1529. // IE <= 11 replaces $0 with the whole match, as if it was $&
  1530. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  1531. var REPLACE_KEEPS_$0 = (function () {
  1532. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  1533. return 'a'.replace(/./, '$0') === '$0';
  1534. })();
  1535. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  1536. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  1537. if (/./[REPLACE]) {
  1538. return /./[REPLACE]('a', '$0') === '';
  1539. }
  1540. return false;
  1541. })();
  1542. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$5(function () {
  1543. var re = /./;
  1544. re.exec = function () {
  1545. var result = [];
  1546. result.groups = { a: '7' };
  1547. return result;
  1548. };
  1549. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  1550. return ''.replace(re, '$<a>') !== '7';
  1551. });
  1552. // @@replace logic
  1553. fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  1554. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  1555. return [
  1556. // `String.prototype.replace` method
  1557. // https://tc39.es/ecma262/#sec-string.prototype.replace
  1558. function replace(searchValue, replaceValue) {
  1559. var O = requireObjectCoercible(this);
  1560. var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
  1561. return replacer
  1562. ? call$1(replacer, searchValue, O, replaceValue)
  1563. : call$1(nativeReplace, toString$1(O), searchValue, replaceValue);
  1564. },
  1565. // `RegExp.prototype[@@replace]` method
  1566. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  1567. function (string, replaceValue) {
  1568. var rx = anObject(this);
  1569. var S = toString$1(string);
  1570. if (
  1571. typeof replaceValue == 'string' &&
  1572. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  1573. stringIndexOf(replaceValue, '$<') === -1
  1574. ) {
  1575. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  1576. if (res.done) return res.value;
  1577. }
  1578. var functionalReplace = isCallable$1(replaceValue);
  1579. if (!functionalReplace) replaceValue = toString$1(replaceValue);
  1580. var global = rx.global;
  1581. if (global) {
  1582. var fullUnicode = rx.unicode;
  1583. rx.lastIndex = 0;
  1584. }
  1585. var results = [];
  1586. while (true) {
  1587. var result = regExpExec(rx, S);
  1588. if (result === null) break;
  1589. push$1(results, result);
  1590. if (!global) break;
  1591. var matchStr = toString$1(result[0]);
  1592. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  1593. }
  1594. var accumulatedResult = '';
  1595. var nextSourcePosition = 0;
  1596. for (var i = 0; i < results.length; i++) {
  1597. result = results[i];
  1598. var matched = toString$1(result[0]);
  1599. var position = max$1(min(toIntegerOrInfinity(result.index), S.length), 0);
  1600. var captures = [];
  1601. // NOTE: This is equivalent to
  1602. // captures = result.slice(1).map(maybeToString)
  1603. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  1604. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  1605. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  1606. for (var j = 1; j < result.length; j++) push$1(captures, maybeToString(result[j]));
  1607. var namedCaptures = result.groups;
  1608. if (functionalReplace) {
  1609. var replacerArgs = concat$1([matched], captures, position, S);
  1610. if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
  1611. var replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
  1612. } else {
  1613. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  1614. }
  1615. if (position >= nextSourcePosition) {
  1616. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  1617. nextSourcePosition = position + matched.length;
  1618. }
  1619. }
  1620. return accumulatedResult + stringSlice(S, nextSourcePosition);
  1621. }
  1622. ];
  1623. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  1624. var classof$2 = classofRaw$2;
  1625. // `IsArray` abstract operation
  1626. // https://tc39.es/ecma262/#sec-isarray
  1627. // eslint-disable-next-line es/no-array-isarray -- safe
  1628. var isArray$3 = Array.isArray || function isArray(argument) {
  1629. return classof$2(argument) == 'Array';
  1630. };
  1631. var uncurryThis$5 = functionUncurryThis;
  1632. var fails$4 = fails$i;
  1633. var isCallable = isCallable$e;
  1634. var classof$1 = classof$5;
  1635. var getBuiltIn = getBuiltIn$5;
  1636. var inspectSource = inspectSource$2;
  1637. var noop = function () { /* empty */ };
  1638. var empty = [];
  1639. var construct = getBuiltIn('Reflect', 'construct');
  1640. var constructorRegExp = /^\s*(?:class|function)\b/;
  1641. var exec = uncurryThis$5(constructorRegExp.exec);
  1642. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1643. var isConstructorModern = function isConstructor(argument) {
  1644. if (!isCallable(argument)) return false;
  1645. try {
  1646. construct(noop, empty, argument);
  1647. return true;
  1648. } catch (error) {
  1649. return false;
  1650. }
  1651. };
  1652. var isConstructorLegacy = function isConstructor(argument) {
  1653. if (!isCallable(argument)) return false;
  1654. switch (classof$1(argument)) {
  1655. case 'AsyncFunction':
  1656. case 'GeneratorFunction':
  1657. case 'AsyncGeneratorFunction': return false;
  1658. }
  1659. try {
  1660. // we can't check .prototype since constructors produced by .bind haven't it
  1661. // `Function#toString` throws on some built-it function in some legacy engines
  1662. // (for example, `DOMQuad` and similar in FF41-)
  1663. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1664. } catch (error) {
  1665. return true;
  1666. }
  1667. };
  1668. isConstructorLegacy.sham = true;
  1669. // `IsConstructor` abstract operation
  1670. // https://tc39.es/ecma262/#sec-isconstructor
  1671. var isConstructor$2 = !construct || fails$4(function () {
  1672. var called;
  1673. return isConstructorModern(isConstructorModern.call)
  1674. || !isConstructorModern(Object)
  1675. || !isConstructorModern(function () { called = true; })
  1676. || called;
  1677. }) ? isConstructorLegacy : isConstructorModern;
  1678. var toPropertyKey = toPropertyKey$3;
  1679. var definePropertyModule = objectDefineProperty;
  1680. var createPropertyDescriptor = createPropertyDescriptor$3;
  1681. var createProperty$2 = function (object, key, value) {
  1682. var propertyKey = toPropertyKey(key);
  1683. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  1684. else object[propertyKey] = value;
  1685. };
  1686. var fails$3 = fails$i;
  1687. var wellKnownSymbol$4 = wellKnownSymbol$a;
  1688. var V8_VERSION$1 = engineV8Version;
  1689. var SPECIES$2 = wellKnownSymbol$4('species');
  1690. var arrayMethodHasSpeciesSupport$3 = function (METHOD_NAME) {
  1691. // We can't use this feature detection in V8 since it causes
  1692. // deoptimization and serious performance degradation
  1693. // https://github.com/zloirock/core-js/issues/677
  1694. return V8_VERSION$1 >= 51 || !fails$3(function () {
  1695. var array = [];
  1696. var constructor = array.constructor = {};
  1697. constructor[SPECIES$2] = function () {
  1698. return { foo: 1 };
  1699. };
  1700. return array[METHOD_NAME](Boolean).foo !== 1;
  1701. });
  1702. };
  1703. var uncurryThis$4 = functionUncurryThis;
  1704. var arraySlice = uncurryThis$4([].slice);
  1705. var $$5 = _export;
  1706. var isArray$2 = isArray$3;
  1707. var isConstructor$1 = isConstructor$2;
  1708. var isObject$2 = isObject$8;
  1709. var toAbsoluteIndex = toAbsoluteIndex$2;
  1710. var lengthOfArrayLike$2 = lengthOfArrayLike$4;
  1711. var toIndexedObject$1 = toIndexedObject$6;
  1712. var createProperty$1 = createProperty$2;
  1713. var wellKnownSymbol$3 = wellKnownSymbol$a;
  1714. var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$3;
  1715. var nativeSlice = arraySlice;
  1716. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$2('slice');
  1717. var SPECIES$1 = wellKnownSymbol$3('species');
  1718. var $Array$1 = Array;
  1719. var max = Math.max;
  1720. // `Array.prototype.slice` method
  1721. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1722. // fallback for not array-like ES3 strings and DOM objects
  1723. $$5({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1724. slice: function slice(start, end) {
  1725. var O = toIndexedObject$1(this);
  1726. var length = lengthOfArrayLike$2(O);
  1727. var k = toAbsoluteIndex(start, length);
  1728. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1729. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1730. var Constructor, result, n;
  1731. if (isArray$2(O)) {
  1732. Constructor = O.constructor;
  1733. // cross-realm fallback
  1734. if (isConstructor$1(Constructor) && (Constructor === $Array$1 || isArray$2(Constructor.prototype))) {
  1735. Constructor = undefined;
  1736. } else if (isObject$2(Constructor)) {
  1737. Constructor = Constructor[SPECIES$1];
  1738. if (Constructor === null) Constructor = undefined;
  1739. }
  1740. if (Constructor === $Array$1 || Constructor === undefined) {
  1741. return nativeSlice(O, k, fin);
  1742. }
  1743. }
  1744. result = new (Constructor === undefined ? $Array$1 : Constructor)(max(fin - k, 0));
  1745. for (n = 0; k < fin; k++, n++) if (k in O) createProperty$1(result, n, O[k]);
  1746. result.length = n;
  1747. return result;
  1748. }
  1749. });
  1750. var uncurryThis$3 = functionUncurryThis;
  1751. var aCallable = aCallable$2;
  1752. var NATIVE_BIND = functionBindNative;
  1753. var bind$1 = uncurryThis$3(uncurryThis$3.bind);
  1754. // optional / simple context binding
  1755. var functionBindContext = function (fn, that) {
  1756. aCallable(fn);
  1757. return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
  1758. return fn.apply(that, arguments);
  1759. };
  1760. };
  1761. var isArray$1 = isArray$3;
  1762. var isConstructor = isConstructor$2;
  1763. var isObject$1 = isObject$8;
  1764. var wellKnownSymbol$2 = wellKnownSymbol$a;
  1765. var SPECIES = wellKnownSymbol$2('species');
  1766. var $Array = Array;
  1767. // a part of `ArraySpeciesCreate` abstract operation
  1768. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1769. var arraySpeciesConstructor$1 = function (originalArray) {
  1770. var C;
  1771. if (isArray$1(originalArray)) {
  1772. C = originalArray.constructor;
  1773. // cross-realm fallback
  1774. if (isConstructor(C) && (C === $Array || isArray$1(C.prototype))) C = undefined;
  1775. else if (isObject$1(C)) {
  1776. C = C[SPECIES];
  1777. if (C === null) C = undefined;
  1778. }
  1779. } return C === undefined ? $Array : C;
  1780. };
  1781. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1782. // `ArraySpeciesCreate` abstract operation
  1783. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1784. var arraySpeciesCreate$2 = function (originalArray, length) {
  1785. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1786. };
  1787. var bind = functionBindContext;
  1788. var uncurryThis$2 = functionUncurryThis;
  1789. var IndexedObject$2 = indexedObject;
  1790. var toObject$2 = toObject$5;
  1791. var lengthOfArrayLike$1 = lengthOfArrayLike$4;
  1792. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1793. var push = uncurryThis$2([].push);
  1794. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1795. var createMethod = function (TYPE) {
  1796. var IS_MAP = TYPE == 1;
  1797. var IS_FILTER = TYPE == 2;
  1798. var IS_SOME = TYPE == 3;
  1799. var IS_EVERY = TYPE == 4;
  1800. var IS_FIND_INDEX = TYPE == 6;
  1801. var IS_FILTER_REJECT = TYPE == 7;
  1802. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1803. return function ($this, callbackfn, that, specificCreate) {
  1804. var O = toObject$2($this);
  1805. var self = IndexedObject$2(O);
  1806. var boundFunction = bind(callbackfn, that);
  1807. var length = lengthOfArrayLike$1(self);
  1808. var index = 0;
  1809. var create = specificCreate || arraySpeciesCreate$1;
  1810. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1811. var value, result;
  1812. for (;length > index; index++) if (NO_HOLES || index in self) {
  1813. value = self[index];
  1814. result = boundFunction(value, index, O);
  1815. if (TYPE) {
  1816. if (IS_MAP) target[index] = result; // map
  1817. else if (result) switch (TYPE) {
  1818. case 3: return true; // some
  1819. case 5: return value; // find
  1820. case 6: return index; // findIndex
  1821. case 2: push(target, value); // filter
  1822. } else switch (TYPE) {
  1823. case 4: return false; // every
  1824. case 7: push(target, value); // filterReject
  1825. }
  1826. }
  1827. }
  1828. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1829. };
  1830. };
  1831. var arrayIteration = {
  1832. // `Array.prototype.forEach` method
  1833. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1834. forEach: createMethod(0),
  1835. // `Array.prototype.map` method
  1836. // https://tc39.es/ecma262/#sec-array.prototype.map
  1837. map: createMethod(1),
  1838. // `Array.prototype.filter` method
  1839. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1840. filter: createMethod(2),
  1841. // `Array.prototype.some` method
  1842. // https://tc39.es/ecma262/#sec-array.prototype.some
  1843. some: createMethod(3),
  1844. // `Array.prototype.every` method
  1845. // https://tc39.es/ecma262/#sec-array.prototype.every
  1846. every: createMethod(4),
  1847. // `Array.prototype.find` method
  1848. // https://tc39.es/ecma262/#sec-array.prototype.find
  1849. find: createMethod(5),
  1850. // `Array.prototype.findIndex` method
  1851. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1852. findIndex: createMethod(6),
  1853. // `Array.prototype.filterReject` method
  1854. // https://github.com/tc39/proposal-array-filtering
  1855. filterReject: createMethod(7)
  1856. };
  1857. var $$4 = _export;
  1858. var $map = arrayIteration.map;
  1859. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$3;
  1860. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('map');
  1861. // `Array.prototype.map` method
  1862. // https://tc39.es/ecma262/#sec-array.prototype.map
  1863. // with adding support of @@species
  1864. $$4({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1865. map: function map(callbackfn /* , thisArg */) {
  1866. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1867. }
  1868. });
  1869. var wellKnownSymbol$1 = wellKnownSymbol$a;
  1870. var create = objectCreate;
  1871. var defineProperty$1 = objectDefineProperty.f;
  1872. var UNSCOPABLES = wellKnownSymbol$1('unscopables');
  1873. var ArrayPrototype = Array.prototype;
  1874. // Array.prototype[@@unscopables]
  1875. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1876. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1877. defineProperty$1(ArrayPrototype, UNSCOPABLES, {
  1878. configurable: true,
  1879. value: create(null)
  1880. });
  1881. }
  1882. // add a key to Array.prototype[@@unscopables]
  1883. var addToUnscopables$1 = function (key) {
  1884. ArrayPrototype[UNSCOPABLES][key] = true;
  1885. };
  1886. var $$3 = _export;
  1887. var $find = arrayIteration.find;
  1888. var addToUnscopables = addToUnscopables$1;
  1889. var FIND = 'find';
  1890. var SKIPS_HOLES = true;
  1891. // Shouldn't skip holes
  1892. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1893. // `Array.prototype.find` method
  1894. // https://tc39.es/ecma262/#sec-array.prototype.find
  1895. $$3({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1896. find: function find(callbackfn /* , that = undefined */) {
  1897. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1898. }
  1899. });
  1900. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1901. addToUnscopables(FIND);
  1902. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1903. var classof = classof$5;
  1904. // `Object.prototype.toString` method implementation
  1905. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1906. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1907. return '[object ' + classof(this) + ']';
  1908. };
  1909. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1910. var defineBuiltIn = defineBuiltIn$3;
  1911. var toString = objectToString;
  1912. // `Object.prototype.toString` method
  1913. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1914. if (!TO_STRING_TAG_SUPPORT) {
  1915. defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
  1916. }
  1917. var DESCRIPTORS = descriptors;
  1918. var uncurryThis$1 = functionUncurryThis;
  1919. var call = functionCall;
  1920. var fails$2 = fails$i;
  1921. var objectKeys = objectKeys$2;
  1922. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1923. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1924. var toObject$1 = toObject$5;
  1925. var IndexedObject$1 = indexedObject;
  1926. // eslint-disable-next-line es/no-object-assign -- safe
  1927. var $assign = Object.assign;
  1928. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1929. var defineProperty = Object.defineProperty;
  1930. var concat = uncurryThis$1([].concat);
  1931. // `Object.assign` method
  1932. // https://tc39.es/ecma262/#sec-object.assign
  1933. var objectAssign = !$assign || fails$2(function () {
  1934. // should have correct order of operations (Edge bug)
  1935. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1936. enumerable: true,
  1937. get: function () {
  1938. defineProperty(this, 'b', {
  1939. value: 3,
  1940. enumerable: false
  1941. });
  1942. }
  1943. }), { b: 2 })).b !== 1) return true;
  1944. // should work with symbols and should have deterministic property order (V8 bug)
  1945. var A = {};
  1946. var B = {};
  1947. // eslint-disable-next-line es/no-symbol -- safe
  1948. var symbol = Symbol();
  1949. var alphabet = 'abcdefghijklmnopqrst';
  1950. A[symbol] = 7;
  1951. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1952. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  1953. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1954. var T = toObject$1(target);
  1955. var argumentsLength = arguments.length;
  1956. var index = 1;
  1957. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1958. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1959. while (argumentsLength > index) {
  1960. var S = IndexedObject$1(arguments[index++]);
  1961. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1962. var length = keys.length;
  1963. var j = 0;
  1964. var key;
  1965. while (length > j) {
  1966. key = keys[j++];
  1967. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  1968. }
  1969. } return T;
  1970. } : $assign;
  1971. var $$2 = _export;
  1972. var assign = objectAssign;
  1973. // `Object.assign` method
  1974. // https://tc39.es/ecma262/#sec-object.assign
  1975. // eslint-disable-next-line es/no-object-assign -- required for testing
  1976. $$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1977. assign: assign
  1978. });
  1979. var $TypeError = TypeError;
  1980. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1981. var doesNotExceedSafeInteger$1 = function (it) {
  1982. if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
  1983. return it;
  1984. };
  1985. var $$1 = _export;
  1986. var fails$1 = fails$i;
  1987. var isArray = isArray$3;
  1988. var isObject = isObject$8;
  1989. var toObject = toObject$5;
  1990. var lengthOfArrayLike = lengthOfArrayLike$4;
  1991. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1992. var createProperty = createProperty$2;
  1993. var arraySpeciesCreate = arraySpeciesCreate$2;
  1994. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$3;
  1995. var wellKnownSymbol = wellKnownSymbol$a;
  1996. var V8_VERSION = engineV8Version;
  1997. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1998. // We can't use this feature detection in V8 since it causes
  1999. // deoptimization and serious performance degradation
  2000. // https://github.com/zloirock/core-js/issues/679
  2001. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$1(function () {
  2002. var array = [];
  2003. array[IS_CONCAT_SPREADABLE] = false;
  2004. return array.concat()[0] !== array;
  2005. });
  2006. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  2007. var isConcatSpreadable = function (O) {
  2008. if (!isObject(O)) return false;
  2009. var spreadable = O[IS_CONCAT_SPREADABLE];
  2010. return spreadable !== undefined ? !!spreadable : isArray(O);
  2011. };
  2012. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  2013. // `Array.prototype.concat` method
  2014. // https://tc39.es/ecma262/#sec-array.prototype.concat
  2015. // with adding support of @@isConcatSpreadable and @@species
  2016. $$1({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  2017. // eslint-disable-next-line no-unused-vars -- required for `.length`
  2018. concat: function concat(arg) {
  2019. var O = toObject(this);
  2020. var A = arraySpeciesCreate(O, 0);
  2021. var n = 0;
  2022. var i, k, length, len, E;
  2023. for (i = -1, length = arguments.length; i < length; i++) {
  2024. E = i === -1 ? O : arguments[i];
  2025. if (isConcatSpreadable(E)) {
  2026. len = lengthOfArrayLike(E);
  2027. doesNotExceedSafeInteger(n + len);
  2028. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  2029. } else {
  2030. doesNotExceedSafeInteger(n + 1);
  2031. createProperty(A, n++, E);
  2032. }
  2033. }
  2034. A.length = n;
  2035. return A;
  2036. }
  2037. });
  2038. var fails = fails$i;
  2039. var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
  2040. var method = [][METHOD_NAME];
  2041. return !!method && fails(function () {
  2042. // eslint-disable-next-line no-useless-call -- required for testing
  2043. method.call(null, argument || function () { return 1; }, 1);
  2044. });
  2045. };
  2046. var $ = _export;
  2047. var uncurryThis = functionUncurryThis;
  2048. var IndexedObject = indexedObject;
  2049. var toIndexedObject = toIndexedObject$6;
  2050. var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
  2051. var nativeJoin = uncurryThis([].join);
  2052. var ES3_STRINGS = IndexedObject != Object;
  2053. var STRICT_METHOD$1 = arrayMethodIsStrict$1('join', ',');
  2054. // `Array.prototype.join` method
  2055. // https://tc39.es/ecma262/#sec-array.prototype.join
  2056. $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
  2057. join: function join(separator) {
  2058. return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  2059. }
  2060. });
  2061. // iterable DOM collections
  2062. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  2063. var domIterables = {
  2064. CSSRuleList: 0,
  2065. CSSStyleDeclaration: 0,
  2066. CSSValueList: 0,
  2067. ClientRectList: 0,
  2068. DOMRectList: 0,
  2069. DOMStringList: 0,
  2070. DOMTokenList: 1,
  2071. DataTransferItemList: 0,
  2072. FileList: 0,
  2073. HTMLAllCollection: 0,
  2074. HTMLCollection: 0,
  2075. HTMLFormElement: 0,
  2076. HTMLSelectElement: 0,
  2077. MediaList: 0,
  2078. MimeTypeArray: 0,
  2079. NamedNodeMap: 0,
  2080. NodeList: 1,
  2081. PaintRequestList: 0,
  2082. Plugin: 0,
  2083. PluginArray: 0,
  2084. SVGLengthList: 0,
  2085. SVGNumberList: 0,
  2086. SVGPathSegList: 0,
  2087. SVGPointList: 0,
  2088. SVGStringList: 0,
  2089. SVGTransformList: 0,
  2090. SourceBufferList: 0,
  2091. StyleSheetList: 0,
  2092. TextTrackCueList: 0,
  2093. TextTrackList: 0,
  2094. TouchList: 0
  2095. };
  2096. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  2097. var documentCreateElement = documentCreateElement$2;
  2098. var classList = documentCreateElement('span').classList;
  2099. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  2100. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  2101. var $forEach = arrayIteration.forEach;
  2102. var arrayMethodIsStrict = arrayMethodIsStrict$2;
  2103. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  2104. // `Array.prototype.forEach` method implementation
  2105. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  2106. var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  2107. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  2108. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  2109. } : [].forEach;
  2110. var global$1 = global$e;
  2111. var DOMIterables = domIterables;
  2112. var DOMTokenListPrototype = domTokenListPrototype;
  2113. var forEach = arrayForEach;
  2114. var createNonEnumerableProperty = createNonEnumerableProperty$4;
  2115. var handlePrototype = function (CollectionPrototype) {
  2116. // some Chrome versions have non-configurable methods on DOMTokenList
  2117. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  2118. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  2119. } catch (error) {
  2120. CollectionPrototype.forEach = forEach;
  2121. }
  2122. };
  2123. for (var COLLECTION_NAME in DOMIterables) {
  2124. if (DOMIterables[COLLECTION_NAME]) {
  2125. handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype);
  2126. }
  2127. }
  2128. handlePrototype(DOMTokenListPrototype);
  2129. /**
  2130. * @author zhixin wen <wenzhixin2010@gmail.com>
  2131. * extensions: https://github.com/hhurz/tableExport.jquery.plugin
  2132. */
  2133. var Utils = $__default["default"].fn.bootstrapTable.utils;
  2134. var TYPE_NAME = {
  2135. json: 'JSON',
  2136. xml: 'XML',
  2137. png: 'PNG',
  2138. csv: 'CSV',
  2139. txt: 'TXT',
  2140. sql: 'SQL',
  2141. doc: 'MS-Word',
  2142. excel: 'MS-Excel',
  2143. xlsx: 'MS-Excel (OpenXML)',
  2144. powerpoint: 'MS-Powerpoint',
  2145. pdf: 'PDF'
  2146. };
  2147. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  2148. showExport: false,
  2149. exportDataType: 'basic',
  2150. // basic, all, selected
  2151. exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
  2152. exportOptions: {},
  2153. exportFooter: false
  2154. });
  2155. $__default["default"].extend($__default["default"].fn.bootstrapTable.columnDefaults, {
  2156. forceExport: false,
  2157. forceHide: false
  2158. });
  2159. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  2160. export: {
  2161. bootstrap3: 'glyphicon-export icon-share',
  2162. bootstrap5: 'bi-download',
  2163. materialize: 'file_download',
  2164. 'bootstrap-table': 'icon-download'
  2165. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-download'
  2166. });
  2167. $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
  2168. formatExport: function formatExport() {
  2169. return 'Export data';
  2170. }
  2171. });
  2172. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
  2173. $__default["default"].fn.bootstrapTable.methods.push('exportTable');
  2174. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  2175. // eslint-disable-next-line no-unused-vars
  2176. onExportSaved: function onExportSaved(exportedRows) {
  2177. return false;
  2178. },
  2179. onExportStarted: function onExportStarted() {
  2180. return false;
  2181. }
  2182. });
  2183. $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
  2184. 'export-saved.bs.table': 'onExportSaved',
  2185. 'export-started.bs.table': 'onExportStarted'
  2186. });
  2187. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  2188. _inherits(_class, _$$BootstrapTable);
  2189. var _super = _createSuper(_class);
  2190. function _class() {
  2191. _classCallCheck(this, _class);
  2192. return _super.apply(this, arguments);
  2193. }
  2194. _createClass(_class, [{
  2195. key: "initToolbar",
  2196. value: function initToolbar() {
  2197. var _this = this,
  2198. _get2;
  2199. var o = this.options;
  2200. var exportTypes = o.exportTypes;
  2201. this.showToolbar = this.showToolbar || o.showExport;
  2202. if (this.options.showExport) {
  2203. if (typeof exportTypes === 'string') {
  2204. var types = exportTypes.slice(1, -1).replace(/ /g, '').split(',');
  2205. exportTypes = types.map(function (t) {
  2206. return t.slice(1, -1);
  2207. });
  2208. }
  2209. if (typeof o.exportOptions === 'string') {
  2210. o.exportOptions = Utils.calculateObjectValue(null, o.exportOptions);
  2211. }
  2212. this.$export = this.$toolbar.find('>.columns div.export');
  2213. if (this.$export.length) {
  2214. this.updateExportButton();
  2215. return;
  2216. }
  2217. this.buttons = Object.assign(this.buttons, {
  2218. export: {
  2219. html: function html() {
  2220. if (exportTypes.length === 1) {
  2221. return "\n <div class=\"export ".concat(_this.constants.classes.buttonsDropdown, "\"\n data-type=\"").concat(exportTypes[0], "\">\n <button class=\"").concat(_this.constants.buttonsClass, "\"\n aria-label=\"").concat(o.formatExport(), "\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(_this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n </button>\n </div>\n ");
  2222. }
  2223. var html = [];
  2224. html.push("\n <div class=\"export ".concat(_this.constants.classes.buttonsDropdown, "\">\n <button class=\"").concat(_this.constants.buttonsClass, " dropdown-toggle\"\n aria-label=\"").concat(o.formatExport(), "\"\n ").concat(_this.constants.dataToggle, "=\"dropdown\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(_this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n ").concat(_this.constants.html.dropdownCaret, "\n </button>\n ").concat(_this.constants.html.toolbarDropdown[0], "\n "));
  2225. var _iterator = _createForOfIteratorHelper(exportTypes),
  2226. _step;
  2227. try {
  2228. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  2229. var type = _step.value;
  2230. if (TYPE_NAME.hasOwnProperty(type)) {
  2231. var $item = $__default["default"](Utils.sprintf(_this.constants.html.pageDropdownItem, '', TYPE_NAME[type]));
  2232. $item.attr('data-type', type);
  2233. html.push($item.prop('outerHTML'));
  2234. }
  2235. }
  2236. } catch (err) {
  2237. _iterator.e(err);
  2238. } finally {
  2239. _iterator.f();
  2240. }
  2241. html.push(_this.constants.html.toolbarDropdown[1], '</div>');
  2242. return html.join('');
  2243. }
  2244. }
  2245. });
  2246. }
  2247. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2248. args[_key] = arguments[_key];
  2249. }
  2250. (_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args));
  2251. this.$export = this.$toolbar.find('>.columns div.export');
  2252. if (!this.options.showExport) {
  2253. return;
  2254. }
  2255. this.updateExportButton();
  2256. var $exportButtons = this.$export.find('[data-type]');
  2257. if (exportTypes.length === 1) {
  2258. $exportButtons = this.$export;
  2259. }
  2260. $exportButtons.click(function (e) {
  2261. e.preventDefault();
  2262. _this.exportTable({
  2263. type: $__default["default"](e.currentTarget).data('type')
  2264. });
  2265. });
  2266. this.handleToolbar();
  2267. }
  2268. }, {
  2269. key: "handleToolbar",
  2270. value: function handleToolbar() {
  2271. if (!this.$export) {
  2272. return;
  2273. }
  2274. if (_get(_getPrototypeOf(_class.prototype), "handleToolbar", this)) {
  2275. _get(_getPrototypeOf(_class.prototype), "handleToolbar", this).call(this);
  2276. }
  2277. }
  2278. }, {
  2279. key: "exportTable",
  2280. value: function exportTable(options) {
  2281. var _this2 = this;
  2282. var o = this.options;
  2283. var stateField = this.header.stateField;
  2284. var isCardView = o.cardView;
  2285. var doExport = function doExport(callback) {
  2286. _this2.trigger('export-started');
  2287. if (stateField) {
  2288. _this2.hideColumn(stateField);
  2289. }
  2290. if (isCardView) {
  2291. _this2.toggleView();
  2292. }
  2293. _this2.columns.forEach(function (row) {
  2294. if (row.forceHide) {
  2295. _this2.hideColumn(row.field);
  2296. }
  2297. });
  2298. var data = _this2.getData();
  2299. if (o.detailView && o.detailViewIcon) {
  2300. var detailViewIndex = o.detailViewAlign === 'left' ? 0 : _this2.getVisibleFields().length + Utils.getDetailViewIndexOffset(_this2.options);
  2301. o.exportOptions.ignoreColumn = [detailViewIndex].concat(o.exportOptions.ignoreColumn || []);
  2302. }
  2303. if (o.exportFooter && o.height) {
  2304. var $footerRow = _this2.$tableFooter.find('tr').first();
  2305. var footerData = {};
  2306. var footerHtml = [];
  2307. $__default["default"].each($footerRow.children(), function (index, footerCell) {
  2308. var footerCellHtml = $__default["default"](footerCell).children('.th-inner').first().html();
  2309. footerData[_this2.columns[index].field] = footerCellHtml === '&nbsp;' ? null : footerCellHtml;
  2310. // grab footer cell text into cell index-based array
  2311. footerHtml.push(footerCellHtml);
  2312. });
  2313. _this2.$body.append(_this2.$body.children().last()[0].outerHTML);
  2314. var $lastTableRow = _this2.$body.children().last();
  2315. $__default["default"].each($lastTableRow.children(), function (index, lastTableRowCell) {
  2316. $__default["default"](lastTableRowCell).html(footerHtml[index]);
  2317. });
  2318. }
  2319. var hiddenColumns = _this2.getHiddenColumns();
  2320. hiddenColumns.forEach(function (row) {
  2321. if (row.forceExport) {
  2322. _this2.showColumn(row.field);
  2323. }
  2324. });
  2325. if (typeof o.exportOptions.fileName === 'function') {
  2326. options.fileName = o.exportOptions.fileName();
  2327. }
  2328. _this2.$el.tableExport($__default["default"].extend({
  2329. onAfterSaveToFile: function onAfterSaveToFile() {
  2330. if (o.exportFooter) {
  2331. _this2.load(data);
  2332. }
  2333. if (stateField) {
  2334. _this2.showColumn(stateField);
  2335. }
  2336. if (isCardView) {
  2337. _this2.toggleView();
  2338. }
  2339. hiddenColumns.forEach(function (row) {
  2340. if (row.forceExport) {
  2341. _this2.hideColumn(row.field);
  2342. }
  2343. });
  2344. _this2.columns.forEach(function (row) {
  2345. if (row.forceHide) {
  2346. _this2.showColumn(row.field);
  2347. }
  2348. });
  2349. if (callback) callback();
  2350. }
  2351. }, o.exportOptions, options));
  2352. };
  2353. if (o.exportDataType === 'all' && o.pagination) {
  2354. var eventName = o.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table';
  2355. var virtualScroll = this.options.virtualScroll;
  2356. this.$el.one(eventName, function () {
  2357. setTimeout(function () {
  2358. doExport(function () {
  2359. _this2.options.virtualScroll = virtualScroll;
  2360. _this2.togglePagination();
  2361. });
  2362. }, 0);
  2363. });
  2364. this.options.virtualScroll = false;
  2365. this.togglePagination();
  2366. this.trigger('export-saved', this.getData());
  2367. } else if (o.exportDataType === 'selected') {
  2368. var data = this.getData();
  2369. var selectedData = this.getSelections();
  2370. var pagination = o.pagination;
  2371. if (!selectedData.length) {
  2372. return;
  2373. }
  2374. if (o.sidePagination === 'server') {
  2375. data = _defineProperty({
  2376. total: o.totalRows
  2377. }, this.options.dataField, data);
  2378. selectedData = _defineProperty({
  2379. total: selectedData.length
  2380. }, this.options.dataField, selectedData);
  2381. }
  2382. this.load(selectedData);
  2383. if (pagination) {
  2384. this.togglePagination();
  2385. }
  2386. doExport(function () {
  2387. if (pagination) {
  2388. _this2.togglePagination();
  2389. }
  2390. _this2.load(data);
  2391. });
  2392. this.trigger('export-saved', selectedData);
  2393. } else {
  2394. doExport();
  2395. this.trigger('export-saved', this.getData(true));
  2396. }
  2397. }
  2398. }, {
  2399. key: "updateSelected",
  2400. value: function updateSelected() {
  2401. _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this);
  2402. this.updateExportButton();
  2403. }
  2404. }, {
  2405. key: "updateExportButton",
  2406. value: function updateExportButton() {
  2407. if (this.options.exportDataType === 'selected') {
  2408. this.$export.find('> button').prop('disabled', !this.getSelections().length);
  2409. }
  2410. }
  2411. }]);
  2412. return _class;
  2413. }($__default["default"].BootstrapTable);
  2414. }));