bootstrap-table-cookie.js 121 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514
  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 ($$8) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$8);
  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.bind() : 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 ? Object.setPrototypeOf.bind() : 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.bind();
  108. } else {
  109. _get = function _get(target, property, receiver) {
  110. var base = _superPropBase(target, property);
  111. if (!base) return;
  112. var desc = Object.getOwnPropertyDescriptor(base, property);
  113. if (desc.get) {
  114. return desc.get.call(arguments.length < 3 ? target : receiver);
  115. }
  116. return desc.value;
  117. };
  118. }
  119. return _get.apply(this, arguments);
  120. }
  121. function _unsupportedIterableToArray(o, minLen) {
  122. if (!o) return;
  123. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  124. var n = Object.prototype.toString.call(o).slice(8, -1);
  125. if (n === "Object" && o.constructor) n = o.constructor.name;
  126. if (n === "Map" || n === "Set") return Array.from(o);
  127. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  128. }
  129. function _arrayLikeToArray(arr, len) {
  130. if (len == null || len > arr.length) len = arr.length;
  131. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  132. return arr2;
  133. }
  134. function _createForOfIteratorHelper(o, allowArrayLike) {
  135. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  136. if (!it) {
  137. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  138. if (it) o = it;
  139. var i = 0;
  140. var F = function () {};
  141. return {
  142. s: F,
  143. n: function () {
  144. if (i >= o.length) return {
  145. done: true
  146. };
  147. return {
  148. done: false,
  149. value: o[i++]
  150. };
  151. },
  152. e: function (e) {
  153. throw e;
  154. },
  155. f: F
  156. };
  157. }
  158. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  159. }
  160. var normalCompletion = true,
  161. didErr = false,
  162. err;
  163. return {
  164. s: function () {
  165. it = it.call(o);
  166. },
  167. n: function () {
  168. var step = it.next();
  169. normalCompletion = step.done;
  170. return step;
  171. },
  172. e: function (e) {
  173. didErr = true;
  174. err = e;
  175. },
  176. f: function () {
  177. try {
  178. if (!normalCompletion && it.return != null) it.return();
  179. } finally {
  180. if (didErr) throw err;
  181. }
  182. }
  183. };
  184. }
  185. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  186. var check = function (it) {
  187. return it && it.Math == Math && it;
  188. };
  189. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  190. var global$e =
  191. // eslint-disable-next-line es-x/no-global-this -- safe
  192. check(typeof globalThis == 'object' && globalThis) ||
  193. check(typeof window == 'object' && window) ||
  194. // eslint-disable-next-line no-restricted-globals -- safe
  195. check(typeof self == 'object' && self) ||
  196. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  197. // eslint-disable-next-line no-new-func -- fallback
  198. (function () { return this; })() || Function('return this')();
  199. var objectGetOwnPropertyDescriptor = {};
  200. var fails$k = function (exec) {
  201. try {
  202. return !!exec();
  203. } catch (error) {
  204. return true;
  205. }
  206. };
  207. var fails$j = fails$k;
  208. // Detect IE8's incomplete defineProperty implementation
  209. var descriptors = !fails$j(function () {
  210. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  211. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  212. });
  213. var fails$i = fails$k;
  214. var functionBindNative = !fails$i(function () {
  215. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  216. var test = (function () { /* empty */ }).bind();
  217. // eslint-disable-next-line no-prototype-builtins -- safe
  218. return typeof test != 'function' || test.hasOwnProperty('prototype');
  219. });
  220. var NATIVE_BIND$3 = functionBindNative;
  221. var call$b = Function.prototype.call;
  222. var functionCall = NATIVE_BIND$3 ? call$b.bind(call$b) : function () {
  223. return call$b.apply(call$b, arguments);
  224. };
  225. var objectPropertyIsEnumerable = {};
  226. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  227. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  228. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  229. // Nashorn ~ JDK8 bug
  230. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  231. // `Object.prototype.propertyIsEnumerable` method implementation
  232. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  233. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  234. var descriptor = getOwnPropertyDescriptor$1(this, V);
  235. return !!descriptor && descriptor.enumerable;
  236. } : $propertyIsEnumerable;
  237. var createPropertyDescriptor$3 = function (bitmap, value) {
  238. return {
  239. enumerable: !(bitmap & 1),
  240. configurable: !(bitmap & 2),
  241. writable: !(bitmap & 4),
  242. value: value
  243. };
  244. };
  245. var NATIVE_BIND$2 = functionBindNative;
  246. var FunctionPrototype$2 = Function.prototype;
  247. var bind$2 = FunctionPrototype$2.bind;
  248. var call$a = FunctionPrototype$2.call;
  249. var uncurryThis$k = NATIVE_BIND$2 && bind$2.bind(call$a, call$a);
  250. var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
  251. return fn && uncurryThis$k(fn);
  252. } : function (fn) {
  253. return fn && function () {
  254. return call$a.apply(fn, arguments);
  255. };
  256. };
  257. var uncurryThis$j = functionUncurryThis;
  258. var toString$9 = uncurryThis$j({}.toString);
  259. var stringSlice$5 = uncurryThis$j(''.slice);
  260. var classofRaw$1 = function (it) {
  261. return stringSlice$5(toString$9(it), 8, -1);
  262. };
  263. var uncurryThis$i = functionUncurryThis;
  264. var fails$h = fails$k;
  265. var classof$7 = classofRaw$1;
  266. var $Object$3 = Object;
  267. var split = uncurryThis$i(''.split);
  268. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  269. var indexedObject = fails$h(function () {
  270. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  271. // eslint-disable-next-line no-prototype-builtins -- safe
  272. return !$Object$3('z').propertyIsEnumerable(0);
  273. }) ? function (it) {
  274. return classof$7(it) == 'String' ? split(it, '') : $Object$3(it);
  275. } : $Object$3;
  276. var $TypeError$9 = TypeError;
  277. // `RequireObjectCoercible` abstract operation
  278. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  279. var requireObjectCoercible$7 = function (it) {
  280. if (it == undefined) throw $TypeError$9("Can't call method on " + it);
  281. return it;
  282. };
  283. // toObject with fallback for non-array-like ES3 strings
  284. var IndexedObject$2 = indexedObject;
  285. var requireObjectCoercible$6 = requireObjectCoercible$7;
  286. var toIndexedObject$5 = function (it) {
  287. return IndexedObject$2(requireObjectCoercible$6(it));
  288. };
  289. // `IsCallable` abstract operation
  290. // https://tc39.es/ecma262/#sec-iscallable
  291. var isCallable$e = function (argument) {
  292. return typeof argument == 'function';
  293. };
  294. var isCallable$d = isCallable$e;
  295. var isObject$8 = function (it) {
  296. return typeof it == 'object' ? it !== null : isCallable$d(it);
  297. };
  298. var global$d = global$e;
  299. var isCallable$c = isCallable$e;
  300. var aFunction = function (argument) {
  301. return isCallable$c(argument) ? argument : undefined;
  302. };
  303. var getBuiltIn$5 = function (namespace, method) {
  304. return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
  305. };
  306. var uncurryThis$h = functionUncurryThis;
  307. var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
  308. var getBuiltIn$4 = getBuiltIn$5;
  309. var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
  310. var global$c = global$e;
  311. var userAgent = engineUserAgent;
  312. var process = global$c.process;
  313. var Deno = global$c.Deno;
  314. var versions = process && process.versions || Deno && Deno.version;
  315. var v8 = versions && versions.v8;
  316. var match, version;
  317. if (v8) {
  318. match = v8.split('.');
  319. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  320. // but their correct versions are not interesting for us
  321. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  322. }
  323. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  324. // so check `userAgent` even if `.v8` exists, but 0
  325. if (!version && userAgent) {
  326. match = userAgent.match(/Edge\/(\d+)/);
  327. if (!match || match[1] >= 74) {
  328. match = userAgent.match(/Chrome\/(\d+)/);
  329. if (match) version = +match[1];
  330. }
  331. }
  332. var engineV8Version = version;
  333. /* eslint-disable es-x/no-symbol -- required for testing */
  334. var V8_VERSION$2 = engineV8Version;
  335. var fails$g = fails$k;
  336. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  337. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$g(function () {
  338. var symbol = Symbol();
  339. // Chrome 38 Symbol has incorrect toString conversion
  340. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  341. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  342. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  343. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  344. });
  345. /* eslint-disable es-x/no-symbol -- required for testing */
  346. var NATIVE_SYMBOL$1 = nativeSymbol;
  347. var useSymbolAsUid = NATIVE_SYMBOL$1
  348. && !Symbol.sham
  349. && typeof Symbol.iterator == 'symbol';
  350. var getBuiltIn$3 = getBuiltIn$5;
  351. var isCallable$b = isCallable$e;
  352. var isPrototypeOf$1 = objectIsPrototypeOf;
  353. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  354. var $Object$2 = Object;
  355. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  356. return typeof it == 'symbol';
  357. } : function (it) {
  358. var $Symbol = getBuiltIn$3('Symbol');
  359. return isCallable$b($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
  360. };
  361. var $String$2 = String;
  362. var tryToString$2 = function (argument) {
  363. try {
  364. return $String$2(argument);
  365. } catch (error) {
  366. return 'Object';
  367. }
  368. };
  369. var isCallable$a = isCallable$e;
  370. var tryToString$1 = tryToString$2;
  371. var $TypeError$8 = TypeError;
  372. // `Assert: IsCallable(argument) is true`
  373. var aCallable$2 = function (argument) {
  374. if (isCallable$a(argument)) return argument;
  375. throw $TypeError$8(tryToString$1(argument) + ' is not a function');
  376. };
  377. var aCallable$1 = aCallable$2;
  378. // `GetMethod` abstract operation
  379. // https://tc39.es/ecma262/#sec-getmethod
  380. var getMethod$4 = function (V, P) {
  381. var func = V[P];
  382. return func == null ? undefined : aCallable$1(func);
  383. };
  384. var call$9 = functionCall;
  385. var isCallable$9 = isCallable$e;
  386. var isObject$7 = isObject$8;
  387. var $TypeError$7 = TypeError;
  388. // `OrdinaryToPrimitive` abstract operation
  389. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  390. var ordinaryToPrimitive$1 = function (input, pref) {
  391. var fn, val;
  392. if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
  393. if (isCallable$9(fn = input.valueOf) && !isObject$7(val = call$9(fn, input))) return val;
  394. if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
  395. throw $TypeError$7("Can't convert object to primitive value");
  396. };
  397. var shared$4 = {exports: {}};
  398. var global$b = global$e;
  399. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  400. var defineProperty$2 = Object.defineProperty;
  401. var defineGlobalProperty$3 = function (key, value) {
  402. try {
  403. defineProperty$2(global$b, key, { value: value, configurable: true, writable: true });
  404. } catch (error) {
  405. global$b[key] = value;
  406. } return value;
  407. };
  408. var global$a = global$e;
  409. var defineGlobalProperty$2 = defineGlobalProperty$3;
  410. var SHARED = '__core-js_shared__';
  411. var store$3 = global$a[SHARED] || defineGlobalProperty$2(SHARED, {});
  412. var sharedStore = store$3;
  413. var store$2 = sharedStore;
  414. (shared$4.exports = function (key, value) {
  415. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  416. })('versions', []).push({
  417. version: '3.22.8',
  418. mode: 'global',
  419. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  420. license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
  421. source: 'https://github.com/zloirock/core-js'
  422. });
  423. var requireObjectCoercible$5 = requireObjectCoercible$7;
  424. var $Object$1 = Object;
  425. // `ToObject` abstract operation
  426. // https://tc39.es/ecma262/#sec-toobject
  427. var toObject$4 = function (argument) {
  428. return $Object$1(requireObjectCoercible$5(argument));
  429. };
  430. var uncurryThis$g = functionUncurryThis;
  431. var toObject$3 = toObject$4;
  432. var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
  433. // `HasOwnProperty` abstract operation
  434. // https://tc39.es/ecma262/#sec-hasownproperty
  435. // eslint-disable-next-line es-x/no-object-hasown -- safe
  436. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  437. return hasOwnProperty(toObject$3(it), key);
  438. };
  439. var uncurryThis$f = functionUncurryThis;
  440. var id = 0;
  441. var postfix = Math.random();
  442. var toString$8 = uncurryThis$f(1.0.toString);
  443. var uid$2 = function (key) {
  444. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
  445. };
  446. var global$9 = global$e;
  447. var shared$3 = shared$4.exports;
  448. var hasOwn$7 = hasOwnProperty_1;
  449. var uid$1 = uid$2;
  450. var NATIVE_SYMBOL = nativeSymbol;
  451. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  452. var WellKnownSymbolsStore = shared$3('wks');
  453. var Symbol$1 = global$9.Symbol;
  454. var symbolFor = Symbol$1 && Symbol$1['for'];
  455. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  456. var wellKnownSymbol$c = function (name) {
  457. if (!hasOwn$7(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  458. var description = 'Symbol.' + name;
  459. if (NATIVE_SYMBOL && hasOwn$7(Symbol$1, name)) {
  460. WellKnownSymbolsStore[name] = Symbol$1[name];
  461. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  462. WellKnownSymbolsStore[name] = symbolFor(description);
  463. } else {
  464. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  465. }
  466. } return WellKnownSymbolsStore[name];
  467. };
  468. var call$8 = functionCall;
  469. var isObject$6 = isObject$8;
  470. var isSymbol$1 = isSymbol$2;
  471. var getMethod$3 = getMethod$4;
  472. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  473. var wellKnownSymbol$b = wellKnownSymbol$c;
  474. var $TypeError$6 = TypeError;
  475. var TO_PRIMITIVE = wellKnownSymbol$b('toPrimitive');
  476. // `ToPrimitive` abstract operation
  477. // https://tc39.es/ecma262/#sec-toprimitive
  478. var toPrimitive$1 = function (input, pref) {
  479. if (!isObject$6(input) || isSymbol$1(input)) return input;
  480. var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
  481. var result;
  482. if (exoticToPrim) {
  483. if (pref === undefined) pref = 'default';
  484. result = call$8(exoticToPrim, input, pref);
  485. if (!isObject$6(result) || isSymbol$1(result)) return result;
  486. throw $TypeError$6("Can't convert object to primitive value");
  487. }
  488. if (pref === undefined) pref = 'number';
  489. return ordinaryToPrimitive(input, pref);
  490. };
  491. var toPrimitive = toPrimitive$1;
  492. var isSymbol = isSymbol$2;
  493. // `ToPropertyKey` abstract operation
  494. // https://tc39.es/ecma262/#sec-topropertykey
  495. var toPropertyKey$3 = function (argument) {
  496. var key = toPrimitive(argument, 'string');
  497. return isSymbol(key) ? key : key + '';
  498. };
  499. var global$8 = global$e;
  500. var isObject$5 = isObject$8;
  501. var document$1 = global$8.document;
  502. // typeof document.createElement is 'object' in old IE
  503. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  504. var documentCreateElement$2 = function (it) {
  505. return EXISTS$1 ? document$1.createElement(it) : {};
  506. };
  507. var DESCRIPTORS$7 = descriptors;
  508. var fails$f = fails$k;
  509. var createElement = documentCreateElement$2;
  510. // Thanks to IE8 for its funny defineProperty
  511. var ie8DomDefine = !DESCRIPTORS$7 && !fails$f(function () {
  512. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  513. return Object.defineProperty(createElement('div'), 'a', {
  514. get: function () { return 7; }
  515. }).a != 7;
  516. });
  517. var DESCRIPTORS$6 = descriptors;
  518. var call$7 = functionCall;
  519. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  520. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  521. var toIndexedObject$4 = toIndexedObject$5;
  522. var toPropertyKey$2 = toPropertyKey$3;
  523. var hasOwn$6 = hasOwnProperty_1;
  524. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  525. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  526. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  527. // `Object.getOwnPropertyDescriptor` method
  528. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  529. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  530. O = toIndexedObject$4(O);
  531. P = toPropertyKey$2(P);
  532. if (IE8_DOM_DEFINE$1) try {
  533. return $getOwnPropertyDescriptor$1(O, P);
  534. } catch (error) { /* empty */ }
  535. if (hasOwn$6(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule.f, O, P), O[P]);
  536. };
  537. var objectDefineProperty = {};
  538. var DESCRIPTORS$5 = descriptors;
  539. var fails$e = fails$k;
  540. // V8 ~ Chrome 36-
  541. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  542. var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$e(function () {
  543. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  544. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  545. value: 42,
  546. writable: false
  547. }).prototype != 42;
  548. });
  549. var isObject$4 = isObject$8;
  550. var $String$1 = String;
  551. var $TypeError$5 = TypeError;
  552. // `Assert: Type(argument) is Object`
  553. var anObject$b = function (argument) {
  554. if (isObject$4(argument)) return argument;
  555. throw $TypeError$5($String$1(argument) + ' is not an object');
  556. };
  557. var DESCRIPTORS$4 = descriptors;
  558. var IE8_DOM_DEFINE = ie8DomDefine;
  559. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  560. var anObject$a = anObject$b;
  561. var toPropertyKey$1 = toPropertyKey$3;
  562. var $TypeError$4 = TypeError;
  563. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  564. var $defineProperty = Object.defineProperty;
  565. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  566. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  567. var ENUMERABLE = 'enumerable';
  568. var CONFIGURABLE$1 = 'configurable';
  569. var WRITABLE = 'writable';
  570. // `Object.defineProperty` method
  571. // https://tc39.es/ecma262/#sec-object.defineproperty
  572. objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  573. anObject$a(O);
  574. P = toPropertyKey$1(P);
  575. anObject$a(Attributes);
  576. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  577. var current = $getOwnPropertyDescriptor(O, P);
  578. if (current && current[WRITABLE]) {
  579. O[P] = Attributes.value;
  580. Attributes = {
  581. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  582. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  583. writable: false
  584. };
  585. }
  586. } return $defineProperty(O, P, Attributes);
  587. } : $defineProperty : function defineProperty(O, P, Attributes) {
  588. anObject$a(O);
  589. P = toPropertyKey$1(P);
  590. anObject$a(Attributes);
  591. if (IE8_DOM_DEFINE) try {
  592. return $defineProperty(O, P, Attributes);
  593. } catch (error) { /* empty */ }
  594. if ('get' in Attributes || 'set' in Attributes) throw $TypeError$4('Accessors not supported');
  595. if ('value' in Attributes) O[P] = Attributes.value;
  596. return O;
  597. };
  598. var DESCRIPTORS$3 = descriptors;
  599. var definePropertyModule$3 = objectDefineProperty;
  600. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  601. var createNonEnumerableProperty$5 = DESCRIPTORS$3 ? function (object, key, value) {
  602. return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
  603. } : function (object, key, value) {
  604. object[key] = value;
  605. return object;
  606. };
  607. var makeBuiltIn$2 = {exports: {}};
  608. var DESCRIPTORS$2 = descriptors;
  609. var hasOwn$5 = hasOwnProperty_1;
  610. var FunctionPrototype$1 = Function.prototype;
  611. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  612. var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
  613. var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
  614. // additional protection from minified / mangled / dropped function names
  615. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  616. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  617. var functionName = {
  618. EXISTS: EXISTS,
  619. PROPER: PROPER,
  620. CONFIGURABLE: CONFIGURABLE
  621. };
  622. var uncurryThis$e = functionUncurryThis;
  623. var isCallable$8 = isCallable$e;
  624. var store$1 = sharedStore;
  625. var functionToString = uncurryThis$e(Function.toString);
  626. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  627. if (!isCallable$8(store$1.inspectSource)) {
  628. store$1.inspectSource = function (it) {
  629. return functionToString(it);
  630. };
  631. }
  632. var inspectSource$3 = store$1.inspectSource;
  633. var global$7 = global$e;
  634. var isCallable$7 = isCallable$e;
  635. var inspectSource$2 = inspectSource$3;
  636. var WeakMap$1 = global$7.WeakMap;
  637. var nativeWeakMap = isCallable$7(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
  638. var shared$2 = shared$4.exports;
  639. var uid = uid$2;
  640. var keys = shared$2('keys');
  641. var sharedKey$2 = function (key) {
  642. return keys[key] || (keys[key] = uid(key));
  643. };
  644. var hiddenKeys$4 = {};
  645. var NATIVE_WEAK_MAP = nativeWeakMap;
  646. var global$6 = global$e;
  647. var uncurryThis$d = functionUncurryThis;
  648. var isObject$3 = isObject$8;
  649. var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
  650. var hasOwn$4 = hasOwnProperty_1;
  651. var shared$1 = sharedStore;
  652. var sharedKey$1 = sharedKey$2;
  653. var hiddenKeys$3 = hiddenKeys$4;
  654. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  655. var TypeError$1 = global$6.TypeError;
  656. var WeakMap = global$6.WeakMap;
  657. var set, get, has;
  658. var enforce = function (it) {
  659. return has(it) ? get(it) : set(it, {});
  660. };
  661. var getterFor = function (TYPE) {
  662. return function (it) {
  663. var state;
  664. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  665. throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  666. } return state;
  667. };
  668. };
  669. if (NATIVE_WEAK_MAP || shared$1.state) {
  670. var store = shared$1.state || (shared$1.state = new WeakMap());
  671. var wmget = uncurryThis$d(store.get);
  672. var wmhas = uncurryThis$d(store.has);
  673. var wmset = uncurryThis$d(store.set);
  674. set = function (it, metadata) {
  675. if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  676. metadata.facade = it;
  677. wmset(store, it, metadata);
  678. return metadata;
  679. };
  680. get = function (it) {
  681. return wmget(store, it) || {};
  682. };
  683. has = function (it) {
  684. return wmhas(store, it);
  685. };
  686. } else {
  687. var STATE = sharedKey$1('state');
  688. hiddenKeys$3[STATE] = true;
  689. set = function (it, metadata) {
  690. if (hasOwn$4(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  691. metadata.facade = it;
  692. createNonEnumerableProperty$4(it, STATE, metadata);
  693. return metadata;
  694. };
  695. get = function (it) {
  696. return hasOwn$4(it, STATE) ? it[STATE] : {};
  697. };
  698. has = function (it) {
  699. return hasOwn$4(it, STATE);
  700. };
  701. }
  702. var internalState = {
  703. set: set,
  704. get: get,
  705. has: has,
  706. enforce: enforce,
  707. getterFor: getterFor
  708. };
  709. var fails$d = fails$k;
  710. var isCallable$6 = isCallable$e;
  711. var hasOwn$3 = hasOwnProperty_1;
  712. var DESCRIPTORS$1 = descriptors;
  713. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  714. var inspectSource$1 = inspectSource$3;
  715. var InternalStateModule = internalState;
  716. var enforceInternalState = InternalStateModule.enforce;
  717. var getInternalState$1 = InternalStateModule.get;
  718. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  719. var defineProperty$1 = Object.defineProperty;
  720. var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$d(function () {
  721. return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  722. });
  723. var TEMPLATE = String(String).split('String');
  724. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  725. if (String(name).slice(0, 7) === 'Symbol(') {
  726. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  727. }
  728. if (options && options.getter) name = 'get ' + name;
  729. if (options && options.setter) name = 'set ' + name;
  730. if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  731. defineProperty$1(value, 'name', { value: name, configurable: true });
  732. }
  733. if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
  734. defineProperty$1(value, 'length', { value: options.arity });
  735. }
  736. try {
  737. if (options && hasOwn$3(options, 'constructor') && options.constructor) {
  738. if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
  739. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  740. } else if (value.prototype) value.prototype = undefined;
  741. } catch (error) { /* empty */ }
  742. var state = enforceInternalState(value);
  743. if (!hasOwn$3(state, 'source')) {
  744. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  745. } return value;
  746. };
  747. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  748. // eslint-disable-next-line no-extend-native -- required
  749. Function.prototype.toString = makeBuiltIn$1(function toString() {
  750. return isCallable$6(this) && getInternalState$1(this).source || inspectSource$1(this);
  751. }, 'toString');
  752. var isCallable$5 = isCallable$e;
  753. var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
  754. var makeBuiltIn = makeBuiltIn$2.exports;
  755. var defineGlobalProperty$1 = defineGlobalProperty$3;
  756. var defineBuiltIn$4 = function (O, key, value, options) {
  757. if (!options) options = {};
  758. var simple = options.enumerable;
  759. var name = options.name !== undefined ? options.name : key;
  760. if (isCallable$5(value)) makeBuiltIn(value, name, options);
  761. if (options.global) {
  762. if (simple) O[key] = value;
  763. else defineGlobalProperty$1(key, value);
  764. } else {
  765. if (!options.unsafe) delete O[key];
  766. else if (O[key]) simple = true;
  767. if (simple) O[key] = value;
  768. else createNonEnumerableProperty$3(O, key, value);
  769. } return O;
  770. };
  771. var objectGetOwnPropertyNames = {};
  772. var ceil = Math.ceil;
  773. var floor$1 = Math.floor;
  774. // `Math.trunc` method
  775. // https://tc39.es/ecma262/#sec-math.trunc
  776. // eslint-disable-next-line es-x/no-math-trunc -- safe
  777. var mathTrunc = Math.trunc || function trunc(x) {
  778. var n = +x;
  779. return (n > 0 ? floor$1 : ceil)(n);
  780. };
  781. var trunc = mathTrunc;
  782. // `ToIntegerOrInfinity` abstract operation
  783. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  784. var toIntegerOrInfinity$4 = function (argument) {
  785. var number = +argument;
  786. // eslint-disable-next-line no-self-compare -- NaN check
  787. return number !== number || number === 0 ? 0 : trunc(number);
  788. };
  789. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  790. var max$2 = Math.max;
  791. var min$3 = Math.min;
  792. // Helper for a popular repeating case of the spec:
  793. // Let integer be ? ToInteger(index).
  794. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  795. var toAbsoluteIndex$2 = function (index, length) {
  796. var integer = toIntegerOrInfinity$3(index);
  797. return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
  798. };
  799. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  800. var min$2 = Math.min;
  801. // `ToLength` abstract operation
  802. // https://tc39.es/ecma262/#sec-tolength
  803. var toLength$3 = function (argument) {
  804. return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  805. };
  806. var toLength$2 = toLength$3;
  807. // `LengthOfArrayLike` abstract operation
  808. // https://tc39.es/ecma262/#sec-lengthofarraylike
  809. var lengthOfArrayLike$4 = function (obj) {
  810. return toLength$2(obj.length);
  811. };
  812. var toIndexedObject$3 = toIndexedObject$5;
  813. var toAbsoluteIndex$1 = toAbsoluteIndex$2;
  814. var lengthOfArrayLike$3 = lengthOfArrayLike$4;
  815. // `Array.prototype.{ indexOf, includes }` methods implementation
  816. var createMethod$2 = function (IS_INCLUDES) {
  817. return function ($this, el, fromIndex) {
  818. var O = toIndexedObject$3($this);
  819. var length = lengthOfArrayLike$3(O);
  820. var index = toAbsoluteIndex$1(fromIndex, length);
  821. var value;
  822. // Array#includes uses SameValueZero equality algorithm
  823. // eslint-disable-next-line no-self-compare -- NaN check
  824. if (IS_INCLUDES && el != el) while (length > index) {
  825. value = O[index++];
  826. // eslint-disable-next-line no-self-compare -- NaN check
  827. if (value != value) return true;
  828. // Array#indexOf ignores holes, Array#includes - not
  829. } else for (;length > index; index++) {
  830. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  831. } return !IS_INCLUDES && -1;
  832. };
  833. };
  834. var arrayIncludes = {
  835. // `Array.prototype.includes` method
  836. // https://tc39.es/ecma262/#sec-array.prototype.includes
  837. includes: createMethod$2(true),
  838. // `Array.prototype.indexOf` method
  839. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  840. indexOf: createMethod$2(false)
  841. };
  842. var uncurryThis$c = functionUncurryThis;
  843. var hasOwn$2 = hasOwnProperty_1;
  844. var toIndexedObject$2 = toIndexedObject$5;
  845. var indexOf$1 = arrayIncludes.indexOf;
  846. var hiddenKeys$2 = hiddenKeys$4;
  847. var push$3 = uncurryThis$c([].push);
  848. var objectKeysInternal = function (object, names) {
  849. var O = toIndexedObject$2(object);
  850. var i = 0;
  851. var result = [];
  852. var key;
  853. for (key in O) !hasOwn$2(hiddenKeys$2, key) && hasOwn$2(O, key) && push$3(result, key);
  854. // Don't enum bug & hidden keys
  855. while (names.length > i) if (hasOwn$2(O, key = names[i++])) {
  856. ~indexOf$1(result, key) || push$3(result, key);
  857. }
  858. return result;
  859. };
  860. // IE8- don't enum bug keys
  861. var enumBugKeys$3 = [
  862. 'constructor',
  863. 'hasOwnProperty',
  864. 'isPrototypeOf',
  865. 'propertyIsEnumerable',
  866. 'toLocaleString',
  867. 'toString',
  868. 'valueOf'
  869. ];
  870. var internalObjectKeys$1 = objectKeysInternal;
  871. var enumBugKeys$2 = enumBugKeys$3;
  872. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  873. // `Object.getOwnPropertyNames` method
  874. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  875. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  876. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  877. return internalObjectKeys$1(O, hiddenKeys$1);
  878. };
  879. var objectGetOwnPropertySymbols = {};
  880. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  881. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  882. var getBuiltIn$2 = getBuiltIn$5;
  883. var uncurryThis$b = functionUncurryThis;
  884. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  885. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  886. var anObject$9 = anObject$b;
  887. var concat$1 = uncurryThis$b([].concat);
  888. // all object keys, includes non-enumerable and symbols
  889. var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
  890. var keys = getOwnPropertyNamesModule.f(anObject$9(it));
  891. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  892. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  893. };
  894. var hasOwn$1 = hasOwnProperty_1;
  895. var ownKeys = ownKeys$1;
  896. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  897. var definePropertyModule$2 = objectDefineProperty;
  898. var copyConstructorProperties$1 = function (target, source, exceptions) {
  899. var keys = ownKeys(source);
  900. var defineProperty = definePropertyModule$2.f;
  901. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  902. for (var i = 0; i < keys.length; i++) {
  903. var key = keys[i];
  904. if (!hasOwn$1(target, key) && !(exceptions && hasOwn$1(exceptions, key))) {
  905. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  906. }
  907. }
  908. };
  909. var fails$c = fails$k;
  910. var isCallable$4 = isCallable$e;
  911. var replacement = /#|\.prototype\./;
  912. var isForced$1 = function (feature, detection) {
  913. var value = data[normalize(feature)];
  914. return value == POLYFILL ? true
  915. : value == NATIVE ? false
  916. : isCallable$4(detection) ? fails$c(detection)
  917. : !!detection;
  918. };
  919. var normalize = isForced$1.normalize = function (string) {
  920. return String(string).replace(replacement, '.').toLowerCase();
  921. };
  922. var data = isForced$1.data = {};
  923. var NATIVE = isForced$1.NATIVE = 'N';
  924. var POLYFILL = isForced$1.POLYFILL = 'P';
  925. var isForced_1 = isForced$1;
  926. var global$5 = global$e;
  927. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  928. var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
  929. var defineBuiltIn$3 = defineBuiltIn$4;
  930. var defineGlobalProperty = defineGlobalProperty$3;
  931. var copyConstructorProperties = copyConstructorProperties$1;
  932. var isForced = isForced_1;
  933. /*
  934. options.target - name of the target object
  935. options.global - target is the global object
  936. options.stat - export as static methods of target
  937. options.proto - export as prototype methods of target
  938. options.real - real prototype method for the `pure` version
  939. options.forced - export even if the native feature is available
  940. options.bind - bind methods to the target, required for the `pure` version
  941. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  942. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  943. options.sham - add a flag to not completely full polyfills
  944. options.enumerable - export as enumerable property
  945. options.dontCallGetSet - prevent calling a getter on target
  946. options.name - the .name of the function if it does not match the key
  947. */
  948. var _export = function (options, source) {
  949. var TARGET = options.target;
  950. var GLOBAL = options.global;
  951. var STATIC = options.stat;
  952. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  953. if (GLOBAL) {
  954. target = global$5;
  955. } else if (STATIC) {
  956. target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
  957. } else {
  958. target = (global$5[TARGET] || {}).prototype;
  959. }
  960. if (target) for (key in source) {
  961. sourceProperty = source[key];
  962. if (options.dontCallGetSet) {
  963. descriptor = getOwnPropertyDescriptor(target, key);
  964. targetProperty = descriptor && descriptor.value;
  965. } else targetProperty = target[key];
  966. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  967. // contained in target
  968. if (!FORCED && targetProperty !== undefined) {
  969. if (typeof sourceProperty == typeof targetProperty) continue;
  970. copyConstructorProperties(sourceProperty, targetProperty);
  971. }
  972. // add a flag to not completely full polyfills
  973. if (options.sham || (targetProperty && targetProperty.sham)) {
  974. createNonEnumerableProperty$2(sourceProperty, 'sham', true);
  975. }
  976. defineBuiltIn$3(target, key, sourceProperty, options);
  977. }
  978. };
  979. var objectDefineProperties = {};
  980. var internalObjectKeys = objectKeysInternal;
  981. var enumBugKeys$1 = enumBugKeys$3;
  982. // `Object.keys` method
  983. // https://tc39.es/ecma262/#sec-object.keys
  984. // eslint-disable-next-line es-x/no-object-keys -- safe
  985. var objectKeys$1 = Object.keys || function keys(O) {
  986. return internalObjectKeys(O, enumBugKeys$1);
  987. };
  988. var DESCRIPTORS = descriptors;
  989. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  990. var definePropertyModule$1 = objectDefineProperty;
  991. var anObject$8 = anObject$b;
  992. var toIndexedObject$1 = toIndexedObject$5;
  993. var objectKeys = objectKeys$1;
  994. // `Object.defineProperties` method
  995. // https://tc39.es/ecma262/#sec-object.defineproperties
  996. // eslint-disable-next-line es-x/no-object-defineproperties -- safe
  997. objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  998. anObject$8(O);
  999. var props = toIndexedObject$1(Properties);
  1000. var keys = objectKeys(Properties);
  1001. var length = keys.length;
  1002. var index = 0;
  1003. var key;
  1004. while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
  1005. return O;
  1006. };
  1007. var getBuiltIn$1 = getBuiltIn$5;
  1008. var html$1 = getBuiltIn$1('document', 'documentElement');
  1009. /* global ActiveXObject -- old IE, WSH */
  1010. var anObject$7 = anObject$b;
  1011. var definePropertiesModule = objectDefineProperties;
  1012. var enumBugKeys = enumBugKeys$3;
  1013. var hiddenKeys = hiddenKeys$4;
  1014. var html = html$1;
  1015. var documentCreateElement$1 = documentCreateElement$2;
  1016. var sharedKey = sharedKey$2;
  1017. var GT = '>';
  1018. var LT = '<';
  1019. var PROTOTYPE = 'prototype';
  1020. var SCRIPT = 'script';
  1021. var IE_PROTO = sharedKey('IE_PROTO');
  1022. var EmptyConstructor = function () { /* empty */ };
  1023. var scriptTag = function (content) {
  1024. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1025. };
  1026. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1027. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1028. activeXDocument.write(scriptTag(''));
  1029. activeXDocument.close();
  1030. var temp = activeXDocument.parentWindow.Object;
  1031. activeXDocument = null; // avoid memory leak
  1032. return temp;
  1033. };
  1034. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1035. var NullProtoObjectViaIFrame = function () {
  1036. // Thrash, waste and sodomy: IE GC bug
  1037. var iframe = documentCreateElement$1('iframe');
  1038. var JS = 'java' + SCRIPT + ':';
  1039. var iframeDocument;
  1040. iframe.style.display = 'none';
  1041. html.appendChild(iframe);
  1042. // https://github.com/zloirock/core-js/issues/475
  1043. iframe.src = String(JS);
  1044. iframeDocument = iframe.contentWindow.document;
  1045. iframeDocument.open();
  1046. iframeDocument.write(scriptTag('document.F=Object'));
  1047. iframeDocument.close();
  1048. return iframeDocument.F;
  1049. };
  1050. // Check for document.domain and active x support
  1051. // No need to use active x approach when document.domain is not set
  1052. // see https://github.com/es-shims/es5-shim/issues/150
  1053. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1054. // avoid IE GC bug
  1055. var activeXDocument;
  1056. var NullProtoObject = function () {
  1057. try {
  1058. activeXDocument = new ActiveXObject('htmlfile');
  1059. } catch (error) { /* ignore */ }
  1060. NullProtoObject = typeof document != 'undefined'
  1061. ? document.domain && activeXDocument
  1062. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1063. : NullProtoObjectViaIFrame()
  1064. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1065. var length = enumBugKeys.length;
  1066. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1067. return NullProtoObject();
  1068. };
  1069. hiddenKeys[IE_PROTO] = true;
  1070. // `Object.create` method
  1071. // https://tc39.es/ecma262/#sec-object.create
  1072. // eslint-disable-next-line es-x/no-object-create -- safe
  1073. var objectCreate = Object.create || function create(O, Properties) {
  1074. var result;
  1075. if (O !== null) {
  1076. EmptyConstructor[PROTOTYPE] = anObject$7(O);
  1077. result = new EmptyConstructor();
  1078. EmptyConstructor[PROTOTYPE] = null;
  1079. // add "__proto__" for Object.getPrototypeOf polyfill
  1080. result[IE_PROTO] = O;
  1081. } else result = NullProtoObject();
  1082. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1083. };
  1084. var wellKnownSymbol$a = wellKnownSymbol$c;
  1085. var create$1 = objectCreate;
  1086. var defineProperty = objectDefineProperty.f;
  1087. var UNSCOPABLES = wellKnownSymbol$a('unscopables');
  1088. var ArrayPrototype = Array.prototype;
  1089. // Array.prototype[@@unscopables]
  1090. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1091. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1092. defineProperty(ArrayPrototype, UNSCOPABLES, {
  1093. configurable: true,
  1094. value: create$1(null)
  1095. });
  1096. }
  1097. // add a key to Array.prototype[@@unscopables]
  1098. var addToUnscopables$2 = function (key) {
  1099. ArrayPrototype[UNSCOPABLES][key] = true;
  1100. };
  1101. var $$7 = _export;
  1102. var $includes = arrayIncludes.includes;
  1103. var fails$b = fails$k;
  1104. var addToUnscopables$1 = addToUnscopables$2;
  1105. // FF99+ bug
  1106. var BROKEN_ON_SPARSE = fails$b(function () {
  1107. return !Array(1).includes();
  1108. });
  1109. // `Array.prototype.includes` method
  1110. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1111. $$7({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1112. includes: function includes(el /* , fromIndex = 0 */) {
  1113. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1114. }
  1115. });
  1116. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1117. addToUnscopables$1('includes');
  1118. var isObject$2 = isObject$8;
  1119. var classof$6 = classofRaw$1;
  1120. var wellKnownSymbol$9 = wellKnownSymbol$c;
  1121. var MATCH$1 = wellKnownSymbol$9('match');
  1122. // `IsRegExp` abstract operation
  1123. // https://tc39.es/ecma262/#sec-isregexp
  1124. var isRegexp = function (it) {
  1125. var isRegExp;
  1126. return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$6(it) == 'RegExp');
  1127. };
  1128. var isRegExp$1 = isRegexp;
  1129. var $TypeError$3 = TypeError;
  1130. var notARegexp = function (it) {
  1131. if (isRegExp$1(it)) {
  1132. throw $TypeError$3("The method doesn't accept regular expressions");
  1133. } return it;
  1134. };
  1135. var wellKnownSymbol$8 = wellKnownSymbol$c;
  1136. var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
  1137. var test = {};
  1138. test[TO_STRING_TAG$1] = 'z';
  1139. var toStringTagSupport = String(test) === '[object z]';
  1140. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  1141. var isCallable$3 = isCallable$e;
  1142. var classofRaw = classofRaw$1;
  1143. var wellKnownSymbol$7 = wellKnownSymbol$c;
  1144. var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
  1145. var $Object = Object;
  1146. // ES3 wrong here
  1147. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  1148. // fallback for IE11 Script Access Denied error
  1149. var tryGet = function (it, key) {
  1150. try {
  1151. return it[key];
  1152. } catch (error) { /* empty */ }
  1153. };
  1154. // getting tag from ES6+ `Object.prototype.toString`
  1155. var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  1156. var O, tag, result;
  1157. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1158. // @@toStringTag case
  1159. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  1160. // builtinTag case
  1161. : CORRECT_ARGUMENTS ? classofRaw(O)
  1162. // ES3 arguments fallback
  1163. : (result = classofRaw(O)) == 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
  1164. };
  1165. var classof$4 = classof$5;
  1166. var $String = String;
  1167. var toString$7 = function (argument) {
  1168. if (classof$4(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1169. return $String(argument);
  1170. };
  1171. var wellKnownSymbol$6 = wellKnownSymbol$c;
  1172. var MATCH = wellKnownSymbol$6('match');
  1173. var correctIsRegexpLogic = function (METHOD_NAME) {
  1174. var regexp = /./;
  1175. try {
  1176. '/./'[METHOD_NAME](regexp);
  1177. } catch (error1) {
  1178. try {
  1179. regexp[MATCH] = false;
  1180. return '/./'[METHOD_NAME](regexp);
  1181. } catch (error2) { /* empty */ }
  1182. } return false;
  1183. };
  1184. var $$6 = _export;
  1185. var uncurryThis$a = functionUncurryThis;
  1186. var notARegExp = notARegexp;
  1187. var requireObjectCoercible$4 = requireObjectCoercible$7;
  1188. var toString$6 = toString$7;
  1189. var correctIsRegExpLogic = correctIsRegexpLogic;
  1190. var stringIndexOf$1 = uncurryThis$a(''.indexOf);
  1191. // `String.prototype.includes` method
  1192. // https://tc39.es/ecma262/#sec-string.prototype.includes
  1193. $$6({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  1194. includes: function includes(searchString /* , position = 0 */) {
  1195. return !!~stringIndexOf$1(
  1196. toString$6(requireObjectCoercible$4(this)),
  1197. toString$6(notARegExp(searchString)),
  1198. arguments.length > 1 ? arguments[1] : undefined
  1199. );
  1200. }
  1201. });
  1202. var classof$3 = classofRaw$1;
  1203. // `IsArray` abstract operation
  1204. // https://tc39.es/ecma262/#sec-isarray
  1205. // eslint-disable-next-line es-x/no-array-isarray -- safe
  1206. var isArray$2 = Array.isArray || function isArray(argument) {
  1207. return classof$3(argument) == 'Array';
  1208. };
  1209. var $TypeError$2 = TypeError;
  1210. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1211. var doesNotExceedSafeInteger$1 = function (it) {
  1212. if (it > MAX_SAFE_INTEGER) throw $TypeError$2('Maximum allowed index exceeded');
  1213. return it;
  1214. };
  1215. var toPropertyKey = toPropertyKey$3;
  1216. var definePropertyModule = objectDefineProperty;
  1217. var createPropertyDescriptor = createPropertyDescriptor$3;
  1218. var createProperty$2 = function (object, key, value) {
  1219. var propertyKey = toPropertyKey(key);
  1220. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  1221. else object[propertyKey] = value;
  1222. };
  1223. var uncurryThis$9 = functionUncurryThis;
  1224. var fails$a = fails$k;
  1225. var isCallable$2 = isCallable$e;
  1226. var classof$2 = classof$5;
  1227. var getBuiltIn = getBuiltIn$5;
  1228. var inspectSource = inspectSource$3;
  1229. var noop = function () { /* empty */ };
  1230. var empty = [];
  1231. var construct = getBuiltIn('Reflect', 'construct');
  1232. var constructorRegExp = /^\s*(?:class|function)\b/;
  1233. var exec$2 = uncurryThis$9(constructorRegExp.exec);
  1234. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1235. var isConstructorModern = function isConstructor(argument) {
  1236. if (!isCallable$2(argument)) return false;
  1237. try {
  1238. construct(noop, empty, argument);
  1239. return true;
  1240. } catch (error) {
  1241. return false;
  1242. }
  1243. };
  1244. var isConstructorLegacy = function isConstructor(argument) {
  1245. if (!isCallable$2(argument)) return false;
  1246. switch (classof$2(argument)) {
  1247. case 'AsyncFunction':
  1248. case 'GeneratorFunction':
  1249. case 'AsyncGeneratorFunction': return false;
  1250. }
  1251. try {
  1252. // we can't check .prototype since constructors produced by .bind haven't it
  1253. // `Function#toString` throws on some built-it function in some legacy engines
  1254. // (for example, `DOMQuad` and similar in FF41-)
  1255. return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource(argument));
  1256. } catch (error) {
  1257. return true;
  1258. }
  1259. };
  1260. isConstructorLegacy.sham = true;
  1261. // `IsConstructor` abstract operation
  1262. // https://tc39.es/ecma262/#sec-isconstructor
  1263. var isConstructor$2 = !construct || fails$a(function () {
  1264. var called;
  1265. return isConstructorModern(isConstructorModern.call)
  1266. || !isConstructorModern(Object)
  1267. || !isConstructorModern(function () { called = true; })
  1268. || called;
  1269. }) ? isConstructorLegacy : isConstructorModern;
  1270. var isArray$1 = isArray$2;
  1271. var isConstructor$1 = isConstructor$2;
  1272. var isObject$1 = isObject$8;
  1273. var wellKnownSymbol$5 = wellKnownSymbol$c;
  1274. var SPECIES$3 = wellKnownSymbol$5('species');
  1275. var $Array$1 = Array;
  1276. // a part of `ArraySpeciesCreate` abstract operation
  1277. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1278. var arraySpeciesConstructor$1 = function (originalArray) {
  1279. var C;
  1280. if (isArray$1(originalArray)) {
  1281. C = originalArray.constructor;
  1282. // cross-realm fallback
  1283. if (isConstructor$1(C) && (C === $Array$1 || isArray$1(C.prototype))) C = undefined;
  1284. else if (isObject$1(C)) {
  1285. C = C[SPECIES$3];
  1286. if (C === null) C = undefined;
  1287. }
  1288. } return C === undefined ? $Array$1 : C;
  1289. };
  1290. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1291. // `ArraySpeciesCreate` abstract operation
  1292. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1293. var arraySpeciesCreate$2 = function (originalArray, length) {
  1294. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1295. };
  1296. var fails$9 = fails$k;
  1297. var wellKnownSymbol$4 = wellKnownSymbol$c;
  1298. var V8_VERSION$1 = engineV8Version;
  1299. var SPECIES$2 = wellKnownSymbol$4('species');
  1300. var arrayMethodHasSpeciesSupport$3 = function (METHOD_NAME) {
  1301. // We can't use this feature detection in V8 since it causes
  1302. // deoptimization and serious performance degradation
  1303. // https://github.com/zloirock/core-js/issues/677
  1304. return V8_VERSION$1 >= 51 || !fails$9(function () {
  1305. var array = [];
  1306. var constructor = array.constructor = {};
  1307. constructor[SPECIES$2] = function () {
  1308. return { foo: 1 };
  1309. };
  1310. return array[METHOD_NAME](Boolean).foo !== 1;
  1311. });
  1312. };
  1313. var $$5 = _export;
  1314. var fails$8 = fails$k;
  1315. var isArray = isArray$2;
  1316. var isObject = isObject$8;
  1317. var toObject$2 = toObject$4;
  1318. var lengthOfArrayLike$2 = lengthOfArrayLike$4;
  1319. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1320. var createProperty$1 = createProperty$2;
  1321. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1322. var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$3;
  1323. var wellKnownSymbol$3 = wellKnownSymbol$c;
  1324. var V8_VERSION = engineV8Version;
  1325. var IS_CONCAT_SPREADABLE = wellKnownSymbol$3('isConcatSpreadable');
  1326. // We can't use this feature detection in V8 since it causes
  1327. // deoptimization and serious performance degradation
  1328. // https://github.com/zloirock/core-js/issues/679
  1329. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$8(function () {
  1330. var array = [];
  1331. array[IS_CONCAT_SPREADABLE] = false;
  1332. return array.concat()[0] !== array;
  1333. });
  1334. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$2('concat');
  1335. var isConcatSpreadable = function (O) {
  1336. if (!isObject(O)) return false;
  1337. var spreadable = O[IS_CONCAT_SPREADABLE];
  1338. return spreadable !== undefined ? !!spreadable : isArray(O);
  1339. };
  1340. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1341. // `Array.prototype.concat` method
  1342. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1343. // with adding support of @@isConcatSpreadable and @@species
  1344. $$5({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1345. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1346. concat: function concat(arg) {
  1347. var O = toObject$2(this);
  1348. var A = arraySpeciesCreate$1(O, 0);
  1349. var n = 0;
  1350. var i, k, length, len, E;
  1351. for (i = -1, length = arguments.length; i < length; i++) {
  1352. E = i === -1 ? O : arguments[i];
  1353. if (isConcatSpreadable(E)) {
  1354. len = lengthOfArrayLike$2(E);
  1355. doesNotExceedSafeInteger(n + len);
  1356. for (k = 0; k < len; k++, n++) if (k in E) createProperty$1(A, n, E[k]);
  1357. } else {
  1358. doesNotExceedSafeInteger(n + 1);
  1359. createProperty$1(A, n++, E);
  1360. }
  1361. }
  1362. A.length = n;
  1363. return A;
  1364. }
  1365. });
  1366. var anObject$6 = anObject$b;
  1367. // `RegExp.prototype.flags` getter implementation
  1368. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1369. var regexpFlags$1 = function () {
  1370. var that = anObject$6(this);
  1371. var result = '';
  1372. if (that.hasIndices) result += 'd';
  1373. if (that.global) result += 'g';
  1374. if (that.ignoreCase) result += 'i';
  1375. if (that.multiline) result += 'm';
  1376. if (that.dotAll) result += 's';
  1377. if (that.unicode) result += 'u';
  1378. if (that.sticky) result += 'y';
  1379. return result;
  1380. };
  1381. var fails$7 = fails$k;
  1382. var global$4 = global$e;
  1383. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  1384. var $RegExp$2 = global$4.RegExp;
  1385. var UNSUPPORTED_Y$2 = fails$7(function () {
  1386. var re = $RegExp$2('a', 'y');
  1387. re.lastIndex = 2;
  1388. return re.exec('abcd') != null;
  1389. });
  1390. // UC Browser bug
  1391. // https://github.com/zloirock/core-js/issues/1008
  1392. var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$7(function () {
  1393. return !$RegExp$2('a', 'y').sticky;
  1394. });
  1395. var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$7(function () {
  1396. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  1397. var re = $RegExp$2('^r', 'gy');
  1398. re.lastIndex = 2;
  1399. return re.exec('str') != null;
  1400. });
  1401. var regexpStickyHelpers = {
  1402. BROKEN_CARET: BROKEN_CARET,
  1403. MISSED_STICKY: MISSED_STICKY,
  1404. UNSUPPORTED_Y: UNSUPPORTED_Y$2
  1405. };
  1406. var fails$6 = fails$k;
  1407. var global$3 = global$e;
  1408. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  1409. var $RegExp$1 = global$3.RegExp;
  1410. var regexpUnsupportedDotAll = fails$6(function () {
  1411. var re = $RegExp$1('.', 's');
  1412. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  1413. });
  1414. var fails$5 = fails$k;
  1415. var global$2 = global$e;
  1416. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  1417. var $RegExp = global$2.RegExp;
  1418. var regexpUnsupportedNcg = fails$5(function () {
  1419. var re = $RegExp('(?<a>b)', 'g');
  1420. return re.exec('b').groups.a !== 'b' ||
  1421. 'b'.replace(re, '$<a>c') !== 'bc';
  1422. });
  1423. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1424. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1425. var call$6 = functionCall;
  1426. var uncurryThis$8 = functionUncurryThis;
  1427. var toString$5 = toString$7;
  1428. var regexpFlags = regexpFlags$1;
  1429. var stickyHelpers$1 = regexpStickyHelpers;
  1430. var shared = shared$4.exports;
  1431. var create = objectCreate;
  1432. var getInternalState = internalState.get;
  1433. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  1434. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  1435. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1436. var nativeExec = RegExp.prototype.exec;
  1437. var patchedExec = nativeExec;
  1438. var charAt$3 = uncurryThis$8(''.charAt);
  1439. var indexOf = uncurryThis$8(''.indexOf);
  1440. var replace$1 = uncurryThis$8(''.replace);
  1441. var stringSlice$4 = uncurryThis$8(''.slice);
  1442. var UPDATES_LAST_INDEX_WRONG = (function () {
  1443. var re1 = /a/;
  1444. var re2 = /b*/g;
  1445. call$6(nativeExec, re1, 'a');
  1446. call$6(nativeExec, re2, 'a');
  1447. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1448. })();
  1449. var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
  1450. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1451. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1452. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  1453. if (PATCH) {
  1454. patchedExec = function exec(string) {
  1455. var re = this;
  1456. var state = getInternalState(re);
  1457. var str = toString$5(string);
  1458. var raw = state.raw;
  1459. var result, reCopy, lastIndex, match, i, object, group;
  1460. if (raw) {
  1461. raw.lastIndex = re.lastIndex;
  1462. result = call$6(patchedExec, raw, str);
  1463. re.lastIndex = raw.lastIndex;
  1464. return result;
  1465. }
  1466. var groups = state.groups;
  1467. var sticky = UNSUPPORTED_Y$1 && re.sticky;
  1468. var flags = call$6(regexpFlags, re);
  1469. var source = re.source;
  1470. var charsAdded = 0;
  1471. var strCopy = str;
  1472. if (sticky) {
  1473. flags = replace$1(flags, 'y', '');
  1474. if (indexOf(flags, 'g') === -1) {
  1475. flags += 'g';
  1476. }
  1477. strCopy = stringSlice$4(str, re.lastIndex);
  1478. // Support anchored sticky behavior.
  1479. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  1480. source = '(?: ' + source + ')';
  1481. strCopy = ' ' + strCopy;
  1482. charsAdded++;
  1483. }
  1484. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1485. // simulate the 'y' flag.
  1486. reCopy = new RegExp('^(?:' + source + ')', flags);
  1487. }
  1488. if (NPCG_INCLUDED) {
  1489. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1490. }
  1491. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1492. match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
  1493. if (sticky) {
  1494. if (match) {
  1495. match.input = stringSlice$4(match.input, charsAdded);
  1496. match[0] = stringSlice$4(match[0], charsAdded);
  1497. match.index = re.lastIndex;
  1498. re.lastIndex += match[0].length;
  1499. } else re.lastIndex = 0;
  1500. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1501. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1502. }
  1503. if (NPCG_INCLUDED && match && match.length > 1) {
  1504. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1505. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  1506. call$6(nativeReplace, match[0], reCopy, function () {
  1507. for (i = 1; i < arguments.length - 2; i++) {
  1508. if (arguments[i] === undefined) match[i] = undefined;
  1509. }
  1510. });
  1511. }
  1512. if (match && groups) {
  1513. match.groups = object = create(null);
  1514. for (i = 0; i < groups.length; i++) {
  1515. group = groups[i];
  1516. object[group[0]] = match[group[1]];
  1517. }
  1518. }
  1519. return match;
  1520. };
  1521. }
  1522. var regexpExec$3 = patchedExec;
  1523. var $$4 = _export;
  1524. var exec$1 = regexpExec$3;
  1525. // `RegExp.prototype.exec` method
  1526. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1527. $$4({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
  1528. exec: exec$1
  1529. });
  1530. var NATIVE_BIND$1 = functionBindNative;
  1531. var FunctionPrototype = Function.prototype;
  1532. var apply$2 = FunctionPrototype.apply;
  1533. var call$5 = FunctionPrototype.call;
  1534. // eslint-disable-next-line es-x/no-reflect -- safe
  1535. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$5.bind(apply$2) : function () {
  1536. return call$5.apply(apply$2, arguments);
  1537. });
  1538. // TODO: Remove from `core-js@4` since it's moved to entry points
  1539. var uncurryThis$7 = functionUncurryThis;
  1540. var defineBuiltIn$2 = defineBuiltIn$4;
  1541. var regexpExec$2 = regexpExec$3;
  1542. var fails$4 = fails$k;
  1543. var wellKnownSymbol$2 = wellKnownSymbol$c;
  1544. var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
  1545. var SPECIES$1 = wellKnownSymbol$2('species');
  1546. var RegExpPrototype$2 = RegExp.prototype;
  1547. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1548. var SYMBOL = wellKnownSymbol$2(KEY);
  1549. var DELEGATES_TO_SYMBOL = !fails$4(function () {
  1550. // String methods call symbol-named RegEp methods
  1551. var O = {};
  1552. O[SYMBOL] = function () { return 7; };
  1553. return ''[KEY](O) != 7;
  1554. });
  1555. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$4(function () {
  1556. // Symbol-named RegExp methods call .exec
  1557. var execCalled = false;
  1558. var re = /a/;
  1559. if (KEY === 'split') {
  1560. // We can't use real regex here since it causes deoptimization
  1561. // and serious performance degradation in V8
  1562. // https://github.com/zloirock/core-js/issues/306
  1563. re = {};
  1564. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1565. // a new one. We need to return the patched regex when creating the new one.
  1566. re.constructor = {};
  1567. re.constructor[SPECIES$1] = function () { return re; };
  1568. re.flags = '';
  1569. re[SYMBOL] = /./[SYMBOL];
  1570. }
  1571. re.exec = function () { execCalled = true; return null; };
  1572. re[SYMBOL]('');
  1573. return !execCalled;
  1574. });
  1575. if (
  1576. !DELEGATES_TO_SYMBOL ||
  1577. !DELEGATES_TO_EXEC ||
  1578. FORCED
  1579. ) {
  1580. var uncurriedNativeRegExpMethod = uncurryThis$7(/./[SYMBOL]);
  1581. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1582. var uncurriedNativeMethod = uncurryThis$7(nativeMethod);
  1583. var $exec = regexp.exec;
  1584. if ($exec === regexpExec$2 || $exec === RegExpPrototype$2.exec) {
  1585. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1586. // The native String method already delegates to @@method (this
  1587. // polyfilled function), leasing to infinite recursion.
  1588. // We avoid it by directly calling the native @@method method.
  1589. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  1590. }
  1591. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  1592. }
  1593. return { done: false };
  1594. });
  1595. defineBuiltIn$2(String.prototype, KEY, methods[0]);
  1596. defineBuiltIn$2(RegExpPrototype$2, SYMBOL, methods[1]);
  1597. }
  1598. if (SHAM) createNonEnumerableProperty$1(RegExpPrototype$2[SYMBOL], 'sham', true);
  1599. };
  1600. var uncurryThis$6 = functionUncurryThis;
  1601. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  1602. var toString$4 = toString$7;
  1603. var requireObjectCoercible$3 = requireObjectCoercible$7;
  1604. var charAt$2 = uncurryThis$6(''.charAt);
  1605. var charCodeAt = uncurryThis$6(''.charCodeAt);
  1606. var stringSlice$3 = uncurryThis$6(''.slice);
  1607. var createMethod$1 = function (CONVERT_TO_STRING) {
  1608. return function ($this, pos) {
  1609. var S = toString$4(requireObjectCoercible$3($this));
  1610. var position = toIntegerOrInfinity$1(pos);
  1611. var size = S.length;
  1612. var first, second;
  1613. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  1614. first = charCodeAt(S, position);
  1615. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  1616. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  1617. ? CONVERT_TO_STRING
  1618. ? charAt$2(S, position)
  1619. : first
  1620. : CONVERT_TO_STRING
  1621. ? stringSlice$3(S, position, position + 2)
  1622. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  1623. };
  1624. };
  1625. var stringMultibyte = {
  1626. // `String.prototype.codePointAt` method
  1627. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  1628. codeAt: createMethod$1(false),
  1629. // `String.prototype.at` method
  1630. // https://github.com/mathiasbynens/String.prototype.at
  1631. charAt: createMethod$1(true)
  1632. };
  1633. var charAt$1 = stringMultibyte.charAt;
  1634. // `AdvanceStringIndex` abstract operation
  1635. // https://tc39.es/ecma262/#sec-advancestringindex
  1636. var advanceStringIndex$2 = function (S, index, unicode) {
  1637. return index + (unicode ? charAt$1(S, index).length : 1);
  1638. };
  1639. var uncurryThis$5 = functionUncurryThis;
  1640. var toObject$1 = toObject$4;
  1641. var floor = Math.floor;
  1642. var charAt = uncurryThis$5(''.charAt);
  1643. var replace = uncurryThis$5(''.replace);
  1644. var stringSlice$2 = uncurryThis$5(''.slice);
  1645. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  1646. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  1647. // `GetSubstitution` abstract operation
  1648. // https://tc39.es/ecma262/#sec-getsubstitution
  1649. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  1650. var tailPos = position + matched.length;
  1651. var m = captures.length;
  1652. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1653. if (namedCaptures !== undefined) {
  1654. namedCaptures = toObject$1(namedCaptures);
  1655. symbols = SUBSTITUTION_SYMBOLS;
  1656. }
  1657. return replace(replacement, symbols, function (match, ch) {
  1658. var capture;
  1659. switch (charAt(ch, 0)) {
  1660. case '$': return '$';
  1661. case '&': return matched;
  1662. case '`': return stringSlice$2(str, 0, position);
  1663. case "'": return stringSlice$2(str, tailPos);
  1664. case '<':
  1665. capture = namedCaptures[stringSlice$2(ch, 1, -1)];
  1666. break;
  1667. default: // \d\d?
  1668. var n = +ch;
  1669. if (n === 0) return match;
  1670. if (n > m) {
  1671. var f = floor(n / 10);
  1672. if (f === 0) return match;
  1673. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  1674. return match;
  1675. }
  1676. capture = captures[n - 1];
  1677. }
  1678. return capture === undefined ? '' : capture;
  1679. });
  1680. };
  1681. var call$4 = functionCall;
  1682. var anObject$5 = anObject$b;
  1683. var isCallable$1 = isCallable$e;
  1684. var classof$1 = classofRaw$1;
  1685. var regexpExec$1 = regexpExec$3;
  1686. var $TypeError$1 = TypeError;
  1687. // `RegExpExec` abstract operation
  1688. // https://tc39.es/ecma262/#sec-regexpexec
  1689. var regexpExecAbstract = function (R, S) {
  1690. var exec = R.exec;
  1691. if (isCallable$1(exec)) {
  1692. var result = call$4(exec, R, S);
  1693. if (result !== null) anObject$5(result);
  1694. return result;
  1695. }
  1696. if (classof$1(R) === 'RegExp') return call$4(regexpExec$1, R, S);
  1697. throw $TypeError$1('RegExp#exec called on incompatible receiver');
  1698. };
  1699. var apply$1 = functionApply;
  1700. var call$3 = functionCall;
  1701. var uncurryThis$4 = functionUncurryThis;
  1702. var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
  1703. var fails$3 = fails$k;
  1704. var anObject$4 = anObject$b;
  1705. var isCallable = isCallable$e;
  1706. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  1707. var toLength$1 = toLength$3;
  1708. var toString$3 = toString$7;
  1709. var requireObjectCoercible$2 = requireObjectCoercible$7;
  1710. var advanceStringIndex$1 = advanceStringIndex$2;
  1711. var getMethod$2 = getMethod$4;
  1712. var getSubstitution = getSubstitution$1;
  1713. var regExpExec$1 = regexpExecAbstract;
  1714. var wellKnownSymbol$1 = wellKnownSymbol$c;
  1715. var REPLACE = wellKnownSymbol$1('replace');
  1716. var max$1 = Math.max;
  1717. var min$1 = Math.min;
  1718. var concat = uncurryThis$4([].concat);
  1719. var push$2 = uncurryThis$4([].push);
  1720. var stringIndexOf = uncurryThis$4(''.indexOf);
  1721. var stringSlice$1 = uncurryThis$4(''.slice);
  1722. var maybeToString = function (it) {
  1723. return it === undefined ? it : String(it);
  1724. };
  1725. // IE <= 11 replaces $0 with the whole match, as if it was $&
  1726. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  1727. var REPLACE_KEEPS_$0 = (function () {
  1728. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  1729. return 'a'.replace(/./, '$0') === '$0';
  1730. })();
  1731. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  1732. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  1733. if (/./[REPLACE]) {
  1734. return /./[REPLACE]('a', '$0') === '';
  1735. }
  1736. return false;
  1737. })();
  1738. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$3(function () {
  1739. var re = /./;
  1740. re.exec = function () {
  1741. var result = [];
  1742. result.groups = { a: '7' };
  1743. return result;
  1744. };
  1745. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  1746. return ''.replace(re, '$<a>') !== '7';
  1747. });
  1748. // @@replace logic
  1749. fixRegExpWellKnownSymbolLogic$2('replace', function (_, nativeReplace, maybeCallNative) {
  1750. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  1751. return [
  1752. // `String.prototype.replace` method
  1753. // https://tc39.es/ecma262/#sec-string.prototype.replace
  1754. function replace(searchValue, replaceValue) {
  1755. var O = requireObjectCoercible$2(this);
  1756. var replacer = searchValue == undefined ? undefined : getMethod$2(searchValue, REPLACE);
  1757. return replacer
  1758. ? call$3(replacer, searchValue, O, replaceValue)
  1759. : call$3(nativeReplace, toString$3(O), searchValue, replaceValue);
  1760. },
  1761. // `RegExp.prototype[@@replace]` method
  1762. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  1763. function (string, replaceValue) {
  1764. var rx = anObject$4(this);
  1765. var S = toString$3(string);
  1766. if (
  1767. typeof replaceValue == 'string' &&
  1768. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  1769. stringIndexOf(replaceValue, '$<') === -1
  1770. ) {
  1771. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  1772. if (res.done) return res.value;
  1773. }
  1774. var functionalReplace = isCallable(replaceValue);
  1775. if (!functionalReplace) replaceValue = toString$3(replaceValue);
  1776. var global = rx.global;
  1777. if (global) {
  1778. var fullUnicode = rx.unicode;
  1779. rx.lastIndex = 0;
  1780. }
  1781. var results = [];
  1782. while (true) {
  1783. var result = regExpExec$1(rx, S);
  1784. if (result === null) break;
  1785. push$2(results, result);
  1786. if (!global) break;
  1787. var matchStr = toString$3(result[0]);
  1788. if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode);
  1789. }
  1790. var accumulatedResult = '';
  1791. var nextSourcePosition = 0;
  1792. for (var i = 0; i < results.length; i++) {
  1793. result = results[i];
  1794. var matched = toString$3(result[0]);
  1795. var position = max$1(min$1(toIntegerOrInfinity(result.index), S.length), 0);
  1796. var captures = [];
  1797. // NOTE: This is equivalent to
  1798. // captures = result.slice(1).map(maybeToString)
  1799. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  1800. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  1801. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  1802. for (var j = 1; j < result.length; j++) push$2(captures, maybeToString(result[j]));
  1803. var namedCaptures = result.groups;
  1804. if (functionalReplace) {
  1805. var replacerArgs = concat([matched], captures, position, S);
  1806. if (namedCaptures !== undefined) push$2(replacerArgs, namedCaptures);
  1807. var replacement = toString$3(apply$1(replaceValue, undefined, replacerArgs));
  1808. } else {
  1809. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  1810. }
  1811. if (position >= nextSourcePosition) {
  1812. accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
  1813. nextSourcePosition = position + matched.length;
  1814. }
  1815. }
  1816. return accumulatedResult + stringSlice$1(S, nextSourcePosition);
  1817. }
  1818. ];
  1819. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  1820. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1821. var classof = classof$5;
  1822. // `Object.prototype.toString` method implementation
  1823. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1824. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1825. return '[object ' + classof(this) + ']';
  1826. };
  1827. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1828. var defineBuiltIn$1 = defineBuiltIn$4;
  1829. var toString$2 = objectToString;
  1830. // `Object.prototype.toString` method
  1831. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1832. if (!TO_STRING_TAG_SUPPORT) {
  1833. defineBuiltIn$1(Object.prototype, 'toString', toString$2, { unsafe: true });
  1834. }
  1835. // iterable DOM collections
  1836. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  1837. var domIterables = {
  1838. CSSRuleList: 0,
  1839. CSSStyleDeclaration: 0,
  1840. CSSValueList: 0,
  1841. ClientRectList: 0,
  1842. DOMRectList: 0,
  1843. DOMStringList: 0,
  1844. DOMTokenList: 1,
  1845. DataTransferItemList: 0,
  1846. FileList: 0,
  1847. HTMLAllCollection: 0,
  1848. HTMLCollection: 0,
  1849. HTMLFormElement: 0,
  1850. HTMLSelectElement: 0,
  1851. MediaList: 0,
  1852. MimeTypeArray: 0,
  1853. NamedNodeMap: 0,
  1854. NodeList: 1,
  1855. PaintRequestList: 0,
  1856. Plugin: 0,
  1857. PluginArray: 0,
  1858. SVGLengthList: 0,
  1859. SVGNumberList: 0,
  1860. SVGPathSegList: 0,
  1861. SVGPointList: 0,
  1862. SVGStringList: 0,
  1863. SVGTransformList: 0,
  1864. SourceBufferList: 0,
  1865. StyleSheetList: 0,
  1866. TextTrackCueList: 0,
  1867. TextTrackList: 0,
  1868. TouchList: 0
  1869. };
  1870. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  1871. var documentCreateElement = documentCreateElement$2;
  1872. var classList = documentCreateElement('span').classList;
  1873. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  1874. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  1875. var uncurryThis$3 = functionUncurryThis;
  1876. var aCallable = aCallable$2;
  1877. var NATIVE_BIND = functionBindNative;
  1878. var bind$1 = uncurryThis$3(uncurryThis$3.bind);
  1879. // optional / simple context binding
  1880. var functionBindContext = function (fn, that) {
  1881. aCallable(fn);
  1882. return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
  1883. return fn.apply(that, arguments);
  1884. };
  1885. };
  1886. var bind = functionBindContext;
  1887. var uncurryThis$2 = functionUncurryThis;
  1888. var IndexedObject$1 = indexedObject;
  1889. var toObject = toObject$4;
  1890. var lengthOfArrayLike$1 = lengthOfArrayLike$4;
  1891. var arraySpeciesCreate = arraySpeciesCreate$2;
  1892. var push$1 = uncurryThis$2([].push);
  1893. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1894. var createMethod = function (TYPE) {
  1895. var IS_MAP = TYPE == 1;
  1896. var IS_FILTER = TYPE == 2;
  1897. var IS_SOME = TYPE == 3;
  1898. var IS_EVERY = TYPE == 4;
  1899. var IS_FIND_INDEX = TYPE == 6;
  1900. var IS_FILTER_REJECT = TYPE == 7;
  1901. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1902. return function ($this, callbackfn, that, specificCreate) {
  1903. var O = toObject($this);
  1904. var self = IndexedObject$1(O);
  1905. var boundFunction = bind(callbackfn, that);
  1906. var length = lengthOfArrayLike$1(self);
  1907. var index = 0;
  1908. var create = specificCreate || arraySpeciesCreate;
  1909. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1910. var value, result;
  1911. for (;length > index; index++) if (NO_HOLES || index in self) {
  1912. value = self[index];
  1913. result = boundFunction(value, index, O);
  1914. if (TYPE) {
  1915. if (IS_MAP) target[index] = result; // map
  1916. else if (result) switch (TYPE) {
  1917. case 3: return true; // some
  1918. case 5: return value; // find
  1919. case 6: return index; // findIndex
  1920. case 2: push$1(target, value); // filter
  1921. } else switch (TYPE) {
  1922. case 4: return false; // every
  1923. case 7: push$1(target, value); // filterReject
  1924. }
  1925. }
  1926. }
  1927. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1928. };
  1929. };
  1930. var arrayIteration = {
  1931. // `Array.prototype.forEach` method
  1932. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1933. forEach: createMethod(0),
  1934. // `Array.prototype.map` method
  1935. // https://tc39.es/ecma262/#sec-array.prototype.map
  1936. map: createMethod(1),
  1937. // `Array.prototype.filter` method
  1938. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1939. filter: createMethod(2),
  1940. // `Array.prototype.some` method
  1941. // https://tc39.es/ecma262/#sec-array.prototype.some
  1942. some: createMethod(3),
  1943. // `Array.prototype.every` method
  1944. // https://tc39.es/ecma262/#sec-array.prototype.every
  1945. every: createMethod(4),
  1946. // `Array.prototype.find` method
  1947. // https://tc39.es/ecma262/#sec-array.prototype.find
  1948. find: createMethod(5),
  1949. // `Array.prototype.findIndex` method
  1950. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1951. findIndex: createMethod(6),
  1952. // `Array.prototype.filterReject` method
  1953. // https://github.com/tc39/proposal-array-filtering
  1954. filterReject: createMethod(7)
  1955. };
  1956. var fails$2 = fails$k;
  1957. var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
  1958. var method = [][METHOD_NAME];
  1959. return !!method && fails$2(function () {
  1960. // eslint-disable-next-line no-useless-call -- required for testing
  1961. method.call(null, argument || function () { return 1; }, 1);
  1962. });
  1963. };
  1964. var $forEach = arrayIteration.forEach;
  1965. var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
  1966. var STRICT_METHOD$1 = arrayMethodIsStrict$1('forEach');
  1967. // `Array.prototype.forEach` method implementation
  1968. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1969. var arrayForEach = !STRICT_METHOD$1 ? function forEach(callbackfn /* , thisArg */) {
  1970. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1971. // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
  1972. } : [].forEach;
  1973. var global$1 = global$e;
  1974. var DOMIterables = domIterables;
  1975. var DOMTokenListPrototype = domTokenListPrototype;
  1976. var forEach = arrayForEach;
  1977. var createNonEnumerableProperty = createNonEnumerableProperty$5;
  1978. var handlePrototype = function (CollectionPrototype) {
  1979. // some Chrome versions have non-configurable methods on DOMTokenList
  1980. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  1981. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  1982. } catch (error) {
  1983. CollectionPrototype.forEach = forEach;
  1984. }
  1985. };
  1986. for (var COLLECTION_NAME in DOMIterables) {
  1987. if (DOMIterables[COLLECTION_NAME]) {
  1988. handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype);
  1989. }
  1990. }
  1991. handlePrototype(DOMTokenListPrototype);
  1992. var call$2 = functionCall;
  1993. var hasOwn = hasOwnProperty_1;
  1994. var isPrototypeOf = objectIsPrototypeOf;
  1995. var regExpFlags = regexpFlags$1;
  1996. var RegExpPrototype$1 = RegExp.prototype;
  1997. var regexpGetFlags = function (R) {
  1998. var flags = R.flags;
  1999. return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
  2000. ? call$2(regExpFlags, R) : flags;
  2001. };
  2002. var PROPER_FUNCTION_NAME = functionName.PROPER;
  2003. var defineBuiltIn = defineBuiltIn$4;
  2004. var anObject$3 = anObject$b;
  2005. var $toString = toString$7;
  2006. var fails$1 = fails$k;
  2007. var getRegExpFlags = regexpGetFlags;
  2008. var TO_STRING = 'toString';
  2009. var RegExpPrototype = RegExp.prototype;
  2010. var n$ToString = RegExpPrototype[TO_STRING];
  2011. var NOT_GENERIC = fails$1(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  2012. // FF44- RegExp#toString has a wrong name
  2013. var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
  2014. // `RegExp.prototype.toString` method
  2015. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  2016. if (NOT_GENERIC || INCORRECT_NAME) {
  2017. defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
  2018. var R = anObject$3(this);
  2019. var pattern = $toString(R.source);
  2020. var flags = $toString(getRegExpFlags(R));
  2021. return '/' + pattern + '/' + flags;
  2022. }, { unsafe: true });
  2023. }
  2024. var $$3 = _export;
  2025. var $find = arrayIteration.find;
  2026. var addToUnscopables = addToUnscopables$2;
  2027. var FIND = 'find';
  2028. var SKIPS_HOLES = true;
  2029. // Shouldn't skip holes
  2030. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  2031. // `Array.prototype.find` method
  2032. // https://tc39.es/ecma262/#sec-array.prototype.find
  2033. $$3({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  2034. find: function find(callbackfn /* , that = undefined */) {
  2035. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  2036. }
  2037. });
  2038. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  2039. addToUnscopables(FIND);
  2040. var $$2 = _export;
  2041. var $filter = arrayIteration.filter;
  2042. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$3;
  2043. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('filter');
  2044. // `Array.prototype.filter` method
  2045. // https://tc39.es/ecma262/#sec-array.prototype.filter
  2046. // with adding support of @@species
  2047. $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  2048. filter: function filter(callbackfn /* , thisArg */) {
  2049. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  2050. }
  2051. });
  2052. var isConstructor = isConstructor$2;
  2053. var tryToString = tryToString$2;
  2054. var $TypeError = TypeError;
  2055. // `Assert: IsConstructor(argument) is true`
  2056. var aConstructor$1 = function (argument) {
  2057. if (isConstructor(argument)) return argument;
  2058. throw $TypeError(tryToString(argument) + ' is not a constructor');
  2059. };
  2060. var anObject$2 = anObject$b;
  2061. var aConstructor = aConstructor$1;
  2062. var wellKnownSymbol = wellKnownSymbol$c;
  2063. var SPECIES = wellKnownSymbol('species');
  2064. // `SpeciesConstructor` abstract operation
  2065. // https://tc39.es/ecma262/#sec-speciesconstructor
  2066. var speciesConstructor$1 = function (O, defaultConstructor) {
  2067. var C = anObject$2(O).constructor;
  2068. var S;
  2069. return C === undefined || (S = anObject$2(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);
  2070. };
  2071. var toAbsoluteIndex = toAbsoluteIndex$2;
  2072. var lengthOfArrayLike = lengthOfArrayLike$4;
  2073. var createProperty = createProperty$2;
  2074. var $Array = Array;
  2075. var max = Math.max;
  2076. var arraySliceSimple = function (O, start, end) {
  2077. var length = lengthOfArrayLike(O);
  2078. var k = toAbsoluteIndex(start, length);
  2079. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  2080. var result = $Array(max(fin - k, 0));
  2081. for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
  2082. result.length = n;
  2083. return result;
  2084. };
  2085. var apply = functionApply;
  2086. var call$1 = functionCall;
  2087. var uncurryThis$1 = functionUncurryThis;
  2088. var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
  2089. var isRegExp = isRegexp;
  2090. var anObject$1 = anObject$b;
  2091. var requireObjectCoercible$1 = requireObjectCoercible$7;
  2092. var speciesConstructor = speciesConstructor$1;
  2093. var advanceStringIndex = advanceStringIndex$2;
  2094. var toLength = toLength$3;
  2095. var toString$1 = toString$7;
  2096. var getMethod$1 = getMethod$4;
  2097. var arraySlice = arraySliceSimple;
  2098. var callRegExpExec = regexpExecAbstract;
  2099. var regexpExec = regexpExec$3;
  2100. var stickyHelpers = regexpStickyHelpers;
  2101. var fails = fails$k;
  2102. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  2103. var MAX_UINT32 = 0xFFFFFFFF;
  2104. var min = Math.min;
  2105. var $push = [].push;
  2106. var exec = uncurryThis$1(/./.exec);
  2107. var push = uncurryThis$1($push);
  2108. var stringSlice = uncurryThis$1(''.slice);
  2109. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  2110. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  2111. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  2112. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  2113. var re = /(?:)/;
  2114. var originalExec = re.exec;
  2115. re.exec = function () { return originalExec.apply(this, arguments); };
  2116. var result = 'ab'.split(re);
  2117. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  2118. });
  2119. // @@split logic
  2120. fixRegExpWellKnownSymbolLogic$1('split', function (SPLIT, nativeSplit, maybeCallNative) {
  2121. var internalSplit;
  2122. if (
  2123. 'abbc'.split(/(b)*/)[1] == 'c' ||
  2124. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  2125. 'test'.split(/(?:)/, -1).length != 4 ||
  2126. 'ab'.split(/(?:ab)*/).length != 2 ||
  2127. '.'.split(/(.?)(.?)/).length != 4 ||
  2128. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  2129. '.'.split(/()()/).length > 1 ||
  2130. ''.split(/.?/).length
  2131. ) {
  2132. // based on es5-shim implementation, need to rework it
  2133. internalSplit = function (separator, limit) {
  2134. var string = toString$1(requireObjectCoercible$1(this));
  2135. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  2136. if (lim === 0) return [];
  2137. if (separator === undefined) return [string];
  2138. // If `separator` is not a regex, use native split
  2139. if (!isRegExp(separator)) {
  2140. return call$1(nativeSplit, string, separator, lim);
  2141. }
  2142. var output = [];
  2143. var flags = (separator.ignoreCase ? 'i' : '') +
  2144. (separator.multiline ? 'm' : '') +
  2145. (separator.unicode ? 'u' : '') +
  2146. (separator.sticky ? 'y' : '');
  2147. var lastLastIndex = 0;
  2148. // Make `global` and avoid `lastIndex` issues by working with a copy
  2149. var separatorCopy = new RegExp(separator.source, flags + 'g');
  2150. var match, lastIndex, lastLength;
  2151. while (match = call$1(regexpExec, separatorCopy, string)) {
  2152. lastIndex = separatorCopy.lastIndex;
  2153. if (lastIndex > lastLastIndex) {
  2154. push(output, stringSlice(string, lastLastIndex, match.index));
  2155. if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));
  2156. lastLength = match[0].length;
  2157. lastLastIndex = lastIndex;
  2158. if (output.length >= lim) break;
  2159. }
  2160. if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
  2161. }
  2162. if (lastLastIndex === string.length) {
  2163. if (lastLength || !exec(separatorCopy, '')) push(output, '');
  2164. } else push(output, stringSlice(string, lastLastIndex));
  2165. return output.length > lim ? arraySlice(output, 0, lim) : output;
  2166. };
  2167. // Chakra, V8
  2168. } else if ('0'.split(undefined, 0).length) {
  2169. internalSplit = function (separator, limit) {
  2170. return separator === undefined && limit === 0 ? [] : call$1(nativeSplit, this, separator, limit);
  2171. };
  2172. } else internalSplit = nativeSplit;
  2173. return [
  2174. // `String.prototype.split` method
  2175. // https://tc39.es/ecma262/#sec-string.prototype.split
  2176. function split(separator, limit) {
  2177. var O = requireObjectCoercible$1(this);
  2178. var splitter = separator == undefined ? undefined : getMethod$1(separator, SPLIT);
  2179. return splitter
  2180. ? call$1(splitter, separator, O, limit)
  2181. : call$1(internalSplit, toString$1(O), separator, limit);
  2182. },
  2183. // `RegExp.prototype[@@split]` method
  2184. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  2185. //
  2186. // NOTE: This cannot be properly polyfilled in engines that don't support
  2187. // the 'y' flag.
  2188. function (string, limit) {
  2189. var rx = anObject$1(this);
  2190. var S = toString$1(string);
  2191. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  2192. if (res.done) return res.value;
  2193. var C = speciesConstructor(rx, RegExp);
  2194. var unicodeMatching = rx.unicode;
  2195. var flags = (rx.ignoreCase ? 'i' : '') +
  2196. (rx.multiline ? 'm' : '') +
  2197. (rx.unicode ? 'u' : '') +
  2198. (UNSUPPORTED_Y ? 'g' : 'y');
  2199. // ^(? + rx + ) is needed, in combination with some S slicing, to
  2200. // simulate the 'y' flag.
  2201. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  2202. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  2203. if (lim === 0) return [];
  2204. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  2205. var p = 0;
  2206. var q = 0;
  2207. var A = [];
  2208. while (q < S.length) {
  2209. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  2210. var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
  2211. var e;
  2212. if (
  2213. z === null ||
  2214. (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  2215. ) {
  2216. q = advanceStringIndex(S, q, unicodeMatching);
  2217. } else {
  2218. push(A, stringSlice(S, p, q));
  2219. if (A.length === lim) return A;
  2220. for (var i = 1; i <= z.length - 1; i++) {
  2221. push(A, z[i]);
  2222. if (A.length === lim) return A;
  2223. }
  2224. q = p = e;
  2225. }
  2226. }
  2227. push(A, stringSlice(S, p));
  2228. return A;
  2229. }
  2230. ];
  2231. }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  2232. var $$1 = _export;
  2233. var $map = arrayIteration.map;
  2234. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$3;
  2235. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  2236. // `Array.prototype.map` method
  2237. // https://tc39.es/ecma262/#sec-array.prototype.map
  2238. // with adding support of @@species
  2239. $$1({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  2240. map: function map(callbackfn /* , thisArg */) {
  2241. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  2242. }
  2243. });
  2244. // `SameValue` abstract operation
  2245. // https://tc39.es/ecma262/#sec-samevalue
  2246. // eslint-disable-next-line es-x/no-object-is -- safe
  2247. var sameValue$1 = Object.is || function is(x, y) {
  2248. // eslint-disable-next-line no-self-compare -- NaN check
  2249. return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
  2250. };
  2251. var call = functionCall;
  2252. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  2253. var anObject = anObject$b;
  2254. var requireObjectCoercible = requireObjectCoercible$7;
  2255. var sameValue = sameValue$1;
  2256. var toString = toString$7;
  2257. var getMethod = getMethod$4;
  2258. var regExpExec = regexpExecAbstract;
  2259. // @@search logic
  2260. fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
  2261. return [
  2262. // `String.prototype.search` method
  2263. // https://tc39.es/ecma262/#sec-string.prototype.search
  2264. function search(regexp) {
  2265. var O = requireObjectCoercible(this);
  2266. var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
  2267. return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
  2268. },
  2269. // `RegExp.prototype[@@search]` method
  2270. // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
  2271. function (string) {
  2272. var rx = anObject(this);
  2273. var S = toString(string);
  2274. var res = maybeCallNative(nativeSearch, rx, S);
  2275. if (res.done) return res.value;
  2276. var previousLastIndex = rx.lastIndex;
  2277. if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
  2278. var result = regExpExec(rx, S);
  2279. if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
  2280. return result === null ? -1 : result.index;
  2281. }
  2282. ];
  2283. });
  2284. var $ = _export;
  2285. var uncurryThis = functionUncurryThis;
  2286. var IndexedObject = indexedObject;
  2287. var toIndexedObject = toIndexedObject$5;
  2288. var arrayMethodIsStrict = arrayMethodIsStrict$2;
  2289. var un$Join = uncurryThis([].join);
  2290. var ES3_STRINGS = IndexedObject != Object;
  2291. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  2292. // `Array.prototype.join` method
  2293. // https://tc39.es/ecma262/#sec-array.prototype.join
  2294. $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  2295. join: function join(separator) {
  2296. return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
  2297. }
  2298. });
  2299. /**
  2300. * @author: Dennis Hernández
  2301. * @update zhixin wen <wenzhixin2010@gmail.com>
  2302. */
  2303. var Utils = $__default["default"].fn.bootstrapTable.utils;
  2304. var UtilsCookie = {
  2305. cookieIds: {
  2306. sortOrder: 'bs.table.sortOrder',
  2307. sortName: 'bs.table.sortName',
  2308. sortPriority: 'bs.table.sortPriority',
  2309. pageNumber: 'bs.table.pageNumber',
  2310. pageList: 'bs.table.pageList',
  2311. columns: 'bs.table.columns',
  2312. hiddenColumns: 'bs.table.hiddenColumns',
  2313. cardView: 'bs.table.cardView',
  2314. searchText: 'bs.table.searchText',
  2315. reorderColumns: 'bs.table.reorderColumns',
  2316. filterControl: 'bs.table.filterControl',
  2317. filterBy: 'bs.table.filterBy'
  2318. },
  2319. getCurrentHeader: function getCurrentHeader(that) {
  2320. return that.options.height ? that.$tableHeader : that.$header;
  2321. },
  2322. getCurrentSearchControls: function getCurrentSearchControls(that) {
  2323. return that.options.height ? 'table select, table input' : 'select, input';
  2324. },
  2325. isCookieSupportedByBrowser: function isCookieSupportedByBrowser() {
  2326. return navigator.cookieEnabled;
  2327. },
  2328. isCookieEnabled: function isCookieEnabled(that, cookieName) {
  2329. return that.options.cookiesEnabled.includes(cookieName);
  2330. },
  2331. setCookie: function setCookie(that, cookieName, cookieValue) {
  2332. if (!that.options.cookie || !UtilsCookie.isCookieEnabled(that, cookieName)) {
  2333. return;
  2334. }
  2335. return that._storage.setItem("".concat(that.options.cookieIdTable, ".").concat(cookieName), cookieValue);
  2336. },
  2337. getCookie: function getCookie(that, cookieName) {
  2338. if (!cookieName || !UtilsCookie.isCookieEnabled(that, cookieName)) {
  2339. return null;
  2340. }
  2341. return that._storage.getItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
  2342. },
  2343. deleteCookie: function deleteCookie(that, cookieName) {
  2344. return that._storage.removeItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
  2345. },
  2346. calculateExpiration: function calculateExpiration(cookieExpire) {
  2347. var time = cookieExpire.replace(/[0-9]*/, ''); // s,mi,h,d,m,y
  2348. cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); // number
  2349. switch (time.toLowerCase()) {
  2350. case 's':
  2351. cookieExpire = +cookieExpire;
  2352. break;
  2353. case 'mi':
  2354. cookieExpire *= 60;
  2355. break;
  2356. case 'h':
  2357. cookieExpire = cookieExpire * 60 * 60;
  2358. break;
  2359. case 'd':
  2360. cookieExpire = cookieExpire * 24 * 60 * 60;
  2361. break;
  2362. case 'm':
  2363. cookieExpire = cookieExpire * 30 * 24 * 60 * 60;
  2364. break;
  2365. case 'y':
  2366. cookieExpire = cookieExpire * 365 * 24 * 60 * 60;
  2367. break;
  2368. default:
  2369. cookieExpire = undefined;
  2370. break;
  2371. }
  2372. if (!cookieExpire) {
  2373. return '';
  2374. }
  2375. var d = new Date();
  2376. d.setTime(d.getTime() + cookieExpire * 1000);
  2377. return d.toGMTString();
  2378. },
  2379. initCookieFilters: function initCookieFilters(bootstrapTable) {
  2380. setTimeout(function () {
  2381. var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(bootstrapTable, UtilsCookie.cookieIds.filterControl));
  2382. if (!bootstrapTable._filterControlValuesLoaded && parsedCookieFilters) {
  2383. var cachedFilters = {};
  2384. var header = UtilsCookie.getCurrentHeader(bootstrapTable);
  2385. var searchControls = UtilsCookie.getCurrentSearchControls(bootstrapTable);
  2386. var applyCookieFilters = function applyCookieFilters(element, filteredCookies) {
  2387. filteredCookies.forEach(function (cookie) {
  2388. var value = element.value.toString();
  2389. var text = cookie.text;
  2390. if (text === '' || element.type === 'radio' && value !== text) {
  2391. return;
  2392. }
  2393. if (element.tagName === 'INPUT' && element.type === 'radio' && value === text) {
  2394. element.checked = true;
  2395. cachedFilters[cookie.field] = text;
  2396. } else if (element.tagName === 'INPUT') {
  2397. element.value = text;
  2398. cachedFilters[cookie.field] = text;
  2399. } else if (element.tagName === 'SELECT' && bootstrapTable.options.filterControlContainer) {
  2400. element.value = text;
  2401. cachedFilters[cookie.field] = text;
  2402. } else if (text !== '' && element.tagName === 'SELECT') {
  2403. cachedFilters[cookie.field] = text;
  2404. var _iterator = _createForOfIteratorHelper(element),
  2405. _step;
  2406. try {
  2407. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  2408. var currentElement = _step.value;
  2409. if (currentElement.value === text) {
  2410. currentElement.selected = true;
  2411. return;
  2412. }
  2413. }
  2414. } catch (err) {
  2415. _iterator.e(err);
  2416. } finally {
  2417. _iterator.f();
  2418. }
  2419. var option = document.createElement('option');
  2420. option.value = text;
  2421. option.text = text;
  2422. element.add(option, element[1]);
  2423. element.selectedIndex = 1;
  2424. }
  2425. });
  2426. };
  2427. var filterContainer = header;
  2428. if (bootstrapTable.options.filterControlContainer) {
  2429. filterContainer = $__default["default"]("".concat(bootstrapTable.options.filterControlContainer));
  2430. }
  2431. filterContainer.find(searchControls).each(function () {
  2432. var field = $__default["default"](this).closest('[data-field]').data('field');
  2433. var filteredCookies = parsedCookieFilters.filter(function (cookie) {
  2434. return cookie.field === field;
  2435. });
  2436. applyCookieFilters(this, filteredCookies);
  2437. });
  2438. bootstrapTable.initColumnSearch(cachedFilters);
  2439. bootstrapTable._filterControlValuesLoaded = true;
  2440. bootstrapTable.initServer();
  2441. }
  2442. }, 250);
  2443. }
  2444. };
  2445. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  2446. cookie: false,
  2447. cookieExpire: '2h',
  2448. cookiePath: null,
  2449. cookieDomain: null,
  2450. cookieSecure: null,
  2451. cookieSameSite: 'Lax',
  2452. cookieIdTable: '',
  2453. cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.sortPriority', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.hiddenColumns', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy', 'bs.table.reorderColumns', 'bs.table.cardView'],
  2454. cookieStorage: 'cookieStorage',
  2455. // localStorage, sessionStorage, customStorage
  2456. cookieCustomStorageGet: null,
  2457. cookieCustomStorageSet: null,
  2458. cookieCustomStorageDelete: null,
  2459. // internal variable
  2460. _filterControls: [],
  2461. _filterControlValuesLoaded: false,
  2462. _storage: {
  2463. setItem: undefined,
  2464. getItem: undefined,
  2465. removeItem: undefined
  2466. }
  2467. });
  2468. $__default["default"].fn.bootstrapTable.methods.push('getCookies');
  2469. $__default["default"].fn.bootstrapTable.methods.push('deleteCookie');
  2470. $__default["default"].extend($__default["default"].fn.bootstrapTable.utils, {
  2471. setCookie: UtilsCookie.setCookie,
  2472. getCookie: UtilsCookie.getCookie
  2473. });
  2474. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  2475. _inherits(_class, _$$BootstrapTable);
  2476. var _super = _createSuper(_class);
  2477. function _class() {
  2478. _classCallCheck(this, _class);
  2479. return _super.apply(this, arguments);
  2480. }
  2481. _createClass(_class, [{
  2482. key: "init",
  2483. value: function init() {
  2484. if (this.options.cookie) {
  2485. if (this.options.cookieStorage === 'cookieStorage' && !UtilsCookie.isCookieSupportedByBrowser()) {
  2486. throw new Error('Cookies are not enabled in this browser.');
  2487. }
  2488. this.configureStorage(); // FilterBy logic
  2489. var filterByCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterBy);
  2490. if (typeof filterByCookieValue === 'boolean' && !filterByCookieValue) {
  2491. throw new Error('The cookie value of filterBy must be a json!');
  2492. }
  2493. var filterByCookie = {};
  2494. try {
  2495. filterByCookie = JSON.parse(filterByCookieValue);
  2496. } catch (e) {
  2497. throw new Error('Could not parse the json of the filterBy cookie!');
  2498. }
  2499. this.filterColumns = filterByCookie ? filterByCookie : {}; // FilterControl logic
  2500. this._filterControls = [];
  2501. this._filterControlValuesLoaded = false;
  2502. this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/'/g, '').replace(/ /g, '').toLowerCase().split(',') : this.options.cookiesEnabled;
  2503. if (this.options.filterControl) {
  2504. var that = this;
  2505. this.$el.on('column-search.bs.table', function (e, field, text) {
  2506. var isNewField = true;
  2507. for (var i = 0; i < that._filterControls.length; i++) {
  2508. if (that._filterControls[i].field === field) {
  2509. that._filterControls[i].text = text;
  2510. isNewField = false;
  2511. break;
  2512. }
  2513. }
  2514. if (isNewField) {
  2515. that._filterControls.push({
  2516. field: field,
  2517. text: text
  2518. });
  2519. }
  2520. UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that._filterControls));
  2521. }).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that));
  2522. }
  2523. }
  2524. _get(_getPrototypeOf(_class.prototype), "init", this).call(this);
  2525. }
  2526. }, {
  2527. key: "initServer",
  2528. value: function initServer() {
  2529. var _get2;
  2530. if (this.options.cookie && this.options.filterControl && !this._filterControlValuesLoaded) {
  2531. var cookie = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterControl));
  2532. if (cookie) {
  2533. return;
  2534. }
  2535. }
  2536. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2537. args[_key] = arguments[_key];
  2538. }
  2539. (_get2 = _get(_getPrototypeOf(_class.prototype), "initServer", this)).call.apply(_get2, [this].concat(args));
  2540. }
  2541. }, {
  2542. key: "initTable",
  2543. value: function initTable() {
  2544. var _get3;
  2545. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2546. args[_key2] = arguments[_key2];
  2547. }
  2548. (_get3 = _get(_getPrototypeOf(_class.prototype), "initTable", this)).call.apply(_get3, [this].concat(args));
  2549. this.initCookie();
  2550. }
  2551. }, {
  2552. key: "onSort",
  2553. value: function onSort() {
  2554. var _get4;
  2555. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  2556. args[_key3] = arguments[_key3];
  2557. }
  2558. (_get4 = _get(_getPrototypeOf(_class.prototype), "onSort", this)).call.apply(_get4, [this].concat(args));
  2559. if (!this.options.cookie) {
  2560. return;
  2561. }
  2562. if (this.options.sortName === undefined || this.options.sortOrder === undefined) {
  2563. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
  2564. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
  2565. } else {
  2566. this.options.sortPriority = null;
  2567. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
  2568. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder);
  2569. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName);
  2570. }
  2571. }
  2572. }, {
  2573. key: "onMultipleSort",
  2574. value: function onMultipleSort() {
  2575. var _get5;
  2576. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  2577. args[_key4] = arguments[_key4];
  2578. }
  2579. (_get5 = _get(_getPrototypeOf(_class.prototype), "onMultipleSort", this)).call.apply(_get5, [this].concat(args));
  2580. if (!this.options.cookie) {
  2581. return;
  2582. }
  2583. if (this.options.sortPriority === undefined) {
  2584. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
  2585. } else {
  2586. this.options.sortName = undefined;
  2587. this.options.sortOrder = undefined;
  2588. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
  2589. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
  2590. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortPriority, JSON.stringify(this.options.sortPriority));
  2591. }
  2592. }
  2593. }, {
  2594. key: "onPageNumber",
  2595. value: function onPageNumber() {
  2596. var _get6;
  2597. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2598. args[_key5] = arguments[_key5];
  2599. }
  2600. (_get6 = _get(_getPrototypeOf(_class.prototype), "onPageNumber", this)).call.apply(_get6, [this].concat(args));
  2601. if (!this.options.cookie) {
  2602. return;
  2603. }
  2604. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2605. }
  2606. }, {
  2607. key: "onPageListChange",
  2608. value: function onPageListChange() {
  2609. var _get7;
  2610. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2611. args[_key6] = arguments[_key6];
  2612. }
  2613. (_get7 = _get(_getPrototypeOf(_class.prototype), "onPageListChange", this)).call.apply(_get7, [this].concat(args));
  2614. if (!this.options.cookie) {
  2615. return;
  2616. }
  2617. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize);
  2618. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2619. }
  2620. }, {
  2621. key: "onPagePre",
  2622. value: function onPagePre() {
  2623. var _get8;
  2624. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2625. args[_key7] = arguments[_key7];
  2626. }
  2627. (_get8 = _get(_getPrototypeOf(_class.prototype), "onPagePre", this)).call.apply(_get8, [this].concat(args));
  2628. if (!this.options.cookie) {
  2629. return;
  2630. }
  2631. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2632. }
  2633. }, {
  2634. key: "onPageNext",
  2635. value: function onPageNext() {
  2636. var _get9;
  2637. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2638. args[_key8] = arguments[_key8];
  2639. }
  2640. (_get9 = _get(_getPrototypeOf(_class.prototype), "onPageNext", this)).call.apply(_get9, [this].concat(args));
  2641. if (!this.options.cookie) {
  2642. return;
  2643. }
  2644. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2645. }
  2646. }, {
  2647. key: "_toggleColumn",
  2648. value: function _toggleColumn() {
  2649. var _get10;
  2650. for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
  2651. args[_key9] = arguments[_key9];
  2652. }
  2653. (_get10 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get10, [this].concat(args));
  2654. if (!this.options.cookie) {
  2655. return;
  2656. }
  2657. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.hiddenColumns, JSON.stringify(this.getHiddenColumns().map(function (column) {
  2658. return column.field;
  2659. })));
  2660. }
  2661. }, {
  2662. key: "_toggleAllColumns",
  2663. value: function _toggleAllColumns() {
  2664. var _get11;
  2665. for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
  2666. args[_key10] = arguments[_key10];
  2667. }
  2668. (_get11 = _get(_getPrototypeOf(_class.prototype), "_toggleAllColumns", this)).call.apply(_get11, [this].concat(args));
  2669. if (!this.options.cookie) {
  2670. return;
  2671. }
  2672. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.hiddenColumns, JSON.stringify(this.getHiddenColumns().map(function (column) {
  2673. return column.field;
  2674. })));
  2675. }
  2676. }, {
  2677. key: "toggleView",
  2678. value: function toggleView() {
  2679. _get(_getPrototypeOf(_class.prototype), "toggleView", this).call(this);
  2680. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.cardView, this.options.cardView);
  2681. }
  2682. }, {
  2683. key: "selectPage",
  2684. value: function selectPage(page) {
  2685. _get(_getPrototypeOf(_class.prototype), "selectPage", this).call(this, page);
  2686. if (!this.options.cookie) {
  2687. return;
  2688. }
  2689. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page);
  2690. }
  2691. }, {
  2692. key: "onSearch",
  2693. value: function onSearch(event) {
  2694. _get(_getPrototypeOf(_class.prototype), "onSearch", this).call(this, event, arguments.length > 1 ? arguments[1] : true);
  2695. if (!this.options.cookie) {
  2696. return;
  2697. }
  2698. if (this.options.search) {
  2699. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText);
  2700. }
  2701. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2702. }
  2703. }, {
  2704. key: "initHeader",
  2705. value: function initHeader() {
  2706. var _get12;
  2707. if (this.options.reorderableColumns && this.options.cookie) {
  2708. this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.reorderColumns));
  2709. }
  2710. for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
  2711. args[_key11] = arguments[_key11];
  2712. }
  2713. (_get12 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get12, [this].concat(args));
  2714. }
  2715. }, {
  2716. key: "persistReorderColumnsState",
  2717. value: function persistReorderColumnsState(that) {
  2718. UtilsCookie.setCookie(that, UtilsCookie.cookieIds.reorderColumns, JSON.stringify(that.columnsSortOrder));
  2719. }
  2720. }, {
  2721. key: "filterBy",
  2722. value: function filterBy() {
  2723. var _get13;
  2724. for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
  2725. args[_key12] = arguments[_key12];
  2726. }
  2727. (_get13 = _get(_getPrototypeOf(_class.prototype), "filterBy", this)).call.apply(_get13, [this].concat(args));
  2728. if (!this.options.cookie) {
  2729. return;
  2730. }
  2731. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns));
  2732. }
  2733. }, {
  2734. key: "initCookie",
  2735. value: function initCookie() {
  2736. var _this = this;
  2737. if (!this.options.cookie) {
  2738. return;
  2739. }
  2740. if (this.options.cookieIdTable === '' || this.options.cookieExpire === '') {
  2741. console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.');
  2742. this.options.cookie = false; // Make sure that the cookie extension is disabled
  2743. return;
  2744. }
  2745. var sortOrderCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortOrder);
  2746. var sortOrderNameCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortName);
  2747. var sortPriorityCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortPriority);
  2748. var pageNumberCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageNumber);
  2749. var pageListCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageList);
  2750. var searchTextCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.searchText);
  2751. var cardViewCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.cardView);
  2752. var columnsCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.columns);
  2753. var hiddenColumnsCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.hiddenColumns);
  2754. if (typeof columnsCookieValue === 'boolean' && !columnsCookieValue) {
  2755. throw new Error('The cookie value of filterBy must be a json!');
  2756. }
  2757. var columnsCookie = {};
  2758. try {
  2759. columnsCookie = JSON.parse(columnsCookieValue);
  2760. } catch (e) {
  2761. throw new Error('Could not parse the json of the columns cookie!', columnsCookieValue);
  2762. }
  2763. var hiddenColumnsCookie = {};
  2764. try {
  2765. hiddenColumnsCookie = JSON.parse(hiddenColumnsCookieValue);
  2766. } catch (e) {
  2767. throw new Error('Could not parse the json of the hidden columns cookie!', hiddenColumnsCookieValue);
  2768. }
  2769. try {
  2770. sortPriorityCookie = JSON.parse(sortPriorityCookie);
  2771. } catch (e) {
  2772. throw new Error('Could not parse the json of the sortPriority cookie!', sortPriorityCookie);
  2773. }
  2774. if (!sortPriorityCookie) {
  2775. // sortOrder
  2776. this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder; // sortName
  2777. this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName;
  2778. } else {
  2779. this.options.sortOrder = undefined;
  2780. this.options.sortName = undefined;
  2781. } // sortPriority
  2782. this.options.sortPriority = sortPriorityCookie ? sortPriorityCookie : this.options.sortPriority;
  2783. if (this.options.sortOrder || this.options.sortName) {
  2784. // sortPriority
  2785. this.options.sortPriority = null;
  2786. } // pageNumber
  2787. this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber; // pageSize
  2788. this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize; // searchText
  2789. if (UtilsCookie.isCookieEnabled(this, 'bs.table.searchText') && this.options.searchText === '') {
  2790. this.options.searchText = searchTextCookie ? searchTextCookie : '';
  2791. } // cardView
  2792. this.options.cardView = cardViewCookie === 'true' ? cardViewCookie : false;
  2793. if (hiddenColumnsCookie) {
  2794. var _iterator2 = _createForOfIteratorHelper(this.columns),
  2795. _step2;
  2796. try {
  2797. var _loop = function _loop() {
  2798. var column = _step2.value;
  2799. column.visible = !hiddenColumnsCookie.filter(function (columnField) {
  2800. if (_this.isSelectionColumn(column)) {
  2801. return true;
  2802. }
  2803. return columnField === column.field;
  2804. }).length > 0 || !column.switchable;
  2805. };
  2806. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  2807. _loop();
  2808. }
  2809. } catch (err) {
  2810. _iterator2.e(err);
  2811. } finally {
  2812. _iterator2.f();
  2813. }
  2814. } else if (columnsCookie) {
  2815. /**
  2816. * This is needed for the old saved cookies!
  2817. * It can be removed in 2-3 Versions Later!!
  2818. * TODO: Remove this part (column cookie) some versions later e.g. 1.22.0
  2819. */
  2820. var _iterator3 = _createForOfIteratorHelper(this.columns),
  2821. _step3;
  2822. try {
  2823. var _loop2 = function _loop2() {
  2824. var column = _step3.value;
  2825. if (!column.switchable) {
  2826. return "continue";
  2827. }
  2828. column.visible = columnsCookie.filter(function (columnField) {
  2829. if (_this.isSelectionColumn(column)) {
  2830. return true;
  2831. }
  2832. if (columnField instanceof Object) {
  2833. return columnField.field === column.field;
  2834. }
  2835. return columnField === column.field;
  2836. }).length > 0;
  2837. };
  2838. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  2839. var _ret = _loop2();
  2840. if (_ret === "continue") continue;
  2841. }
  2842. } catch (err) {
  2843. _iterator3.e(err);
  2844. } finally {
  2845. _iterator3.f();
  2846. }
  2847. }
  2848. }
  2849. }, {
  2850. key: "getCookies",
  2851. value: function getCookies() {
  2852. var bootstrapTable = this;
  2853. var cookies = {};
  2854. $__default["default"].each(UtilsCookie.cookieIds, function (key, value) {
  2855. cookies[key] = UtilsCookie.getCookie(bootstrapTable, value);
  2856. if (key === 'columns' || key === 'hiddenColumns' || key === 'sortPriority') {
  2857. cookies[key] = JSON.parse(cookies[key]);
  2858. }
  2859. });
  2860. return cookies;
  2861. }
  2862. }, {
  2863. key: "deleteCookie",
  2864. value: function deleteCookie(cookieName) {
  2865. if (!cookieName) {
  2866. return;
  2867. }
  2868. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds[cookieName]);
  2869. }
  2870. }, {
  2871. key: "configureStorage",
  2872. value: function configureStorage() {
  2873. var that = this;
  2874. this._storage = {};
  2875. switch (this.options.cookieStorage) {
  2876. case 'cookieStorage':
  2877. this._storage.setItem = function (cookieName, cookieValue) {
  2878. document.cookie = [cookieName, '=', encodeURIComponent(cookieValue), "; expires=".concat(UtilsCookie.calculateExpiration(that.options.cookieExpire)), that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', that.options.cookieSecure ? '; secure' : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
  2879. };
  2880. this._storage.getItem = function (cookieName) {
  2881. var value = "; ".concat(document.cookie);
  2882. var parts = value.split("; ".concat(cookieName, "="));
  2883. return parts.length === 2 ? decodeURIComponent(parts.pop().split(';').shift()) : null;
  2884. };
  2885. this._storage.removeItem = function (cookieName) {
  2886. document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
  2887. };
  2888. break;
  2889. case 'localStorage':
  2890. this._storage.setItem = function (cookieName, cookieValue) {
  2891. localStorage.setItem(cookieName, cookieValue);
  2892. };
  2893. this._storage.getItem = function (cookieName) {
  2894. return localStorage.getItem(cookieName);
  2895. };
  2896. this._storage.removeItem = function (cookieName) {
  2897. localStorage.removeItem(cookieName);
  2898. };
  2899. break;
  2900. case 'sessionStorage':
  2901. this._storage.setItem = function (cookieName, cookieValue) {
  2902. sessionStorage.setItem(cookieName, cookieValue);
  2903. };
  2904. this._storage.getItem = function (cookieName) {
  2905. return sessionStorage.getItem(cookieName);
  2906. };
  2907. this._storage.removeItem = function (cookieName) {
  2908. sessionStorage.removeItem(cookieName);
  2909. };
  2910. break;
  2911. case 'customStorage':
  2912. if (!this.options.cookieCustomStorageSet || !this.options.cookieCustomStorageGet || !this.options.cookieCustomStorageDelete) {
  2913. throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
  2914. }
  2915. this._storage.setItem = function (cookieName, cookieValue) {
  2916. Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], '');
  2917. };
  2918. this._storage.getItem = function (cookieName) {
  2919. return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], '');
  2920. };
  2921. this._storage.removeItem = function (cookieName) {
  2922. Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], '');
  2923. };
  2924. break;
  2925. default:
  2926. throw new Error('Storage method not supported.');
  2927. }
  2928. }
  2929. }]);
  2930. return _class;
  2931. }($__default["default"].BootstrapTable);
  2932. }));