bootstrap-table-treegrid.js 60 KB

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