utils.js 115 KB

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