utils.js 146 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340
  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, $) { '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 es_array_concat = {};
  16. var globalThis_1;
  17. var hasRequiredGlobalThis;
  18. function requireGlobalThis () {
  19. if (hasRequiredGlobalThis) return globalThis_1;
  20. hasRequiredGlobalThis = 1;
  21. var check = function (it) {
  22. return it && it.Math === Math && it;
  23. };
  24. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  25. globalThis_1 =
  26. // eslint-disable-next-line es/no-global-this -- safe
  27. check(typeof globalThis == 'object' && globalThis) ||
  28. check(typeof window == 'object' && window) ||
  29. // eslint-disable-next-line no-restricted-globals -- safe
  30. check(typeof self == 'object' && self) ||
  31. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  32. check(typeof globalThis_1 == 'object' && globalThis_1) ||
  33. // eslint-disable-next-line no-new-func -- fallback
  34. (function () { return this; })() || Function('return this')();
  35. return globalThis_1;
  36. }
  37. var objectGetOwnPropertyDescriptor = {};
  38. var fails;
  39. var hasRequiredFails;
  40. function requireFails () {
  41. if (hasRequiredFails) return fails;
  42. hasRequiredFails = 1;
  43. fails = function (exec) {
  44. try {
  45. return !!exec();
  46. } catch (error) {
  47. return true;
  48. }
  49. };
  50. return fails;
  51. }
  52. var descriptors;
  53. var hasRequiredDescriptors;
  54. function requireDescriptors () {
  55. if (hasRequiredDescriptors) return descriptors;
  56. hasRequiredDescriptors = 1;
  57. var fails = requireFails();
  58. // Detect IE8's incomplete defineProperty implementation
  59. descriptors = !fails(function () {
  60. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  61. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  62. });
  63. return descriptors;
  64. }
  65. var functionBindNative;
  66. var hasRequiredFunctionBindNative;
  67. function requireFunctionBindNative () {
  68. if (hasRequiredFunctionBindNative) return functionBindNative;
  69. hasRequiredFunctionBindNative = 1;
  70. var fails = requireFails();
  71. functionBindNative = !fails(function () {
  72. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  73. var test = (function () { /* empty */ }).bind();
  74. // eslint-disable-next-line no-prototype-builtins -- safe
  75. return typeof test != 'function' || test.hasOwnProperty('prototype');
  76. });
  77. return functionBindNative;
  78. }
  79. var functionCall;
  80. var hasRequiredFunctionCall;
  81. function requireFunctionCall () {
  82. if (hasRequiredFunctionCall) return functionCall;
  83. hasRequiredFunctionCall = 1;
  84. var NATIVE_BIND = requireFunctionBindNative();
  85. var call = Function.prototype.call;
  86. functionCall = NATIVE_BIND ? call.bind(call) : function () {
  87. return call.apply(call, arguments);
  88. };
  89. return functionCall;
  90. }
  91. var objectPropertyIsEnumerable = {};
  92. var hasRequiredObjectPropertyIsEnumerable;
  93. function requireObjectPropertyIsEnumerable () {
  94. if (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable;
  95. hasRequiredObjectPropertyIsEnumerable = 1;
  96. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  97. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  98. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  99. // Nashorn ~ JDK8 bug
  100. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  101. // `Object.prototype.propertyIsEnumerable` method implementation
  102. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  103. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  104. var descriptor = getOwnPropertyDescriptor(this, V);
  105. return !!descriptor && descriptor.enumerable;
  106. } : $propertyIsEnumerable;
  107. return objectPropertyIsEnumerable;
  108. }
  109. var createPropertyDescriptor;
  110. var hasRequiredCreatePropertyDescriptor;
  111. function requireCreatePropertyDescriptor () {
  112. if (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor;
  113. hasRequiredCreatePropertyDescriptor = 1;
  114. createPropertyDescriptor = function (bitmap, value) {
  115. return {
  116. enumerable: !(bitmap & 1),
  117. configurable: !(bitmap & 2),
  118. writable: !(bitmap & 4),
  119. value: value
  120. };
  121. };
  122. return createPropertyDescriptor;
  123. }
  124. var functionUncurryThis;
  125. var hasRequiredFunctionUncurryThis;
  126. function requireFunctionUncurryThis () {
  127. if (hasRequiredFunctionUncurryThis) return functionUncurryThis;
  128. hasRequiredFunctionUncurryThis = 1;
  129. var NATIVE_BIND = requireFunctionBindNative();
  130. var FunctionPrototype = Function.prototype;
  131. var call = FunctionPrototype.call;
  132. var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
  133. functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  134. return function () {
  135. return call.apply(fn, arguments);
  136. };
  137. };
  138. return functionUncurryThis;
  139. }
  140. var classofRaw;
  141. var hasRequiredClassofRaw;
  142. function requireClassofRaw () {
  143. if (hasRequiredClassofRaw) return classofRaw;
  144. hasRequiredClassofRaw = 1;
  145. var uncurryThis = requireFunctionUncurryThis();
  146. var toString = uncurryThis({}.toString);
  147. var stringSlice = uncurryThis(''.slice);
  148. classofRaw = function (it) {
  149. return stringSlice(toString(it), 8, -1);
  150. };
  151. return classofRaw;
  152. }
  153. var indexedObject;
  154. var hasRequiredIndexedObject;
  155. function requireIndexedObject () {
  156. if (hasRequiredIndexedObject) return indexedObject;
  157. hasRequiredIndexedObject = 1;
  158. var uncurryThis = requireFunctionUncurryThis();
  159. var fails = requireFails();
  160. var classof = requireClassofRaw();
  161. var $Object = Object;
  162. var split = uncurryThis(''.split);
  163. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  164. indexedObject = fails(function () {
  165. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  166. // eslint-disable-next-line no-prototype-builtins -- safe
  167. return !$Object('z').propertyIsEnumerable(0);
  168. }) ? function (it) {
  169. return classof(it) === 'String' ? split(it, '') : $Object(it);
  170. } : $Object;
  171. return indexedObject;
  172. }
  173. var isNullOrUndefined;
  174. var hasRequiredIsNullOrUndefined;
  175. function requireIsNullOrUndefined () {
  176. if (hasRequiredIsNullOrUndefined) return isNullOrUndefined;
  177. hasRequiredIsNullOrUndefined = 1;
  178. // we can't use just `it == null` since of `document.all` special case
  179. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  180. isNullOrUndefined = function (it) {
  181. return it === null || it === undefined;
  182. };
  183. return isNullOrUndefined;
  184. }
  185. var requireObjectCoercible;
  186. var hasRequiredRequireObjectCoercible;
  187. function requireRequireObjectCoercible () {
  188. if (hasRequiredRequireObjectCoercible) return requireObjectCoercible;
  189. hasRequiredRequireObjectCoercible = 1;
  190. var isNullOrUndefined = requireIsNullOrUndefined();
  191. var $TypeError = TypeError;
  192. // `RequireObjectCoercible` abstract operation
  193. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  194. requireObjectCoercible = function (it) {
  195. if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
  196. return it;
  197. };
  198. return requireObjectCoercible;
  199. }
  200. var toIndexedObject;
  201. var hasRequiredToIndexedObject;
  202. function requireToIndexedObject () {
  203. if (hasRequiredToIndexedObject) return toIndexedObject;
  204. hasRequiredToIndexedObject = 1;
  205. // toObject with fallback for non-array-like ES3 strings
  206. var IndexedObject = requireIndexedObject();
  207. var requireObjectCoercible = requireRequireObjectCoercible();
  208. toIndexedObject = function (it) {
  209. return IndexedObject(requireObjectCoercible(it));
  210. };
  211. return toIndexedObject;
  212. }
  213. var isCallable;
  214. var hasRequiredIsCallable;
  215. function requireIsCallable () {
  216. if (hasRequiredIsCallable) return isCallable;
  217. hasRequiredIsCallable = 1;
  218. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  219. var documentAll = typeof document == 'object' && document.all;
  220. // `IsCallable` abstract operation
  221. // https://tc39.es/ecma262/#sec-iscallable
  222. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  223. isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  224. return typeof argument == 'function' || argument === documentAll;
  225. } : function (argument) {
  226. return typeof argument == 'function';
  227. };
  228. return isCallable;
  229. }
  230. var isObject;
  231. var hasRequiredIsObject;
  232. function requireIsObject () {
  233. if (hasRequiredIsObject) return isObject;
  234. hasRequiredIsObject = 1;
  235. var isCallable = requireIsCallable();
  236. isObject = function (it) {
  237. return typeof it == 'object' ? it !== null : isCallable(it);
  238. };
  239. return isObject;
  240. }
  241. var getBuiltIn;
  242. var hasRequiredGetBuiltIn;
  243. function requireGetBuiltIn () {
  244. if (hasRequiredGetBuiltIn) return getBuiltIn;
  245. hasRequiredGetBuiltIn = 1;
  246. var globalThis = requireGlobalThis();
  247. var isCallable = requireIsCallable();
  248. var aFunction = function (argument) {
  249. return isCallable(argument) ? argument : undefined;
  250. };
  251. getBuiltIn = function (namespace, method) {
  252. return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
  253. };
  254. return getBuiltIn;
  255. }
  256. var objectIsPrototypeOf;
  257. var hasRequiredObjectIsPrototypeOf;
  258. function requireObjectIsPrototypeOf () {
  259. if (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf;
  260. hasRequiredObjectIsPrototypeOf = 1;
  261. var uncurryThis = requireFunctionUncurryThis();
  262. objectIsPrototypeOf = uncurryThis({}.isPrototypeOf);
  263. return objectIsPrototypeOf;
  264. }
  265. var environmentUserAgent;
  266. var hasRequiredEnvironmentUserAgent;
  267. function requireEnvironmentUserAgent () {
  268. if (hasRequiredEnvironmentUserAgent) return environmentUserAgent;
  269. hasRequiredEnvironmentUserAgent = 1;
  270. var globalThis = requireGlobalThis();
  271. var navigator = globalThis.navigator;
  272. var userAgent = navigator && navigator.userAgent;
  273. environmentUserAgent = userAgent ? String(userAgent) : '';
  274. return environmentUserAgent;
  275. }
  276. var environmentV8Version;
  277. var hasRequiredEnvironmentV8Version;
  278. function requireEnvironmentV8Version () {
  279. if (hasRequiredEnvironmentV8Version) return environmentV8Version;
  280. hasRequiredEnvironmentV8Version = 1;
  281. var globalThis = requireGlobalThis();
  282. var userAgent = requireEnvironmentUserAgent();
  283. var process = globalThis.process;
  284. var Deno = globalThis.Deno;
  285. var versions = process && process.versions || Deno && Deno.version;
  286. var v8 = versions && versions.v8;
  287. var match, version;
  288. if (v8) {
  289. match = v8.split('.');
  290. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  291. // but their correct versions are not interesting for us
  292. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  293. }
  294. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  295. // so check `userAgent` even if `.v8` exists, but 0
  296. if (!version && userAgent) {
  297. match = userAgent.match(/Edge\/(\d+)/);
  298. if (!match || match[1] >= 74) {
  299. match = userAgent.match(/Chrome\/(\d+)/);
  300. if (match) version = +match[1];
  301. }
  302. }
  303. environmentV8Version = version;
  304. return environmentV8Version;
  305. }
  306. var symbolConstructorDetection;
  307. var hasRequiredSymbolConstructorDetection;
  308. function requireSymbolConstructorDetection () {
  309. if (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection;
  310. hasRequiredSymbolConstructorDetection = 1;
  311. /* eslint-disable es/no-symbol -- required for testing */
  312. var V8_VERSION = requireEnvironmentV8Version();
  313. var fails = requireFails();
  314. var globalThis = requireGlobalThis();
  315. var $String = globalThis.String;
  316. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  317. symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
  318. var symbol = Symbol('symbol detection');
  319. // Chrome 38 Symbol has incorrect toString conversion
  320. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  321. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  322. // of course, fail.
  323. return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
  324. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  325. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  326. });
  327. return symbolConstructorDetection;
  328. }
  329. var useSymbolAsUid;
  330. var hasRequiredUseSymbolAsUid;
  331. function requireUseSymbolAsUid () {
  332. if (hasRequiredUseSymbolAsUid) return useSymbolAsUid;
  333. hasRequiredUseSymbolAsUid = 1;
  334. /* eslint-disable es/no-symbol -- required for testing */
  335. var NATIVE_SYMBOL = requireSymbolConstructorDetection();
  336. useSymbolAsUid = NATIVE_SYMBOL
  337. && !Symbol.sham
  338. && typeof Symbol.iterator == 'symbol';
  339. return useSymbolAsUid;
  340. }
  341. var isSymbol;
  342. var hasRequiredIsSymbol;
  343. function requireIsSymbol () {
  344. if (hasRequiredIsSymbol) return isSymbol;
  345. hasRequiredIsSymbol = 1;
  346. var getBuiltIn = requireGetBuiltIn();
  347. var isCallable = requireIsCallable();
  348. var isPrototypeOf = requireObjectIsPrototypeOf();
  349. var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
  350. var $Object = Object;
  351. isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  352. return typeof it == 'symbol';
  353. } : function (it) {
  354. var $Symbol = getBuiltIn('Symbol');
  355. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  356. };
  357. return isSymbol;
  358. }
  359. var tryToString;
  360. var hasRequiredTryToString;
  361. function requireTryToString () {
  362. if (hasRequiredTryToString) return tryToString;
  363. hasRequiredTryToString = 1;
  364. var $String = String;
  365. tryToString = function (argument) {
  366. try {
  367. return $String(argument);
  368. } catch (error) {
  369. return 'Object';
  370. }
  371. };
  372. return tryToString;
  373. }
  374. var aCallable;
  375. var hasRequiredACallable;
  376. function requireACallable () {
  377. if (hasRequiredACallable) return aCallable;
  378. hasRequiredACallable = 1;
  379. var isCallable = requireIsCallable();
  380. var tryToString = requireTryToString();
  381. var $TypeError = TypeError;
  382. // `Assert: IsCallable(argument) is true`
  383. aCallable = function (argument) {
  384. if (isCallable(argument)) return argument;
  385. throw new $TypeError(tryToString(argument) + ' is not a function');
  386. };
  387. return aCallable;
  388. }
  389. var getMethod;
  390. var hasRequiredGetMethod;
  391. function requireGetMethod () {
  392. if (hasRequiredGetMethod) return getMethod;
  393. hasRequiredGetMethod = 1;
  394. var aCallable = requireACallable();
  395. var isNullOrUndefined = requireIsNullOrUndefined();
  396. // `GetMethod` abstract operation
  397. // https://tc39.es/ecma262/#sec-getmethod
  398. getMethod = function (V, P) {
  399. var func = V[P];
  400. return isNullOrUndefined(func) ? undefined : aCallable(func);
  401. };
  402. return getMethod;
  403. }
  404. var ordinaryToPrimitive;
  405. var hasRequiredOrdinaryToPrimitive;
  406. function requireOrdinaryToPrimitive () {
  407. if (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive;
  408. hasRequiredOrdinaryToPrimitive = 1;
  409. var call = requireFunctionCall();
  410. var isCallable = requireIsCallable();
  411. var isObject = requireIsObject();
  412. var $TypeError = TypeError;
  413. // `OrdinaryToPrimitive` abstract operation
  414. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  415. ordinaryToPrimitive = function (input, pref) {
  416. var fn, val;
  417. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  418. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  419. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  420. throw new $TypeError("Can't convert object to primitive value");
  421. };
  422. return ordinaryToPrimitive;
  423. }
  424. var sharedStore = {exports: {}};
  425. var isPure;
  426. var hasRequiredIsPure;
  427. function requireIsPure () {
  428. if (hasRequiredIsPure) return isPure;
  429. hasRequiredIsPure = 1;
  430. isPure = false;
  431. return isPure;
  432. }
  433. var defineGlobalProperty;
  434. var hasRequiredDefineGlobalProperty;
  435. function requireDefineGlobalProperty () {
  436. if (hasRequiredDefineGlobalProperty) return defineGlobalProperty;
  437. hasRequiredDefineGlobalProperty = 1;
  438. var globalThis = requireGlobalThis();
  439. // eslint-disable-next-line es/no-object-defineproperty -- safe
  440. var defineProperty = Object.defineProperty;
  441. defineGlobalProperty = function (key, value) {
  442. try {
  443. defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
  444. } catch (error) {
  445. globalThis[key] = value;
  446. } return value;
  447. };
  448. return defineGlobalProperty;
  449. }
  450. var hasRequiredSharedStore;
  451. function requireSharedStore () {
  452. if (hasRequiredSharedStore) return sharedStore.exports;
  453. hasRequiredSharedStore = 1;
  454. var IS_PURE = requireIsPure();
  455. var globalThis = requireGlobalThis();
  456. var defineGlobalProperty = requireDefineGlobalProperty();
  457. var SHARED = '__core-js_shared__';
  458. var store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
  459. (store.versions || (store.versions = [])).push({
  460. version: '3.38.1',
  461. mode: IS_PURE ? 'pure' : 'global',
  462. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  463. license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
  464. source: 'https://github.com/zloirock/core-js'
  465. });
  466. return sharedStore.exports;
  467. }
  468. var shared;
  469. var hasRequiredShared;
  470. function requireShared () {
  471. if (hasRequiredShared) return shared;
  472. hasRequiredShared = 1;
  473. var store = requireSharedStore();
  474. shared = function (key, value) {
  475. return store[key] || (store[key] = value || {});
  476. };
  477. return shared;
  478. }
  479. var toObject;
  480. var hasRequiredToObject;
  481. function requireToObject () {
  482. if (hasRequiredToObject) return toObject;
  483. hasRequiredToObject = 1;
  484. var requireObjectCoercible = requireRequireObjectCoercible();
  485. var $Object = Object;
  486. // `ToObject` abstract operation
  487. // https://tc39.es/ecma262/#sec-toobject
  488. toObject = function (argument) {
  489. return $Object(requireObjectCoercible(argument));
  490. };
  491. return toObject;
  492. }
  493. var hasOwnProperty_1;
  494. var hasRequiredHasOwnProperty;
  495. function requireHasOwnProperty () {
  496. if (hasRequiredHasOwnProperty) return hasOwnProperty_1;
  497. hasRequiredHasOwnProperty = 1;
  498. var uncurryThis = requireFunctionUncurryThis();
  499. var toObject = requireToObject();
  500. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  501. // `HasOwnProperty` abstract operation
  502. // https://tc39.es/ecma262/#sec-hasownproperty
  503. // eslint-disable-next-line es/no-object-hasown -- safe
  504. hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  505. return hasOwnProperty(toObject(it), key);
  506. };
  507. return hasOwnProperty_1;
  508. }
  509. var uid;
  510. var hasRequiredUid;
  511. function requireUid () {
  512. if (hasRequiredUid) return uid;
  513. hasRequiredUid = 1;
  514. var uncurryThis = requireFunctionUncurryThis();
  515. var id = 0;
  516. var postfix = Math.random();
  517. var toString = uncurryThis(1.0.toString);
  518. uid = function (key) {
  519. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  520. };
  521. return uid;
  522. }
  523. var wellKnownSymbol;
  524. var hasRequiredWellKnownSymbol;
  525. function requireWellKnownSymbol () {
  526. if (hasRequiredWellKnownSymbol) return wellKnownSymbol;
  527. hasRequiredWellKnownSymbol = 1;
  528. var globalThis = requireGlobalThis();
  529. var shared = requireShared();
  530. var hasOwn = requireHasOwnProperty();
  531. var uid = requireUid();
  532. var NATIVE_SYMBOL = requireSymbolConstructorDetection();
  533. var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
  534. var Symbol = globalThis.Symbol;
  535. var WellKnownSymbolsStore = shared('wks');
  536. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
  537. wellKnownSymbol = function (name) {
  538. if (!hasOwn(WellKnownSymbolsStore, name)) {
  539. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
  540. ? Symbol[name]
  541. : createWellKnownSymbol('Symbol.' + name);
  542. } return WellKnownSymbolsStore[name];
  543. };
  544. return wellKnownSymbol;
  545. }
  546. var toPrimitive;
  547. var hasRequiredToPrimitive;
  548. function requireToPrimitive () {
  549. if (hasRequiredToPrimitive) return toPrimitive;
  550. hasRequiredToPrimitive = 1;
  551. var call = requireFunctionCall();
  552. var isObject = requireIsObject();
  553. var isSymbol = requireIsSymbol();
  554. var getMethod = requireGetMethod();
  555. var ordinaryToPrimitive = requireOrdinaryToPrimitive();
  556. var wellKnownSymbol = requireWellKnownSymbol();
  557. var $TypeError = TypeError;
  558. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  559. // `ToPrimitive` abstract operation
  560. // https://tc39.es/ecma262/#sec-toprimitive
  561. toPrimitive = function (input, pref) {
  562. if (!isObject(input) || isSymbol(input)) return input;
  563. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  564. var result;
  565. if (exoticToPrim) {
  566. if (pref === undefined) pref = 'default';
  567. result = call(exoticToPrim, input, pref);
  568. if (!isObject(result) || isSymbol(result)) return result;
  569. throw new $TypeError("Can't convert object to primitive value");
  570. }
  571. if (pref === undefined) pref = 'number';
  572. return ordinaryToPrimitive(input, pref);
  573. };
  574. return toPrimitive;
  575. }
  576. var toPropertyKey;
  577. var hasRequiredToPropertyKey;
  578. function requireToPropertyKey () {
  579. if (hasRequiredToPropertyKey) return toPropertyKey;
  580. hasRequiredToPropertyKey = 1;
  581. var toPrimitive = requireToPrimitive();
  582. var isSymbol = requireIsSymbol();
  583. // `ToPropertyKey` abstract operation
  584. // https://tc39.es/ecma262/#sec-topropertykey
  585. toPropertyKey = function (argument) {
  586. var key = toPrimitive(argument, 'string');
  587. return isSymbol(key) ? key : key + '';
  588. };
  589. return toPropertyKey;
  590. }
  591. var documentCreateElement;
  592. var hasRequiredDocumentCreateElement;
  593. function requireDocumentCreateElement () {
  594. if (hasRequiredDocumentCreateElement) return documentCreateElement;
  595. hasRequiredDocumentCreateElement = 1;
  596. var globalThis = requireGlobalThis();
  597. var isObject = requireIsObject();
  598. var document = globalThis.document;
  599. // typeof document.createElement is 'object' in old IE
  600. var EXISTS = isObject(document) && isObject(document.createElement);
  601. documentCreateElement = function (it) {
  602. return EXISTS ? document.createElement(it) : {};
  603. };
  604. return documentCreateElement;
  605. }
  606. var ie8DomDefine;
  607. var hasRequiredIe8DomDefine;
  608. function requireIe8DomDefine () {
  609. if (hasRequiredIe8DomDefine) return ie8DomDefine;
  610. hasRequiredIe8DomDefine = 1;
  611. var DESCRIPTORS = requireDescriptors();
  612. var fails = requireFails();
  613. var createElement = requireDocumentCreateElement();
  614. // Thanks to IE8 for its funny defineProperty
  615. ie8DomDefine = !DESCRIPTORS && !fails(function () {
  616. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  617. return Object.defineProperty(createElement('div'), 'a', {
  618. get: function () { return 7; }
  619. }).a !== 7;
  620. });
  621. return ie8DomDefine;
  622. }
  623. var hasRequiredObjectGetOwnPropertyDescriptor;
  624. function requireObjectGetOwnPropertyDescriptor () {
  625. if (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor;
  626. hasRequiredObjectGetOwnPropertyDescriptor = 1;
  627. var DESCRIPTORS = requireDescriptors();
  628. var call = requireFunctionCall();
  629. var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
  630. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  631. var toIndexedObject = requireToIndexedObject();
  632. var toPropertyKey = requireToPropertyKey();
  633. var hasOwn = requireHasOwnProperty();
  634. var IE8_DOM_DEFINE = requireIe8DomDefine();
  635. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  636. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  637. // `Object.getOwnPropertyDescriptor` method
  638. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  639. objectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  640. O = toIndexedObject(O);
  641. P = toPropertyKey(P);
  642. if (IE8_DOM_DEFINE) try {
  643. return $getOwnPropertyDescriptor(O, P);
  644. } catch (error) { /* empty */ }
  645. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  646. };
  647. return objectGetOwnPropertyDescriptor;
  648. }
  649. var objectDefineProperty = {};
  650. var v8PrototypeDefineBug;
  651. var hasRequiredV8PrototypeDefineBug;
  652. function requireV8PrototypeDefineBug () {
  653. if (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug;
  654. hasRequiredV8PrototypeDefineBug = 1;
  655. var DESCRIPTORS = requireDescriptors();
  656. var fails = requireFails();
  657. // V8 ~ Chrome 36-
  658. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  659. v8PrototypeDefineBug = DESCRIPTORS && fails(function () {
  660. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  661. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  662. value: 42,
  663. writable: false
  664. }).prototype !== 42;
  665. });
  666. return v8PrototypeDefineBug;
  667. }
  668. var anObject;
  669. var hasRequiredAnObject;
  670. function requireAnObject () {
  671. if (hasRequiredAnObject) return anObject;
  672. hasRequiredAnObject = 1;
  673. var isObject = requireIsObject();
  674. var $String = String;
  675. var $TypeError = TypeError;
  676. // `Assert: Type(argument) is Object`
  677. anObject = function (argument) {
  678. if (isObject(argument)) return argument;
  679. throw new $TypeError($String(argument) + ' is not an object');
  680. };
  681. return anObject;
  682. }
  683. var hasRequiredObjectDefineProperty;
  684. function requireObjectDefineProperty () {
  685. if (hasRequiredObjectDefineProperty) return objectDefineProperty;
  686. hasRequiredObjectDefineProperty = 1;
  687. var DESCRIPTORS = requireDescriptors();
  688. var IE8_DOM_DEFINE = requireIe8DomDefine();
  689. var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
  690. var anObject = requireAnObject();
  691. var toPropertyKey = requireToPropertyKey();
  692. var $TypeError = TypeError;
  693. // eslint-disable-next-line es/no-object-defineproperty -- safe
  694. var $defineProperty = Object.defineProperty;
  695. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  696. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  697. var ENUMERABLE = 'enumerable';
  698. var CONFIGURABLE = 'configurable';
  699. var WRITABLE = 'writable';
  700. // `Object.defineProperty` method
  701. // https://tc39.es/ecma262/#sec-object.defineproperty
  702. objectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  703. anObject(O);
  704. P = toPropertyKey(P);
  705. anObject(Attributes);
  706. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  707. var current = $getOwnPropertyDescriptor(O, P);
  708. if (current && current[WRITABLE]) {
  709. O[P] = Attributes.value;
  710. Attributes = {
  711. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  712. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  713. writable: false
  714. };
  715. }
  716. } return $defineProperty(O, P, Attributes);
  717. } : $defineProperty : function defineProperty(O, P, Attributes) {
  718. anObject(O);
  719. P = toPropertyKey(P);
  720. anObject(Attributes);
  721. if (IE8_DOM_DEFINE) try {
  722. return $defineProperty(O, P, Attributes);
  723. } catch (error) { /* empty */ }
  724. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
  725. if ('value' in Attributes) O[P] = Attributes.value;
  726. return O;
  727. };
  728. return objectDefineProperty;
  729. }
  730. var createNonEnumerableProperty;
  731. var hasRequiredCreateNonEnumerableProperty;
  732. function requireCreateNonEnumerableProperty () {
  733. if (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty;
  734. hasRequiredCreateNonEnumerableProperty = 1;
  735. var DESCRIPTORS = requireDescriptors();
  736. var definePropertyModule = requireObjectDefineProperty();
  737. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  738. createNonEnumerableProperty = DESCRIPTORS ? function (object, key, value) {
  739. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  740. } : function (object, key, value) {
  741. object[key] = value;
  742. return object;
  743. };
  744. return createNonEnumerableProperty;
  745. }
  746. var makeBuiltIn = {exports: {}};
  747. var functionName;
  748. var hasRequiredFunctionName;
  749. function requireFunctionName () {
  750. if (hasRequiredFunctionName) return functionName;
  751. hasRequiredFunctionName = 1;
  752. var DESCRIPTORS = requireDescriptors();
  753. var hasOwn = requireHasOwnProperty();
  754. var FunctionPrototype = Function.prototype;
  755. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  756. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  757. var EXISTS = hasOwn(FunctionPrototype, 'name');
  758. // additional protection from minified / mangled / dropped function names
  759. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  760. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  761. functionName = {
  762. EXISTS: EXISTS,
  763. PROPER: PROPER,
  764. CONFIGURABLE: CONFIGURABLE
  765. };
  766. return functionName;
  767. }
  768. var inspectSource;
  769. var hasRequiredInspectSource;
  770. function requireInspectSource () {
  771. if (hasRequiredInspectSource) return inspectSource;
  772. hasRequiredInspectSource = 1;
  773. var uncurryThis = requireFunctionUncurryThis();
  774. var isCallable = requireIsCallable();
  775. var store = requireSharedStore();
  776. var functionToString = uncurryThis(Function.toString);
  777. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  778. if (!isCallable(store.inspectSource)) {
  779. store.inspectSource = function (it) {
  780. return functionToString(it);
  781. };
  782. }
  783. inspectSource = store.inspectSource;
  784. return inspectSource;
  785. }
  786. var weakMapBasicDetection;
  787. var hasRequiredWeakMapBasicDetection;
  788. function requireWeakMapBasicDetection () {
  789. if (hasRequiredWeakMapBasicDetection) return weakMapBasicDetection;
  790. hasRequiredWeakMapBasicDetection = 1;
  791. var globalThis = requireGlobalThis();
  792. var isCallable = requireIsCallable();
  793. var WeakMap = globalThis.WeakMap;
  794. weakMapBasicDetection = isCallable(WeakMap) && /native code/.test(String(WeakMap));
  795. return weakMapBasicDetection;
  796. }
  797. var sharedKey;
  798. var hasRequiredSharedKey;
  799. function requireSharedKey () {
  800. if (hasRequiredSharedKey) return sharedKey;
  801. hasRequiredSharedKey = 1;
  802. var shared = requireShared();
  803. var uid = requireUid();
  804. var keys = shared('keys');
  805. sharedKey = function (key) {
  806. return keys[key] || (keys[key] = uid(key));
  807. };
  808. return sharedKey;
  809. }
  810. var hiddenKeys;
  811. var hasRequiredHiddenKeys;
  812. function requireHiddenKeys () {
  813. if (hasRequiredHiddenKeys) return hiddenKeys;
  814. hasRequiredHiddenKeys = 1;
  815. hiddenKeys = {};
  816. return hiddenKeys;
  817. }
  818. var internalState;
  819. var hasRequiredInternalState;
  820. function requireInternalState () {
  821. if (hasRequiredInternalState) return internalState;
  822. hasRequiredInternalState = 1;
  823. var NATIVE_WEAK_MAP = requireWeakMapBasicDetection();
  824. var globalThis = requireGlobalThis();
  825. var isObject = requireIsObject();
  826. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  827. var hasOwn = requireHasOwnProperty();
  828. var shared = requireSharedStore();
  829. var sharedKey = requireSharedKey();
  830. var hiddenKeys = requireHiddenKeys();
  831. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  832. var TypeError = globalThis.TypeError;
  833. var WeakMap = globalThis.WeakMap;
  834. var set, get, has;
  835. var enforce = function (it) {
  836. return has(it) ? get(it) : set(it, {});
  837. };
  838. var getterFor = function (TYPE) {
  839. return function (it) {
  840. var state;
  841. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  842. throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
  843. } return state;
  844. };
  845. };
  846. if (NATIVE_WEAK_MAP || shared.state) {
  847. var store = shared.state || (shared.state = new WeakMap());
  848. /* eslint-disable no-self-assign -- prototype methods protection */
  849. store.get = store.get;
  850. store.has = store.has;
  851. store.set = store.set;
  852. /* eslint-enable no-self-assign -- prototype methods protection */
  853. set = function (it, metadata) {
  854. if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  855. metadata.facade = it;
  856. store.set(it, metadata);
  857. return metadata;
  858. };
  859. get = function (it) {
  860. return store.get(it) || {};
  861. };
  862. has = function (it) {
  863. return store.has(it);
  864. };
  865. } else {
  866. var STATE = sharedKey('state');
  867. hiddenKeys[STATE] = true;
  868. set = function (it, metadata) {
  869. if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  870. metadata.facade = it;
  871. createNonEnumerableProperty(it, STATE, metadata);
  872. return metadata;
  873. };
  874. get = function (it) {
  875. return hasOwn(it, STATE) ? it[STATE] : {};
  876. };
  877. has = function (it) {
  878. return hasOwn(it, STATE);
  879. };
  880. }
  881. internalState = {
  882. set: set,
  883. get: get,
  884. has: has,
  885. enforce: enforce,
  886. getterFor: getterFor
  887. };
  888. return internalState;
  889. }
  890. var hasRequiredMakeBuiltIn;
  891. function requireMakeBuiltIn () {
  892. if (hasRequiredMakeBuiltIn) return makeBuiltIn.exports;
  893. hasRequiredMakeBuiltIn = 1;
  894. var uncurryThis = requireFunctionUncurryThis();
  895. var fails = requireFails();
  896. var isCallable = requireIsCallable();
  897. var hasOwn = requireHasOwnProperty();
  898. var DESCRIPTORS = requireDescriptors();
  899. var CONFIGURABLE_FUNCTION_NAME = requireFunctionName().CONFIGURABLE;
  900. var inspectSource = requireInspectSource();
  901. var InternalStateModule = requireInternalState();
  902. var enforceInternalState = InternalStateModule.enforce;
  903. var getInternalState = InternalStateModule.get;
  904. var $String = String;
  905. // eslint-disable-next-line es/no-object-defineproperty -- safe
  906. var defineProperty = Object.defineProperty;
  907. var stringSlice = uncurryThis(''.slice);
  908. var replace = uncurryThis(''.replace);
  909. var join = uncurryThis([].join);
  910. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  911. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  912. });
  913. var TEMPLATE = String(String).split('String');
  914. var makeBuiltIn$1 = makeBuiltIn.exports = function (value, name, options) {
  915. if (stringSlice($String(name), 0, 7) === 'Symbol(') {
  916. name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  917. }
  918. if (options && options.getter) name = 'get ' + name;
  919. if (options && options.setter) name = 'set ' + name;
  920. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  921. if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
  922. else value.name = name;
  923. }
  924. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  925. defineProperty(value, 'length', { value: options.arity });
  926. }
  927. try {
  928. if (options && hasOwn(options, 'constructor') && options.constructor) {
  929. if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
  930. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  931. } else if (value.prototype) value.prototype = undefined;
  932. } catch (error) { /* empty */ }
  933. var state = enforceInternalState(value);
  934. if (!hasOwn(state, 'source')) {
  935. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  936. } return value;
  937. };
  938. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  939. // eslint-disable-next-line no-extend-native -- required
  940. Function.prototype.toString = makeBuiltIn$1(function toString() {
  941. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  942. }, 'toString');
  943. return makeBuiltIn.exports;
  944. }
  945. var defineBuiltIn;
  946. var hasRequiredDefineBuiltIn;
  947. function requireDefineBuiltIn () {
  948. if (hasRequiredDefineBuiltIn) return defineBuiltIn;
  949. hasRequiredDefineBuiltIn = 1;
  950. var isCallable = requireIsCallable();
  951. var definePropertyModule = requireObjectDefineProperty();
  952. var makeBuiltIn = requireMakeBuiltIn();
  953. var defineGlobalProperty = requireDefineGlobalProperty();
  954. defineBuiltIn = function (O, key, value, options) {
  955. if (!options) options = {};
  956. var simple = options.enumerable;
  957. var name = options.name !== undefined ? options.name : key;
  958. if (isCallable(value)) makeBuiltIn(value, name, options);
  959. if (options.global) {
  960. if (simple) O[key] = value;
  961. else defineGlobalProperty(key, value);
  962. } else {
  963. try {
  964. if (!options.unsafe) delete O[key];
  965. else if (O[key]) simple = true;
  966. } catch (error) { /* empty */ }
  967. if (simple) O[key] = value;
  968. else definePropertyModule.f(O, key, {
  969. value: value,
  970. enumerable: false,
  971. configurable: !options.nonConfigurable,
  972. writable: !options.nonWritable
  973. });
  974. } return O;
  975. };
  976. return defineBuiltIn;
  977. }
  978. var objectGetOwnPropertyNames = {};
  979. var mathTrunc;
  980. var hasRequiredMathTrunc;
  981. function requireMathTrunc () {
  982. if (hasRequiredMathTrunc) return mathTrunc;
  983. hasRequiredMathTrunc = 1;
  984. var ceil = Math.ceil;
  985. var floor = Math.floor;
  986. // `Math.trunc` method
  987. // https://tc39.es/ecma262/#sec-math.trunc
  988. // eslint-disable-next-line es/no-math-trunc -- safe
  989. mathTrunc = Math.trunc || function trunc(x) {
  990. var n = +x;
  991. return (n > 0 ? floor : ceil)(n);
  992. };
  993. return mathTrunc;
  994. }
  995. var toIntegerOrInfinity;
  996. var hasRequiredToIntegerOrInfinity;
  997. function requireToIntegerOrInfinity () {
  998. if (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity;
  999. hasRequiredToIntegerOrInfinity = 1;
  1000. var trunc = requireMathTrunc();
  1001. // `ToIntegerOrInfinity` abstract operation
  1002. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  1003. toIntegerOrInfinity = function (argument) {
  1004. var number = +argument;
  1005. // eslint-disable-next-line no-self-compare -- NaN check
  1006. return number !== number || number === 0 ? 0 : trunc(number);
  1007. };
  1008. return toIntegerOrInfinity;
  1009. }
  1010. var toAbsoluteIndex;
  1011. var hasRequiredToAbsoluteIndex;
  1012. function requireToAbsoluteIndex () {
  1013. if (hasRequiredToAbsoluteIndex) return toAbsoluteIndex;
  1014. hasRequiredToAbsoluteIndex = 1;
  1015. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  1016. var max = Math.max;
  1017. var min = Math.min;
  1018. // Helper for a popular repeating case of the spec:
  1019. // Let integer be ? ToInteger(index).
  1020. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  1021. toAbsoluteIndex = function (index, length) {
  1022. var integer = toIntegerOrInfinity(index);
  1023. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  1024. };
  1025. return toAbsoluteIndex;
  1026. }
  1027. var toLength;
  1028. var hasRequiredToLength;
  1029. function requireToLength () {
  1030. if (hasRequiredToLength) return toLength;
  1031. hasRequiredToLength = 1;
  1032. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  1033. var min = Math.min;
  1034. // `ToLength` abstract operation
  1035. // https://tc39.es/ecma262/#sec-tolength
  1036. toLength = function (argument) {
  1037. var len = toIntegerOrInfinity(argument);
  1038. return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  1039. };
  1040. return toLength;
  1041. }
  1042. var lengthOfArrayLike;
  1043. var hasRequiredLengthOfArrayLike;
  1044. function requireLengthOfArrayLike () {
  1045. if (hasRequiredLengthOfArrayLike) return lengthOfArrayLike;
  1046. hasRequiredLengthOfArrayLike = 1;
  1047. var toLength = requireToLength();
  1048. // `LengthOfArrayLike` abstract operation
  1049. // https://tc39.es/ecma262/#sec-lengthofarraylike
  1050. lengthOfArrayLike = function (obj) {
  1051. return toLength(obj.length);
  1052. };
  1053. return lengthOfArrayLike;
  1054. }
  1055. var arrayIncludes;
  1056. var hasRequiredArrayIncludes;
  1057. function requireArrayIncludes () {
  1058. if (hasRequiredArrayIncludes) return arrayIncludes;
  1059. hasRequiredArrayIncludes = 1;
  1060. var toIndexedObject = requireToIndexedObject();
  1061. var toAbsoluteIndex = requireToAbsoluteIndex();
  1062. var lengthOfArrayLike = requireLengthOfArrayLike();
  1063. // `Array.prototype.{ indexOf, includes }` methods implementation
  1064. var createMethod = function (IS_INCLUDES) {
  1065. return function ($this, el, fromIndex) {
  1066. var O = toIndexedObject($this);
  1067. var length = lengthOfArrayLike(O);
  1068. if (length === 0) return !IS_INCLUDES && -1;
  1069. var index = toAbsoluteIndex(fromIndex, length);
  1070. var value;
  1071. // Array#includes uses SameValueZero equality algorithm
  1072. // eslint-disable-next-line no-self-compare -- NaN check
  1073. if (IS_INCLUDES && el !== el) while (length > index) {
  1074. value = O[index++];
  1075. // eslint-disable-next-line no-self-compare -- NaN check
  1076. if (value !== value) return true;
  1077. // Array#indexOf ignores holes, Array#includes - not
  1078. } else for (;length > index; index++) {
  1079. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  1080. } return !IS_INCLUDES && -1;
  1081. };
  1082. };
  1083. arrayIncludes = {
  1084. // `Array.prototype.includes` method
  1085. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1086. includes: createMethod(true),
  1087. // `Array.prototype.indexOf` method
  1088. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1089. indexOf: createMethod(false)
  1090. };
  1091. return arrayIncludes;
  1092. }
  1093. var objectKeysInternal;
  1094. var hasRequiredObjectKeysInternal;
  1095. function requireObjectKeysInternal () {
  1096. if (hasRequiredObjectKeysInternal) return objectKeysInternal;
  1097. hasRequiredObjectKeysInternal = 1;
  1098. var uncurryThis = requireFunctionUncurryThis();
  1099. var hasOwn = requireHasOwnProperty();
  1100. var toIndexedObject = requireToIndexedObject();
  1101. var indexOf = requireArrayIncludes().indexOf;
  1102. var hiddenKeys = requireHiddenKeys();
  1103. var push = uncurryThis([].push);
  1104. objectKeysInternal = function (object, names) {
  1105. var O = toIndexedObject(object);
  1106. var i = 0;
  1107. var result = [];
  1108. var key;
  1109. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  1110. // Don't enum bug & hidden keys
  1111. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  1112. ~indexOf(result, key) || push(result, key);
  1113. }
  1114. return result;
  1115. };
  1116. return objectKeysInternal;
  1117. }
  1118. var enumBugKeys;
  1119. var hasRequiredEnumBugKeys;
  1120. function requireEnumBugKeys () {
  1121. if (hasRequiredEnumBugKeys) return enumBugKeys;
  1122. hasRequiredEnumBugKeys = 1;
  1123. // IE8- don't enum bug keys
  1124. enumBugKeys = [
  1125. 'constructor',
  1126. 'hasOwnProperty',
  1127. 'isPrototypeOf',
  1128. 'propertyIsEnumerable',
  1129. 'toLocaleString',
  1130. 'toString',
  1131. 'valueOf'
  1132. ];
  1133. return enumBugKeys;
  1134. }
  1135. var hasRequiredObjectGetOwnPropertyNames;
  1136. function requireObjectGetOwnPropertyNames () {
  1137. if (hasRequiredObjectGetOwnPropertyNames) return objectGetOwnPropertyNames;
  1138. hasRequiredObjectGetOwnPropertyNames = 1;
  1139. var internalObjectKeys = requireObjectKeysInternal();
  1140. var enumBugKeys = requireEnumBugKeys();
  1141. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  1142. // `Object.getOwnPropertyNames` method
  1143. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  1144. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  1145. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  1146. return internalObjectKeys(O, hiddenKeys);
  1147. };
  1148. return objectGetOwnPropertyNames;
  1149. }
  1150. var objectGetOwnPropertySymbols = {};
  1151. var hasRequiredObjectGetOwnPropertySymbols;
  1152. function requireObjectGetOwnPropertySymbols () {
  1153. if (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols;
  1154. hasRequiredObjectGetOwnPropertySymbols = 1;
  1155. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  1156. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  1157. return objectGetOwnPropertySymbols;
  1158. }
  1159. var ownKeys;
  1160. var hasRequiredOwnKeys;
  1161. function requireOwnKeys () {
  1162. if (hasRequiredOwnKeys) return ownKeys;
  1163. hasRequiredOwnKeys = 1;
  1164. var getBuiltIn = requireGetBuiltIn();
  1165. var uncurryThis = requireFunctionUncurryThis();
  1166. var getOwnPropertyNamesModule = requireObjectGetOwnPropertyNames();
  1167. var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
  1168. var anObject = requireAnObject();
  1169. var concat = uncurryThis([].concat);
  1170. // all object keys, includes non-enumerable and symbols
  1171. ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  1172. var keys = getOwnPropertyNamesModule.f(anObject(it));
  1173. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1174. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  1175. };
  1176. return ownKeys;
  1177. }
  1178. var copyConstructorProperties;
  1179. var hasRequiredCopyConstructorProperties;
  1180. function requireCopyConstructorProperties () {
  1181. if (hasRequiredCopyConstructorProperties) return copyConstructorProperties;
  1182. hasRequiredCopyConstructorProperties = 1;
  1183. var hasOwn = requireHasOwnProperty();
  1184. var ownKeys = requireOwnKeys();
  1185. var getOwnPropertyDescriptorModule = requireObjectGetOwnPropertyDescriptor();
  1186. var definePropertyModule = requireObjectDefineProperty();
  1187. copyConstructorProperties = function (target, source, exceptions) {
  1188. var keys = ownKeys(source);
  1189. var defineProperty = definePropertyModule.f;
  1190. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  1191. for (var i = 0; i < keys.length; i++) {
  1192. var key = keys[i];
  1193. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  1194. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  1195. }
  1196. }
  1197. };
  1198. return copyConstructorProperties;
  1199. }
  1200. var isForced_1;
  1201. var hasRequiredIsForced;
  1202. function requireIsForced () {
  1203. if (hasRequiredIsForced) return isForced_1;
  1204. hasRequiredIsForced = 1;
  1205. var fails = requireFails();
  1206. var isCallable = requireIsCallable();
  1207. var replacement = /#|\.prototype\./;
  1208. var isForced = function (feature, detection) {
  1209. var value = data[normalize(feature)];
  1210. return value === POLYFILL ? true
  1211. : value === NATIVE ? false
  1212. : isCallable(detection) ? fails(detection)
  1213. : !!detection;
  1214. };
  1215. var normalize = isForced.normalize = function (string) {
  1216. return String(string).replace(replacement, '.').toLowerCase();
  1217. };
  1218. var data = isForced.data = {};
  1219. var NATIVE = isForced.NATIVE = 'N';
  1220. var POLYFILL = isForced.POLYFILL = 'P';
  1221. isForced_1 = isForced;
  1222. return isForced_1;
  1223. }
  1224. var _export;
  1225. var hasRequired_export;
  1226. function require_export () {
  1227. if (hasRequired_export) return _export;
  1228. hasRequired_export = 1;
  1229. var globalThis = requireGlobalThis();
  1230. var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
  1231. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  1232. var defineBuiltIn = requireDefineBuiltIn();
  1233. var defineGlobalProperty = requireDefineGlobalProperty();
  1234. var copyConstructorProperties = requireCopyConstructorProperties();
  1235. var isForced = requireIsForced();
  1236. /*
  1237. options.target - name of the target object
  1238. options.global - target is the global object
  1239. options.stat - export as static methods of target
  1240. options.proto - export as prototype methods of target
  1241. options.real - real prototype method for the `pure` version
  1242. options.forced - export even if the native feature is available
  1243. options.bind - bind methods to the target, required for the `pure` version
  1244. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  1245. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  1246. options.sham - add a flag to not completely full polyfills
  1247. options.enumerable - export as enumerable property
  1248. options.dontCallGetSet - prevent calling a getter on target
  1249. options.name - the .name of the function if it does not match the key
  1250. */
  1251. _export = function (options, source) {
  1252. var TARGET = options.target;
  1253. var GLOBAL = options.global;
  1254. var STATIC = options.stat;
  1255. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  1256. if (GLOBAL) {
  1257. target = globalThis;
  1258. } else if (STATIC) {
  1259. target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
  1260. } else {
  1261. target = globalThis[TARGET] && globalThis[TARGET].prototype;
  1262. }
  1263. if (target) for (key in source) {
  1264. sourceProperty = source[key];
  1265. if (options.dontCallGetSet) {
  1266. descriptor = getOwnPropertyDescriptor(target, key);
  1267. targetProperty = descriptor && descriptor.value;
  1268. } else targetProperty = target[key];
  1269. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1270. // contained in target
  1271. if (!FORCED && targetProperty !== undefined) {
  1272. if (typeof sourceProperty == typeof targetProperty) continue;
  1273. copyConstructorProperties(sourceProperty, targetProperty);
  1274. }
  1275. // add a flag to not completely full polyfills
  1276. if (options.sham || (targetProperty && targetProperty.sham)) {
  1277. createNonEnumerableProperty(sourceProperty, 'sham', true);
  1278. }
  1279. defineBuiltIn(target, key, sourceProperty, options);
  1280. }
  1281. };
  1282. return _export;
  1283. }
  1284. var isArray;
  1285. var hasRequiredIsArray;
  1286. function requireIsArray () {
  1287. if (hasRequiredIsArray) return isArray;
  1288. hasRequiredIsArray = 1;
  1289. var classof = requireClassofRaw();
  1290. // `IsArray` abstract operation
  1291. // https://tc39.es/ecma262/#sec-isarray
  1292. // eslint-disable-next-line es/no-array-isarray -- safe
  1293. isArray = Array.isArray || function isArray(argument) {
  1294. return classof(argument) === 'Array';
  1295. };
  1296. return isArray;
  1297. }
  1298. var doesNotExceedSafeInteger;
  1299. var hasRequiredDoesNotExceedSafeInteger;
  1300. function requireDoesNotExceedSafeInteger () {
  1301. if (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger;
  1302. hasRequiredDoesNotExceedSafeInteger = 1;
  1303. var $TypeError = TypeError;
  1304. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1305. doesNotExceedSafeInteger = function (it) {
  1306. if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
  1307. return it;
  1308. };
  1309. return doesNotExceedSafeInteger;
  1310. }
  1311. var createProperty;
  1312. var hasRequiredCreateProperty;
  1313. function requireCreateProperty () {
  1314. if (hasRequiredCreateProperty) return createProperty;
  1315. hasRequiredCreateProperty = 1;
  1316. var DESCRIPTORS = requireDescriptors();
  1317. var definePropertyModule = requireObjectDefineProperty();
  1318. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  1319. createProperty = function (object, key, value) {
  1320. if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
  1321. else object[key] = value;
  1322. };
  1323. return createProperty;
  1324. }
  1325. var toStringTagSupport;
  1326. var hasRequiredToStringTagSupport;
  1327. function requireToStringTagSupport () {
  1328. if (hasRequiredToStringTagSupport) return toStringTagSupport;
  1329. hasRequiredToStringTagSupport = 1;
  1330. var wellKnownSymbol = requireWellKnownSymbol();
  1331. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  1332. var test = {};
  1333. test[TO_STRING_TAG] = 'z';
  1334. toStringTagSupport = String(test) === '[object z]';
  1335. return toStringTagSupport;
  1336. }
  1337. var classof;
  1338. var hasRequiredClassof;
  1339. function requireClassof () {
  1340. if (hasRequiredClassof) return classof;
  1341. hasRequiredClassof = 1;
  1342. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  1343. var isCallable = requireIsCallable();
  1344. var classofRaw = requireClassofRaw();
  1345. var wellKnownSymbol = requireWellKnownSymbol();
  1346. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  1347. var $Object = Object;
  1348. // ES3 wrong here
  1349. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
  1350. // fallback for IE11 Script Access Denied error
  1351. var tryGet = function (it, key) {
  1352. try {
  1353. return it[key];
  1354. } catch (error) { /* empty */ }
  1355. };
  1356. // getting tag from ES6+ `Object.prototype.toString`
  1357. classof = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  1358. var O, tag, result;
  1359. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1360. // @@toStringTag case
  1361. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  1362. // builtinTag case
  1363. : CORRECT_ARGUMENTS ? classofRaw(O)
  1364. // ES3 arguments fallback
  1365. : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  1366. };
  1367. return classof;
  1368. }
  1369. var isConstructor;
  1370. var hasRequiredIsConstructor;
  1371. function requireIsConstructor () {
  1372. if (hasRequiredIsConstructor) return isConstructor;
  1373. hasRequiredIsConstructor = 1;
  1374. var uncurryThis = requireFunctionUncurryThis();
  1375. var fails = requireFails();
  1376. var isCallable = requireIsCallable();
  1377. var classof = requireClassof();
  1378. var getBuiltIn = requireGetBuiltIn();
  1379. var inspectSource = requireInspectSource();
  1380. var noop = function () { /* empty */ };
  1381. var construct = getBuiltIn('Reflect', 'construct');
  1382. var constructorRegExp = /^\s*(?:class|function)\b/;
  1383. var exec = uncurryThis(constructorRegExp.exec);
  1384. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  1385. var isConstructorModern = function isConstructor(argument) {
  1386. if (!isCallable(argument)) return false;
  1387. try {
  1388. construct(noop, [], argument);
  1389. return true;
  1390. } catch (error) {
  1391. return false;
  1392. }
  1393. };
  1394. var isConstructorLegacy = function isConstructor(argument) {
  1395. if (!isCallable(argument)) return false;
  1396. switch (classof(argument)) {
  1397. case 'AsyncFunction':
  1398. case 'GeneratorFunction':
  1399. case 'AsyncGeneratorFunction': return false;
  1400. }
  1401. try {
  1402. // we can't check .prototype since constructors produced by .bind haven't it
  1403. // `Function#toString` throws on some built-it function in some legacy engines
  1404. // (for example, `DOMQuad` and similar in FF41-)
  1405. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1406. } catch (error) {
  1407. return true;
  1408. }
  1409. };
  1410. isConstructorLegacy.sham = true;
  1411. // `IsConstructor` abstract operation
  1412. // https://tc39.es/ecma262/#sec-isconstructor
  1413. isConstructor = !construct || fails(function () {
  1414. var called;
  1415. return isConstructorModern(isConstructorModern.call)
  1416. || !isConstructorModern(Object)
  1417. || !isConstructorModern(function () { called = true; })
  1418. || called;
  1419. }) ? isConstructorLegacy : isConstructorModern;
  1420. return isConstructor;
  1421. }
  1422. var arraySpeciesConstructor;
  1423. var hasRequiredArraySpeciesConstructor;
  1424. function requireArraySpeciesConstructor () {
  1425. if (hasRequiredArraySpeciesConstructor) return arraySpeciesConstructor;
  1426. hasRequiredArraySpeciesConstructor = 1;
  1427. var isArray = requireIsArray();
  1428. var isConstructor = requireIsConstructor();
  1429. var isObject = requireIsObject();
  1430. var wellKnownSymbol = requireWellKnownSymbol();
  1431. var SPECIES = wellKnownSymbol('species');
  1432. var $Array = Array;
  1433. // a part of `ArraySpeciesCreate` abstract operation
  1434. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1435. arraySpeciesConstructor = function (originalArray) {
  1436. var C;
  1437. if (isArray(originalArray)) {
  1438. C = originalArray.constructor;
  1439. // cross-realm fallback
  1440. if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
  1441. else if (isObject(C)) {
  1442. C = C[SPECIES];
  1443. if (C === null) C = undefined;
  1444. }
  1445. } return C === undefined ? $Array : C;
  1446. };
  1447. return arraySpeciesConstructor;
  1448. }
  1449. var arraySpeciesCreate;
  1450. var hasRequiredArraySpeciesCreate;
  1451. function requireArraySpeciesCreate () {
  1452. if (hasRequiredArraySpeciesCreate) return arraySpeciesCreate;
  1453. hasRequiredArraySpeciesCreate = 1;
  1454. var arraySpeciesConstructor = requireArraySpeciesConstructor();
  1455. // `ArraySpeciesCreate` abstract operation
  1456. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1457. arraySpeciesCreate = function (originalArray, length) {
  1458. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1459. };
  1460. return arraySpeciesCreate;
  1461. }
  1462. var arrayMethodHasSpeciesSupport;
  1463. var hasRequiredArrayMethodHasSpeciesSupport;
  1464. function requireArrayMethodHasSpeciesSupport () {
  1465. if (hasRequiredArrayMethodHasSpeciesSupport) return arrayMethodHasSpeciesSupport;
  1466. hasRequiredArrayMethodHasSpeciesSupport = 1;
  1467. var fails = requireFails();
  1468. var wellKnownSymbol = requireWellKnownSymbol();
  1469. var V8_VERSION = requireEnvironmentV8Version();
  1470. var SPECIES = wellKnownSymbol('species');
  1471. arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1472. // We can't use this feature detection in V8 since it causes
  1473. // deoptimization and serious performance degradation
  1474. // https://github.com/zloirock/core-js/issues/677
  1475. return V8_VERSION >= 51 || !fails(function () {
  1476. var array = [];
  1477. var constructor = array.constructor = {};
  1478. constructor[SPECIES] = function () {
  1479. return { foo: 1 };
  1480. };
  1481. return array[METHOD_NAME](Boolean).foo !== 1;
  1482. });
  1483. };
  1484. return arrayMethodHasSpeciesSupport;
  1485. }
  1486. var hasRequiredEs_array_concat;
  1487. function requireEs_array_concat () {
  1488. if (hasRequiredEs_array_concat) return es_array_concat;
  1489. hasRequiredEs_array_concat = 1;
  1490. var $ = require_export();
  1491. var fails = requireFails();
  1492. var isArray = requireIsArray();
  1493. var isObject = requireIsObject();
  1494. var toObject = requireToObject();
  1495. var lengthOfArrayLike = requireLengthOfArrayLike();
  1496. var doesNotExceedSafeInteger = requireDoesNotExceedSafeInteger();
  1497. var createProperty = requireCreateProperty();
  1498. var arraySpeciesCreate = requireArraySpeciesCreate();
  1499. var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
  1500. var wellKnownSymbol = requireWellKnownSymbol();
  1501. var V8_VERSION = requireEnvironmentV8Version();
  1502. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1503. // We can't use this feature detection in V8 since it causes
  1504. // deoptimization and serious performance degradation
  1505. // https://github.com/zloirock/core-js/issues/679
  1506. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  1507. var array = [];
  1508. array[IS_CONCAT_SPREADABLE] = false;
  1509. return array.concat()[0] !== array;
  1510. });
  1511. var isConcatSpreadable = function (O) {
  1512. if (!isObject(O)) return false;
  1513. var spreadable = O[IS_CONCAT_SPREADABLE];
  1514. return spreadable !== undefined ? !!spreadable : isArray(O);
  1515. };
  1516. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');
  1517. // `Array.prototype.concat` method
  1518. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1519. // with adding support of @@isConcatSpreadable and @@species
  1520. $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1521. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1522. concat: function concat(arg) {
  1523. var O = toObject(this);
  1524. var A = arraySpeciesCreate(O, 0);
  1525. var n = 0;
  1526. var i, k, length, len, E;
  1527. for (i = -1, length = arguments.length; i < length; i++) {
  1528. E = i === -1 ? O : arguments[i];
  1529. if (isConcatSpreadable(E)) {
  1530. len = lengthOfArrayLike(E);
  1531. doesNotExceedSafeInteger(n + len);
  1532. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1533. } else {
  1534. doesNotExceedSafeInteger(n + 1);
  1535. createProperty(A, n++, E);
  1536. }
  1537. }
  1538. A.length = n;
  1539. return A;
  1540. }
  1541. });
  1542. return es_array_concat;
  1543. }
  1544. requireEs_array_concat();
  1545. var es_array_filter = {};
  1546. var functionUncurryThisClause;
  1547. var hasRequiredFunctionUncurryThisClause;
  1548. function requireFunctionUncurryThisClause () {
  1549. if (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause;
  1550. hasRequiredFunctionUncurryThisClause = 1;
  1551. var classofRaw = requireClassofRaw();
  1552. var uncurryThis = requireFunctionUncurryThis();
  1553. functionUncurryThisClause = function (fn) {
  1554. // Nashorn bug:
  1555. // https://github.com/zloirock/core-js/issues/1128
  1556. // https://github.com/zloirock/core-js/issues/1130
  1557. if (classofRaw(fn) === 'Function') return uncurryThis(fn);
  1558. };
  1559. return functionUncurryThisClause;
  1560. }
  1561. var functionBindContext;
  1562. var hasRequiredFunctionBindContext;
  1563. function requireFunctionBindContext () {
  1564. if (hasRequiredFunctionBindContext) return functionBindContext;
  1565. hasRequiredFunctionBindContext = 1;
  1566. var uncurryThis = requireFunctionUncurryThisClause();
  1567. var aCallable = requireACallable();
  1568. var NATIVE_BIND = requireFunctionBindNative();
  1569. var bind = uncurryThis(uncurryThis.bind);
  1570. // optional / simple context binding
  1571. functionBindContext = function (fn, that) {
  1572. aCallable(fn);
  1573. return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
  1574. return fn.apply(that, arguments);
  1575. };
  1576. };
  1577. return functionBindContext;
  1578. }
  1579. var arrayIteration;
  1580. var hasRequiredArrayIteration;
  1581. function requireArrayIteration () {
  1582. if (hasRequiredArrayIteration) return arrayIteration;
  1583. hasRequiredArrayIteration = 1;
  1584. var bind = requireFunctionBindContext();
  1585. var uncurryThis = requireFunctionUncurryThis();
  1586. var IndexedObject = requireIndexedObject();
  1587. var toObject = requireToObject();
  1588. var lengthOfArrayLike = requireLengthOfArrayLike();
  1589. var arraySpeciesCreate = requireArraySpeciesCreate();
  1590. var push = uncurryThis([].push);
  1591. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1592. var createMethod = function (TYPE) {
  1593. var IS_MAP = TYPE === 1;
  1594. var IS_FILTER = TYPE === 2;
  1595. var IS_SOME = TYPE === 3;
  1596. var IS_EVERY = TYPE === 4;
  1597. var IS_FIND_INDEX = TYPE === 6;
  1598. var IS_FILTER_REJECT = TYPE === 7;
  1599. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  1600. return function ($this, callbackfn, that, specificCreate) {
  1601. var O = toObject($this);
  1602. var self = IndexedObject(O);
  1603. var length = lengthOfArrayLike(self);
  1604. var boundFunction = bind(callbackfn, that);
  1605. var index = 0;
  1606. var create = specificCreate || arraySpeciesCreate;
  1607. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1608. var value, result;
  1609. for (;length > index; index++) if (NO_HOLES || index in self) {
  1610. value = self[index];
  1611. result = boundFunction(value, index, O);
  1612. if (TYPE) {
  1613. if (IS_MAP) target[index] = result; // map
  1614. else if (result) switch (TYPE) {
  1615. case 3: return true; // some
  1616. case 5: return value; // find
  1617. case 6: return index; // findIndex
  1618. case 2: push(target, value); // filter
  1619. } else switch (TYPE) {
  1620. case 4: return false; // every
  1621. case 7: push(target, value); // filterReject
  1622. }
  1623. }
  1624. }
  1625. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1626. };
  1627. };
  1628. arrayIteration = {
  1629. // `Array.prototype.forEach` method
  1630. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1631. forEach: createMethod(0),
  1632. // `Array.prototype.map` method
  1633. // https://tc39.es/ecma262/#sec-array.prototype.map
  1634. map: createMethod(1),
  1635. // `Array.prototype.filter` method
  1636. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1637. filter: createMethod(2),
  1638. // `Array.prototype.some` method
  1639. // https://tc39.es/ecma262/#sec-array.prototype.some
  1640. some: createMethod(3),
  1641. // `Array.prototype.every` method
  1642. // https://tc39.es/ecma262/#sec-array.prototype.every
  1643. every: createMethod(4),
  1644. // `Array.prototype.find` method
  1645. // https://tc39.es/ecma262/#sec-array.prototype.find
  1646. find: createMethod(5),
  1647. // `Array.prototype.findIndex` method
  1648. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1649. findIndex: createMethod(6),
  1650. // `Array.prototype.filterReject` method
  1651. // https://github.com/tc39/proposal-array-filtering
  1652. filterReject: createMethod(7)
  1653. };
  1654. return arrayIteration;
  1655. }
  1656. var hasRequiredEs_array_filter;
  1657. function requireEs_array_filter () {
  1658. if (hasRequiredEs_array_filter) return es_array_filter;
  1659. hasRequiredEs_array_filter = 1;
  1660. var $ = require_export();
  1661. var $filter = requireArrayIteration().filter;
  1662. var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
  1663. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  1664. // `Array.prototype.filter` method
  1665. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1666. // with adding support of @@species
  1667. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1668. filter: function filter(callbackfn /* , thisArg */) {
  1669. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1670. }
  1671. });
  1672. return es_array_filter;
  1673. }
  1674. requireEs_array_filter();
  1675. var es_array_find = {};
  1676. var objectDefineProperties = {};
  1677. var objectKeys;
  1678. var hasRequiredObjectKeys;
  1679. function requireObjectKeys () {
  1680. if (hasRequiredObjectKeys) return objectKeys;
  1681. hasRequiredObjectKeys = 1;
  1682. var internalObjectKeys = requireObjectKeysInternal();
  1683. var enumBugKeys = requireEnumBugKeys();
  1684. // `Object.keys` method
  1685. // https://tc39.es/ecma262/#sec-object.keys
  1686. // eslint-disable-next-line es/no-object-keys -- safe
  1687. objectKeys = Object.keys || function keys(O) {
  1688. return internalObjectKeys(O, enumBugKeys);
  1689. };
  1690. return objectKeys;
  1691. }
  1692. var hasRequiredObjectDefineProperties;
  1693. function requireObjectDefineProperties () {
  1694. if (hasRequiredObjectDefineProperties) return objectDefineProperties;
  1695. hasRequiredObjectDefineProperties = 1;
  1696. var DESCRIPTORS = requireDescriptors();
  1697. var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
  1698. var definePropertyModule = requireObjectDefineProperty();
  1699. var anObject = requireAnObject();
  1700. var toIndexedObject = requireToIndexedObject();
  1701. var objectKeys = requireObjectKeys();
  1702. // `Object.defineProperties` method
  1703. // https://tc39.es/ecma262/#sec-object.defineproperties
  1704. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1705. objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1706. anObject(O);
  1707. var props = toIndexedObject(Properties);
  1708. var keys = objectKeys(Properties);
  1709. var length = keys.length;
  1710. var index = 0;
  1711. var key;
  1712. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1713. return O;
  1714. };
  1715. return objectDefineProperties;
  1716. }
  1717. var html;
  1718. var hasRequiredHtml;
  1719. function requireHtml () {
  1720. if (hasRequiredHtml) return html;
  1721. hasRequiredHtml = 1;
  1722. var getBuiltIn = requireGetBuiltIn();
  1723. html = getBuiltIn('document', 'documentElement');
  1724. return html;
  1725. }
  1726. var objectCreate;
  1727. var hasRequiredObjectCreate;
  1728. function requireObjectCreate () {
  1729. if (hasRequiredObjectCreate) return objectCreate;
  1730. hasRequiredObjectCreate = 1;
  1731. /* global ActiveXObject -- old IE, WSH */
  1732. var anObject = requireAnObject();
  1733. var definePropertiesModule = requireObjectDefineProperties();
  1734. var enumBugKeys = requireEnumBugKeys();
  1735. var hiddenKeys = requireHiddenKeys();
  1736. var html = requireHtml();
  1737. var documentCreateElement = requireDocumentCreateElement();
  1738. var sharedKey = requireSharedKey();
  1739. var GT = '>';
  1740. var LT = '<';
  1741. var PROTOTYPE = 'prototype';
  1742. var SCRIPT = 'script';
  1743. var IE_PROTO = sharedKey('IE_PROTO');
  1744. var EmptyConstructor = function () { /* empty */ };
  1745. var scriptTag = function (content) {
  1746. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1747. };
  1748. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1749. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1750. activeXDocument.write(scriptTag(''));
  1751. activeXDocument.close();
  1752. var temp = activeXDocument.parentWindow.Object;
  1753. // eslint-disable-next-line no-useless-assignment -- avoid memory leak
  1754. activeXDocument = null;
  1755. return temp;
  1756. };
  1757. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1758. var NullProtoObjectViaIFrame = function () {
  1759. // Thrash, waste and sodomy: IE GC bug
  1760. var iframe = documentCreateElement('iframe');
  1761. var JS = 'java' + SCRIPT + ':';
  1762. var iframeDocument;
  1763. iframe.style.display = 'none';
  1764. html.appendChild(iframe);
  1765. // https://github.com/zloirock/core-js/issues/475
  1766. iframe.src = String(JS);
  1767. iframeDocument = iframe.contentWindow.document;
  1768. iframeDocument.open();
  1769. iframeDocument.write(scriptTag('document.F=Object'));
  1770. iframeDocument.close();
  1771. return iframeDocument.F;
  1772. };
  1773. // Check for document.domain and active x support
  1774. // No need to use active x approach when document.domain is not set
  1775. // see https://github.com/es-shims/es5-shim/issues/150
  1776. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1777. // avoid IE GC bug
  1778. var activeXDocument;
  1779. var NullProtoObject = function () {
  1780. try {
  1781. activeXDocument = new ActiveXObject('htmlfile');
  1782. } catch (error) { /* ignore */ }
  1783. NullProtoObject = typeof document != 'undefined'
  1784. ? document.domain && activeXDocument
  1785. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1786. : NullProtoObjectViaIFrame()
  1787. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1788. var length = enumBugKeys.length;
  1789. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1790. return NullProtoObject();
  1791. };
  1792. hiddenKeys[IE_PROTO] = true;
  1793. // `Object.create` method
  1794. // https://tc39.es/ecma262/#sec-object.create
  1795. // eslint-disable-next-line es/no-object-create -- safe
  1796. objectCreate = Object.create || function create(O, Properties) {
  1797. var result;
  1798. if (O !== null) {
  1799. EmptyConstructor[PROTOTYPE] = anObject(O);
  1800. result = new EmptyConstructor();
  1801. EmptyConstructor[PROTOTYPE] = null;
  1802. // add "__proto__" for Object.getPrototypeOf polyfill
  1803. result[IE_PROTO] = O;
  1804. } else result = NullProtoObject();
  1805. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1806. };
  1807. return objectCreate;
  1808. }
  1809. var addToUnscopables;
  1810. var hasRequiredAddToUnscopables;
  1811. function requireAddToUnscopables () {
  1812. if (hasRequiredAddToUnscopables) return addToUnscopables;
  1813. hasRequiredAddToUnscopables = 1;
  1814. var wellKnownSymbol = requireWellKnownSymbol();
  1815. var create = requireObjectCreate();
  1816. var defineProperty = requireObjectDefineProperty().f;
  1817. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1818. var ArrayPrototype = Array.prototype;
  1819. // Array.prototype[@@unscopables]
  1820. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1821. if (ArrayPrototype[UNSCOPABLES] === undefined) {
  1822. defineProperty(ArrayPrototype, UNSCOPABLES, {
  1823. configurable: true,
  1824. value: create(null)
  1825. });
  1826. }
  1827. // add a key to Array.prototype[@@unscopables]
  1828. addToUnscopables = function (key) {
  1829. ArrayPrototype[UNSCOPABLES][key] = true;
  1830. };
  1831. return addToUnscopables;
  1832. }
  1833. var hasRequiredEs_array_find;
  1834. function requireEs_array_find () {
  1835. if (hasRequiredEs_array_find) return es_array_find;
  1836. hasRequiredEs_array_find = 1;
  1837. var $ = require_export();
  1838. var $find = requireArrayIteration().find;
  1839. var addToUnscopables = requireAddToUnscopables();
  1840. var FIND = 'find';
  1841. var SKIPS_HOLES = true;
  1842. // Shouldn't skip holes
  1843. // eslint-disable-next-line es/no-array-prototype-find -- testing
  1844. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1845. // `Array.prototype.find` method
  1846. // https://tc39.es/ecma262/#sec-array.prototype.find
  1847. $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1848. find: function find(callbackfn /* , that = undefined */) {
  1849. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1850. }
  1851. });
  1852. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1853. addToUnscopables(FIND);
  1854. return es_array_find;
  1855. }
  1856. requireEs_array_find();
  1857. var es_array_includes = {};
  1858. var hasRequiredEs_array_includes;
  1859. function requireEs_array_includes () {
  1860. if (hasRequiredEs_array_includes) return es_array_includes;
  1861. hasRequiredEs_array_includes = 1;
  1862. var $ = require_export();
  1863. var $includes = requireArrayIncludes().includes;
  1864. var fails = requireFails();
  1865. var addToUnscopables = requireAddToUnscopables();
  1866. // FF99+ bug
  1867. var BROKEN_ON_SPARSE = fails(function () {
  1868. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  1869. return !Array(1).includes();
  1870. });
  1871. // `Array.prototype.includes` method
  1872. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1873. $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1874. includes: function includes(el /* , fromIndex = 0 */) {
  1875. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1876. }
  1877. });
  1878. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1879. addToUnscopables('includes');
  1880. return es_array_includes;
  1881. }
  1882. requireEs_array_includes();
  1883. var es_array_indexOf = {};
  1884. var arrayMethodIsStrict;
  1885. var hasRequiredArrayMethodIsStrict;
  1886. function requireArrayMethodIsStrict () {
  1887. if (hasRequiredArrayMethodIsStrict) return arrayMethodIsStrict;
  1888. hasRequiredArrayMethodIsStrict = 1;
  1889. var fails = requireFails();
  1890. arrayMethodIsStrict = function (METHOD_NAME, argument) {
  1891. var method = [][METHOD_NAME];
  1892. return !!method && fails(function () {
  1893. // eslint-disable-next-line no-useless-call -- required for testing
  1894. method.call(null, argument || function () { return 1; }, 1);
  1895. });
  1896. };
  1897. return arrayMethodIsStrict;
  1898. }
  1899. var hasRequiredEs_array_indexOf;
  1900. function requireEs_array_indexOf () {
  1901. if (hasRequiredEs_array_indexOf) return es_array_indexOf;
  1902. hasRequiredEs_array_indexOf = 1;
  1903. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1904. var $ = require_export();
  1905. var uncurryThis = requireFunctionUncurryThisClause();
  1906. var $indexOf = requireArrayIncludes().indexOf;
  1907. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  1908. var nativeIndexOf = uncurryThis([].indexOf);
  1909. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  1910. var FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');
  1911. // `Array.prototype.indexOf` method
  1912. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1913. $({ target: 'Array', proto: true, forced: FORCED }, {
  1914. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1915. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1916. return NEGATIVE_ZERO
  1917. // convert -0 to +0
  1918. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  1919. : $indexOf(this, searchElement, fromIndex);
  1920. }
  1921. });
  1922. return es_array_indexOf;
  1923. }
  1924. requireEs_array_indexOf();
  1925. var es_array_join = {};
  1926. var hasRequiredEs_array_join;
  1927. function requireEs_array_join () {
  1928. if (hasRequiredEs_array_join) return es_array_join;
  1929. hasRequiredEs_array_join = 1;
  1930. var $ = require_export();
  1931. var uncurryThis = requireFunctionUncurryThis();
  1932. var IndexedObject = requireIndexedObject();
  1933. var toIndexedObject = requireToIndexedObject();
  1934. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  1935. var nativeJoin = uncurryThis([].join);
  1936. var ES3_STRINGS = IndexedObject !== Object;
  1937. var FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');
  1938. // `Array.prototype.join` method
  1939. // https://tc39.es/ecma262/#sec-array.prototype.join
  1940. $({ target: 'Array', proto: true, forced: FORCED }, {
  1941. join: function join(separator) {
  1942. return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  1943. }
  1944. });
  1945. return es_array_join;
  1946. }
  1947. requireEs_array_join();
  1948. var es_array_sort = {};
  1949. var deletePropertyOrThrow;
  1950. var hasRequiredDeletePropertyOrThrow;
  1951. function requireDeletePropertyOrThrow () {
  1952. if (hasRequiredDeletePropertyOrThrow) return deletePropertyOrThrow;
  1953. hasRequiredDeletePropertyOrThrow = 1;
  1954. var tryToString = requireTryToString();
  1955. var $TypeError = TypeError;
  1956. deletePropertyOrThrow = function (O, P) {
  1957. if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  1958. };
  1959. return deletePropertyOrThrow;
  1960. }
  1961. var toString;
  1962. var hasRequiredToString;
  1963. function requireToString () {
  1964. if (hasRequiredToString) return toString;
  1965. hasRequiredToString = 1;
  1966. var classof = requireClassof();
  1967. var $String = String;
  1968. toString = function (argument) {
  1969. if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  1970. return $String(argument);
  1971. };
  1972. return toString;
  1973. }
  1974. var arraySlice;
  1975. var hasRequiredArraySlice;
  1976. function requireArraySlice () {
  1977. if (hasRequiredArraySlice) return arraySlice;
  1978. hasRequiredArraySlice = 1;
  1979. var uncurryThis = requireFunctionUncurryThis();
  1980. arraySlice = uncurryThis([].slice);
  1981. return arraySlice;
  1982. }
  1983. var arraySort;
  1984. var hasRequiredArraySort;
  1985. function requireArraySort () {
  1986. if (hasRequiredArraySort) return arraySort;
  1987. hasRequiredArraySort = 1;
  1988. var arraySlice = requireArraySlice();
  1989. var floor = Math.floor;
  1990. var sort = function (array, comparefn) {
  1991. var length = array.length;
  1992. if (length < 8) {
  1993. // insertion sort
  1994. var i = 1;
  1995. var element, j;
  1996. while (i < length) {
  1997. j = i;
  1998. element = array[i];
  1999. while (j && comparefn(array[j - 1], element) > 0) {
  2000. array[j] = array[--j];
  2001. }
  2002. if (j !== i++) array[j] = element;
  2003. }
  2004. } else {
  2005. // merge sort
  2006. var middle = floor(length / 2);
  2007. var left = sort(arraySlice(array, 0, middle), comparefn);
  2008. var right = sort(arraySlice(array, middle), comparefn);
  2009. var llength = left.length;
  2010. var rlength = right.length;
  2011. var lindex = 0;
  2012. var rindex = 0;
  2013. while (lindex < llength || rindex < rlength) {
  2014. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  2015. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  2016. : lindex < llength ? left[lindex++] : right[rindex++];
  2017. }
  2018. }
  2019. return array;
  2020. };
  2021. arraySort = sort;
  2022. return arraySort;
  2023. }
  2024. var environmentFfVersion;
  2025. var hasRequiredEnvironmentFfVersion;
  2026. function requireEnvironmentFfVersion () {
  2027. if (hasRequiredEnvironmentFfVersion) return environmentFfVersion;
  2028. hasRequiredEnvironmentFfVersion = 1;
  2029. var userAgent = requireEnvironmentUserAgent();
  2030. var firefox = userAgent.match(/firefox\/(\d+)/i);
  2031. environmentFfVersion = !!firefox && +firefox[1];
  2032. return environmentFfVersion;
  2033. }
  2034. var environmentIsIeOrEdge;
  2035. var hasRequiredEnvironmentIsIeOrEdge;
  2036. function requireEnvironmentIsIeOrEdge () {
  2037. if (hasRequiredEnvironmentIsIeOrEdge) return environmentIsIeOrEdge;
  2038. hasRequiredEnvironmentIsIeOrEdge = 1;
  2039. var UA = requireEnvironmentUserAgent();
  2040. environmentIsIeOrEdge = /MSIE|Trident/.test(UA);
  2041. return environmentIsIeOrEdge;
  2042. }
  2043. var environmentWebkitVersion;
  2044. var hasRequiredEnvironmentWebkitVersion;
  2045. function requireEnvironmentWebkitVersion () {
  2046. if (hasRequiredEnvironmentWebkitVersion) return environmentWebkitVersion;
  2047. hasRequiredEnvironmentWebkitVersion = 1;
  2048. var userAgent = requireEnvironmentUserAgent();
  2049. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  2050. environmentWebkitVersion = !!webkit && +webkit[1];
  2051. return environmentWebkitVersion;
  2052. }
  2053. var hasRequiredEs_array_sort;
  2054. function requireEs_array_sort () {
  2055. if (hasRequiredEs_array_sort) return es_array_sort;
  2056. hasRequiredEs_array_sort = 1;
  2057. var $ = require_export();
  2058. var uncurryThis = requireFunctionUncurryThis();
  2059. var aCallable = requireACallable();
  2060. var toObject = requireToObject();
  2061. var lengthOfArrayLike = requireLengthOfArrayLike();
  2062. var deletePropertyOrThrow = requireDeletePropertyOrThrow();
  2063. var toString = requireToString();
  2064. var fails = requireFails();
  2065. var internalSort = requireArraySort();
  2066. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  2067. var FF = requireEnvironmentFfVersion();
  2068. var IE_OR_EDGE = requireEnvironmentIsIeOrEdge();
  2069. var V8 = requireEnvironmentV8Version();
  2070. var WEBKIT = requireEnvironmentWebkitVersion();
  2071. var test = [];
  2072. var nativeSort = uncurryThis(test.sort);
  2073. var push = uncurryThis(test.push);
  2074. // IE8-
  2075. var FAILS_ON_UNDEFINED = fails(function () {
  2076. test.sort(undefined);
  2077. });
  2078. // V8 bug
  2079. var FAILS_ON_NULL = fails(function () {
  2080. test.sort(null);
  2081. });
  2082. // Old WebKit
  2083. var STRICT_METHOD = arrayMethodIsStrict('sort');
  2084. var STABLE_SORT = !fails(function () {
  2085. // feature detection can be too slow, so check engines versions
  2086. if (V8) return V8 < 70;
  2087. if (FF && FF > 3) return;
  2088. if (IE_OR_EDGE) return true;
  2089. if (WEBKIT) return WEBKIT < 603;
  2090. var result = '';
  2091. var code, chr, value, index;
  2092. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  2093. for (code = 65; code < 76; code++) {
  2094. chr = String.fromCharCode(code);
  2095. switch (code) {
  2096. case 66: case 69: case 70: case 72: value = 3; break;
  2097. case 68: case 71: value = 4; break;
  2098. default: value = 2;
  2099. }
  2100. for (index = 0; index < 47; index++) {
  2101. test.push({ k: chr + index, v: value });
  2102. }
  2103. }
  2104. test.sort(function (a, b) { return b.v - a.v; });
  2105. for (index = 0; index < test.length; index++) {
  2106. chr = test[index].k.charAt(0);
  2107. if (result.charAt(result.length - 1) !== chr) result += chr;
  2108. }
  2109. return result !== 'DGBEFHACIJK';
  2110. });
  2111. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  2112. var getSortCompare = function (comparefn) {
  2113. return function (x, y) {
  2114. if (y === undefined) return -1;
  2115. if (x === undefined) return 1;
  2116. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  2117. return toString(x) > toString(y) ? 1 : -1;
  2118. };
  2119. };
  2120. // `Array.prototype.sort` method
  2121. // https://tc39.es/ecma262/#sec-array.prototype.sort
  2122. $({ target: 'Array', proto: true, forced: FORCED }, {
  2123. sort: function sort(comparefn) {
  2124. if (comparefn !== undefined) aCallable(comparefn);
  2125. var array = toObject(this);
  2126. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  2127. var items = [];
  2128. var arrayLength = lengthOfArrayLike(array);
  2129. var itemsLength, index;
  2130. for (index = 0; index < arrayLength; index++) {
  2131. if (index in array) push(items, array[index]);
  2132. }
  2133. internalSort(items, getSortCompare(comparefn));
  2134. itemsLength = lengthOfArrayLike(items);
  2135. index = 0;
  2136. while (index < itemsLength) array[index] = items[index++];
  2137. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  2138. return array;
  2139. }
  2140. });
  2141. return es_array_sort;
  2142. }
  2143. requireEs_array_sort();
  2144. var es_object_keys = {};
  2145. var hasRequiredEs_object_keys;
  2146. function requireEs_object_keys () {
  2147. if (hasRequiredEs_object_keys) return es_object_keys;
  2148. hasRequiredEs_object_keys = 1;
  2149. var $ = require_export();
  2150. var toObject = requireToObject();
  2151. var nativeKeys = requireObjectKeys();
  2152. var fails = requireFails();
  2153. var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
  2154. // `Object.keys` method
  2155. // https://tc39.es/ecma262/#sec-object.keys
  2156. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  2157. keys: function keys(it) {
  2158. return nativeKeys(toObject(it));
  2159. }
  2160. });
  2161. return es_object_keys;
  2162. }
  2163. requireEs_object_keys();
  2164. var es_object_toString = {};
  2165. var objectToString;
  2166. var hasRequiredObjectToString;
  2167. function requireObjectToString () {
  2168. if (hasRequiredObjectToString) return objectToString;
  2169. hasRequiredObjectToString = 1;
  2170. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  2171. var classof = requireClassof();
  2172. // `Object.prototype.toString` method implementation
  2173. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  2174. objectToString = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  2175. return '[object ' + classof(this) + ']';
  2176. };
  2177. return objectToString;
  2178. }
  2179. var hasRequiredEs_object_toString;
  2180. function requireEs_object_toString () {
  2181. if (hasRequiredEs_object_toString) return es_object_toString;
  2182. hasRequiredEs_object_toString = 1;
  2183. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  2184. var defineBuiltIn = requireDefineBuiltIn();
  2185. var toString = requireObjectToString();
  2186. // `Object.prototype.toString` method
  2187. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  2188. if (!TO_STRING_TAG_SUPPORT) {
  2189. defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
  2190. }
  2191. return es_object_toString;
  2192. }
  2193. requireEs_object_toString();
  2194. var es_regexp_exec = {};
  2195. var regexpFlags;
  2196. var hasRequiredRegexpFlags;
  2197. function requireRegexpFlags () {
  2198. if (hasRequiredRegexpFlags) return regexpFlags;
  2199. hasRequiredRegexpFlags = 1;
  2200. var anObject = requireAnObject();
  2201. // `RegExp.prototype.flags` getter implementation
  2202. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  2203. regexpFlags = function () {
  2204. var that = anObject(this);
  2205. var result = '';
  2206. if (that.hasIndices) result += 'd';
  2207. if (that.global) result += 'g';
  2208. if (that.ignoreCase) result += 'i';
  2209. if (that.multiline) result += 'm';
  2210. if (that.dotAll) result += 's';
  2211. if (that.unicode) result += 'u';
  2212. if (that.unicodeSets) result += 'v';
  2213. if (that.sticky) result += 'y';
  2214. return result;
  2215. };
  2216. return regexpFlags;
  2217. }
  2218. var regexpStickyHelpers;
  2219. var hasRequiredRegexpStickyHelpers;
  2220. function requireRegexpStickyHelpers () {
  2221. if (hasRequiredRegexpStickyHelpers) return regexpStickyHelpers;
  2222. hasRequiredRegexpStickyHelpers = 1;
  2223. var fails = requireFails();
  2224. var globalThis = requireGlobalThis();
  2225. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  2226. var $RegExp = globalThis.RegExp;
  2227. var UNSUPPORTED_Y = fails(function () {
  2228. var re = $RegExp('a', 'y');
  2229. re.lastIndex = 2;
  2230. return re.exec('abcd') !== null;
  2231. });
  2232. // UC Browser bug
  2233. // https://github.com/zloirock/core-js/issues/1008
  2234. var MISSED_STICKY = UNSUPPORTED_Y || fails(function () {
  2235. return !$RegExp('a', 'y').sticky;
  2236. });
  2237. var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
  2238. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  2239. var re = $RegExp('^r', 'gy');
  2240. re.lastIndex = 2;
  2241. return re.exec('str') !== null;
  2242. });
  2243. regexpStickyHelpers = {
  2244. BROKEN_CARET: BROKEN_CARET,
  2245. MISSED_STICKY: MISSED_STICKY,
  2246. UNSUPPORTED_Y: UNSUPPORTED_Y
  2247. };
  2248. return regexpStickyHelpers;
  2249. }
  2250. var regexpUnsupportedDotAll;
  2251. var hasRequiredRegexpUnsupportedDotAll;
  2252. function requireRegexpUnsupportedDotAll () {
  2253. if (hasRequiredRegexpUnsupportedDotAll) return regexpUnsupportedDotAll;
  2254. hasRequiredRegexpUnsupportedDotAll = 1;
  2255. var fails = requireFails();
  2256. var globalThis = requireGlobalThis();
  2257. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  2258. var $RegExp = globalThis.RegExp;
  2259. regexpUnsupportedDotAll = fails(function () {
  2260. var re = $RegExp('.', 's');
  2261. return !(re.dotAll && re.test('\n') && re.flags === 's');
  2262. });
  2263. return regexpUnsupportedDotAll;
  2264. }
  2265. var regexpUnsupportedNcg;
  2266. var hasRequiredRegexpUnsupportedNcg;
  2267. function requireRegexpUnsupportedNcg () {
  2268. if (hasRequiredRegexpUnsupportedNcg) return regexpUnsupportedNcg;
  2269. hasRequiredRegexpUnsupportedNcg = 1;
  2270. var fails = requireFails();
  2271. var globalThis = requireGlobalThis();
  2272. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  2273. var $RegExp = globalThis.RegExp;
  2274. regexpUnsupportedNcg = fails(function () {
  2275. var re = $RegExp('(?<a>b)', 'g');
  2276. return re.exec('b').groups.a !== 'b' ||
  2277. 'b'.replace(re, '$<a>c') !== 'bc';
  2278. });
  2279. return regexpUnsupportedNcg;
  2280. }
  2281. var regexpExec;
  2282. var hasRequiredRegexpExec;
  2283. function requireRegexpExec () {
  2284. if (hasRequiredRegexpExec) return regexpExec;
  2285. hasRequiredRegexpExec = 1;
  2286. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  2287. /* eslint-disable regexp/no-useless-quantifier -- testing */
  2288. var call = requireFunctionCall();
  2289. var uncurryThis = requireFunctionUncurryThis();
  2290. var toString = requireToString();
  2291. var regexpFlags = requireRegexpFlags();
  2292. var stickyHelpers = requireRegexpStickyHelpers();
  2293. var shared = requireShared();
  2294. var create = requireObjectCreate();
  2295. var getInternalState = requireInternalState().get;
  2296. var UNSUPPORTED_DOT_ALL = requireRegexpUnsupportedDotAll();
  2297. var UNSUPPORTED_NCG = requireRegexpUnsupportedNcg();
  2298. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  2299. var nativeExec = RegExp.prototype.exec;
  2300. var patchedExec = nativeExec;
  2301. var charAt = uncurryThis(''.charAt);
  2302. var indexOf = uncurryThis(''.indexOf);
  2303. var replace = uncurryThis(''.replace);
  2304. var stringSlice = uncurryThis(''.slice);
  2305. var UPDATES_LAST_INDEX_WRONG = (function () {
  2306. var re1 = /a/;
  2307. var re2 = /b*/g;
  2308. call(nativeExec, re1, 'a');
  2309. call(nativeExec, re2, 'a');
  2310. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  2311. })();
  2312. var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
  2313. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  2314. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  2315. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  2316. if (PATCH) {
  2317. patchedExec = function exec(string) {
  2318. var re = this;
  2319. var state = getInternalState(re);
  2320. var str = toString(string);
  2321. var raw = state.raw;
  2322. var result, reCopy, lastIndex, match, i, object, group;
  2323. if (raw) {
  2324. raw.lastIndex = re.lastIndex;
  2325. result = call(patchedExec, raw, str);
  2326. re.lastIndex = raw.lastIndex;
  2327. return result;
  2328. }
  2329. var groups = state.groups;
  2330. var sticky = UNSUPPORTED_Y && re.sticky;
  2331. var flags = call(regexpFlags, re);
  2332. var source = re.source;
  2333. var charsAdded = 0;
  2334. var strCopy = str;
  2335. if (sticky) {
  2336. flags = replace(flags, 'y', '');
  2337. if (indexOf(flags, 'g') === -1) {
  2338. flags += 'g';
  2339. }
  2340. strCopy = stringSlice(str, re.lastIndex);
  2341. // Support anchored sticky behavior.
  2342. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
  2343. source = '(?: ' + source + ')';
  2344. strCopy = ' ' + strCopy;
  2345. charsAdded++;
  2346. }
  2347. // ^(? + rx + ) is needed, in combination with some str slicing, to
  2348. // simulate the 'y' flag.
  2349. reCopy = new RegExp('^(?:' + source + ')', flags);
  2350. }
  2351. if (NPCG_INCLUDED) {
  2352. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  2353. }
  2354. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  2355. match = call(nativeExec, sticky ? reCopy : re, strCopy);
  2356. if (sticky) {
  2357. if (match) {
  2358. match.input = stringSlice(match.input, charsAdded);
  2359. match[0] = stringSlice(match[0], charsAdded);
  2360. match.index = re.lastIndex;
  2361. re.lastIndex += match[0].length;
  2362. } else re.lastIndex = 0;
  2363. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  2364. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  2365. }
  2366. if (NPCG_INCLUDED && match && match.length > 1) {
  2367. // Fix browsers whose `exec` methods don't consistently return `undefined`
  2368. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  2369. call(nativeReplace, match[0], reCopy, function () {
  2370. for (i = 1; i < arguments.length - 2; i++) {
  2371. if (arguments[i] === undefined) match[i] = undefined;
  2372. }
  2373. });
  2374. }
  2375. if (match && groups) {
  2376. match.groups = object = create(null);
  2377. for (i = 0; i < groups.length; i++) {
  2378. group = groups[i];
  2379. object[group[0]] = match[group[1]];
  2380. }
  2381. }
  2382. return match;
  2383. };
  2384. }
  2385. regexpExec = patchedExec;
  2386. return regexpExec;
  2387. }
  2388. var hasRequiredEs_regexp_exec;
  2389. function requireEs_regexp_exec () {
  2390. if (hasRequiredEs_regexp_exec) return es_regexp_exec;
  2391. hasRequiredEs_regexp_exec = 1;
  2392. var $ = require_export();
  2393. var exec = requireRegexpExec();
  2394. // `RegExp.prototype.exec` method
  2395. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  2396. $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  2397. exec: exec
  2398. });
  2399. return es_regexp_exec;
  2400. }
  2401. requireEs_regexp_exec();
  2402. var es_regexp_toString = {};
  2403. var regexpGetFlags;
  2404. var hasRequiredRegexpGetFlags;
  2405. function requireRegexpGetFlags () {
  2406. if (hasRequiredRegexpGetFlags) return regexpGetFlags;
  2407. hasRequiredRegexpGetFlags = 1;
  2408. var call = requireFunctionCall();
  2409. var hasOwn = requireHasOwnProperty();
  2410. var isPrototypeOf = requireObjectIsPrototypeOf();
  2411. var regExpFlags = requireRegexpFlags();
  2412. var RegExpPrototype = RegExp.prototype;
  2413. regexpGetFlags = function (R) {
  2414. var flags = R.flags;
  2415. return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)
  2416. ? call(regExpFlags, R) : flags;
  2417. };
  2418. return regexpGetFlags;
  2419. }
  2420. var hasRequiredEs_regexp_toString;
  2421. function requireEs_regexp_toString () {
  2422. if (hasRequiredEs_regexp_toString) return es_regexp_toString;
  2423. hasRequiredEs_regexp_toString = 1;
  2424. var PROPER_FUNCTION_NAME = requireFunctionName().PROPER;
  2425. var defineBuiltIn = requireDefineBuiltIn();
  2426. var anObject = requireAnObject();
  2427. var $toString = requireToString();
  2428. var fails = requireFails();
  2429. var getRegExpFlags = requireRegexpGetFlags();
  2430. var TO_STRING = 'toString';
  2431. var RegExpPrototype = RegExp.prototype;
  2432. var nativeToString = RegExpPrototype[TO_STRING];
  2433. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  2434. // FF44- RegExp#toString has a wrong name
  2435. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
  2436. // `RegExp.prototype.toString` method
  2437. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  2438. if (NOT_GENERIC || INCORRECT_NAME) {
  2439. defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
  2440. var R = anObject(this);
  2441. var pattern = $toString(R.source);
  2442. var flags = $toString(getRegExpFlags(R));
  2443. return '/' + pattern + '/' + flags;
  2444. }, { unsafe: true });
  2445. }
  2446. return es_regexp_toString;
  2447. }
  2448. requireEs_regexp_toString();
  2449. var es_string_match = {};
  2450. var fixRegexpWellKnownSymbolLogic;
  2451. var hasRequiredFixRegexpWellKnownSymbolLogic;
  2452. function requireFixRegexpWellKnownSymbolLogic () {
  2453. if (hasRequiredFixRegexpWellKnownSymbolLogic) return fixRegexpWellKnownSymbolLogic;
  2454. hasRequiredFixRegexpWellKnownSymbolLogic = 1;
  2455. // TODO: Remove from `core-js@4` since it's moved to entry points
  2456. requireEs_regexp_exec();
  2457. var call = requireFunctionCall();
  2458. var defineBuiltIn = requireDefineBuiltIn();
  2459. var regexpExec = requireRegexpExec();
  2460. var fails = requireFails();
  2461. var wellKnownSymbol = requireWellKnownSymbol();
  2462. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  2463. var SPECIES = wellKnownSymbol('species');
  2464. var RegExpPrototype = RegExp.prototype;
  2465. fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  2466. var SYMBOL = wellKnownSymbol(KEY);
  2467. var DELEGATES_TO_SYMBOL = !fails(function () {
  2468. // String methods call symbol-named RegExp methods
  2469. var O = {};
  2470. O[SYMBOL] = function () { return 7; };
  2471. return ''[KEY](O) !== 7;
  2472. });
  2473. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  2474. // Symbol-named RegExp methods call .exec
  2475. var execCalled = false;
  2476. var re = /a/;
  2477. if (KEY === 'split') {
  2478. // We can't use real regex here since it causes deoptimization
  2479. // and serious performance degradation in V8
  2480. // https://github.com/zloirock/core-js/issues/306
  2481. re = {};
  2482. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  2483. // a new one. We need to return the patched regex when creating the new one.
  2484. re.constructor = {};
  2485. re.constructor[SPECIES] = function () { return re; };
  2486. re.flags = '';
  2487. re[SYMBOL] = /./[SYMBOL];
  2488. }
  2489. re.exec = function () {
  2490. execCalled = true;
  2491. return null;
  2492. };
  2493. re[SYMBOL]('');
  2494. return !execCalled;
  2495. });
  2496. if (
  2497. !DELEGATES_TO_SYMBOL ||
  2498. !DELEGATES_TO_EXEC ||
  2499. FORCED
  2500. ) {
  2501. var nativeRegExpMethod = /./[SYMBOL];
  2502. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  2503. var $exec = regexp.exec;
  2504. if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
  2505. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  2506. // The native String method already delegates to @@method (this
  2507. // polyfilled function), leasing to infinite recursion.
  2508. // We avoid it by directly calling the native @@method method.
  2509. return { done: true, value: call(nativeRegExpMethod, regexp, str, arg2) };
  2510. }
  2511. return { done: true, value: call(nativeMethod, str, regexp, arg2) };
  2512. }
  2513. return { done: false };
  2514. });
  2515. defineBuiltIn(String.prototype, KEY, methods[0]);
  2516. defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  2517. }
  2518. if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
  2519. };
  2520. return fixRegexpWellKnownSymbolLogic;
  2521. }
  2522. var stringMultibyte;
  2523. var hasRequiredStringMultibyte;
  2524. function requireStringMultibyte () {
  2525. if (hasRequiredStringMultibyte) return stringMultibyte;
  2526. hasRequiredStringMultibyte = 1;
  2527. var uncurryThis = requireFunctionUncurryThis();
  2528. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  2529. var toString = requireToString();
  2530. var requireObjectCoercible = requireRequireObjectCoercible();
  2531. var charAt = uncurryThis(''.charAt);
  2532. var charCodeAt = uncurryThis(''.charCodeAt);
  2533. var stringSlice = uncurryThis(''.slice);
  2534. var createMethod = function (CONVERT_TO_STRING) {
  2535. return function ($this, pos) {
  2536. var S = toString(requireObjectCoercible($this));
  2537. var position = toIntegerOrInfinity(pos);
  2538. var size = S.length;
  2539. var first, second;
  2540. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  2541. first = charCodeAt(S, position);
  2542. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  2543. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  2544. ? CONVERT_TO_STRING
  2545. ? charAt(S, position)
  2546. : first
  2547. : CONVERT_TO_STRING
  2548. ? stringSlice(S, position, position + 2)
  2549. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  2550. };
  2551. };
  2552. stringMultibyte = {
  2553. // `String.prototype.codePointAt` method
  2554. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  2555. codeAt: createMethod(false),
  2556. // `String.prototype.at` method
  2557. // https://github.com/mathiasbynens/String.prototype.at
  2558. charAt: createMethod(true)
  2559. };
  2560. return stringMultibyte;
  2561. }
  2562. var advanceStringIndex;
  2563. var hasRequiredAdvanceStringIndex;
  2564. function requireAdvanceStringIndex () {
  2565. if (hasRequiredAdvanceStringIndex) return advanceStringIndex;
  2566. hasRequiredAdvanceStringIndex = 1;
  2567. var charAt = requireStringMultibyte().charAt;
  2568. // `AdvanceStringIndex` abstract operation
  2569. // https://tc39.es/ecma262/#sec-advancestringindex
  2570. advanceStringIndex = function (S, index, unicode) {
  2571. return index + (unicode ? charAt(S, index).length : 1);
  2572. };
  2573. return advanceStringIndex;
  2574. }
  2575. var regexpExecAbstract;
  2576. var hasRequiredRegexpExecAbstract;
  2577. function requireRegexpExecAbstract () {
  2578. if (hasRequiredRegexpExecAbstract) return regexpExecAbstract;
  2579. hasRequiredRegexpExecAbstract = 1;
  2580. var call = requireFunctionCall();
  2581. var anObject = requireAnObject();
  2582. var isCallable = requireIsCallable();
  2583. var classof = requireClassofRaw();
  2584. var regexpExec = requireRegexpExec();
  2585. var $TypeError = TypeError;
  2586. // `RegExpExec` abstract operation
  2587. // https://tc39.es/ecma262/#sec-regexpexec
  2588. regexpExecAbstract = function (R, S) {
  2589. var exec = R.exec;
  2590. if (isCallable(exec)) {
  2591. var result = call(exec, R, S);
  2592. if (result !== null) anObject(result);
  2593. return result;
  2594. }
  2595. if (classof(R) === 'RegExp') return call(regexpExec, R, S);
  2596. throw new $TypeError('RegExp#exec called on incompatible receiver');
  2597. };
  2598. return regexpExecAbstract;
  2599. }
  2600. var hasRequiredEs_string_match;
  2601. function requireEs_string_match () {
  2602. if (hasRequiredEs_string_match) return es_string_match;
  2603. hasRequiredEs_string_match = 1;
  2604. var call = requireFunctionCall();
  2605. var fixRegExpWellKnownSymbolLogic = requireFixRegexpWellKnownSymbolLogic();
  2606. var anObject = requireAnObject();
  2607. var isNullOrUndefined = requireIsNullOrUndefined();
  2608. var toLength = requireToLength();
  2609. var toString = requireToString();
  2610. var requireObjectCoercible = requireRequireObjectCoercible();
  2611. var getMethod = requireGetMethod();
  2612. var advanceStringIndex = requireAdvanceStringIndex();
  2613. var regExpExec = requireRegexpExecAbstract();
  2614. // @@match logic
  2615. fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
  2616. return [
  2617. // `String.prototype.match` method
  2618. // https://tc39.es/ecma262/#sec-string.prototype.match
  2619. function match(regexp) {
  2620. var O = requireObjectCoercible(this);
  2621. var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
  2622. return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
  2623. },
  2624. // `RegExp.prototype[@@match]` method
  2625. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  2626. function (string) {
  2627. var rx = anObject(this);
  2628. var S = toString(string);
  2629. var res = maybeCallNative(nativeMatch, rx, S);
  2630. if (res.done) return res.value;
  2631. if (!rx.global) return regExpExec(rx, S);
  2632. var fullUnicode = rx.unicode;
  2633. rx.lastIndex = 0;
  2634. var A = [];
  2635. var n = 0;
  2636. var result;
  2637. while ((result = regExpExec(rx, S)) !== null) {
  2638. var matchStr = toString(result[0]);
  2639. A[n] = matchStr;
  2640. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  2641. n++;
  2642. }
  2643. return n === 0 ? null : A;
  2644. }
  2645. ];
  2646. });
  2647. return es_string_match;
  2648. }
  2649. requireEs_string_match();
  2650. var es_string_replace = {};
  2651. var functionApply;
  2652. var hasRequiredFunctionApply;
  2653. function requireFunctionApply () {
  2654. if (hasRequiredFunctionApply) return functionApply;
  2655. hasRequiredFunctionApply = 1;
  2656. var NATIVE_BIND = requireFunctionBindNative();
  2657. var FunctionPrototype = Function.prototype;
  2658. var apply = FunctionPrototype.apply;
  2659. var call = FunctionPrototype.call;
  2660. // eslint-disable-next-line es/no-reflect -- safe
  2661. functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  2662. return call.apply(apply, arguments);
  2663. });
  2664. return functionApply;
  2665. }
  2666. var getSubstitution;
  2667. var hasRequiredGetSubstitution;
  2668. function requireGetSubstitution () {
  2669. if (hasRequiredGetSubstitution) return getSubstitution;
  2670. hasRequiredGetSubstitution = 1;
  2671. var uncurryThis = requireFunctionUncurryThis();
  2672. var toObject = requireToObject();
  2673. var floor = Math.floor;
  2674. var charAt = uncurryThis(''.charAt);
  2675. var replace = uncurryThis(''.replace);
  2676. var stringSlice = uncurryThis(''.slice);
  2677. // eslint-disable-next-line redos/no-vulnerable -- safe
  2678. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  2679. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  2680. // `GetSubstitution` abstract operation
  2681. // https://tc39.es/ecma262/#sec-getsubstitution
  2682. getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
  2683. var tailPos = position + matched.length;
  2684. var m = captures.length;
  2685. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  2686. if (namedCaptures !== undefined) {
  2687. namedCaptures = toObject(namedCaptures);
  2688. symbols = SUBSTITUTION_SYMBOLS;
  2689. }
  2690. return replace(replacement, symbols, function (match, ch) {
  2691. var capture;
  2692. switch (charAt(ch, 0)) {
  2693. case '$': return '$';
  2694. case '&': return matched;
  2695. case '`': return stringSlice(str, 0, position);
  2696. case "'": return stringSlice(str, tailPos);
  2697. case '<':
  2698. capture = namedCaptures[stringSlice(ch, 1, -1)];
  2699. break;
  2700. default: // \d\d?
  2701. var n = +ch;
  2702. if (n === 0) return match;
  2703. if (n > m) {
  2704. var f = floor(n / 10);
  2705. if (f === 0) return match;
  2706. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  2707. return match;
  2708. }
  2709. capture = captures[n - 1];
  2710. }
  2711. return capture === undefined ? '' : capture;
  2712. });
  2713. };
  2714. return getSubstitution;
  2715. }
  2716. var hasRequiredEs_string_replace;
  2717. function requireEs_string_replace () {
  2718. if (hasRequiredEs_string_replace) return es_string_replace;
  2719. hasRequiredEs_string_replace = 1;
  2720. var apply = requireFunctionApply();
  2721. var call = requireFunctionCall();
  2722. var uncurryThis = requireFunctionUncurryThis();
  2723. var fixRegExpWellKnownSymbolLogic = requireFixRegexpWellKnownSymbolLogic();
  2724. var fails = requireFails();
  2725. var anObject = requireAnObject();
  2726. var isCallable = requireIsCallable();
  2727. var isNullOrUndefined = requireIsNullOrUndefined();
  2728. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  2729. var toLength = requireToLength();
  2730. var toString = requireToString();
  2731. var requireObjectCoercible = requireRequireObjectCoercible();
  2732. var advanceStringIndex = requireAdvanceStringIndex();
  2733. var getMethod = requireGetMethod();
  2734. var getSubstitution = requireGetSubstitution();
  2735. var regExpExec = requireRegexpExecAbstract();
  2736. var wellKnownSymbol = requireWellKnownSymbol();
  2737. var REPLACE = wellKnownSymbol('replace');
  2738. var max = Math.max;
  2739. var min = Math.min;
  2740. var concat = uncurryThis([].concat);
  2741. var push = uncurryThis([].push);
  2742. var stringIndexOf = uncurryThis(''.indexOf);
  2743. var stringSlice = uncurryThis(''.slice);
  2744. var maybeToString = function (it) {
  2745. return it === undefined ? it : String(it);
  2746. };
  2747. // IE <= 11 replaces $0 with the whole match, as if it was $&
  2748. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  2749. var REPLACE_KEEPS_$0 = (function () {
  2750. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  2751. return 'a'.replace(/./, '$0') === '$0';
  2752. })();
  2753. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  2754. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  2755. if (/./[REPLACE]) {
  2756. return /./[REPLACE]('a', '$0') === '';
  2757. }
  2758. return false;
  2759. })();
  2760. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  2761. var re = /./;
  2762. re.exec = function () {
  2763. var result = [];
  2764. result.groups = { a: '7' };
  2765. return result;
  2766. };
  2767. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  2768. return ''.replace(re, '$<a>') !== '7';
  2769. });
  2770. // @@replace logic
  2771. fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  2772. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  2773. return [
  2774. // `String.prototype.replace` method
  2775. // https://tc39.es/ecma262/#sec-string.prototype.replace
  2776. function replace(searchValue, replaceValue) {
  2777. var O = requireObjectCoercible(this);
  2778. var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
  2779. return replacer
  2780. ? call(replacer, searchValue, O, replaceValue)
  2781. : call(nativeReplace, toString(O), searchValue, replaceValue);
  2782. },
  2783. // `RegExp.prototype[@@replace]` method
  2784. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  2785. function (string, replaceValue) {
  2786. var rx = anObject(this);
  2787. var S = toString(string);
  2788. if (
  2789. typeof replaceValue == 'string' &&
  2790. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  2791. stringIndexOf(replaceValue, '$<') === -1
  2792. ) {
  2793. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  2794. if (res.done) return res.value;
  2795. }
  2796. var functionalReplace = isCallable(replaceValue);
  2797. if (!functionalReplace) replaceValue = toString(replaceValue);
  2798. var global = rx.global;
  2799. var fullUnicode;
  2800. if (global) {
  2801. fullUnicode = rx.unicode;
  2802. rx.lastIndex = 0;
  2803. }
  2804. var results = [];
  2805. var result;
  2806. while (true) {
  2807. result = regExpExec(rx, S);
  2808. if (result === null) break;
  2809. push(results, result);
  2810. if (!global) break;
  2811. var matchStr = toString(result[0]);
  2812. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  2813. }
  2814. var accumulatedResult = '';
  2815. var nextSourcePosition = 0;
  2816. for (var i = 0; i < results.length; i++) {
  2817. result = results[i];
  2818. var matched = toString(result[0]);
  2819. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  2820. var captures = [];
  2821. var replacement;
  2822. // NOTE: This is equivalent to
  2823. // captures = result.slice(1).map(maybeToString)
  2824. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  2825. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  2826. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  2827. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  2828. var namedCaptures = result.groups;
  2829. if (functionalReplace) {
  2830. var replacerArgs = concat([matched], captures, position, S);
  2831. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  2832. replacement = toString(apply(replaceValue, undefined, replacerArgs));
  2833. } else {
  2834. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  2835. }
  2836. if (position >= nextSourcePosition) {
  2837. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  2838. nextSourcePosition = position + matched.length;
  2839. }
  2840. }
  2841. return accumulatedResult + stringSlice(S, nextSourcePosition);
  2842. }
  2843. ];
  2844. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  2845. return es_string_replace;
  2846. }
  2847. requireEs_string_replace();
  2848. var es_string_startsWith = {};
  2849. var isRegexp;
  2850. var hasRequiredIsRegexp;
  2851. function requireIsRegexp () {
  2852. if (hasRequiredIsRegexp) return isRegexp;
  2853. hasRequiredIsRegexp = 1;
  2854. var isObject = requireIsObject();
  2855. var classof = requireClassofRaw();
  2856. var wellKnownSymbol = requireWellKnownSymbol();
  2857. var MATCH = wellKnownSymbol('match');
  2858. // `IsRegExp` abstract operation
  2859. // https://tc39.es/ecma262/#sec-isregexp
  2860. isRegexp = function (it) {
  2861. var isRegExp;
  2862. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
  2863. };
  2864. return isRegexp;
  2865. }
  2866. var notARegexp;
  2867. var hasRequiredNotARegexp;
  2868. function requireNotARegexp () {
  2869. if (hasRequiredNotARegexp) return notARegexp;
  2870. hasRequiredNotARegexp = 1;
  2871. var isRegExp = requireIsRegexp();
  2872. var $TypeError = TypeError;
  2873. notARegexp = function (it) {
  2874. if (isRegExp(it)) {
  2875. throw new $TypeError("The method doesn't accept regular expressions");
  2876. } return it;
  2877. };
  2878. return notARegexp;
  2879. }
  2880. var correctIsRegexpLogic;
  2881. var hasRequiredCorrectIsRegexpLogic;
  2882. function requireCorrectIsRegexpLogic () {
  2883. if (hasRequiredCorrectIsRegexpLogic) return correctIsRegexpLogic;
  2884. hasRequiredCorrectIsRegexpLogic = 1;
  2885. var wellKnownSymbol = requireWellKnownSymbol();
  2886. var MATCH = wellKnownSymbol('match');
  2887. correctIsRegexpLogic = function (METHOD_NAME) {
  2888. var regexp = /./;
  2889. try {
  2890. '/./'[METHOD_NAME](regexp);
  2891. } catch (error1) {
  2892. try {
  2893. regexp[MATCH] = false;
  2894. return '/./'[METHOD_NAME](regexp);
  2895. } catch (error2) { /* empty */ }
  2896. } return false;
  2897. };
  2898. return correctIsRegexpLogic;
  2899. }
  2900. var hasRequiredEs_string_startsWith;
  2901. function requireEs_string_startsWith () {
  2902. if (hasRequiredEs_string_startsWith) return es_string_startsWith;
  2903. hasRequiredEs_string_startsWith = 1;
  2904. var $ = require_export();
  2905. var uncurryThis = requireFunctionUncurryThisClause();
  2906. var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
  2907. var toLength = requireToLength();
  2908. var toString = requireToString();
  2909. var notARegExp = requireNotARegexp();
  2910. var requireObjectCoercible = requireRequireObjectCoercible();
  2911. var correctIsRegExpLogic = requireCorrectIsRegexpLogic();
  2912. var IS_PURE = requireIsPure();
  2913. var stringSlice = uncurryThis(''.slice);
  2914. var min = Math.min;
  2915. var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
  2916. // https://github.com/zloirock/core-js/pull/702
  2917. var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
  2918. var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
  2919. return descriptor && !descriptor.writable;
  2920. }();
  2921. // `String.prototype.startsWith` method
  2922. // https://tc39.es/ecma262/#sec-string.prototype.startswith
  2923. $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  2924. startsWith: function startsWith(searchString /* , position = 0 */) {
  2925. var that = toString(requireObjectCoercible(this));
  2926. notARegExp(searchString);
  2927. var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  2928. var search = toString(searchString);
  2929. return stringSlice(that, index, index + search.length) === search;
  2930. }
  2931. });
  2932. return es_string_startsWith;
  2933. }
  2934. requireEs_string_startsWith();
  2935. var es_string_trim = {};
  2936. var whitespaces;
  2937. var hasRequiredWhitespaces;
  2938. function requireWhitespaces () {
  2939. if (hasRequiredWhitespaces) return whitespaces;
  2940. hasRequiredWhitespaces = 1;
  2941. // a string of all valid unicode whitespaces
  2942. whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  2943. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  2944. return whitespaces;
  2945. }
  2946. var stringTrim;
  2947. var hasRequiredStringTrim;
  2948. function requireStringTrim () {
  2949. if (hasRequiredStringTrim) return stringTrim;
  2950. hasRequiredStringTrim = 1;
  2951. var uncurryThis = requireFunctionUncurryThis();
  2952. var requireObjectCoercible = requireRequireObjectCoercible();
  2953. var toString = requireToString();
  2954. var whitespaces = requireWhitespaces();
  2955. var replace = uncurryThis(''.replace);
  2956. var ltrim = RegExp('^[' + whitespaces + ']+');
  2957. var rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');
  2958. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  2959. var createMethod = function (TYPE) {
  2960. return function ($this) {
  2961. var string = toString(requireObjectCoercible($this));
  2962. if (TYPE & 1) string = replace(string, ltrim, '');
  2963. if (TYPE & 2) string = replace(string, rtrim, '$1');
  2964. return string;
  2965. };
  2966. };
  2967. stringTrim = {
  2968. // `String.prototype.{ trimLeft, trimStart }` methods
  2969. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  2970. start: createMethod(1),
  2971. // `String.prototype.{ trimRight, trimEnd }` methods
  2972. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  2973. end: createMethod(2),
  2974. // `String.prototype.trim` method
  2975. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2976. trim: createMethod(3)
  2977. };
  2978. return stringTrim;
  2979. }
  2980. var stringTrimForced;
  2981. var hasRequiredStringTrimForced;
  2982. function requireStringTrimForced () {
  2983. if (hasRequiredStringTrimForced) return stringTrimForced;
  2984. hasRequiredStringTrimForced = 1;
  2985. var PROPER_FUNCTION_NAME = requireFunctionName().PROPER;
  2986. var fails = requireFails();
  2987. var whitespaces = requireWhitespaces();
  2988. var non = '\u200B\u0085\u180E';
  2989. // check that a method works with the correct list
  2990. // of whitespaces and has a correct name
  2991. stringTrimForced = function (METHOD_NAME) {
  2992. return fails(function () {
  2993. return !!whitespaces[METHOD_NAME]()
  2994. || non[METHOD_NAME]() !== non
  2995. || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
  2996. });
  2997. };
  2998. return stringTrimForced;
  2999. }
  3000. var hasRequiredEs_string_trim;
  3001. function requireEs_string_trim () {
  3002. if (hasRequiredEs_string_trim) return es_string_trim;
  3003. hasRequiredEs_string_trim = 1;
  3004. var $ = require_export();
  3005. var $trim = requireStringTrim().trim;
  3006. var forcedStringTrimMethod = requireStringTrimForced();
  3007. // `String.prototype.trim` method
  3008. // https://tc39.es/ecma262/#sec-string.prototype.trim
  3009. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  3010. trim: function trim() {
  3011. return $trim(this);
  3012. }
  3013. });
  3014. return es_string_trim;
  3015. }
  3016. requireEs_string_trim();
  3017. var web_domCollections_forEach = {};
  3018. var domIterables;
  3019. var hasRequiredDomIterables;
  3020. function requireDomIterables () {
  3021. if (hasRequiredDomIterables) return domIterables;
  3022. hasRequiredDomIterables = 1;
  3023. // iterable DOM collections
  3024. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  3025. domIterables = {
  3026. CSSRuleList: 0,
  3027. CSSStyleDeclaration: 0,
  3028. CSSValueList: 0,
  3029. ClientRectList: 0,
  3030. DOMRectList: 0,
  3031. DOMStringList: 0,
  3032. DOMTokenList: 1,
  3033. DataTransferItemList: 0,
  3034. FileList: 0,
  3035. HTMLAllCollection: 0,
  3036. HTMLCollection: 0,
  3037. HTMLFormElement: 0,
  3038. HTMLSelectElement: 0,
  3039. MediaList: 0,
  3040. MimeTypeArray: 0,
  3041. NamedNodeMap: 0,
  3042. NodeList: 1,
  3043. PaintRequestList: 0,
  3044. Plugin: 0,
  3045. PluginArray: 0,
  3046. SVGLengthList: 0,
  3047. SVGNumberList: 0,
  3048. SVGPathSegList: 0,
  3049. SVGPointList: 0,
  3050. SVGStringList: 0,
  3051. SVGTransformList: 0,
  3052. SourceBufferList: 0,
  3053. StyleSheetList: 0,
  3054. TextTrackCueList: 0,
  3055. TextTrackList: 0,
  3056. TouchList: 0
  3057. };
  3058. return domIterables;
  3059. }
  3060. var domTokenListPrototype;
  3061. var hasRequiredDomTokenListPrototype;
  3062. function requireDomTokenListPrototype () {
  3063. if (hasRequiredDomTokenListPrototype) return domTokenListPrototype;
  3064. hasRequiredDomTokenListPrototype = 1;
  3065. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  3066. var documentCreateElement = requireDocumentCreateElement();
  3067. var classList = documentCreateElement('span').classList;
  3068. var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
  3069. domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
  3070. return domTokenListPrototype;
  3071. }
  3072. var arrayForEach;
  3073. var hasRequiredArrayForEach;
  3074. function requireArrayForEach () {
  3075. if (hasRequiredArrayForEach) return arrayForEach;
  3076. hasRequiredArrayForEach = 1;
  3077. var $forEach = requireArrayIteration().forEach;
  3078. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  3079. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  3080. // `Array.prototype.forEach` method implementation
  3081. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  3082. arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  3083. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3084. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  3085. } : [].forEach;
  3086. return arrayForEach;
  3087. }
  3088. var hasRequiredWeb_domCollections_forEach;
  3089. function requireWeb_domCollections_forEach () {
  3090. if (hasRequiredWeb_domCollections_forEach) return web_domCollections_forEach;
  3091. hasRequiredWeb_domCollections_forEach = 1;
  3092. var globalThis = requireGlobalThis();
  3093. var DOMIterables = requireDomIterables();
  3094. var DOMTokenListPrototype = requireDomTokenListPrototype();
  3095. var forEach = requireArrayForEach();
  3096. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  3097. var handlePrototype = function (CollectionPrototype) {
  3098. // some Chrome versions have non-configurable methods on DOMTokenList
  3099. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  3100. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  3101. } catch (error) {
  3102. CollectionPrototype.forEach = forEach;
  3103. }
  3104. };
  3105. for (var COLLECTION_NAME in DOMIterables) {
  3106. if (DOMIterables[COLLECTION_NAME]) {
  3107. handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype);
  3108. }
  3109. }
  3110. handlePrototype(DOMTokenListPrototype);
  3111. return web_domCollections_forEach;
  3112. }
  3113. requireWeb_domCollections_forEach();
  3114. /* eslint-disable no-use-before-define */
  3115. var Utils = $.fn.bootstrapTable.utils;
  3116. var searchControls = 'select, input:not([type="checkbox"]):not([type="radio"])';
  3117. function getInputClass(that) {
  3118. var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3119. var formControlClass = isSelect ? that.constants.classes.select : that.constants.classes.input;
  3120. return that.options.iconSize ? Utils.sprintf('%s %s-%s', formControlClass, formControlClass, that.options.iconSize) : formControlClass;
  3121. }
  3122. function getOptionsFromSelectControl(selectControl) {
  3123. return selectControl[0].options;
  3124. }
  3125. function getControlContainer(that) {
  3126. if (that.options.filterControlContainer) {
  3127. return $("".concat(that.options.filterControlContainer));
  3128. }
  3129. if (that.options.height && that._initialized) {
  3130. return that.$tableContainer.find('.fixed-table-header table thead');
  3131. }
  3132. return that.$header;
  3133. }
  3134. function isKeyAllowed(keyCode) {
  3135. return $.inArray(keyCode, [37, 38, 39, 40]) > -1;
  3136. }
  3137. function getSearchControls(that) {
  3138. return getControlContainer(that).find(searchControls);
  3139. }
  3140. function hideUnusedSelectOptions(selectControl, uniqueValues) {
  3141. var options = getOptionsFromSelectControl(selectControl);
  3142. for (var i = 0; i < options.length; i++) {
  3143. if (options[i].value !== '') {
  3144. if (!uniqueValues.hasOwnProperty(options[i].value)) {
  3145. selectControl.find(Utils.sprintf('option[value=\'%s\']', options[i].value)).hide();
  3146. } else {
  3147. selectControl.find(Utils.sprintf('option[value=\'%s\']', options[i].value)).show();
  3148. }
  3149. }
  3150. }
  3151. }
  3152. function existOptionInSelectControl(selectControl, value) {
  3153. var options = getOptionsFromSelectControl(selectControl);
  3154. for (var i = 0; i < options.length; i++) {
  3155. if (options[i].value === Utils.unescapeHTML(value)) {
  3156. // The value is not valid to add
  3157. return true;
  3158. }
  3159. }
  3160. // If we get here, the value is valid to add
  3161. return false;
  3162. }
  3163. function addOptionToSelectControl(selectControl, _value, text, selected, shouldCompareText) {
  3164. var value = _value === undefined || _value === null ? '' : _value.toString().trim();
  3165. value = Utils.removeHTML(Utils.unescapeHTML(value));
  3166. text = Utils.removeHTML(Utils.unescapeHTML(text));
  3167. if (existOptionInSelectControl(selectControl, value)) {
  3168. return;
  3169. }
  3170. var isSelected = shouldCompareText ? value === selected || text === selected : value === selected;
  3171. var option = new Option(text, value, false, isSelected);
  3172. selectControl.get(0).add(option);
  3173. }
  3174. function sortSelectControl(selectControl, orderBy, options) {
  3175. var $selectControl = selectControl.get(0);
  3176. if (orderBy === 'server') {
  3177. return;
  3178. }
  3179. var tmpAry = new Array();
  3180. for (var i = 0; i < $selectControl.options.length; i++) {
  3181. tmpAry[i] = new Array();
  3182. tmpAry[i][0] = $selectControl.options[i].text;
  3183. tmpAry[i][1] = $selectControl.options[i].value;
  3184. tmpAry[i][2] = $selectControl.options[i].selected;
  3185. }
  3186. tmpAry.sort(function (a, b) {
  3187. return Utils.sort(a[0], b[0], orderBy === 'desc' ? -1 : 1, options);
  3188. });
  3189. while ($selectControl.options.length > 0) {
  3190. $selectControl.options[0] = null;
  3191. }
  3192. for (var _i = 0; _i < tmpAry.length; _i++) {
  3193. var op = new Option(tmpAry[_i][0], tmpAry[_i][1], false, tmpAry[_i][2]);
  3194. $selectControl.add(op);
  3195. }
  3196. }
  3197. function fixHeaderCSS(_ref) {
  3198. var $tableHeader = _ref.$tableHeader;
  3199. $tableHeader.css('height', $tableHeader.find('table').outerHeight(true));
  3200. }
  3201. function getElementClass($element) {
  3202. return $element.attr('class').split(' ').filter(function (className) {
  3203. return className.startsWith('bootstrap-table-filter-control-');
  3204. });
  3205. }
  3206. function getCursorPosition(el) {
  3207. if ($(el).is('input[type=search]')) {
  3208. var pos = 0;
  3209. if ('selectionStart' in el) {
  3210. pos = el.selectionStart;
  3211. } else if ('selection' in document) {
  3212. el.focus();
  3213. var Sel = document.selection.createRange();
  3214. var SelLength = document.selection.createRange().text.length;
  3215. Sel.moveStart('character', -el.value.length);
  3216. pos = Sel.text.length - SelLength;
  3217. }
  3218. return pos;
  3219. }
  3220. return -1;
  3221. }
  3222. function cacheValues(that) {
  3223. var searchControls = getSearchControls(that);
  3224. that._valuesFilterControl = [];
  3225. searchControls.each(function () {
  3226. var $field = $(this);
  3227. var fieldClass = escapeID(getElementClass($field));
  3228. if (that.options.height && !that.options.filterControlContainer) {
  3229. $field = that.$el.find(".fixed-table-header .".concat(fieldClass));
  3230. } else if (that.options.filterControlContainer) {
  3231. $field = $("".concat(that.options.filterControlContainer, " .").concat(fieldClass));
  3232. } else {
  3233. $field = that.$el.find(".".concat(fieldClass));
  3234. }
  3235. that._valuesFilterControl.push({
  3236. field: $field.closest('[data-field]').data('field'),
  3237. value: $field.val(),
  3238. position: getCursorPosition($field.get(0)),
  3239. hasFocus: $field.is(':focus')
  3240. });
  3241. });
  3242. }
  3243. function setCaretPosition(elem, caretPos) {
  3244. try {
  3245. if (elem) {
  3246. if (elem.createTextRange) {
  3247. var range = elem.createTextRange();
  3248. range.move('character', caretPos);
  3249. range.select();
  3250. } else {
  3251. elem.setSelectionRange(caretPos, caretPos);
  3252. }
  3253. }
  3254. } catch (ex) {
  3255. // ignored
  3256. }
  3257. }
  3258. function setValues(that) {
  3259. var field = null;
  3260. var result = [];
  3261. var searchControls = getSearchControls(that);
  3262. if (that._valuesFilterControl.length > 0) {
  3263. // Callback to apply after settings fields values
  3264. var callbacks = [];
  3265. searchControls.each(function (i, el) {
  3266. var $this = $(el);
  3267. field = $this.closest('[data-field]').data('field');
  3268. result = that._valuesFilterControl.filter(function (valueObj) {
  3269. return valueObj.field === field;
  3270. });
  3271. if (result.length > 0) {
  3272. if (result[0].hasFocus || result[0].value) {
  3273. var fieldToFocusCallback = function (element, cacheElementInfo) {
  3274. // Closure here to capture the field information
  3275. var closedCallback = function closedCallback() {
  3276. if (cacheElementInfo.hasFocus) {
  3277. element.focus();
  3278. }
  3279. if (Array.isArray(cacheElementInfo.value)) {
  3280. var $element = $(element);
  3281. $.each(cacheElementInfo.value, function (i, e) {
  3282. $element.find(Utils.sprintf('option[value=\'%s\']', e)).prop('selected', true);
  3283. });
  3284. } else {
  3285. element.value = cacheElementInfo.value;
  3286. }
  3287. setCaretPosition(element, cacheElementInfo.position);
  3288. };
  3289. return closedCallback;
  3290. }($this.get(0), result[0]);
  3291. callbacks.push(fieldToFocusCallback);
  3292. }
  3293. }
  3294. });
  3295. // Callback call.
  3296. if (callbacks.length > 0) {
  3297. callbacks.forEach(function (callback) {
  3298. return callback();
  3299. });
  3300. }
  3301. }
  3302. }
  3303. function collectBootstrapTableFilterCookies() {
  3304. var cookies = [];
  3305. var cookieRegex = /bs\.table\.(filterControl|searchText)/g;
  3306. var foundCookies = document.cookie.match(cookieRegex);
  3307. var foundLocalStorage = localStorage;
  3308. if (foundCookies) {
  3309. $.each(foundCookies, function (i, _cookie) {
  3310. var cookie = _cookie;
  3311. if (/./.test(cookie)) {
  3312. cookie = cookie.split('.').pop();
  3313. }
  3314. if ($.inArray(cookie, cookies) === -1) {
  3315. cookies.push(cookie);
  3316. }
  3317. });
  3318. }
  3319. if (!foundLocalStorage) {
  3320. return cookies;
  3321. }
  3322. Object.keys(localStorage).forEach(function (cookie) {
  3323. if (!cookieRegex.test(cookie)) {
  3324. return;
  3325. }
  3326. cookie = cookie.split('.').pop();
  3327. if (!cookies.includes(cookie)) {
  3328. cookies.push(cookie);
  3329. }
  3330. });
  3331. return cookies;
  3332. }
  3333. function escapeID(id) {
  3334. // eslint-disable-next-line no-useless-escape
  3335. return String(id).replace(/([:.\[\],])/g, '\\$1');
  3336. }
  3337. function isColumnSearchableViaSelect(_ref2) {
  3338. var filterControl = _ref2.filterControl,
  3339. searchable = _ref2.searchable;
  3340. return filterControl && filterControl.toLowerCase() === 'select' && searchable;
  3341. }
  3342. function isFilterDataNotGiven(_ref3) {
  3343. var filterData = _ref3.filterData;
  3344. return filterData === undefined || filterData.toLowerCase() === 'column';
  3345. }
  3346. function hasSelectControlElement(selectControl) {
  3347. return selectControl && selectControl.length > 0;
  3348. }
  3349. function initFilterSelectControls(that) {
  3350. var data = that.options.data;
  3351. $.each(that.header.fields, function (j, field) {
  3352. var column = that.columns[that.fieldsColumnsIndex[field]];
  3353. var selectControl = getControlContainer(that).find("select.bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3354. if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
  3355. if (!selectControl[0].multiple && selectControl.get(selectControl.length - 1).options.length === 0) {
  3356. // Added the default option, must use a non-breaking space(&nbsp;) to pass the W3C validator
  3357. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder || ' ', column.filterDefault);
  3358. }
  3359. var uniqueValues = {};
  3360. for (var i = 0; i < data.length; i++) {
  3361. // Added a new value
  3362. var fieldValue = Utils.getItemField(data[i], field, false);
  3363. var formatter = that.options.editable && column.editable ? column._formatter : that.header.formatters[j];
  3364. var formattedValue = Utils.calculateObjectValue(that.header, formatter, [fieldValue, data[i], i], fieldValue);
  3365. if (fieldValue === undefined || fieldValue === null) {
  3366. fieldValue = formattedValue;
  3367. column._forceFormatter = true;
  3368. }
  3369. if (column.filterDataCollector) {
  3370. formattedValue = Utils.calculateObjectValue(that.header, column.filterDataCollector, [fieldValue, data[i], formattedValue], formattedValue);
  3371. }
  3372. if (column.searchFormatter) {
  3373. fieldValue = formattedValue;
  3374. }
  3375. uniqueValues[formattedValue] = fieldValue;
  3376. if (_typeof(formattedValue) === 'object' && formattedValue !== null) {
  3377. formattedValue.forEach(function (value) {
  3378. addOptionToSelectControl(selectControl, value, value, column.filterDefault);
  3379. });
  3380. continue;
  3381. }
  3382. }
  3383. // eslint-disable-next-line guard-for-in
  3384. for (var key in uniqueValues) {
  3385. addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
  3386. }
  3387. if (that.options.sortSelectOptions) {
  3388. sortSelectControl(selectControl, column.filterOrderBy, that.options);
  3389. }
  3390. }
  3391. });
  3392. }
  3393. function getFilterDataMethod(objFilterDataMethod, searchTerm) {
  3394. var keys = Object.keys(objFilterDataMethod);
  3395. for (var i = 0; i < keys.length; i++) {
  3396. if (keys[i] === searchTerm) {
  3397. return objFilterDataMethod[searchTerm];
  3398. }
  3399. }
  3400. return null;
  3401. }
  3402. function createControls(that, header) {
  3403. var addedFilterControl = false;
  3404. var html;
  3405. $.each(that.columns, function (_, column) {
  3406. html = [];
  3407. if (!column.visible && !(that.options.filterControlContainer && $(".bootstrap-table-filter-control-".concat(escapeID(column.field))).length >= 1)) {
  3408. return;
  3409. }
  3410. if (!column.filterControl && !that.options.filterControlContainer) {
  3411. html.push('<div class="no-filter-control"></div>');
  3412. } else if (that.options.filterControlContainer) {
  3413. // Use a filter control container instead of th
  3414. var $filterControls = $(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3415. $.each($filterControls, function (_, filterControl) {
  3416. var $filterControl = $(filterControl);
  3417. if (!$filterControl.is('[type=radio]')) {
  3418. var placeholder = column.filterControlPlaceholder || '';
  3419. $filterControl.attr('placeholder', placeholder).val(column.filterDefault);
  3420. }
  3421. $filterControl.attr('data-field', column.field);
  3422. });
  3423. addedFilterControl = true;
  3424. } else {
  3425. // Create the control based on the html defined in the filterTemplate array.
  3426. var nameControl = column.filterControl.toLowerCase();
  3427. html.push('<div class="filter-control">');
  3428. addedFilterControl = true;
  3429. if (column.searchable && that.options.filterTemplate[nameControl]) {
  3430. html.push(that.options.filterTemplate[nameControl](that, column, column.filterControlPlaceholder ? column.filterControlPlaceholder : '', column.filterDefault));
  3431. }
  3432. }
  3433. // Filtering by default when it is set.
  3434. if (column.filterControl && '' !== column.filterDefault && 'undefined' !== typeof column.filterDefault) {
  3435. if (Utils.isEmptyObject(that.filterColumnsPartial)) {
  3436. that.filterColumnsPartial = {};
  3437. }
  3438. if (!(column.field in that.filterColumnsPartial)) {
  3439. that.filterColumnsPartial[column.field] = column.filterDefault;
  3440. }
  3441. }
  3442. $.each(header.find('th'), function (_, th) {
  3443. var $th = $(th);
  3444. if ($th.data('field') === column.field) {
  3445. $th.find('.filter-control').remove();
  3446. $th.find('.fht-cell').html(html.join(''));
  3447. return false;
  3448. }
  3449. });
  3450. if (column.filterData && column.filterData.toLowerCase() !== 'column') {
  3451. var filterDataType = getFilterDataMethod(filterDataMethods, column.filterData.substring(0, column.filterData.indexOf(':')));
  3452. var filterDataSource;
  3453. var selectControl;
  3454. if (filterDataType) {
  3455. filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
  3456. selectControl = header.find(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3457. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault, true);
  3458. filterDataType(that, filterDataSource, selectControl, that.options.filterOrderBy, column.filterDefault);
  3459. } else {
  3460. 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"}');
  3461. }
  3462. }
  3463. });
  3464. if (addedFilterControl) {
  3465. header.off('keyup', 'input').on('keyup', 'input', function (_ref4, obj) {
  3466. var currentTarget = _ref4.currentTarget,
  3467. keyCode = _ref4.keyCode;
  3468. keyCode = obj ? obj.keyCode : keyCode;
  3469. if (that.options.searchOnEnterKey && keyCode !== 13) {
  3470. return;
  3471. }
  3472. if (isKeyAllowed(keyCode)) {
  3473. return;
  3474. }
  3475. var $currentTarget = $(currentTarget);
  3476. if ($currentTarget.is(':checkbox') || $currentTarget.is(':radio')) {
  3477. return;
  3478. }
  3479. clearTimeout(currentTarget.timeoutId || 0);
  3480. currentTarget.timeoutId = setTimeout(function () {
  3481. that.onColumnSearch({
  3482. currentTarget: currentTarget,
  3483. keyCode: keyCode
  3484. });
  3485. }, that.options.searchTimeOut);
  3486. });
  3487. header.off('change', 'select', '.fc-multipleselect').on('change', 'select', '.fc-multipleselect', function (_ref5) {
  3488. var currentTarget = _ref5.currentTarget,
  3489. keyCode = _ref5.keyCode;
  3490. var $selectControl = $(currentTarget);
  3491. var value = $selectControl.val();
  3492. if (Array.isArray(value)) {
  3493. for (var i = 0; i < value.length; i++) {
  3494. if (value[i] && value[i].length > 0 && value[i].trim()) {
  3495. $selectControl.find("option[value=\"".concat(value[i], "\"]")).attr('selected', true);
  3496. }
  3497. }
  3498. } else if (value && value.length > 0 && value.trim()) {
  3499. $selectControl.find('option[selected]').removeAttr('selected');
  3500. $selectControl.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  3501. } else {
  3502. $selectControl.find('option[selected]').removeAttr('selected');
  3503. }
  3504. clearTimeout(currentTarget.timeoutId || 0);
  3505. currentTarget.timeoutId = setTimeout(function () {
  3506. that.onColumnSearch({
  3507. currentTarget: currentTarget,
  3508. keyCode: keyCode
  3509. });
  3510. }, that.options.searchTimeOut);
  3511. });
  3512. header.off('mouseup', 'input:not([type=radio])').on('mouseup', 'input:not([type=radio])', function (_ref6) {
  3513. var currentTarget = _ref6.currentTarget,
  3514. keyCode = _ref6.keyCode;
  3515. var $input = $(currentTarget);
  3516. var oldValue = $input.val();
  3517. if (oldValue === '') {
  3518. return;
  3519. }
  3520. setTimeout(function () {
  3521. var newValue = $input.val();
  3522. if (newValue === '') {
  3523. clearTimeout(currentTarget.timeoutId || 0);
  3524. currentTarget.timeoutId = setTimeout(function () {
  3525. that.onColumnSearch({
  3526. currentTarget: currentTarget,
  3527. keyCode: keyCode
  3528. });
  3529. }, that.options.searchTimeOut);
  3530. }
  3531. }, 1);
  3532. });
  3533. header.off('change', 'input[type=radio]').on('change', 'input[type=radio]', function (_ref7) {
  3534. var currentTarget = _ref7.currentTarget,
  3535. keyCode = _ref7.keyCode;
  3536. clearTimeout(currentTarget.timeoutId || 0);
  3537. currentTarget.timeoutId = setTimeout(function () {
  3538. that.onColumnSearch({
  3539. currentTarget: currentTarget,
  3540. keyCode: keyCode
  3541. });
  3542. }, that.options.searchTimeOut);
  3543. });
  3544. // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  3545. if (header.find('.date-filter-control').length > 0) {
  3546. $.each(that.columns, function (i, _ref8) {
  3547. var filterDefault = _ref8.filterDefault,
  3548. filterControl = _ref8.filterControl,
  3549. field = _ref8.field,
  3550. filterDatepickerOptions = _ref8.filterDatepickerOptions;
  3551. if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
  3552. var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(escapeID(field)));
  3553. if (filterDefault) {
  3554. $datepicker.value(filterDefault);
  3555. }
  3556. if (filterDatepickerOptions.min) {
  3557. $datepicker.attr('min', filterDatepickerOptions.min);
  3558. }
  3559. if (filterDatepickerOptions.max) {
  3560. $datepicker.attr('max', filterDatepickerOptions.max);
  3561. }
  3562. if (filterDatepickerOptions.step) {
  3563. $datepicker.attr('step', filterDatepickerOptions.step);
  3564. }
  3565. if (filterDatepickerOptions.pattern) {
  3566. $datepicker.attr('pattern', filterDatepickerOptions.pattern);
  3567. }
  3568. $datepicker.on('change', function (_ref9) {
  3569. var currentTarget = _ref9.currentTarget;
  3570. clearTimeout(currentTarget.timeoutId || 0);
  3571. currentTarget.timeoutId = setTimeout(function () {
  3572. that.onColumnSearch({
  3573. currentTarget: currentTarget
  3574. });
  3575. }, that.options.searchTimeOut);
  3576. });
  3577. }
  3578. });
  3579. }
  3580. if (that.options.sidePagination !== 'server') {
  3581. that.triggerSearch();
  3582. }
  3583. if (!that.options.filterControlVisible) {
  3584. header.find('.filter-control, .no-filter-control').hide();
  3585. }
  3586. } else {
  3587. header.find('.filter-control, .no-filter-control').hide();
  3588. }
  3589. that.trigger('created-controls');
  3590. }
  3591. function getDirectionOfSelectOptions(_alignment) {
  3592. var alignment = _alignment === undefined ? 'left' : _alignment.toLowerCase();
  3593. switch (alignment) {
  3594. case 'left':
  3595. return 'ltr';
  3596. case 'right':
  3597. return 'rtl';
  3598. case 'auto':
  3599. return 'auto';
  3600. default:
  3601. return 'ltr';
  3602. }
  3603. }
  3604. function syncHeaders(that) {
  3605. if (!that.options.height) {
  3606. return;
  3607. }
  3608. var fixedHeader = that.$tableContainer.find('.fixed-table-header table thead');
  3609. if (fixedHeader.length === 0) {
  3610. return;
  3611. }
  3612. that.$header.children().find('th[data-field]').each(function (_, element) {
  3613. if (element.classList[0] !== 'bs-checkbox') {
  3614. var $element = $(element);
  3615. var $field = $element.data('field');
  3616. var $fixedField = that.$tableContainer.find("th[data-field='".concat($field, "']")).not($element);
  3617. var input = $element.find('input');
  3618. var fixedInput = $fixedField.find('input');
  3619. if (input.length > 0 && fixedInput.length > 0) {
  3620. if (input.val() !== fixedInput.val()) {
  3621. input.val(fixedInput.val());
  3622. }
  3623. }
  3624. }
  3625. });
  3626. }
  3627. var filterDataMethods = {
  3628. func: function func(that, filterDataSource, selectControl, filterOrderBy, selected) {
  3629. var variableValues = window[filterDataSource].apply();
  3630. // eslint-disable-next-line guard-for-in
  3631. for (var key in variableValues) {
  3632. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  3633. }
  3634. if (that.options.sortSelectOptions) {
  3635. sortSelectControl(selectControl, filterOrderBy, that.options);
  3636. }
  3637. setValues(that);
  3638. },
  3639. obj: function obj(that, filterDataSource, selectControl, filterOrderBy, selected) {
  3640. var objectKeys = filterDataSource.split('.');
  3641. var variableName = objectKeys.shift();
  3642. var variableValues = window[variableName];
  3643. if (objectKeys.length > 0) {
  3644. objectKeys.forEach(function (key) {
  3645. variableValues = variableValues[key];
  3646. });
  3647. }
  3648. // eslint-disable-next-line guard-for-in
  3649. for (var key in variableValues) {
  3650. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  3651. }
  3652. if (that.options.sortSelectOptions) {
  3653. sortSelectControl(selectControl, filterOrderBy, that.options);
  3654. }
  3655. setValues(that);
  3656. },
  3657. var: function _var(that, filterDataSource, selectControl, filterOrderBy, selected) {
  3658. var variableValues = window[filterDataSource];
  3659. var isArray = Array.isArray(variableValues);
  3660. for (var key in variableValues) {
  3661. if (isArray) {
  3662. addOptionToSelectControl(selectControl, variableValues[key], variableValues[key], selected, true);
  3663. } else {
  3664. addOptionToSelectControl(selectControl, key, variableValues[key], selected, true);
  3665. }
  3666. }
  3667. if (that.options.sortSelectOptions) {
  3668. sortSelectControl(selectControl, filterOrderBy, that.options);
  3669. }
  3670. setValues(that);
  3671. },
  3672. url: function url(that, filterDataSource, selectControl, filterOrderBy, selected) {
  3673. $.ajax({
  3674. url: filterDataSource,
  3675. dataType: 'json',
  3676. success: function success(data) {
  3677. // eslint-disable-next-line guard-for-in
  3678. for (var key in data) {
  3679. addOptionToSelectControl(selectControl, key, data[key], selected);
  3680. }
  3681. if (that.options.sortSelectOptions) {
  3682. sortSelectControl(selectControl, filterOrderBy, that.options);
  3683. }
  3684. setValues(that);
  3685. }
  3686. });
  3687. },
  3688. json: function json(that, filterDataSource, selectControl, filterOrderBy, selected) {
  3689. var variableValues = JSON.parse(filterDataSource);
  3690. // eslint-disable-next-line guard-for-in
  3691. for (var key in variableValues) {
  3692. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  3693. }
  3694. if (that.options.sortSelectOptions) {
  3695. sortSelectControl(selectControl, filterOrderBy, that.options);
  3696. }
  3697. setValues(that);
  3698. }
  3699. };
  3700. exports.addOptionToSelectControl = addOptionToSelectControl;
  3701. exports.cacheValues = cacheValues;
  3702. exports.collectBootstrapTableFilterCookies = collectBootstrapTableFilterCookies;
  3703. exports.createControls = createControls;
  3704. exports.escapeID = escapeID;
  3705. exports.existOptionInSelectControl = existOptionInSelectControl;
  3706. exports.fixHeaderCSS = fixHeaderCSS;
  3707. exports.getControlContainer = getControlContainer;
  3708. exports.getCursorPosition = getCursorPosition;
  3709. exports.getDirectionOfSelectOptions = getDirectionOfSelectOptions;
  3710. exports.getElementClass = getElementClass;
  3711. exports.getFilterDataMethod = getFilterDataMethod;
  3712. exports.getInputClass = getInputClass;
  3713. exports.getOptionsFromSelectControl = getOptionsFromSelectControl;
  3714. exports.getSearchControls = getSearchControls;
  3715. exports.hasSelectControlElement = hasSelectControlElement;
  3716. exports.hideUnusedSelectOptions = hideUnusedSelectOptions;
  3717. exports.initFilterSelectControls = initFilterSelectControls;
  3718. exports.isColumnSearchableViaSelect = isColumnSearchableViaSelect;
  3719. exports.isFilterDataNotGiven = isFilterDataNotGiven;
  3720. exports.isKeyAllowed = isKeyAllowed;
  3721. exports.setCaretPosition = setCaretPosition;
  3722. exports.setValues = setValues;
  3723. exports.sortSelectControl = sortSelectControl;
  3724. exports.syncHeaders = syncHeaders;
  3725. }));