bootstrap-table-editable.js 88 KB

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