bootstrap-table-treegrid.js 61 KB

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