utils.js 119 KB

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