bootstrap-table-cookie.js 115 KB

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