bootstrap-table-print.js 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141
  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 ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  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. function createCommonjsModule(fn, module) {
  187. return module = { exports: {} }, fn(module, module.exports), module.exports;
  188. }
  189. var check = function (it) {
  190. return it && it.Math == Math && it;
  191. };
  192. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  193. var global_1 =
  194. // eslint-disable-next-line es-x/no-global-this -- safe
  195. check(typeof globalThis == 'object' && globalThis) ||
  196. check(typeof window == 'object' && window) ||
  197. // eslint-disable-next-line no-restricted-globals -- safe
  198. check(typeof self == 'object' && self) ||
  199. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  200. // eslint-disable-next-line no-new-func -- fallback
  201. (function () { return this; })() || Function('return this')();
  202. var fails = function (exec) {
  203. try {
  204. return !!exec();
  205. } catch (error) {
  206. return true;
  207. }
  208. };
  209. // Detect IE8's incomplete defineProperty implementation
  210. var descriptors = !fails(function () {
  211. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  212. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  213. });
  214. var functionBindNative = !fails(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 call$1 = Function.prototype.call;
  221. var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
  222. return call$1.apply(call$1, arguments);
  223. };
  224. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  225. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  226. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  227. // Nashorn ~ JDK8 bug
  228. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  229. // `Object.prototype.propertyIsEnumerable` method implementation
  230. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  231. var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  232. var descriptor = getOwnPropertyDescriptor$1(this, V);
  233. return !!descriptor && descriptor.enumerable;
  234. } : $propertyIsEnumerable;
  235. var objectPropertyIsEnumerable = {
  236. f: f$5
  237. };
  238. var createPropertyDescriptor = function (bitmap, value) {
  239. return {
  240. enumerable: !(bitmap & 1),
  241. configurable: !(bitmap & 2),
  242. writable: !(bitmap & 4),
  243. value: value
  244. };
  245. };
  246. var FunctionPrototype$1 = Function.prototype;
  247. var bind$1 = FunctionPrototype$1.bind;
  248. var call = FunctionPrototype$1.call;
  249. var uncurryThis = functionBindNative && bind$1.bind(call, call);
  250. var functionUncurryThis = functionBindNative ? function (fn) {
  251. return fn && uncurryThis(fn);
  252. } : function (fn) {
  253. return fn && function () {
  254. return call.apply(fn, arguments);
  255. };
  256. };
  257. var toString$1 = functionUncurryThis({}.toString);
  258. var stringSlice = functionUncurryThis(''.slice);
  259. var classofRaw = function (it) {
  260. return stringSlice(toString$1(it), 8, -1);
  261. };
  262. var Object$4 = global_1.Object;
  263. var split = functionUncurryThis(''.split);
  264. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  265. var indexedObject = fails(function () {
  266. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  267. // eslint-disable-next-line no-prototype-builtins -- safe
  268. return !Object$4('z').propertyIsEnumerable(0);
  269. }) ? function (it) {
  270. return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
  271. } : Object$4;
  272. var TypeError$9 = global_1.TypeError;
  273. // `RequireObjectCoercible` abstract operation
  274. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  275. var requireObjectCoercible = function (it) {
  276. if (it == undefined) throw TypeError$9("Can't call method on " + it);
  277. return it;
  278. };
  279. // toObject with fallback for non-array-like ES3 strings
  280. var toIndexedObject = function (it) {
  281. return indexedObject(requireObjectCoercible(it));
  282. };
  283. // `IsCallable` abstract operation
  284. // https://tc39.es/ecma262/#sec-iscallable
  285. var isCallable = function (argument) {
  286. return typeof argument == 'function';
  287. };
  288. var isObject = function (it) {
  289. return typeof it == 'object' ? it !== null : isCallable(it);
  290. };
  291. var aFunction = function (argument) {
  292. return isCallable(argument) ? argument : undefined;
  293. };
  294. var getBuiltIn = function (namespace, method) {
  295. return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
  296. };
  297. var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
  298. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  299. var process = global_1.process;
  300. var Deno = global_1.Deno;
  301. var versions = process && process.versions || Deno && Deno.version;
  302. var v8 = versions && versions.v8;
  303. var match, version;
  304. if (v8) {
  305. match = v8.split('.');
  306. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  307. // but their correct versions are not interesting for us
  308. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  309. }
  310. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  311. // so check `userAgent` even if `.v8` exists, but 0
  312. if (!version && engineUserAgent) {
  313. match = engineUserAgent.match(/Edge\/(\d+)/);
  314. if (!match || match[1] >= 74) {
  315. match = engineUserAgent.match(/Chrome\/(\d+)/);
  316. if (match) version = +match[1];
  317. }
  318. }
  319. var engineV8Version = version;
  320. /* eslint-disable es-x/no-symbol -- required for testing */
  321. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  322. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  323. var symbol = Symbol();
  324. // Chrome 38 Symbol has incorrect toString conversion
  325. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  326. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  327. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  328. !Symbol.sham && engineV8Version && engineV8Version < 41;
  329. });
  330. /* eslint-disable es-x/no-symbol -- required for testing */
  331. var useSymbolAsUid = nativeSymbol
  332. && !Symbol.sham
  333. && typeof Symbol.iterator == 'symbol';
  334. var Object$3 = global_1.Object;
  335. var isSymbol = useSymbolAsUid ? function (it) {
  336. return typeof it == 'symbol';
  337. } : function (it) {
  338. var $Symbol = getBuiltIn('Symbol');
  339. return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
  340. };
  341. var String$3 = global_1.String;
  342. var tryToString = function (argument) {
  343. try {
  344. return String$3(argument);
  345. } catch (error) {
  346. return 'Object';
  347. }
  348. };
  349. var TypeError$8 = global_1.TypeError;
  350. // `Assert: IsCallable(argument) is true`
  351. var aCallable = function (argument) {
  352. if (isCallable(argument)) return argument;
  353. throw TypeError$8(tryToString(argument) + ' is not a function');
  354. };
  355. // `GetMethod` abstract operation
  356. // https://tc39.es/ecma262/#sec-getmethod
  357. var getMethod = function (V, P) {
  358. var func = V[P];
  359. return func == null ? undefined : aCallable(func);
  360. };
  361. var TypeError$7 = global_1.TypeError;
  362. // `OrdinaryToPrimitive` abstract operation
  363. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  364. var ordinaryToPrimitive = function (input, pref) {
  365. var fn, val;
  366. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  367. if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
  368. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  369. throw TypeError$7("Can't convert object to primitive value");
  370. };
  371. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  372. var defineProperty$1 = Object.defineProperty;
  373. var setGlobal = function (key, value) {
  374. try {
  375. defineProperty$1(global_1, key, { value: value, configurable: true, writable: true });
  376. } catch (error) {
  377. global_1[key] = value;
  378. } return value;
  379. };
  380. var SHARED = '__core-js_shared__';
  381. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  382. var sharedStore = store$1;
  383. var shared = createCommonjsModule(function (module) {
  384. (module.exports = function (key, value) {
  385. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  386. })('versions', []).push({
  387. version: '3.22.4',
  388. mode: 'global',
  389. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  390. license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
  391. source: 'https://github.com/zloirock/core-js'
  392. });
  393. });
  394. var Object$2 = global_1.Object;
  395. // `ToObject` abstract operation
  396. // https://tc39.es/ecma262/#sec-toobject
  397. var toObject = function (argument) {
  398. return Object$2(requireObjectCoercible(argument));
  399. };
  400. var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
  401. // `HasOwnProperty` abstract operation
  402. // https://tc39.es/ecma262/#sec-hasownproperty
  403. // eslint-disable-next-line es-x/no-object-hasown -- safe
  404. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  405. return hasOwnProperty(toObject(it), key);
  406. };
  407. var id = 0;
  408. var postfix = Math.random();
  409. var toString = functionUncurryThis(1.0.toString);
  410. var uid = function (key) {
  411. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  412. };
  413. var WellKnownSymbolsStore = shared('wks');
  414. var Symbol$1 = global_1.Symbol;
  415. var symbolFor = Symbol$1 && Symbol$1['for'];
  416. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  417. var wellKnownSymbol = function (name) {
  418. if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  419. var description = 'Symbol.' + name;
  420. if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
  421. WellKnownSymbolsStore[name] = Symbol$1[name];
  422. } else if (useSymbolAsUid && symbolFor) {
  423. WellKnownSymbolsStore[name] = symbolFor(description);
  424. } else {
  425. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  426. }
  427. } return WellKnownSymbolsStore[name];
  428. };
  429. var TypeError$6 = global_1.TypeError;
  430. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  431. // `ToPrimitive` abstract operation
  432. // https://tc39.es/ecma262/#sec-toprimitive
  433. var toPrimitive = function (input, pref) {
  434. if (!isObject(input) || isSymbol(input)) return input;
  435. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  436. var result;
  437. if (exoticToPrim) {
  438. if (pref === undefined) pref = 'default';
  439. result = functionCall(exoticToPrim, input, pref);
  440. if (!isObject(result) || isSymbol(result)) return result;
  441. throw TypeError$6("Can't convert object to primitive value");
  442. }
  443. if (pref === undefined) pref = 'number';
  444. return ordinaryToPrimitive(input, pref);
  445. };
  446. // `ToPropertyKey` abstract operation
  447. // https://tc39.es/ecma262/#sec-topropertykey
  448. var toPropertyKey = function (argument) {
  449. var key = toPrimitive(argument, 'string');
  450. return isSymbol(key) ? key : key + '';
  451. };
  452. var document$1 = global_1.document;
  453. // typeof document.createElement is 'object' in old IE
  454. var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
  455. var documentCreateElement = function (it) {
  456. return EXISTS$1 ? document$1.createElement(it) : {};
  457. };
  458. // Thanks to IE8 for its funny defineProperty
  459. var ie8DomDefine = !descriptors && !fails(function () {
  460. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  461. return Object.defineProperty(documentCreateElement('div'), 'a', {
  462. get: function () { return 7; }
  463. }).a != 7;
  464. });
  465. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  466. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  467. // `Object.getOwnPropertyDescriptor` method
  468. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  469. var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  470. O = toIndexedObject(O);
  471. P = toPropertyKey(P);
  472. if (ie8DomDefine) try {
  473. return $getOwnPropertyDescriptor$1(O, P);
  474. } catch (error) { /* empty */ }
  475. if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
  476. };
  477. var objectGetOwnPropertyDescriptor = {
  478. f: f$4
  479. };
  480. // V8 ~ Chrome 36-
  481. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  482. var v8PrototypeDefineBug = descriptors && fails(function () {
  483. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  484. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  485. value: 42,
  486. writable: false
  487. }).prototype != 42;
  488. });
  489. var String$2 = global_1.String;
  490. var TypeError$5 = global_1.TypeError;
  491. // `Assert: Type(argument) is Object`
  492. var anObject = function (argument) {
  493. if (isObject(argument)) return argument;
  494. throw TypeError$5(String$2(argument) + ' is not an object');
  495. };
  496. var TypeError$4 = global_1.TypeError;
  497. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  498. var $defineProperty = Object.defineProperty;
  499. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  500. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  501. var ENUMERABLE = 'enumerable';
  502. var CONFIGURABLE$1 = 'configurable';
  503. var WRITABLE = 'writable';
  504. // `Object.defineProperty` method
  505. // https://tc39.es/ecma262/#sec-object.defineproperty
  506. var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
  507. anObject(O);
  508. P = toPropertyKey(P);
  509. anObject(Attributes);
  510. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  511. var current = $getOwnPropertyDescriptor(O, P);
  512. if (current && current[WRITABLE]) {
  513. O[P] = Attributes.value;
  514. Attributes = {
  515. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  516. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  517. writable: false
  518. };
  519. }
  520. } return $defineProperty(O, P, Attributes);
  521. } : $defineProperty : function defineProperty(O, P, Attributes) {
  522. anObject(O);
  523. P = toPropertyKey(P);
  524. anObject(Attributes);
  525. if (ie8DomDefine) try {
  526. return $defineProperty(O, P, Attributes);
  527. } catch (error) { /* empty */ }
  528. if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported');
  529. if ('value' in Attributes) O[P] = Attributes.value;
  530. return O;
  531. };
  532. var objectDefineProperty = {
  533. f: f$3
  534. };
  535. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  536. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  537. } : function (object, key, value) {
  538. object[key] = value;
  539. return object;
  540. };
  541. var FunctionPrototype = Function.prototype;
  542. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  543. var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
  544. var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
  545. // additional protection from minified / mangled / dropped function names
  546. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  547. var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
  548. var functionName = {
  549. EXISTS: EXISTS,
  550. PROPER: PROPER,
  551. CONFIGURABLE: CONFIGURABLE
  552. };
  553. var functionToString = functionUncurryThis(Function.toString);
  554. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  555. if (!isCallable(sharedStore.inspectSource)) {
  556. sharedStore.inspectSource = function (it) {
  557. return functionToString(it);
  558. };
  559. }
  560. var inspectSource = sharedStore.inspectSource;
  561. var WeakMap$1 = global_1.WeakMap;
  562. var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
  563. var keys = shared('keys');
  564. var sharedKey = function (key) {
  565. return keys[key] || (keys[key] = uid(key));
  566. };
  567. var hiddenKeys$1 = {};
  568. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  569. var TypeError$3 = global_1.TypeError;
  570. var WeakMap = global_1.WeakMap;
  571. var set, get, has;
  572. var enforce = function (it) {
  573. return has(it) ? get(it) : set(it, {});
  574. };
  575. var getterFor = function (TYPE) {
  576. return function (it) {
  577. var state;
  578. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  579. throw TypeError$3('Incompatible receiver, ' + TYPE + ' required');
  580. } return state;
  581. };
  582. };
  583. if (nativeWeakMap || sharedStore.state) {
  584. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  585. var wmget = functionUncurryThis(store.get);
  586. var wmhas = functionUncurryThis(store.has);
  587. var wmset = functionUncurryThis(store.set);
  588. set = function (it, metadata) {
  589. if (wmhas(store, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  590. metadata.facade = it;
  591. wmset(store, it, metadata);
  592. return metadata;
  593. };
  594. get = function (it) {
  595. return wmget(store, it) || {};
  596. };
  597. has = function (it) {
  598. return wmhas(store, it);
  599. };
  600. } else {
  601. var STATE = sharedKey('state');
  602. hiddenKeys$1[STATE] = true;
  603. set = function (it, metadata) {
  604. if (hasOwnProperty_1(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  605. metadata.facade = it;
  606. createNonEnumerableProperty(it, STATE, metadata);
  607. return metadata;
  608. };
  609. get = function (it) {
  610. return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
  611. };
  612. has = function (it) {
  613. return hasOwnProperty_1(it, STATE);
  614. };
  615. }
  616. var internalState = {
  617. set: set,
  618. get: get,
  619. has: has,
  620. enforce: enforce,
  621. getterFor: getterFor
  622. };
  623. var makeBuiltIn_1 = createCommonjsModule(function (module) {
  624. var defineProperty = objectDefineProperty.f;
  625. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  626. var enforceInternalState = internalState.enforce;
  627. var getInternalState = internalState.get;
  628. var CONFIGURABLE_LENGTH = !fails(function () {
  629. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  630. });
  631. var TEMPLATE = String(String).split('String');
  632. var makeBuiltIn = module.exports = function (value, name, options) {
  633. if (String(name).slice(0, 7) === 'Symbol(') {
  634. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  635. }
  636. if (options && options.getter) name = 'get ' + name;
  637. if (options && options.setter) name = 'set ' + name;
  638. if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  639. defineProperty(value, 'name', { value: name, configurable: true });
  640. }
  641. if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
  642. defineProperty(value, 'length', { value: options.arity });
  643. }
  644. var state = enforceInternalState(value);
  645. if (!hasOwnProperty_1(state, 'source')) {
  646. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  647. } return value;
  648. };
  649. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  650. // eslint-disable-next-line no-extend-native -- required
  651. Function.prototype.toString = makeBuiltIn(function toString() {
  652. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  653. }, 'toString');
  654. });
  655. var defineBuiltIn = function (O, key, value, options) {
  656. var unsafe = options ? !!options.unsafe : false;
  657. var simple = options ? !!options.enumerable : false;
  658. var noTargetGet = options ? !!options.noTargetGet : false;
  659. var name = options && options.name !== undefined ? options.name : key;
  660. if (isCallable(value)) makeBuiltIn_1(value, name, options);
  661. if (O === global_1) {
  662. if (simple) O[key] = value;
  663. else setGlobal(key, value);
  664. return O;
  665. } else if (!unsafe) {
  666. delete O[key];
  667. } else if (!noTargetGet && O[key]) {
  668. simple = true;
  669. }
  670. if (simple) O[key] = value;
  671. else createNonEnumerableProperty(O, key, value);
  672. return O;
  673. };
  674. var ceil = Math.ceil;
  675. var floor$1 = Math.floor;
  676. // `ToIntegerOrInfinity` abstract operation
  677. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  678. var toIntegerOrInfinity = function (argument) {
  679. var number = +argument;
  680. // eslint-disable-next-line no-self-compare -- safe
  681. return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
  682. };
  683. var max$2 = Math.max;
  684. var min$1 = Math.min;
  685. // Helper for a popular repeating case of the spec:
  686. // Let integer be ? ToInteger(index).
  687. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  688. var toAbsoluteIndex = function (index, length) {
  689. var integer = toIntegerOrInfinity(index);
  690. return integer < 0 ? max$2(integer + length, 0) : min$1(integer, length);
  691. };
  692. var min = Math.min;
  693. // `ToLength` abstract operation
  694. // https://tc39.es/ecma262/#sec-tolength
  695. var toLength = function (argument) {
  696. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  697. };
  698. // `LengthOfArrayLike` abstract operation
  699. // https://tc39.es/ecma262/#sec-lengthofarraylike
  700. var lengthOfArrayLike = function (obj) {
  701. return toLength(obj.length);
  702. };
  703. // `Array.prototype.{ indexOf, includes }` methods implementation
  704. var createMethod$1 = function (IS_INCLUDES) {
  705. return function ($this, el, fromIndex) {
  706. var O = toIndexedObject($this);
  707. var length = lengthOfArrayLike(O);
  708. var index = toAbsoluteIndex(fromIndex, length);
  709. var value;
  710. // Array#includes uses SameValueZero equality algorithm
  711. // eslint-disable-next-line no-self-compare -- NaN check
  712. if (IS_INCLUDES && el != el) while (length > index) {
  713. value = O[index++];
  714. // eslint-disable-next-line no-self-compare -- NaN check
  715. if (value != value) return true;
  716. // Array#indexOf ignores holes, Array#includes - not
  717. } else for (;length > index; index++) {
  718. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  719. } return !IS_INCLUDES && -1;
  720. };
  721. };
  722. var arrayIncludes = {
  723. // `Array.prototype.includes` method
  724. // https://tc39.es/ecma262/#sec-array.prototype.includes
  725. includes: createMethod$1(true),
  726. // `Array.prototype.indexOf` method
  727. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  728. indexOf: createMethod$1(false)
  729. };
  730. var indexOf = arrayIncludes.indexOf;
  731. var push$2 = functionUncurryThis([].push);
  732. var objectKeysInternal = function (object, names) {
  733. var O = toIndexedObject(object);
  734. var i = 0;
  735. var result = [];
  736. var key;
  737. for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$2(result, key);
  738. // Don't enum bug & hidden keys
  739. while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
  740. ~indexOf(result, key) || push$2(result, key);
  741. }
  742. return result;
  743. };
  744. // IE8- don't enum bug keys
  745. var enumBugKeys = [
  746. 'constructor',
  747. 'hasOwnProperty',
  748. 'isPrototypeOf',
  749. 'propertyIsEnumerable',
  750. 'toLocaleString',
  751. 'toString',
  752. 'valueOf'
  753. ];
  754. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  755. // `Object.getOwnPropertyNames` method
  756. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  757. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  758. var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  759. return objectKeysInternal(O, hiddenKeys);
  760. };
  761. var objectGetOwnPropertyNames = {
  762. f: f$2
  763. };
  764. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  765. var f$1 = Object.getOwnPropertySymbols;
  766. var objectGetOwnPropertySymbols = {
  767. f: f$1
  768. };
  769. var concat$1 = functionUncurryThis([].concat);
  770. // all object keys, includes non-enumerable and symbols
  771. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  772. var keys = objectGetOwnPropertyNames.f(anObject(it));
  773. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  774. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  775. };
  776. var copyConstructorProperties = function (target, source, exceptions) {
  777. var keys = ownKeys(source);
  778. var defineProperty = objectDefineProperty.f;
  779. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  780. for (var i = 0; i < keys.length; i++) {
  781. var key = keys[i];
  782. if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
  783. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  784. }
  785. }
  786. };
  787. var replacement = /#|\.prototype\./;
  788. var isForced = function (feature, detection) {
  789. var value = data[normalize(feature)];
  790. return value == POLYFILL ? true
  791. : value == NATIVE ? false
  792. : isCallable(detection) ? fails(detection)
  793. : !!detection;
  794. };
  795. var normalize = isForced.normalize = function (string) {
  796. return String(string).replace(replacement, '.').toLowerCase();
  797. };
  798. var data = isForced.data = {};
  799. var NATIVE = isForced.NATIVE = 'N';
  800. var POLYFILL = isForced.POLYFILL = 'P';
  801. var isForced_1 = isForced;
  802. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  803. /*
  804. options.target - name of the target object
  805. options.global - target is the global object
  806. options.stat - export as static methods of target
  807. options.proto - export as prototype methods of target
  808. options.real - real prototype method for the `pure` version
  809. options.forced - export even if the native feature is available
  810. options.bind - bind methods to the target, required for the `pure` version
  811. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  812. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  813. options.sham - add a flag to not completely full polyfills
  814. options.enumerable - export as enumerable property
  815. options.noTargetGet - prevent calling a getter on target
  816. options.name - the .name of the function if it does not match the key
  817. */
  818. var _export = function (options, source) {
  819. var TARGET = options.target;
  820. var GLOBAL = options.global;
  821. var STATIC = options.stat;
  822. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  823. if (GLOBAL) {
  824. target = global_1;
  825. } else if (STATIC) {
  826. target = global_1[TARGET] || setGlobal(TARGET, {});
  827. } else {
  828. target = (global_1[TARGET] || {}).prototype;
  829. }
  830. if (target) for (key in source) {
  831. sourceProperty = source[key];
  832. if (options.noTargetGet) {
  833. descriptor = getOwnPropertyDescriptor(target, key);
  834. targetProperty = descriptor && descriptor.value;
  835. } else targetProperty = target[key];
  836. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  837. // contained in target
  838. if (!FORCED && targetProperty !== undefined) {
  839. if (typeof sourceProperty == typeof targetProperty) continue;
  840. copyConstructorProperties(sourceProperty, targetProperty);
  841. }
  842. // add a flag to not completely full polyfills
  843. if (options.sham || (targetProperty && targetProperty.sham)) {
  844. createNonEnumerableProperty(sourceProperty, 'sham', true);
  845. }
  846. defineBuiltIn(target, key, sourceProperty, options);
  847. }
  848. };
  849. // `IsArray` abstract operation
  850. // https://tc39.es/ecma262/#sec-isarray
  851. // eslint-disable-next-line es-x/no-array-isarray -- safe
  852. var isArray = Array.isArray || function isArray(argument) {
  853. return classofRaw(argument) == 'Array';
  854. };
  855. var createProperty = function (object, key, value) {
  856. var propertyKey = toPropertyKey(key);
  857. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  858. else object[propertyKey] = value;
  859. };
  860. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  861. var test$1 = {};
  862. test$1[TO_STRING_TAG$1] = 'z';
  863. var toStringTagSupport = String(test$1) === '[object z]';
  864. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  865. var Object$1 = global_1.Object;
  866. // ES3 wrong here
  867. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  868. // fallback for IE11 Script Access Denied error
  869. var tryGet = function (it, key) {
  870. try {
  871. return it[key];
  872. } catch (error) { /* empty */ }
  873. };
  874. // getting tag from ES6+ `Object.prototype.toString`
  875. var classof = toStringTagSupport ? classofRaw : function (it) {
  876. var O, tag, result;
  877. return it === undefined ? 'Undefined' : it === null ? 'Null'
  878. // @@toStringTag case
  879. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  880. // builtinTag case
  881. : CORRECT_ARGUMENTS ? classofRaw(O)
  882. // ES3 arguments fallback
  883. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  884. };
  885. var noop = function () { /* empty */ };
  886. var empty = [];
  887. var construct = getBuiltIn('Reflect', 'construct');
  888. var constructorRegExp = /^\s*(?:class|function)\b/;
  889. var exec = functionUncurryThis(constructorRegExp.exec);
  890. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  891. var isConstructorModern = function isConstructor(argument) {
  892. if (!isCallable(argument)) return false;
  893. try {
  894. construct(noop, empty, argument);
  895. return true;
  896. } catch (error) {
  897. return false;
  898. }
  899. };
  900. var isConstructorLegacy = function isConstructor(argument) {
  901. if (!isCallable(argument)) return false;
  902. switch (classof(argument)) {
  903. case 'AsyncFunction':
  904. case 'GeneratorFunction':
  905. case 'AsyncGeneratorFunction': return false;
  906. }
  907. try {
  908. // we can't check .prototype since constructors produced by .bind haven't it
  909. // `Function#toString` throws on some built-it function in some legacy engines
  910. // (for example, `DOMQuad` and similar in FF41-)
  911. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  912. } catch (error) {
  913. return true;
  914. }
  915. };
  916. isConstructorLegacy.sham = true;
  917. // `IsConstructor` abstract operation
  918. // https://tc39.es/ecma262/#sec-isconstructor
  919. var isConstructor = !construct || fails(function () {
  920. var called;
  921. return isConstructorModern(isConstructorModern.call)
  922. || !isConstructorModern(Object)
  923. || !isConstructorModern(function () { called = true; })
  924. || called;
  925. }) ? isConstructorLegacy : isConstructorModern;
  926. var SPECIES$2 = wellKnownSymbol('species');
  927. var Array$3 = global_1.Array;
  928. // a part of `ArraySpeciesCreate` abstract operation
  929. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  930. var arraySpeciesConstructor = function (originalArray) {
  931. var C;
  932. if (isArray(originalArray)) {
  933. C = originalArray.constructor;
  934. // cross-realm fallback
  935. if (isConstructor(C) && (C === Array$3 || isArray(C.prototype))) C = undefined;
  936. else if (isObject(C)) {
  937. C = C[SPECIES$2];
  938. if (C === null) C = undefined;
  939. }
  940. } return C === undefined ? Array$3 : C;
  941. };
  942. // `ArraySpeciesCreate` abstract operation
  943. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  944. var arraySpeciesCreate = function (originalArray, length) {
  945. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  946. };
  947. var SPECIES$1 = wellKnownSymbol('species');
  948. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  949. // We can't use this feature detection in V8 since it causes
  950. // deoptimization and serious performance degradation
  951. // https://github.com/zloirock/core-js/issues/677
  952. return engineV8Version >= 51 || !fails(function () {
  953. var array = [];
  954. var constructor = array.constructor = {};
  955. constructor[SPECIES$1] = function () {
  956. return { foo: 1 };
  957. };
  958. return array[METHOD_NAME](Boolean).foo !== 1;
  959. });
  960. };
  961. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  962. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  963. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  964. var TypeError$2 = global_1.TypeError;
  965. // We can't use this feature detection in V8 since it causes
  966. // deoptimization and serious performance degradation
  967. // https://github.com/zloirock/core-js/issues/679
  968. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  969. var array = [];
  970. array[IS_CONCAT_SPREADABLE] = false;
  971. return array.concat()[0] !== array;
  972. });
  973. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  974. var isConcatSpreadable = function (O) {
  975. if (!isObject(O)) return false;
  976. var spreadable = O[IS_CONCAT_SPREADABLE];
  977. return spreadable !== undefined ? !!spreadable : isArray(O);
  978. };
  979. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  980. // `Array.prototype.concat` method
  981. // https://tc39.es/ecma262/#sec-array.prototype.concat
  982. // with adding support of @@isConcatSpreadable and @@species
  983. _export({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
  984. // eslint-disable-next-line no-unused-vars -- required for `.length`
  985. concat: function concat(arg) {
  986. var O = toObject(this);
  987. var A = arraySpeciesCreate(O, 0);
  988. var n = 0;
  989. var i, k, length, len, E;
  990. for (i = -1, length = arguments.length; i < length; i++) {
  991. E = i === -1 ? O : arguments[i];
  992. if (isConcatSpreadable(E)) {
  993. len = lengthOfArrayLike(E);
  994. if (n + len > MAX_SAFE_INTEGER) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  995. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  996. } else {
  997. if (n >= MAX_SAFE_INTEGER) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  998. createProperty(A, n++, E);
  999. }
  1000. }
  1001. A.length = n;
  1002. return A;
  1003. }
  1004. });
  1005. // `Object.keys` method
  1006. // https://tc39.es/ecma262/#sec-object.keys
  1007. // eslint-disable-next-line es-x/no-object-keys -- safe
  1008. var objectKeys = Object.keys || function keys(O) {
  1009. return objectKeysInternal(O, enumBugKeys);
  1010. };
  1011. // eslint-disable-next-line es-x/no-object-assign -- safe
  1012. var $assign = Object.assign;
  1013. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  1014. var defineProperty = Object.defineProperty;
  1015. var concat = functionUncurryThis([].concat);
  1016. // `Object.assign` method
  1017. // https://tc39.es/ecma262/#sec-object.assign
  1018. var objectAssign = !$assign || fails(function () {
  1019. // should have correct order of operations (Edge bug)
  1020. if (descriptors && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1021. enumerable: true,
  1022. get: function () {
  1023. defineProperty(this, 'b', {
  1024. value: 3,
  1025. enumerable: false
  1026. });
  1027. }
  1028. }), { b: 2 })).b !== 1) return true;
  1029. // should work with symbols and should have deterministic property order (V8 bug)
  1030. var A = {};
  1031. var B = {};
  1032. // eslint-disable-next-line es-x/no-symbol -- safe
  1033. var symbol = Symbol();
  1034. var alphabet = 'abcdefghijklmnopqrst';
  1035. A[symbol] = 7;
  1036. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1037. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  1038. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1039. var T = toObject(target);
  1040. var argumentsLength = arguments.length;
  1041. var index = 1;
  1042. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  1043. var propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1044. while (argumentsLength > index) {
  1045. var S = indexedObject(arguments[index++]);
  1046. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1047. var length = keys.length;
  1048. var j = 0;
  1049. var key;
  1050. while (length > j) {
  1051. key = keys[j++];
  1052. if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
  1053. }
  1054. } return T;
  1055. } : $assign;
  1056. // `Object.assign` method
  1057. // https://tc39.es/ecma262/#sec-object.assign
  1058. // eslint-disable-next-line es-x/no-object-assign -- required for testing
  1059. _export({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== objectAssign }, {
  1060. assign: objectAssign
  1061. });
  1062. var arraySlice = functionUncurryThis([].slice);
  1063. var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice');
  1064. var SPECIES = wellKnownSymbol('species');
  1065. var Array$2 = global_1.Array;
  1066. var max$1 = Math.max;
  1067. // `Array.prototype.slice` method
  1068. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1069. // fallback for not array-like ES3 strings and DOM objects
  1070. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
  1071. slice: function slice(start, end) {
  1072. var O = toIndexedObject(this);
  1073. var length = lengthOfArrayLike(O);
  1074. var k = toAbsoluteIndex(start, length);
  1075. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1076. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1077. var Constructor, result, n;
  1078. if (isArray(O)) {
  1079. Constructor = O.constructor;
  1080. // cross-realm fallback
  1081. if (isConstructor(Constructor) && (Constructor === Array$2 || isArray(Constructor.prototype))) {
  1082. Constructor = undefined;
  1083. } else if (isObject(Constructor)) {
  1084. Constructor = Constructor[SPECIES];
  1085. if (Constructor === null) Constructor = undefined;
  1086. }
  1087. if (Constructor === Array$2 || Constructor === undefined) {
  1088. return arraySlice(O, k, fin);
  1089. }
  1090. }
  1091. result = new (Constructor === undefined ? Array$2 : Constructor)(max$1(fin - k, 0));
  1092. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  1093. result.length = n;
  1094. return result;
  1095. }
  1096. });
  1097. var arrayMethodIsStrict = function (METHOD_NAME, argument) {
  1098. var method = [][METHOD_NAME];
  1099. return !!method && fails(function () {
  1100. // eslint-disable-next-line no-useless-call -- required for testing
  1101. method.call(null, argument || function () { return 1; }, 1);
  1102. });
  1103. };
  1104. /* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
  1105. var $IndexOf = arrayIncludes.indexOf;
  1106. var un$IndexOf = functionUncurryThis([].indexOf);
  1107. var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
  1108. var STRICT_METHOD$2 = arrayMethodIsStrict('indexOf');
  1109. // `Array.prototype.indexOf` method
  1110. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1111. _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$2 }, {
  1112. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1113. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1114. return NEGATIVE_ZERO
  1115. // convert -0 to +0
  1116. ? un$IndexOf(this, searchElement, fromIndex) || 0
  1117. : $IndexOf(this, searchElement, fromIndex);
  1118. }
  1119. });
  1120. var bind = functionUncurryThis(functionUncurryThis.bind);
  1121. // optional / simple context binding
  1122. var functionBindContext = function (fn, that) {
  1123. aCallable(fn);
  1124. return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
  1125. return fn.apply(that, arguments);
  1126. };
  1127. };
  1128. var TypeError$1 = global_1.TypeError;
  1129. // `FlattenIntoArray` abstract operation
  1130. // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
  1131. var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
  1132. var targetIndex = start;
  1133. var sourceIndex = 0;
  1134. var mapFn = mapper ? functionBindContext(mapper, thisArg) : false;
  1135. var element, elementLen;
  1136. while (sourceIndex < sourceLen) {
  1137. if (sourceIndex in source) {
  1138. element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
  1139. if (depth > 0 && isArray(element)) {
  1140. elementLen = lengthOfArrayLike(element);
  1141. targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
  1142. } else {
  1143. if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError$1('Exceed the acceptable array length');
  1144. target[targetIndex] = element;
  1145. }
  1146. targetIndex++;
  1147. }
  1148. sourceIndex++;
  1149. }
  1150. return targetIndex;
  1151. };
  1152. var flattenIntoArray_1 = flattenIntoArray;
  1153. // `Array.prototype.flat` method
  1154. // https://tc39.es/ecma262/#sec-array.prototype.flat
  1155. _export({ target: 'Array', proto: true }, {
  1156. flat: function flat(/* depthArg = 1 */) {
  1157. var depthArg = arguments.length ? arguments[0] : undefined;
  1158. var O = toObject(this);
  1159. var sourceLen = lengthOfArrayLike(O);
  1160. var A = arraySpeciesCreate(O, 0);
  1161. A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
  1162. return A;
  1163. }
  1164. });
  1165. // `Object.defineProperties` method
  1166. // https://tc39.es/ecma262/#sec-object.defineproperties
  1167. // eslint-disable-next-line es-x/no-object-defineproperties -- safe
  1168. var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
  1169. anObject(O);
  1170. var props = toIndexedObject(Properties);
  1171. var keys = objectKeys(Properties);
  1172. var length = keys.length;
  1173. var index = 0;
  1174. var key;
  1175. while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
  1176. return O;
  1177. };
  1178. var objectDefineProperties = {
  1179. f: f
  1180. };
  1181. var html = getBuiltIn('document', 'documentElement');
  1182. /* global ActiveXObject -- old IE, WSH */
  1183. var GT = '>';
  1184. var LT = '<';
  1185. var PROTOTYPE = 'prototype';
  1186. var SCRIPT = 'script';
  1187. var IE_PROTO = sharedKey('IE_PROTO');
  1188. var EmptyConstructor = function () { /* empty */ };
  1189. var scriptTag = function (content) {
  1190. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1191. };
  1192. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1193. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1194. activeXDocument.write(scriptTag(''));
  1195. activeXDocument.close();
  1196. var temp = activeXDocument.parentWindow.Object;
  1197. activeXDocument = null; // avoid memory leak
  1198. return temp;
  1199. };
  1200. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1201. var NullProtoObjectViaIFrame = function () {
  1202. // Thrash, waste and sodomy: IE GC bug
  1203. var iframe = documentCreateElement('iframe');
  1204. var JS = 'java' + SCRIPT + ':';
  1205. var iframeDocument;
  1206. iframe.style.display = 'none';
  1207. html.appendChild(iframe);
  1208. // https://github.com/zloirock/core-js/issues/475
  1209. iframe.src = String(JS);
  1210. iframeDocument = iframe.contentWindow.document;
  1211. iframeDocument.open();
  1212. iframeDocument.write(scriptTag('document.F=Object'));
  1213. iframeDocument.close();
  1214. return iframeDocument.F;
  1215. };
  1216. // Check for document.domain and active x support
  1217. // No need to use active x approach when document.domain is not set
  1218. // see https://github.com/es-shims/es5-shim/issues/150
  1219. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1220. // avoid IE GC bug
  1221. var activeXDocument;
  1222. var NullProtoObject = function () {
  1223. try {
  1224. activeXDocument = new ActiveXObject('htmlfile');
  1225. } catch (error) { /* ignore */ }
  1226. NullProtoObject = typeof document != 'undefined'
  1227. ? document.domain && activeXDocument
  1228. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1229. : NullProtoObjectViaIFrame()
  1230. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1231. var length = enumBugKeys.length;
  1232. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1233. return NullProtoObject();
  1234. };
  1235. hiddenKeys$1[IE_PROTO] = true;
  1236. // `Object.create` method
  1237. // https://tc39.es/ecma262/#sec-object.create
  1238. // eslint-disable-next-line es-x/no-object-create -- safe
  1239. var objectCreate = Object.create || function create(O, Properties) {
  1240. var result;
  1241. if (O !== null) {
  1242. EmptyConstructor[PROTOTYPE] = anObject(O);
  1243. result = new EmptyConstructor();
  1244. EmptyConstructor[PROTOTYPE] = null;
  1245. // add "__proto__" for Object.getPrototypeOf polyfill
  1246. result[IE_PROTO] = O;
  1247. } else result = NullProtoObject();
  1248. return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
  1249. };
  1250. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1251. var ArrayPrototype = Array.prototype;
  1252. // Array.prototype[@@unscopables]
  1253. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1254. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1255. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  1256. configurable: true,
  1257. value: objectCreate(null)
  1258. });
  1259. }
  1260. // add a key to Array.prototype[@@unscopables]
  1261. var addToUnscopables = function (key) {
  1262. ArrayPrototype[UNSCOPABLES][key] = true;
  1263. };
  1264. // this method was added to unscopables after implementation
  1265. // in popular engines, so it's moved to a separate module
  1266. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1267. addToUnscopables('flat');
  1268. var String$1 = global_1.String;
  1269. var toString_1 = function (argument) {
  1270. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1271. return String$1(argument);
  1272. };
  1273. var Array$1 = global_1.Array;
  1274. var max = Math.max;
  1275. var arraySliceSimple = function (O, start, end) {
  1276. var length = lengthOfArrayLike(O);
  1277. var k = toAbsoluteIndex(start, length);
  1278. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1279. var result = Array$1(max(fin - k, 0));
  1280. for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
  1281. result.length = n;
  1282. return result;
  1283. };
  1284. var floor = Math.floor;
  1285. var mergeSort = function (array, comparefn) {
  1286. var length = array.length;
  1287. var middle = floor(length / 2);
  1288. return length < 8 ? insertionSort(array, comparefn) : merge(
  1289. array,
  1290. mergeSort(arraySliceSimple(array, 0, middle), comparefn),
  1291. mergeSort(arraySliceSimple(array, middle), comparefn),
  1292. comparefn
  1293. );
  1294. };
  1295. var insertionSort = function (array, comparefn) {
  1296. var length = array.length;
  1297. var i = 1;
  1298. var element, j;
  1299. while (i < length) {
  1300. j = i;
  1301. element = array[i];
  1302. while (j && comparefn(array[j - 1], element) > 0) {
  1303. array[j] = array[--j];
  1304. }
  1305. if (j !== i++) array[j] = element;
  1306. } return array;
  1307. };
  1308. var merge = function (array, left, right, comparefn) {
  1309. var llength = left.length;
  1310. var rlength = right.length;
  1311. var lindex = 0;
  1312. var rindex = 0;
  1313. while (lindex < llength || rindex < rlength) {
  1314. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  1315. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  1316. : lindex < llength ? left[lindex++] : right[rindex++];
  1317. } return array;
  1318. };
  1319. var arraySort = mergeSort;
  1320. var firefox = engineUserAgent.match(/firefox\/(\d+)/i);
  1321. var engineFfVersion = !!firefox && +firefox[1];
  1322. var engineIsIeOrEdge = /MSIE|Trident/.test(engineUserAgent);
  1323. var webkit = engineUserAgent.match(/AppleWebKit\/(\d+)\./);
  1324. var engineWebkitVersion = !!webkit && +webkit[1];
  1325. var test = [];
  1326. var un$Sort = functionUncurryThis(test.sort);
  1327. var push$1 = functionUncurryThis(test.push);
  1328. // IE8-
  1329. var FAILS_ON_UNDEFINED = fails(function () {
  1330. test.sort(undefined);
  1331. });
  1332. // V8 bug
  1333. var FAILS_ON_NULL = fails(function () {
  1334. test.sort(null);
  1335. });
  1336. // Old WebKit
  1337. var STRICT_METHOD$1 = arrayMethodIsStrict('sort');
  1338. var STABLE_SORT = !fails(function () {
  1339. // feature detection can be too slow, so check engines versions
  1340. if (engineV8Version) return engineV8Version < 70;
  1341. if (engineFfVersion && engineFfVersion > 3) return;
  1342. if (engineIsIeOrEdge) return true;
  1343. if (engineWebkitVersion) return engineWebkitVersion < 603;
  1344. var result = '';
  1345. var code, chr, value, index;
  1346. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  1347. for (code = 65; code < 76; code++) {
  1348. chr = String.fromCharCode(code);
  1349. switch (code) {
  1350. case 66: case 69: case 70: case 72: value = 3; break;
  1351. case 68: case 71: value = 4; break;
  1352. default: value = 2;
  1353. }
  1354. for (index = 0; index < 47; index++) {
  1355. test.push({ k: chr + index, v: value });
  1356. }
  1357. }
  1358. test.sort(function (a, b) { return b.v - a.v; });
  1359. for (index = 0; index < test.length; index++) {
  1360. chr = test[index].k.charAt(0);
  1361. if (result.charAt(result.length - 1) !== chr) result += chr;
  1362. }
  1363. return result !== 'DGBEFHACIJK';
  1364. });
  1365. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT;
  1366. var getSortCompare = function (comparefn) {
  1367. return function (x, y) {
  1368. if (y === undefined) return -1;
  1369. if (x === undefined) return 1;
  1370. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  1371. return toString_1(x) > toString_1(y) ? 1 : -1;
  1372. };
  1373. };
  1374. // `Array.prototype.sort` method
  1375. // https://tc39.es/ecma262/#sec-array.prototype.sort
  1376. _export({ target: 'Array', proto: true, forced: FORCED }, {
  1377. sort: function sort(comparefn) {
  1378. if (comparefn !== undefined) aCallable(comparefn);
  1379. var array = toObject(this);
  1380. if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
  1381. var items = [];
  1382. var arrayLength = lengthOfArrayLike(array);
  1383. var itemsLength, index;
  1384. for (index = 0; index < arrayLength; index++) {
  1385. if (index in array) push$1(items, array[index]);
  1386. }
  1387. arraySort(items, getSortCompare(comparefn));
  1388. itemsLength = items.length;
  1389. index = 0;
  1390. while (index < itemsLength) array[index] = items[index++];
  1391. while (index < arrayLength) delete array[index++];
  1392. return array;
  1393. }
  1394. });
  1395. var $includes = arrayIncludes.includes;
  1396. // FF99+ bug
  1397. var BROKEN_ON_SPARSE = fails(function () {
  1398. return !Array(1).includes();
  1399. });
  1400. // `Array.prototype.includes` method
  1401. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1402. _export({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1403. includes: function includes(el /* , fromIndex = 0 */) {
  1404. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1405. }
  1406. });
  1407. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1408. addToUnscopables('includes');
  1409. var push = functionUncurryThis([].push);
  1410. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1411. var createMethod = function (TYPE) {
  1412. var IS_MAP = TYPE == 1;
  1413. var IS_FILTER = TYPE == 2;
  1414. var IS_SOME = TYPE == 3;
  1415. var IS_EVERY = TYPE == 4;
  1416. var IS_FIND_INDEX = TYPE == 6;
  1417. var IS_FILTER_REJECT = TYPE == 7;
  1418. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1419. return function ($this, callbackfn, that, specificCreate) {
  1420. var O = toObject($this);
  1421. var self = indexedObject(O);
  1422. var boundFunction = functionBindContext(callbackfn, that);
  1423. var length = lengthOfArrayLike(self);
  1424. var index = 0;
  1425. var create = specificCreate || arraySpeciesCreate;
  1426. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1427. var value, result;
  1428. for (;length > index; index++) if (NO_HOLES || index in self) {
  1429. value = self[index];
  1430. result = boundFunction(value, index, O);
  1431. if (TYPE) {
  1432. if (IS_MAP) target[index] = result; // map
  1433. else if (result) switch (TYPE) {
  1434. case 3: return true; // some
  1435. case 5: return value; // find
  1436. case 6: return index; // findIndex
  1437. case 2: push(target, value); // filter
  1438. } else switch (TYPE) {
  1439. case 4: return false; // every
  1440. case 7: push(target, value); // filterReject
  1441. }
  1442. }
  1443. }
  1444. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1445. };
  1446. };
  1447. var arrayIteration = {
  1448. // `Array.prototype.forEach` method
  1449. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1450. forEach: createMethod(0),
  1451. // `Array.prototype.map` method
  1452. // https://tc39.es/ecma262/#sec-array.prototype.map
  1453. map: createMethod(1),
  1454. // `Array.prototype.filter` method
  1455. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1456. filter: createMethod(2),
  1457. // `Array.prototype.some` method
  1458. // https://tc39.es/ecma262/#sec-array.prototype.some
  1459. some: createMethod(3),
  1460. // `Array.prototype.every` method
  1461. // https://tc39.es/ecma262/#sec-array.prototype.every
  1462. every: createMethod(4),
  1463. // `Array.prototype.find` method
  1464. // https://tc39.es/ecma262/#sec-array.prototype.find
  1465. find: createMethod(5),
  1466. // `Array.prototype.findIndex` method
  1467. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1468. findIndex: createMethod(6),
  1469. // `Array.prototype.filterReject` method
  1470. // https://github.com/tc39/proposal-array-filtering
  1471. filterReject: createMethod(7)
  1472. };
  1473. var $find = arrayIteration.find;
  1474. var FIND = 'find';
  1475. var SKIPS_HOLES = true;
  1476. // Shouldn't skip holes
  1477. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1478. // `Array.prototype.find` method
  1479. // https://tc39.es/ecma262/#sec-array.prototype.find
  1480. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1481. find: function find(callbackfn /* , that = undefined */) {
  1482. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1483. }
  1484. });
  1485. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1486. addToUnscopables(FIND);
  1487. // `Object.prototype.toString` method implementation
  1488. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1489. var objectToString = toStringTagSupport ? {}.toString : function toString() {
  1490. return '[object ' + classof(this) + ']';
  1491. };
  1492. // `Object.prototype.toString` method
  1493. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1494. if (!toStringTagSupport) {
  1495. defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
  1496. }
  1497. var un$Join = functionUncurryThis([].join);
  1498. var ES3_STRINGS = indexedObject != Object;
  1499. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  1500. // `Array.prototype.join` method
  1501. // https://tc39.es/ecma262/#sec-array.prototype.join
  1502. _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  1503. join: function join(separator) {
  1504. return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
  1505. }
  1506. });
  1507. var $filter = arrayIteration.filter;
  1508. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('filter');
  1509. // `Array.prototype.filter` method
  1510. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1511. // with adding support of @@species
  1512. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1513. filter: function filter(callbackfn /* , thisArg */) {
  1514. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1515. }
  1516. });
  1517. var $map = arrayIteration.map;
  1518. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  1519. // `Array.prototype.map` method
  1520. // https://tc39.es/ecma262/#sec-array.prototype.map
  1521. // with adding support of @@species
  1522. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1523. map: function map(callbackfn /* , thisArg */) {
  1524. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1525. }
  1526. });
  1527. /**
  1528. * @update zhixin wen <wenzhixin2010@gmail.com>
  1529. */
  1530. var Utils = $__default["default"].fn.bootstrapTable.utils;
  1531. function printPageBuilderDefault(table) {
  1532. return "\n <html>\n <head>\n <style type=\"text/css\" media=\"print\">\n @page {\n size: auto;\n margin: 25px 0 25px 0;\n }\n </style>\n <style type=\"text/css\" media=\"all\">\n table {\n border-collapse: collapse;\n font-size: 12px;\n }\n table, th, td {\n border: 1px solid grey;\n }\n th, td {\n text-align: center;\n vertical-align: middle;\n }\n p {\n font-weight: bold;\n margin-left:20px;\n }\n table {\n width:94%;\n margin-left:3%;\n margin-right:3%;\n }\n div.bs-table-print {\n text-align:center;\n }\n </style>\n </head>\n <title>Print Table</title>\n <body>\n <p>Printed on: ".concat(new Date(), " </p>\n <div class=\"bs-table-print\">").concat(table, "</div>\n </body>\n </html>");
  1533. }
  1534. $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
  1535. formatPrint: function formatPrint() {
  1536. return 'Print';
  1537. }
  1538. });
  1539. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
  1540. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1541. showPrint: false,
  1542. printAsFilteredAndSortedOnUI: true,
  1543. printSortColumn: undefined,
  1544. printSortOrder: 'asc',
  1545. printPageBuilder: function printPageBuilder(table) {
  1546. return printPageBuilderDefault(table);
  1547. }
  1548. });
  1549. $__default["default"].extend($__default["default"].fn.bootstrapTable.COLUMN_DEFAULTS, {
  1550. printFilter: undefined,
  1551. printIgnore: false,
  1552. printFormatter: undefined
  1553. });
  1554. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  1555. print: {
  1556. bootstrap3: 'glyphicon-print icon-share',
  1557. bootstrap5: 'bi-printer',
  1558. 'bootstrap-table': 'icon-printer'
  1559. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-print'
  1560. });
  1561. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1562. _inherits(_class, _$$BootstrapTable);
  1563. var _super = _createSuper(_class);
  1564. function _class() {
  1565. _classCallCheck(this, _class);
  1566. return _super.apply(this, arguments);
  1567. }
  1568. _createClass(_class, [{
  1569. key: "init",
  1570. value: function init() {
  1571. var _get2;
  1572. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1573. args[_key] = arguments[_key];
  1574. }
  1575. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  1576. if (!this.options.showPrint) {
  1577. return;
  1578. }
  1579. this.mergedCells = [];
  1580. }
  1581. }, {
  1582. key: "initToolbar",
  1583. value: function initToolbar() {
  1584. var _this = this,
  1585. _get3;
  1586. this.showToolbar = this.showToolbar || this.options.showPrint;
  1587. if (this.options.showPrint) {
  1588. this.buttons = Object.assign(this.buttons, {
  1589. print: {
  1590. text: this.options.formatPrint(),
  1591. icon: this.options.icons.print,
  1592. event: function event() {
  1593. _this.doPrint(_this.options.printAsFilteredAndSortedOnUI ? _this.getData() : _this.options.data.slice(0));
  1594. },
  1595. attributes: {
  1596. 'aria-label': this.options.formatPrint(),
  1597. title: this.options.formatPrint()
  1598. }
  1599. }
  1600. });
  1601. }
  1602. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1603. args[_key2] = arguments[_key2];
  1604. }
  1605. (_get3 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get3, [this].concat(args));
  1606. }
  1607. }, {
  1608. key: "mergeCells",
  1609. value: function mergeCells(options) {
  1610. _get(_getPrototypeOf(_class.prototype), "mergeCells", this).call(this, options);
  1611. if (!this.options.showPrint) {
  1612. return;
  1613. }
  1614. var col = this.getVisibleFields().indexOf(options.field);
  1615. if (Utils.hasDetailViewIcon(this.options)) {
  1616. col += 1;
  1617. }
  1618. this.mergedCells.push({
  1619. row: options.index,
  1620. col: col,
  1621. rowspan: options.rowspan || 1,
  1622. colspan: options.colspan || 1
  1623. });
  1624. }
  1625. }, {
  1626. key: "doPrint",
  1627. value: function doPrint(data) {
  1628. var _this2 = this;
  1629. var formatValue = function formatValue(row, i, column) {
  1630. var value = Utils.calculateObjectValue(column, column.printFormatter || column.formatter, [row[column.field], row, i], row[column.field]);
  1631. return typeof value === 'undefined' || value === null ? _this2.options.undefinedText : value;
  1632. };
  1633. var buildTable = function buildTable(data, columnsArray) {
  1634. var dir = _this2.$el.attr('dir') || 'ltr';
  1635. var html = ["<table dir=\"".concat(dir, "\"><thead>")];
  1636. var _iterator = _createForOfIteratorHelper(columnsArray),
  1637. _step;
  1638. try {
  1639. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  1640. var _columns2 = _step.value;
  1641. html.push('<tr>');
  1642. for (var _h = 0; _h < _columns2.length; _h++) {
  1643. if (!_columns2[_h].printIgnore) {
  1644. html.push("<th\n ".concat(Utils.sprintf(' rowspan="%s"', _columns2[_h].rowspan), "\n ").concat(Utils.sprintf(' colspan="%s"', _columns2[_h].colspan), "\n >").concat(_columns2[_h].title, "</th>"));
  1645. }
  1646. }
  1647. html.push('</tr>');
  1648. }
  1649. } catch (err) {
  1650. _iterator.e(err);
  1651. } finally {
  1652. _iterator.f();
  1653. }
  1654. html.push('</thead><tbody>');
  1655. var dontRender = [];
  1656. if (_this2.mergedCells) {
  1657. for (var mc = 0; mc < _this2.mergedCells.length; mc++) {
  1658. var currentMergedCell = _this2.mergedCells[mc];
  1659. for (var rs = 0; rs < currentMergedCell.rowspan; rs++) {
  1660. var row = currentMergedCell.row + rs;
  1661. for (var cs = 0; cs < currentMergedCell.colspan; cs++) {
  1662. var col = currentMergedCell.col + cs;
  1663. dontRender.push("".concat(row, ",").concat(col));
  1664. }
  1665. }
  1666. }
  1667. }
  1668. for (var i = 0; i < data.length; i++) {
  1669. html.push('<tr>');
  1670. var columns = columnsArray.flat(1);
  1671. columns.sort(function (c1, c2) {
  1672. return c1.colspanIndex - c2.colspanIndex;
  1673. });
  1674. for (var j = 0; j < columns.length; j++) {
  1675. if (columns[j].colspanGroup > 0) continue;
  1676. var rowspan = 0;
  1677. var colspan = 0;
  1678. if (_this2.mergedCells) {
  1679. for (var _mc = 0; _mc < _this2.mergedCells.length; _mc++) {
  1680. var _currentMergedCell = _this2.mergedCells[_mc];
  1681. if (_currentMergedCell.col === j && _currentMergedCell.row === i) {
  1682. rowspan = _currentMergedCell.rowspan;
  1683. colspan = _currentMergedCell.colspan;
  1684. }
  1685. }
  1686. }
  1687. if (!columns[j].printIgnore && columns[j].field && (!dontRender.includes("".concat(i, ",").concat(j)) || rowspan > 0 && colspan > 0)) {
  1688. if (rowspan > 0 && colspan > 0) {
  1689. html.push("<td ".concat(Utils.sprintf(' rowspan="%s"', rowspan), " ").concat(Utils.sprintf(' colspan="%s"', colspan), ">"), formatValue(data[i], i, columns[j]), '</td>');
  1690. } else {
  1691. html.push('<td>', formatValue(data[i], i, columns[j]), '</td>');
  1692. }
  1693. }
  1694. }
  1695. html.push('</tr>');
  1696. }
  1697. html.push('</tbody>');
  1698. if (_this2.options.showFooter) {
  1699. html.push('<footer><tr>');
  1700. var _iterator2 = _createForOfIteratorHelper(columnsArray),
  1701. _step2;
  1702. try {
  1703. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  1704. var _columns = _step2.value;
  1705. for (var h = 0; h < _columns.length; h++) {
  1706. if (!_columns[h].printIgnore) {
  1707. var footerData = Utils.trToData(_columns, _this2.$el.find('>tfoot>tr'));
  1708. var footerValue = Utils.calculateObjectValue(_columns[h], _columns[h].footerFormatter, [data], footerData[0] && footerData[0][_columns[h].field] || '');
  1709. html.push("<th>".concat(footerValue, "</th>"));
  1710. }
  1711. }
  1712. }
  1713. } catch (err) {
  1714. _iterator2.e(err);
  1715. } finally {
  1716. _iterator2.f();
  1717. }
  1718. html.push('</tr></footer>');
  1719. }
  1720. html.push('</table>');
  1721. return html.join('');
  1722. };
  1723. var sortRows = function sortRows(data, colName, sortOrder) {
  1724. if (!colName) {
  1725. return data;
  1726. }
  1727. var reverse = sortOrder !== 'asc';
  1728. reverse = -(+reverse || -1);
  1729. return data.sort(function (a, b) {
  1730. return reverse * a[colName].localeCompare(b[colName]);
  1731. });
  1732. };
  1733. var filterRow = function filterRow(row, filters) {
  1734. for (var index = 0; index < filters.length; ++index) {
  1735. if (row[filters[index].colName] !== filters[index].value) {
  1736. return false;
  1737. }
  1738. }
  1739. return true;
  1740. };
  1741. var filterRows = function filterRows(data, filters) {
  1742. return data.filter(function (row) {
  1743. return filterRow(row, filters);
  1744. });
  1745. };
  1746. var getColumnFilters = function getColumnFilters(columns) {
  1747. return !columns || !columns[0] ? [] : columns[0].filter(function (col) {
  1748. return col.printFilter;
  1749. }).map(function (col) {
  1750. return {
  1751. colName: col.field,
  1752. value: col.printFilter
  1753. };
  1754. });
  1755. };
  1756. data = filterRows(data, getColumnFilters(this.options.columns));
  1757. data = sortRows(data, this.options.printSortColumn, this.options.printSortOrder);
  1758. var table = buildTable(data, this.options.columns);
  1759. var newWin = window.open('');
  1760. var calculatedPrintPage = Utils.calculateObjectValue(this, this.options.printPageBuilder, [table], printPageBuilderDefault(table));
  1761. newWin.document.write(calculatedPrintPage);
  1762. newWin.document.close();
  1763. newWin.focus();
  1764. newWin.print();
  1765. newWin.close();
  1766. }
  1767. }]);
  1768. return _class;
  1769. }($__default["default"].BootstrapTable);
  1770. }));