bootstrap-table-treegrid.js 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796
  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 = global || self, factory(global.jQuery));
  5. }(this, function ($) { 'use strict';
  6. $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  7. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  8. var global = typeof window == 'object' && window && window.Math == Math ? window
  9. : typeof self == 'object' && self && self.Math == Math ? self
  10. // eslint-disable-next-line no-new-func
  11. : Function('return this')();
  12. var hasOwnProperty = {}.hasOwnProperty;
  13. var has = function (it, key) {
  14. return hasOwnProperty.call(it, key);
  15. };
  16. var fails = function (exec) {
  17. try {
  18. return !!exec();
  19. } catch (e) {
  20. return true;
  21. }
  22. };
  23. // Thank's IE8 for his funny defineProperty
  24. var descriptors = !fails(function () {
  25. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  26. });
  27. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  28. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  29. // Nashorn ~ JDK8 bug
  30. var NASHORN_BUG = nativeGetOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  31. var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  32. var descriptor = nativeGetOwnPropertyDescriptor(this, V);
  33. return !!descriptor && descriptor.enumerable;
  34. } : nativePropertyIsEnumerable;
  35. var objectPropertyIsEnumerable = {
  36. f: f
  37. };
  38. var createPropertyDescriptor = function (bitmap, value) {
  39. return {
  40. enumerable: !(bitmap & 1),
  41. configurable: !(bitmap & 2),
  42. writable: !(bitmap & 4),
  43. value: value
  44. };
  45. };
  46. var toString = {}.toString;
  47. var classofRaw = function (it) {
  48. return toString.call(it).slice(8, -1);
  49. };
  50. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  51. var split = ''.split;
  52. var indexedObject = fails(function () {
  53. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  54. // eslint-disable-next-line no-prototype-builtins
  55. return !Object('z').propertyIsEnumerable(0);
  56. }) ? function (it) {
  57. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  58. } : Object;
  59. // `RequireObjectCoercible` abstract operation
  60. // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
  61. var requireObjectCoercible = function (it) {
  62. if (it == undefined) throw TypeError("Can't call method on " + it);
  63. return it;
  64. };
  65. // toObject with fallback for non-array-like ES3 strings
  66. var toIndexedObject = function (it) {
  67. return indexedObject(requireObjectCoercible(it));
  68. };
  69. var isObject = function (it) {
  70. return typeof it === 'object' ? it !== null : typeof it === 'function';
  71. };
  72. // 7.1.1 ToPrimitive(input [, PreferredType])
  73. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  74. // and the second argument - flag - preferred type is a string
  75. var toPrimitive = function (it, S) {
  76. if (!isObject(it)) return it;
  77. var fn, val;
  78. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  79. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  80. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  81. throw TypeError("Can't convert object to primitive value");
  82. };
  83. var document = global.document;
  84. // typeof document.createElement is 'object' in old IE
  85. var exist = isObject(document) && isObject(document.createElement);
  86. var documentCreateElement = function (it) {
  87. return exist ? document.createElement(it) : {};
  88. };
  89. // Thank's IE8 for his funny defineProperty
  90. var ie8DomDefine = !descriptors && !fails(function () {
  91. return Object.defineProperty(documentCreateElement('div'), 'a', {
  92. get: function () { return 7; }
  93. }).a != 7;
  94. });
  95. var nativeGetOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  96. var f$1 = descriptors ? nativeGetOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  97. O = toIndexedObject(O);
  98. P = toPrimitive(P, true);
  99. if (ie8DomDefine) try {
  100. return nativeGetOwnPropertyDescriptor$1(O, P);
  101. } catch (e) { /* empty */ }
  102. if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  103. };
  104. var objectGetOwnPropertyDescriptor = {
  105. f: f$1
  106. };
  107. var anObject = function (it) {
  108. if (!isObject(it)) {
  109. throw TypeError(String(it) + ' is not an object');
  110. } return it;
  111. };
  112. var nativeDefineProperty = Object.defineProperty;
  113. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  114. anObject(O);
  115. P = toPrimitive(P, true);
  116. anObject(Attributes);
  117. if (ie8DomDefine) try {
  118. return nativeDefineProperty(O, P, Attributes);
  119. } catch (e) { /* empty */ }
  120. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  121. if ('value' in Attributes) O[P] = Attributes.value;
  122. return O;
  123. };
  124. var objectDefineProperty = {
  125. f: f$2
  126. };
  127. var hide = descriptors ? function (object, key, value) {
  128. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  129. } : function (object, key, value) {
  130. object[key] = value;
  131. return object;
  132. };
  133. function createCommonjsModule(fn, module) {
  134. return module = { exports: {} }, fn(module, module.exports), module.exports;
  135. }
  136. var setGlobal = function (key, value) {
  137. try {
  138. hide(global, key, value);
  139. } catch (e) {
  140. global[key] = value;
  141. } return value;
  142. };
  143. var shared = createCommonjsModule(function (module) {
  144. var SHARED = '__core-js_shared__';
  145. var store = global[SHARED] || setGlobal(SHARED, {});
  146. (module.exports = function (key, value) {
  147. return store[key] || (store[key] = value !== undefined ? value : {});
  148. })('versions', []).push({
  149. version: '3.0.0',
  150. mode: 'global',
  151. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  152. });
  153. });
  154. var functionToString = shared('native-function-to-string', Function.toString);
  155. var WeakMap = global.WeakMap;
  156. var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
  157. var id = 0;
  158. var postfix = Math.random();
  159. var uid = function (key) {
  160. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36));
  161. };
  162. var shared$1 = shared('keys');
  163. var sharedKey = function (key) {
  164. return shared$1[key] || (shared$1[key] = uid(key));
  165. };
  166. var hiddenKeys = {};
  167. var WeakMap$1 = global.WeakMap;
  168. var set, get, has$1;
  169. var enforce = function (it) {
  170. return has$1(it) ? get(it) : set(it, {});
  171. };
  172. var getterFor = function (TYPE) {
  173. return function (it) {
  174. var state;
  175. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  176. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  177. } return state;
  178. };
  179. };
  180. if (nativeWeakMap) {
  181. var store = new WeakMap$1();
  182. var wmget = store.get;
  183. var wmhas = store.has;
  184. var wmset = store.set;
  185. set = function (it, metadata) {
  186. wmset.call(store, it, metadata);
  187. return metadata;
  188. };
  189. get = function (it) {
  190. return wmget.call(store, it) || {};
  191. };
  192. has$1 = function (it) {
  193. return wmhas.call(store, it);
  194. };
  195. } else {
  196. var STATE = sharedKey('state');
  197. hiddenKeys[STATE] = true;
  198. set = function (it, metadata) {
  199. hide(it, STATE, metadata);
  200. return metadata;
  201. };
  202. get = function (it) {
  203. return has(it, STATE) ? it[STATE] : {};
  204. };
  205. has$1 = function (it) {
  206. return has(it, STATE);
  207. };
  208. }
  209. var internalState = {
  210. set: set,
  211. get: get,
  212. has: has$1,
  213. enforce: enforce,
  214. getterFor: getterFor
  215. };
  216. var redefine = createCommonjsModule(function (module) {
  217. var getInternalState = internalState.get;
  218. var enforceInternalState = internalState.enforce;
  219. var TEMPLATE = String(functionToString).split('toString');
  220. shared('inspectSource', function (it) {
  221. return functionToString.call(it);
  222. });
  223. (module.exports = function (O, key, value, options) {
  224. var unsafe = options ? !!options.unsafe : false;
  225. var simple = options ? !!options.enumerable : false;
  226. var noTargetGet = options ? !!options.noTargetGet : false;
  227. if (typeof value == 'function') {
  228. if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
  229. enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  230. }
  231. if (O === global) {
  232. if (simple) O[key] = value;
  233. else setGlobal(key, value);
  234. return;
  235. } else if (!unsafe) {
  236. delete O[key];
  237. } else if (!noTargetGet && O[key]) {
  238. simple = true;
  239. }
  240. if (simple) O[key] = value;
  241. else hide(O, key, value);
  242. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  243. })(Function.prototype, 'toString', function toString() {
  244. return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
  245. });
  246. });
  247. var ceil = Math.ceil;
  248. var floor = Math.floor;
  249. // `ToInteger` abstract operation
  250. // https://tc39.github.io/ecma262/#sec-tointeger
  251. var toInteger = function (argument) {
  252. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  253. };
  254. var min = Math.min;
  255. // `ToLength` abstract operation
  256. // https://tc39.github.io/ecma262/#sec-tolength
  257. var toLength = function (argument) {
  258. return argument > 0 ? min(toInteger(argument), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  259. };
  260. var max = Math.max;
  261. var min$1 = Math.min;
  262. // Helper for a popular repeating case of the spec:
  263. // Let integer be ? ToInteger(index).
  264. // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
  265. var toAbsoluteIndex = function (index, length) {
  266. var integer = toInteger(index);
  267. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  268. };
  269. // `Array.prototype.{ indexOf, includes }` methods implementation
  270. // false -> Array#indexOf
  271. // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  272. // true -> Array#includes
  273. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  274. var arrayIncludes = function (IS_INCLUDES) {
  275. return function ($this, el, fromIndex) {
  276. var O = toIndexedObject($this);
  277. var length = toLength(O.length);
  278. var index = toAbsoluteIndex(fromIndex, length);
  279. var value;
  280. // Array#includes uses SameValueZero equality algorithm
  281. // eslint-disable-next-line no-self-compare
  282. if (IS_INCLUDES && el != el) while (length > index) {
  283. value = O[index++];
  284. // eslint-disable-next-line no-self-compare
  285. if (value != value) return true;
  286. // Array#indexOf ignores holes, Array#includes - not
  287. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  288. if (O[index] === el) return IS_INCLUDES || index || 0;
  289. } return !IS_INCLUDES && -1;
  290. };
  291. };
  292. var arrayIndexOf = arrayIncludes(false);
  293. var objectKeysInternal = function (object, names) {
  294. var O = toIndexedObject(object);
  295. var i = 0;
  296. var result = [];
  297. var key;
  298. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  299. // Don't enum bug & hidden keys
  300. while (names.length > i) if (has(O, key = names[i++])) {
  301. ~arrayIndexOf(result, key) || result.push(key);
  302. }
  303. return result;
  304. };
  305. // IE8- don't enum bug keys
  306. var enumBugKeys = [
  307. 'constructor',
  308. 'hasOwnProperty',
  309. 'isPrototypeOf',
  310. 'propertyIsEnumerable',
  311. 'toLocaleString',
  312. 'toString',
  313. 'valueOf'
  314. ];
  315. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  316. var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
  317. var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  318. return objectKeysInternal(O, hiddenKeys$1);
  319. };
  320. var objectGetOwnPropertyNames = {
  321. f: f$3
  322. };
  323. var f$4 = Object.getOwnPropertySymbols;
  324. var objectGetOwnPropertySymbols = {
  325. f: f$4
  326. };
  327. var Reflect$1 = global.Reflect;
  328. // all object keys, includes non-enumerable and symbols
  329. var ownKeys = Reflect$1 && Reflect$1.ownKeys || function ownKeys(it) {
  330. var keys = objectGetOwnPropertyNames.f(anObject(it));
  331. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  332. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  333. };
  334. var copyConstructorProperties = function (target, source) {
  335. var keys = ownKeys(source);
  336. var defineProperty = objectDefineProperty.f;
  337. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  338. for (var i = 0; i < keys.length; i++) {
  339. var key = keys[i];
  340. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  341. }
  342. };
  343. var replacement = /#|\.prototype\./;
  344. var isForced = function (feature, detection) {
  345. var value = data[normalize(feature)];
  346. return value == POLYFILL ? true
  347. : value == NATIVE ? false
  348. : typeof detection == 'function' ? fails(detection)
  349. : !!detection;
  350. };
  351. var normalize = isForced.normalize = function (string) {
  352. return String(string).replace(replacement, '.').toLowerCase();
  353. };
  354. var data = isForced.data = {};
  355. var NATIVE = isForced.NATIVE = 'N';
  356. var POLYFILL = isForced.POLYFILL = 'P';
  357. var isForced_1 = isForced;
  358. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  359. /*
  360. options.target - name of the target object
  361. options.global - target is the global object
  362. options.stat - export as static methods of target
  363. options.proto - export as prototype methods of target
  364. options.real - real prototype method for the `pure` version
  365. options.forced - export even if the native feature is available
  366. options.bind - bind methods to the target, required for the `pure` version
  367. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  368. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  369. options.sham - add a flag to not completely full polyfills
  370. options.enumerable - export as enumerable property
  371. options.noTargetGet - prevent calling a getter on target
  372. */
  373. var _export = function (options, source) {
  374. var TARGET = options.target;
  375. var GLOBAL = options.global;
  376. var STATIC = options.stat;
  377. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  378. if (GLOBAL) {
  379. target = global;
  380. } else if (STATIC) {
  381. target = global[TARGET] || setGlobal(TARGET, {});
  382. } else {
  383. target = (global[TARGET] || {}).prototype;
  384. }
  385. if (target) for (key in source) {
  386. sourceProperty = source[key];
  387. if (options.noTargetGet) {
  388. descriptor = getOwnPropertyDescriptor(target, key);
  389. targetProperty = descriptor && descriptor.value;
  390. } else targetProperty = target[key];
  391. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  392. // contained in target
  393. if (!FORCED && targetProperty !== undefined) {
  394. if (typeof sourceProperty === typeof targetProperty) continue;
  395. copyConstructorProperties(sourceProperty, targetProperty);
  396. }
  397. // add a flag to not completely full polyfills
  398. if (options.sham || (targetProperty && targetProperty.sham)) {
  399. hide(sourceProperty, 'sham', true);
  400. }
  401. // extend global
  402. redefine(target, key, sourceProperty, options);
  403. }
  404. };
  405. // Chrome 38 Symbol has incorrect toString conversion
  406. var nativeSymbol = !fails(function () {
  407. });
  408. var store$1 = shared('wks');
  409. var Symbol$1 = global.Symbol;
  410. var wellKnownSymbol = function (name) {
  411. return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
  412. || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
  413. };
  414. var defineProperty = objectDefineProperty.f;
  415. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  416. var setToStringTag = function (it, TAG, STATIC) {
  417. if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  418. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  419. }
  420. };
  421. var f$5 = wellKnownSymbol;
  422. var wrappedWellKnownSymbol = {
  423. f: f$5
  424. };
  425. var path = global;
  426. var defineProperty$1 = objectDefineProperty.f;
  427. var defineWellKnownSymbol = function (NAME) {
  428. var Symbol = path.Symbol || (path.Symbol = {});
  429. if (!has(Symbol, NAME)) defineProperty$1(Symbol, NAME, {
  430. value: wrappedWellKnownSymbol.f(NAME)
  431. });
  432. };
  433. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  434. var objectKeys = Object.keys || function keys(O) {
  435. return objectKeysInternal(O, enumBugKeys);
  436. };
  437. // all enumerable object keys, includes symbols
  438. var enumKeys = function (it) {
  439. var result = objectKeys(it);
  440. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  441. if (getOwnPropertySymbols) {
  442. var symbols = getOwnPropertySymbols(it);
  443. var propertyIsEnumerable = objectPropertyIsEnumerable.f;
  444. var i = 0;
  445. var key;
  446. while (symbols.length > i) if (propertyIsEnumerable.call(it, key = symbols[i++])) result.push(key);
  447. } return result;
  448. };
  449. // `IsArray` abstract operation
  450. // https://tc39.github.io/ecma262/#sec-isarray
  451. var isArray = Array.isArray || function isArray(arg) {
  452. return classofRaw(arg) == 'Array';
  453. };
  454. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  455. anObject(O);
  456. var keys = objectKeys(Properties);
  457. var length = keys.length;
  458. var i = 0;
  459. var key;
  460. while (length > i) objectDefineProperty.f(O, key = keys[i++], Properties[key]);
  461. return O;
  462. };
  463. var document$1 = global.document;
  464. var html = document$1 && document$1.documentElement;
  465. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  466. var IE_PROTO = sharedKey('IE_PROTO');
  467. var PROTOTYPE = 'prototype';
  468. var Empty = function () { /* empty */ };
  469. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  470. var createDict = function () {
  471. // Thrash, waste and sodomy: IE GC bug
  472. var iframe = documentCreateElement('iframe');
  473. var length = enumBugKeys.length;
  474. var lt = '<';
  475. var script = 'script';
  476. var gt = '>';
  477. var js = 'java' + script + ':';
  478. var iframeDocument;
  479. iframe.style.display = 'none';
  480. html.appendChild(iframe);
  481. iframe.src = String(js);
  482. iframeDocument = iframe.contentWindow.document;
  483. iframeDocument.open();
  484. iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
  485. iframeDocument.close();
  486. createDict = iframeDocument.F;
  487. while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
  488. return createDict();
  489. };
  490. var objectCreate = Object.create || function create(O, Properties) {
  491. var result;
  492. if (O !== null) {
  493. Empty[PROTOTYPE] = anObject(O);
  494. result = new Empty();
  495. Empty[PROTOTYPE] = null;
  496. // add "__proto__" for Object.getPrototypeOf polyfill
  497. result[IE_PROTO] = O;
  498. } else result = createDict();
  499. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  500. };
  501. hiddenKeys[IE_PROTO] = true;
  502. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  503. var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
  504. var toString$1 = {}.toString;
  505. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  506. ? Object.getOwnPropertyNames(window) : [];
  507. var getWindowNames = function (it) {
  508. try {
  509. return nativeGetOwnPropertyNames(it);
  510. } catch (e) {
  511. return windowNames.slice();
  512. }
  513. };
  514. var f$6 = function getOwnPropertyNames(it) {
  515. return windowNames && toString$1.call(it) == '[object Window]'
  516. ? getWindowNames(it)
  517. : nativeGetOwnPropertyNames(toIndexedObject(it));
  518. };
  519. var objectGetOwnPropertyNamesExternal = {
  520. f: f$6
  521. };
  522. // ECMAScript 6 symbols shim
  523. var HIDDEN = sharedKey('hidden');
  524. var SYMBOL = 'Symbol';
  525. var setInternalState = internalState.set;
  526. var getInternalState = internalState.getterFor(SYMBOL);
  527. var nativeGetOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
  528. var nativeDefineProperty$1 = objectDefineProperty.f;
  529. var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
  530. var $Symbol = global.Symbol;
  531. var JSON = global.JSON;
  532. var nativeJSONStringify = JSON && JSON.stringify;
  533. var PROTOTYPE$1 = 'prototype';
  534. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  535. var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
  536. var SymbolRegistry = shared('symbol-registry');
  537. var AllSymbols = shared('symbols');
  538. var ObjectPrototypeSymbols = shared('op-symbols');
  539. var WellKnownSymbolsStore = shared('wks');
  540. var ObjectPrototype = Object[PROTOTYPE$1];
  541. var QObject = global.QObject;
  542. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  543. var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
  544. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  545. var setSymbolDescriptor = descriptors && fails(function () {
  546. return objectCreate(nativeDefineProperty$1({}, 'a', {
  547. get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
  548. })).a != 7;
  549. }) ? function (it, key, D) {
  550. var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$2(ObjectPrototype, key);
  551. if (ObjectPrototypeDescriptor) delete ObjectPrototype[key];
  552. nativeDefineProperty$1(it, key, D);
  553. if (ObjectPrototypeDescriptor && it !== ObjectPrototype) {
  554. nativeDefineProperty$1(ObjectPrototype, key, ObjectPrototypeDescriptor);
  555. }
  556. } : nativeDefineProperty$1;
  557. var wrap = function (tag, description) {
  558. var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
  559. setInternalState(symbol, {
  560. type: SYMBOL,
  561. tag: tag,
  562. description: description
  563. });
  564. if (!descriptors) symbol.description = description;
  565. return symbol;
  566. };
  567. var isSymbol = nativeSymbol && typeof $Symbol.iterator == 'symbol' ? function (it) {
  568. return typeof it == 'symbol';
  569. } : function (it) {
  570. return Object(it) instanceof $Symbol;
  571. };
  572. var $defineProperty = function defineProperty(it, key, D) {
  573. if (it === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, key, D);
  574. anObject(it);
  575. key = toPrimitive(key, true);
  576. anObject(D);
  577. if (has(AllSymbols, key)) {
  578. if (!D.enumerable) {
  579. if (!has(it, HIDDEN)) nativeDefineProperty$1(it, HIDDEN, createPropertyDescriptor(1, {}));
  580. it[HIDDEN][key] = true;
  581. } else {
  582. if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
  583. D = objectCreate(D, { enumerable: createPropertyDescriptor(0, false) });
  584. } return setSymbolDescriptor(it, key, D);
  585. } return nativeDefineProperty$1(it, key, D);
  586. };
  587. var $defineProperties = function defineProperties(it, P) {
  588. anObject(it);
  589. var keys = enumKeys(P = toIndexedObject(P));
  590. var i = 0;
  591. var l = keys.length;
  592. var key;
  593. while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  594. return it;
  595. };
  596. var $create = function create(it, P) {
  597. return P === undefined ? objectCreate(it) : $defineProperties(objectCreate(it), P);
  598. };
  599. var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  600. var E = nativePropertyIsEnumerable$1.call(this, key = toPrimitive(key, true));
  601. if (this === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return false;
  602. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  603. };
  604. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  605. it = toIndexedObject(it);
  606. key = toPrimitive(key, true);
  607. if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
  608. var D = nativeGetOwnPropertyDescriptor$2(it, key);
  609. if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  610. return D;
  611. };
  612. var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  613. var names = nativeGetOwnPropertyNames$1(toIndexedObject(it));
  614. var result = [];
  615. var i = 0;
  616. var key;
  617. while (names.length > i) {
  618. if (!has(AllSymbols, key = names[i++]) && !has(hiddenKeys, key)) result.push(key);
  619. } return result;
  620. };
  621. var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  622. var IS_OP = it === ObjectPrototype;
  623. var names = nativeGetOwnPropertyNames$1(IS_OP ? ObjectPrototypeSymbols : toIndexedObject(it));
  624. var result = [];
  625. var i = 0;
  626. var key;
  627. while (names.length > i) {
  628. if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectPrototype, key) : true)) result.push(AllSymbols[key]);
  629. } return result;
  630. };
  631. // `Symbol` constructor
  632. // https://tc39.github.io/ecma262/#sec-symbol-constructor
  633. if (!nativeSymbol) {
  634. $Symbol = function Symbol() {
  635. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
  636. var description = arguments[0] === undefined ? undefined : String(arguments[0]);
  637. var tag = uid(description);
  638. var setter = function (value) {
  639. if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
  640. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  641. setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
  642. };
  643. if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
  644. return wrap(tag, description);
  645. };
  646. redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
  647. return getInternalState(this).tag;
  648. });
  649. objectPropertyIsEnumerable.f = $propertyIsEnumerable;
  650. objectDefineProperty.f = $defineProperty;
  651. objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
  652. objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  653. objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
  654. if (descriptors) {
  655. // https://github.com/tc39/proposal-Symbol-description
  656. nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
  657. configurable: true,
  658. get: function description() {
  659. return getInternalState(this).description;
  660. }
  661. });
  662. {
  663. redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
  664. }
  665. }
  666. wrappedWellKnownSymbol.f = function (name) {
  667. return wrap(wellKnownSymbol(name), name);
  668. };
  669. }
  670. _export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, { Symbol: $Symbol });
  671. for (var wellKnownSymbols = objectKeys(WellKnownSymbolsStore), k = 0; wellKnownSymbols.length > k;) {
  672. defineWellKnownSymbol(wellKnownSymbols[k++]);
  673. }
  674. _export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
  675. // `Symbol.for` method
  676. // https://tc39.github.io/ecma262/#sec-symbol.for
  677. 'for': function (key) {
  678. return has(SymbolRegistry, key += '')
  679. ? SymbolRegistry[key]
  680. : SymbolRegistry[key] = $Symbol(key);
  681. },
  682. // `Symbol.keyFor` method
  683. // https://tc39.github.io/ecma262/#sec-symbol.keyfor
  684. keyFor: function keyFor(sym) {
  685. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
  686. for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  687. },
  688. useSetter: function () { USE_SETTER = true; },
  689. useSimple: function () { USE_SETTER = false; }
  690. });
  691. _export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
  692. // `Object.create` method
  693. // https://tc39.github.io/ecma262/#sec-object.create
  694. create: $create,
  695. // `Object.defineProperty` method
  696. // https://tc39.github.io/ecma262/#sec-object.defineproperty
  697. defineProperty: $defineProperty,
  698. // `Object.defineProperties` method
  699. // https://tc39.github.io/ecma262/#sec-object.defineproperties
  700. defineProperties: $defineProperties,
  701. // `Object.getOwnPropertyDescriptor` method
  702. // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
  703. getOwnPropertyDescriptor: $getOwnPropertyDescriptor
  704. });
  705. _export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
  706. // `Object.getOwnPropertyNames` method
  707. // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
  708. getOwnPropertyNames: $getOwnPropertyNames,
  709. // `Object.getOwnPropertySymbols` method
  710. // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
  711. getOwnPropertySymbols: $getOwnPropertySymbols
  712. });
  713. // `JSON.stringify` method behavior with symbols
  714. // https://tc39.github.io/ecma262/#sec-json.stringify
  715. JSON && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {
  716. var symbol = $Symbol();
  717. // MS Edge converts symbol values to JSON as {}
  718. return nativeJSONStringify([symbol]) != '[null]'
  719. // WebKit converts symbol values to JSON as null
  720. || nativeJSONStringify({ a: symbol }) != '{}'
  721. // V8 throws on boxed symbols
  722. || nativeJSONStringify(Object(symbol)) != '{}';
  723. }) }, {
  724. stringify: function stringify(it) {
  725. var args = [it];
  726. var i = 1;
  727. var replacer, $replacer;
  728. while (arguments.length > i) args.push(arguments[i++]);
  729. $replacer = replacer = args[1];
  730. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  731. if (!isArray(replacer)) replacer = function (key, value) {
  732. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  733. if (!isSymbol(value)) return value;
  734. };
  735. args[1] = replacer;
  736. return nativeJSONStringify.apply(JSON, args);
  737. }
  738. });
  739. // `Symbol.prototype[@@toPrimitive]` method
  740. // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
  741. if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
  742. // `Symbol.prototype[@@toStringTag]` property
  743. // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
  744. setToStringTag($Symbol, SYMBOL);
  745. hiddenKeys[HIDDEN] = true;
  746. var defineProperty$2 = objectDefineProperty.f;
  747. var NativeSymbol = global.Symbol;
  748. if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
  749. // Safari 12 bug
  750. NativeSymbol().description !== undefined
  751. )) {
  752. var EmptyStringDescriptionStore = {};
  753. // wrap Symbol constructor for correct work with undefined description
  754. var SymbolWrapper = function Symbol() {
  755. var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
  756. var result = this instanceof SymbolWrapper
  757. ? new NativeSymbol(description)
  758. // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
  759. : description === undefined ? NativeSymbol() : NativeSymbol(description);
  760. if (description === '') EmptyStringDescriptionStore[result] = true;
  761. return result;
  762. };
  763. copyConstructorProperties(SymbolWrapper, NativeSymbol);
  764. var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
  765. symbolPrototype.constructor = SymbolWrapper;
  766. var symbolToString = symbolPrototype.toString;
  767. var native = String(NativeSymbol('test')) == 'Symbol(test)';
  768. var regexp = /^Symbol\((.*)\)[^)]+$/;
  769. defineProperty$2(symbolPrototype, 'description', {
  770. configurable: true,
  771. get: function description() {
  772. var symbol = isObject(this) ? this.valueOf() : this;
  773. var string = symbolToString.call(symbol);
  774. if (has(EmptyStringDescriptionStore, symbol)) return '';
  775. var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
  776. return desc === '' ? undefined : desc;
  777. }
  778. });
  779. _export({ global: true, forced: true }, { Symbol: SymbolWrapper });
  780. }
  781. // `Symbol.iterator` well-known symbol
  782. // https://tc39.github.io/ecma262/#sec-symbol.iterator
  783. defineWellKnownSymbol('iterator');
  784. // `ToObject` abstract operation
  785. // https://tc39.github.io/ecma262/#sec-toobject
  786. var toObject = function (argument) {
  787. return Object(requireObjectCoercible(argument));
  788. };
  789. var createProperty = function (object, key, value) {
  790. var propertyKey = toPrimitive(key);
  791. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  792. else object[propertyKey] = value;
  793. };
  794. var SPECIES = wellKnownSymbol('species');
  795. // `ArraySpeciesCreate` abstract operation
  796. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  797. var arraySpeciesCreate = function (originalArray, length) {
  798. var C;
  799. if (isArray(originalArray)) {
  800. C = originalArray.constructor;
  801. // cross-realm fallback
  802. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  803. else if (isObject(C)) {
  804. C = C[SPECIES];
  805. if (C === null) C = undefined;
  806. }
  807. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  808. };
  809. var SPECIES$1 = wellKnownSymbol('species');
  810. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  811. return !fails(function () {
  812. var array = [];
  813. var constructor = array.constructor = {};
  814. constructor[SPECIES$1] = function () {
  815. return { foo: 1 };
  816. };
  817. return array[METHOD_NAME](Boolean).foo !== 1;
  818. });
  819. };
  820. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  821. var MAX_SAFE_INTEGER = 0x1fffffffffffff;
  822. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  823. var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
  824. var array = [];
  825. array[IS_CONCAT_SPREADABLE] = false;
  826. return array.concat()[0] !== array;
  827. });
  828. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  829. var isConcatSpreadable = function (O) {
  830. if (!isObject(O)) return false;
  831. var spreadable = O[IS_CONCAT_SPREADABLE];
  832. return spreadable !== undefined ? !!spreadable : isArray(O);
  833. };
  834. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  835. // `Array.prototype.concat` method
  836. // https://tc39.github.io/ecma262/#sec-array.prototype.concat
  837. // with adding support of @@isConcatSpreadable and @@species
  838. _export({ target: 'Array', proto: true, forced: FORCED }, {
  839. concat: function concat(arg) { // eslint-disable-line no-unused-vars
  840. var O = toObject(this);
  841. var A = arraySpeciesCreate(O, 0);
  842. var n = 0;
  843. var i, k, length, len, E;
  844. for (i = -1, length = arguments.length; i < length; i++) {
  845. E = i === -1 ? O : arguments[i];
  846. if (isConcatSpreadable(E)) {
  847. len = toLength(E.length);
  848. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  849. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  850. } else {
  851. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  852. createProperty(A, n++, E);
  853. }
  854. }
  855. A.length = n;
  856. return A;
  857. }
  858. });
  859. var aFunction = function (it) {
  860. if (typeof it != 'function') {
  861. throw TypeError(String(it) + ' is not a function');
  862. } return it;
  863. };
  864. // optional / simple context binding
  865. var bindContext = function (fn, that, length) {
  866. aFunction(fn);
  867. if (that === undefined) return fn;
  868. switch (length) {
  869. case 0: return function () {
  870. return fn.call(that);
  871. };
  872. case 1: return function (a) {
  873. return fn.call(that, a);
  874. };
  875. case 2: return function (a, b) {
  876. return fn.call(that, a, b);
  877. };
  878. case 3: return function (a, b, c) {
  879. return fn.call(that, a, b, c);
  880. };
  881. }
  882. return function (/* ...args */) {
  883. return fn.apply(that, arguments);
  884. };
  885. };
  886. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  887. // 0 -> Array#forEach
  888. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  889. // 1 -> Array#map
  890. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  891. // 2 -> Array#filter
  892. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  893. // 3 -> Array#some
  894. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  895. // 4 -> Array#every
  896. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  897. // 5 -> Array#find
  898. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  899. // 6 -> Array#findIndex
  900. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  901. var arrayMethods = function (TYPE, specificCreate) {
  902. var IS_MAP = TYPE == 1;
  903. var IS_FILTER = TYPE == 2;
  904. var IS_SOME = TYPE == 3;
  905. var IS_EVERY = TYPE == 4;
  906. var IS_FIND_INDEX = TYPE == 6;
  907. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  908. var create = specificCreate || arraySpeciesCreate;
  909. return function ($this, callbackfn, that) {
  910. var O = toObject($this);
  911. var self = indexedObject(O);
  912. var boundFunction = bindContext(callbackfn, that, 3);
  913. var length = toLength(self.length);
  914. var index = 0;
  915. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  916. var value, result;
  917. for (;length > index; index++) if (NO_HOLES || index in self) {
  918. value = self[index];
  919. result = boundFunction(value, index, O);
  920. if (TYPE) {
  921. if (IS_MAP) target[index] = result; // map
  922. else if (result) switch (TYPE) {
  923. case 3: return true; // some
  924. case 5: return value; // find
  925. case 6: return index; // findIndex
  926. case 2: target.push(value); // filter
  927. } else if (IS_EVERY) return false; // every
  928. }
  929. }
  930. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  931. };
  932. };
  933. var internalFilter = arrayMethods(2);
  934. var SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('filter');
  935. // `Array.prototype.filter` method
  936. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  937. // with adding support of @@species
  938. _export({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT$1 }, {
  939. filter: function filter(callbackfn /* , thisArg */) {
  940. return internalFilter(this, callbackfn, arguments[1]);
  941. }
  942. });
  943. var UNSCOPABLES = wellKnownSymbol('unscopables');
  944. var ArrayPrototype = Array.prototype;
  945. // Array.prototype[@@unscopables]
  946. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  947. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  948. hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
  949. }
  950. // add a key to Array.prototype[@@unscopables]
  951. var addToUnscopables = function (key) {
  952. ArrayPrototype[UNSCOPABLES][key] = true;
  953. };
  954. var correctPrototypeGetter = !fails(function () {
  955. function F() { /* empty */ }
  956. F.prototype.constructor = null;
  957. return Object.getPrototypeOf(new F()) !== F.prototype;
  958. });
  959. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  960. var IE_PROTO$1 = sharedKey('IE_PROTO');
  961. var ObjectPrototype$1 = Object.prototype;
  962. var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
  963. O = toObject(O);
  964. if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
  965. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  966. return O.constructor.prototype;
  967. } return O instanceof Object ? ObjectPrototype$1 : null;
  968. };
  969. var ITERATOR = wellKnownSymbol('iterator');
  970. var BUGGY_SAFARI_ITERATORS = false;
  971. var returnThis = function () { return this; };
  972. // `%IteratorPrototype%` object
  973. // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
  974. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  975. if ([].keys) {
  976. arrayIterator = [].keys();
  977. // Safari 8 has buggy iterators w/o `next`
  978. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  979. else {
  980. PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
  981. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  982. }
  983. }
  984. if (IteratorPrototype == undefined) IteratorPrototype = {};
  985. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  986. if (!has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
  987. var iteratorsCore = {
  988. IteratorPrototype: IteratorPrototype,
  989. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  990. };
  991. var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
  992. var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
  993. var TO_STRING_TAG = NAME + ' Iterator';
  994. IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
  995. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  996. return IteratorConstructor;
  997. };
  998. var validateSetPrototypeOfArguments = function (O, proto) {
  999. anObject(O);
  1000. if (!isObject(proto) && proto !== null) {
  1001. throw TypeError("Can't set " + String(proto) + ' as a prototype');
  1002. }
  1003. };
  1004. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1005. /* eslint-disable no-proto */
  1006. var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { // eslint-disable-line
  1007. var correctSetter = false;
  1008. var test = {};
  1009. var setter;
  1010. try {
  1011. setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
  1012. setter.call(test, []);
  1013. correctSetter = test instanceof Array;
  1014. } catch (e) { /* empty */ }
  1015. return function setPrototypeOf(O, proto) {
  1016. validateSetPrototypeOfArguments(O, proto);
  1017. if (correctSetter) setter.call(O, proto);
  1018. else O.__proto__ = proto;
  1019. return O;
  1020. };
  1021. }() : undefined);
  1022. var ITERATOR$1 = wellKnownSymbol('iterator');
  1023. var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
  1024. var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
  1025. var KEYS = 'keys';
  1026. var VALUES = 'values';
  1027. var ENTRIES = 'entries';
  1028. var returnThis$1 = function () { return this; };
  1029. var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  1030. createIteratorConstructor(IteratorConstructor, NAME, next);
  1031. var getIterationMethod = function (KIND) {
  1032. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  1033. if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
  1034. switch (KIND) {
  1035. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  1036. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  1037. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  1038. } return function () { return new IteratorConstructor(this); };
  1039. };
  1040. var TO_STRING_TAG = NAME + ' Iterator';
  1041. var INCORRECT_VALUES_NAME = false;
  1042. var IterablePrototype = Iterable.prototype;
  1043. var nativeIterator = IterablePrototype[ITERATOR$1]
  1044. || IterablePrototype['@@iterator']
  1045. || DEFAULT && IterablePrototype[DEFAULT];
  1046. var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
  1047. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  1048. var CurrentIteratorPrototype, methods, KEY;
  1049. // fix native
  1050. if (anyNativeIterator) {
  1051. CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
  1052. if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
  1053. if (objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
  1054. if (objectSetPrototypeOf) {
  1055. objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
  1056. } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
  1057. hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
  1058. }
  1059. }
  1060. // Set @@toStringTag to native iterators
  1061. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  1062. }
  1063. }
  1064. // fix Array#{values, @@iterator}.name in V8 / FF
  1065. if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  1066. INCORRECT_VALUES_NAME = true;
  1067. defaultIterator = function values() { return nativeIterator.call(this); };
  1068. }
  1069. // define iterator
  1070. if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
  1071. hide(IterablePrototype, ITERATOR$1, defaultIterator);
  1072. }
  1073. // export additional methods
  1074. if (DEFAULT) {
  1075. methods = {
  1076. values: getIterationMethod(VALUES),
  1077. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  1078. entries: getIterationMethod(ENTRIES)
  1079. };
  1080. if (FORCED) for (KEY in methods) {
  1081. if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  1082. redefine(IterablePrototype, KEY, methods[KEY]);
  1083. }
  1084. } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
  1085. }
  1086. return methods;
  1087. };
  1088. var ARRAY_ITERATOR = 'Array Iterator';
  1089. var setInternalState$1 = internalState.set;
  1090. var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
  1091. // `Array.prototype.entries` method
  1092. // https://tc39.github.io/ecma262/#sec-array.prototype.entries
  1093. // `Array.prototype.keys` method
  1094. // https://tc39.github.io/ecma262/#sec-array.prototype.keys
  1095. // `Array.prototype.values` method
  1096. // https://tc39.github.io/ecma262/#sec-array.prototype.values
  1097. // `Array.prototype[@@iterator]` method
  1098. // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
  1099. // `CreateArrayIterator` internal method
  1100. // https://tc39.github.io/ecma262/#sec-createarrayiterator
  1101. var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
  1102. setInternalState$1(this, {
  1103. type: ARRAY_ITERATOR,
  1104. target: toIndexedObject(iterated), // target
  1105. index: 0, // next index
  1106. kind: kind // kind
  1107. });
  1108. // `%ArrayIteratorPrototype%.next` method
  1109. // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
  1110. }, function () {
  1111. var state = getInternalState$1(this);
  1112. var target = state.target;
  1113. var kind = state.kind;
  1114. var index = state.index++;
  1115. if (!target || index >= target.length) {
  1116. state.target = undefined;
  1117. return { value: undefined, done: true };
  1118. }
  1119. if (kind == 'keys') return { value: index, done: false };
  1120. if (kind == 'values') return { value: target[index], done: false };
  1121. return { value: [index, target[index]], done: false };
  1122. }, 'values');
  1123. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  1124. addToUnscopables('keys');
  1125. addToUnscopables('values');
  1126. addToUnscopables('entries');
  1127. var sloppyArrayMethod = function (METHOD_NAME, argument) {
  1128. var method = [][METHOD_NAME];
  1129. return !method || !fails(function () {
  1130. // eslint-disable-next-line no-useless-call
  1131. method.call(null, argument || function () { throw Error(); }, 1);
  1132. });
  1133. };
  1134. var nativeJoin = [].join;
  1135. var ES3_STRINGS = indexedObject != Object;
  1136. var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
  1137. // `Array.prototype.join` method
  1138. // https://tc39.github.io/ecma262/#sec-array.prototype.join
  1139. _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
  1140. join: function join(separator) {
  1141. return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
  1142. }
  1143. });
  1144. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  1145. // ES3 wrong here
  1146. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  1147. // fallback for IE11 Script Access Denied error
  1148. var tryGet = function (it, key) {
  1149. try {
  1150. return it[key];
  1151. } catch (e) { /* empty */ }
  1152. };
  1153. // getting tag from ES6+ `Object.prototype.toString`
  1154. var classof = function (it) {
  1155. var O, tag, result;
  1156. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1157. // @@toStringTag case
  1158. : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
  1159. // builtinTag case
  1160. : CORRECT_ARGUMENTS ? classofRaw(O)
  1161. // ES3 arguments fallback
  1162. : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
  1163. };
  1164. var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
  1165. var test = {};
  1166. test[TO_STRING_TAG$2] = 'z';
  1167. // `Object.prototype.toString` method implementation
  1168. // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
  1169. var objectToString = String(test) !== '[object z]' ? function toString() {
  1170. return '[object ' + classof(this) + ']';
  1171. } : test.toString;
  1172. var ObjectPrototype$2 = Object.prototype;
  1173. // `Object.prototype.toString` method
  1174. // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
  1175. if (objectToString !== ObjectPrototype$2.toString) {
  1176. redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });
  1177. }
  1178. // CONVERT_TO_STRING: true -> String#at
  1179. // CONVERT_TO_STRING: false -> String#codePointAt
  1180. var stringAt = function (that, pos, CONVERT_TO_STRING) {
  1181. var S = String(requireObjectCoercible(that));
  1182. var position = toInteger(pos);
  1183. var size = S.length;
  1184. var first, second;
  1185. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  1186. first = S.charCodeAt(position);
  1187. return first < 0xd800 || first > 0xdbff || position + 1 === size
  1188. || (second = S.charCodeAt(position + 1)) < 0xdc00 || second > 0xdfff
  1189. ? CONVERT_TO_STRING ? S.charAt(position) : first
  1190. : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xd800 << 10) + (second - 0xdc00) + 0x10000;
  1191. };
  1192. var STRING_ITERATOR = 'String Iterator';
  1193. var setInternalState$2 = internalState.set;
  1194. var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
  1195. // `String.prototype[@@iterator]` method
  1196. // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
  1197. defineIterator(String, 'String', function (iterated) {
  1198. setInternalState$2(this, {
  1199. type: STRING_ITERATOR,
  1200. string: String(iterated),
  1201. index: 0
  1202. });
  1203. // `%StringIteratorPrototype%.next` method
  1204. // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
  1205. }, function next() {
  1206. var state = getInternalState$2(this);
  1207. var string = state.string;
  1208. var index = state.index;
  1209. var point;
  1210. if (index >= string.length) return { value: undefined, done: true };
  1211. point = stringAt(string, index, true);
  1212. state.index += point.length;
  1213. return { value: point, done: false };
  1214. });
  1215. // iterable DOM collections
  1216. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  1217. var domIterables = {
  1218. CSSRuleList: 0,
  1219. CSSStyleDeclaration: 0,
  1220. CSSValueList: 0,
  1221. ClientRectList: 0,
  1222. DOMRectList: 0,
  1223. DOMStringList: 0,
  1224. DOMTokenList: 1,
  1225. DataTransferItemList: 0,
  1226. FileList: 0,
  1227. HTMLAllCollection: 0,
  1228. HTMLCollection: 0,
  1229. HTMLFormElement: 0,
  1230. HTMLSelectElement: 0,
  1231. MediaList: 0,
  1232. MimeTypeArray: 0,
  1233. NamedNodeMap: 0,
  1234. NodeList: 1,
  1235. PaintRequestList: 0,
  1236. Plugin: 0,
  1237. PluginArray: 0,
  1238. SVGLengthList: 0,
  1239. SVGNumberList: 0,
  1240. SVGPathSegList: 0,
  1241. SVGPointList: 0,
  1242. SVGStringList: 0,
  1243. SVGTransformList: 0,
  1244. SourceBufferList: 0,
  1245. StyleSheetList: 0,
  1246. TextTrackCueList: 0,
  1247. TextTrackList: 0,
  1248. TouchList: 0
  1249. };
  1250. var ITERATOR$2 = wellKnownSymbol('iterator');
  1251. var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
  1252. var ArrayValues = es_array_iterator.values;
  1253. for (var COLLECTION_NAME in domIterables) {
  1254. var Collection = global[COLLECTION_NAME];
  1255. var CollectionPrototype = Collection && Collection.prototype;
  1256. if (CollectionPrototype) {
  1257. // some Chrome versions have non-configurable methods on DOMTokenList
  1258. if (CollectionPrototype[ITERATOR$2] !== ArrayValues) try {
  1259. hide(CollectionPrototype, ITERATOR$2, ArrayValues);
  1260. } catch (e) {
  1261. CollectionPrototype[ITERATOR$2] = ArrayValues;
  1262. }
  1263. if (!CollectionPrototype[TO_STRING_TAG$3]) hide(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME);
  1264. if (domIterables[COLLECTION_NAME]) for (var METHOD_NAME in es_array_iterator) {
  1265. // some Chrome versions have non-configurable methods on DOMTokenList
  1266. if (CollectionPrototype[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
  1267. hide(CollectionPrototype, METHOD_NAME, es_array_iterator[METHOD_NAME]);
  1268. } catch (e) {
  1269. CollectionPrototype[METHOD_NAME] = es_array_iterator[METHOD_NAME];
  1270. }
  1271. }
  1272. }
  1273. }
  1274. function _classCallCheck(instance, Constructor) {
  1275. if (!(instance instanceof Constructor)) {
  1276. throw new TypeError("Cannot call a class as a function");
  1277. }
  1278. }
  1279. function _defineProperties(target, props) {
  1280. for (var i = 0; i < props.length; i++) {
  1281. var descriptor = props[i];
  1282. descriptor.enumerable = descriptor.enumerable || false;
  1283. descriptor.configurable = true;
  1284. if ("value" in descriptor) descriptor.writable = true;
  1285. Object.defineProperty(target, descriptor.key, descriptor);
  1286. }
  1287. }
  1288. function _createClass(Constructor, protoProps, staticProps) {
  1289. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  1290. if (staticProps) _defineProperties(Constructor, staticProps);
  1291. return Constructor;
  1292. }
  1293. function _inherits(subClass, superClass) {
  1294. if (typeof superClass !== "function" && superClass !== null) {
  1295. throw new TypeError("Super expression must either be null or a function");
  1296. }
  1297. subClass.prototype = Object.create(superClass && superClass.prototype, {
  1298. constructor: {
  1299. value: subClass,
  1300. writable: true,
  1301. configurable: true
  1302. }
  1303. });
  1304. if (superClass) _setPrototypeOf(subClass, superClass);
  1305. }
  1306. function _getPrototypeOf(o) {
  1307. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  1308. return o.__proto__ || Object.getPrototypeOf(o);
  1309. };
  1310. return _getPrototypeOf(o);
  1311. }
  1312. function _setPrototypeOf(o, p) {
  1313. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  1314. o.__proto__ = p;
  1315. return o;
  1316. };
  1317. return _setPrototypeOf(o, p);
  1318. }
  1319. function _assertThisInitialized(self) {
  1320. if (self === void 0) {
  1321. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1322. }
  1323. return self;
  1324. }
  1325. function _possibleConstructorReturn(self, call) {
  1326. if (call && (typeof call === "object" || typeof call === "function")) {
  1327. return call;
  1328. }
  1329. return _assertThisInitialized(self);
  1330. }
  1331. function _superPropBase(object, property) {
  1332. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  1333. object = _getPrototypeOf(object);
  1334. if (object === null) break;
  1335. }
  1336. return object;
  1337. }
  1338. function _get(target, property, receiver) {
  1339. if (typeof Reflect !== "undefined" && Reflect.get) {
  1340. _get = Reflect.get;
  1341. } else {
  1342. _get = function _get(target, property, receiver) {
  1343. var base = _superPropBase(target, property);
  1344. if (!base) return;
  1345. var desc = Object.getOwnPropertyDescriptor(base, property);
  1346. if (desc.get) {
  1347. return desc.get.call(receiver);
  1348. }
  1349. return desc.value;
  1350. };
  1351. }
  1352. return _get(target, property, receiver || target);
  1353. }
  1354. /**
  1355. * @author: YL
  1356. * @update: zhixin wen <wenzhixin2010@gmail.com>
  1357. */
  1358. $.extend($.fn.bootstrapTable.defaults, {
  1359. treeEnable: false,
  1360. treeShowField: null,
  1361. idField: 'id',
  1362. parentIdField: 'pid',
  1363. rootParentId: null
  1364. });
  1365. $.BootstrapTable =
  1366. /*#__PURE__*/
  1367. function (_$$BootstrapTable) {
  1368. _inherits(_class, _$$BootstrapTable);
  1369. function _class() {
  1370. _classCallCheck(this, _class);
  1371. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  1372. }
  1373. _createClass(_class, [{
  1374. key: "init",
  1375. value: function init() {
  1376. var _get2;
  1377. this._rowStyle = this.options.rowStyle;
  1378. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1379. args[_key] = arguments[_key];
  1380. }
  1381. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  1382. }
  1383. }, {
  1384. key: "initHeader",
  1385. value: function initHeader() {
  1386. var _get3;
  1387. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1388. args[_key2] = arguments[_key2];
  1389. }
  1390. (_get3 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get3, [this].concat(args));
  1391. var treeShowField = this.options.treeShowField;
  1392. if (treeShowField) {
  1393. var _iteratorNormalCompletion = true;
  1394. var _didIteratorError = false;
  1395. var _iteratorError = undefined;
  1396. try {
  1397. for (var _iterator = this.header.fields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  1398. var field = _step.value;
  1399. if (treeShowField === field) {
  1400. this.treeEnable = true;
  1401. break;
  1402. }
  1403. }
  1404. } catch (err) {
  1405. _didIteratorError = true;
  1406. _iteratorError = err;
  1407. } finally {
  1408. try {
  1409. if (!_iteratorNormalCompletion && _iterator.return != null) {
  1410. _iterator.return();
  1411. }
  1412. } finally {
  1413. if (_didIteratorError) {
  1414. throw _iteratorError;
  1415. }
  1416. }
  1417. }
  1418. }
  1419. }
  1420. }, {
  1421. key: "initBody",
  1422. value: function initBody() {
  1423. var _get4;
  1424. this.virtualScrollDisabled = this.treeEnable;
  1425. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  1426. args[_key3] = arguments[_key3];
  1427. }
  1428. (_get4 = _get(_getPrototypeOf(_class.prototype), "initBody", this)).call.apply(_get4, [this].concat(args));
  1429. }
  1430. }, {
  1431. key: "initTr",
  1432. value: function initTr(item, idx, data, parentDom) {
  1433. var _this = this;
  1434. var nodes = data.filter(function (it) {
  1435. return item[_this.options.idField] === it[_this.options.parentIdField];
  1436. });
  1437. parentDom.append(_get(_getPrototypeOf(_class.prototype), "initRow", this).call(this, item, idx, data, parentDom)); // init sub node
  1438. var len = nodes.length - 1;
  1439. for (var i = 0; i <= len; i++) {
  1440. var node = nodes[i];
  1441. var defaultItem = $.extend(true, {}, item);
  1442. node._level = defaultItem._level + 1;
  1443. node._parent = defaultItem;
  1444. if (i === len) {
  1445. node._last = 1;
  1446. } // jquery.treegrid.js
  1447. this.options.rowStyle = function (item, idx) {
  1448. var res = _this._rowStyle(item, idx);
  1449. var id = item[_this.options.idField] ? item[_this.options.idField] : 0;
  1450. var pid = item[_this.options.parentIdField] ? item[_this.options.parentIdField] : 0;
  1451. res.classes = [res.classes || '', "treegrid-".concat(id), "treegrid-parent-".concat(pid)].join(' ');
  1452. return res;
  1453. };
  1454. this.initTr(node, $.inArray(node, data), data, parentDom);
  1455. }
  1456. }
  1457. }, {
  1458. key: "initRow",
  1459. value: function initRow(item, idx, data, parentDom) {
  1460. var _this2 = this;
  1461. if (this.treeEnable) {
  1462. if (this.options.rootParentId === item[this.parentIdField] || !item[this.parentIdField]) {
  1463. if (item._level === undefined) {
  1464. item._level = 0;
  1465. } // jquery.treegrid.js
  1466. this.options.rowStyle = function (item, idx) {
  1467. var res = _this2._rowStyle(item, idx);
  1468. var x = item[_this2.options.idField] ? item[_this2.options.idField] : 0;
  1469. res.classes = [res.classes || '', "treegrid-".concat(x)].join(' ');
  1470. return res;
  1471. };
  1472. this.initTr(item, idx, data, parentDom);
  1473. return true;
  1474. }
  1475. return false;
  1476. }
  1477. return _get(_getPrototypeOf(_class.prototype), "initRow", this).call(this, item, idx, data, parentDom);
  1478. }
  1479. }]);
  1480. return _class;
  1481. }($.BootstrapTable);
  1482. }));