bootstrap-table-filter-control.js 186 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($$k) { 'use strict';
  6. function _typeof(obj) {
  7. "@babel/helpers - typeof";
  8. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  9. return typeof obj;
  10. } : function (obj) {
  11. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  12. }, _typeof(obj);
  13. }
  14. function _classCallCheck(instance, Constructor) {
  15. if (!(instance instanceof Constructor)) {
  16. throw new TypeError("Cannot call a class as a function");
  17. }
  18. }
  19. function _defineProperties(target, props) {
  20. for (var i = 0; i < props.length; i++) {
  21. var descriptor = props[i];
  22. descriptor.enumerable = descriptor.enumerable || false;
  23. descriptor.configurable = true;
  24. if ("value" in descriptor) descriptor.writable = true;
  25. Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
  26. }
  27. }
  28. function _createClass(Constructor, protoProps, staticProps) {
  29. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  30. if (staticProps) _defineProperties(Constructor, staticProps);
  31. Object.defineProperty(Constructor, "prototype", {
  32. writable: false
  33. });
  34. return Constructor;
  35. }
  36. function _inherits(subClass, superClass) {
  37. if (typeof superClass !== "function" && superClass !== null) {
  38. throw new TypeError("Super expression must either be null or a function");
  39. }
  40. subClass.prototype = Object.create(superClass && superClass.prototype, {
  41. constructor: {
  42. value: subClass,
  43. writable: true,
  44. configurable: true
  45. }
  46. });
  47. Object.defineProperty(subClass, "prototype", {
  48. writable: false
  49. });
  50. if (superClass) _setPrototypeOf(subClass, superClass);
  51. }
  52. function _getPrototypeOf(o) {
  53. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  54. return o.__proto__ || Object.getPrototypeOf(o);
  55. };
  56. return _getPrototypeOf(o);
  57. }
  58. function _setPrototypeOf(o, p) {
  59. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  60. o.__proto__ = p;
  61. return o;
  62. };
  63. return _setPrototypeOf(o, p);
  64. }
  65. function _isNativeReflectConstruct() {
  66. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  67. if (Reflect.construct.sham) return false;
  68. if (typeof Proxy === "function") return true;
  69. try {
  70. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  71. return true;
  72. } catch (e) {
  73. return false;
  74. }
  75. }
  76. function _assertThisInitialized(self) {
  77. if (self === void 0) {
  78. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  79. }
  80. return self;
  81. }
  82. function _possibleConstructorReturn(self, call) {
  83. if (call && (typeof call === "object" || typeof call === "function")) {
  84. return call;
  85. } else if (call !== void 0) {
  86. throw new TypeError("Derived constructors may only return object or undefined");
  87. }
  88. return _assertThisInitialized(self);
  89. }
  90. function _createSuper(Derived) {
  91. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  92. return function _createSuperInternal() {
  93. var Super = _getPrototypeOf(Derived),
  94. result;
  95. if (hasNativeReflectConstruct) {
  96. var NewTarget = _getPrototypeOf(this).constructor;
  97. result = Reflect.construct(Super, arguments, NewTarget);
  98. } else {
  99. result = Super.apply(this, arguments);
  100. }
  101. return _possibleConstructorReturn(this, result);
  102. };
  103. }
  104. function _superPropBase(object, property) {
  105. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  106. object = _getPrototypeOf(object);
  107. if (object === null) break;
  108. }
  109. return object;
  110. }
  111. function _get() {
  112. if (typeof Reflect !== "undefined" && Reflect.get) {
  113. _get = Reflect.get.bind();
  114. } else {
  115. _get = function _get(target, property, receiver) {
  116. var base = _superPropBase(target, property);
  117. if (!base) return;
  118. var desc = Object.getOwnPropertyDescriptor(base, property);
  119. if (desc.get) {
  120. return desc.get.call(arguments.length < 3 ? target : receiver);
  121. }
  122. return desc.value;
  123. };
  124. }
  125. return _get.apply(this, arguments);
  126. }
  127. function _toConsumableArray(arr) {
  128. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  129. }
  130. function _arrayWithoutHoles(arr) {
  131. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  132. }
  133. function _iterableToArray(iter) {
  134. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  135. }
  136. function _unsupportedIterableToArray(o, minLen) {
  137. if (!o) return;
  138. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  139. var n = Object.prototype.toString.call(o).slice(8, -1);
  140. if (n === "Object" && o.constructor) n = o.constructor.name;
  141. if (n === "Map" || n === "Set") return Array.from(o);
  142. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  143. }
  144. function _arrayLikeToArray(arr, len) {
  145. if (len == null || len > arr.length) len = arr.length;
  146. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  147. return arr2;
  148. }
  149. function _nonIterableSpread() {
  150. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  151. }
  152. function _toPrimitive(input, hint) {
  153. if (typeof input !== "object" || input === null) return input;
  154. var prim = input[Symbol.toPrimitive];
  155. if (prim !== undefined) {
  156. var res = prim.call(input, hint || "default");
  157. if (typeof res !== "object") return res;
  158. throw new TypeError("@@toPrimitive must return a primitive value.");
  159. }
  160. return (hint === "string" ? String : Number)(input);
  161. }
  162. function _toPropertyKey(arg) {
  163. var key = _toPrimitive(arg, "string");
  164. return typeof key === "symbol" ? key : String(key);
  165. }
  166. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  167. var check = function (it) {
  168. return it && it.Math == Math && it;
  169. };
  170. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  171. var global$k =
  172. // eslint-disable-next-line es/no-global-this -- safe
  173. check(typeof globalThis == 'object' && globalThis) ||
  174. check(typeof window == 'object' && window) ||
  175. // eslint-disable-next-line no-restricted-globals -- safe
  176. check(typeof self == 'object' && self) ||
  177. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  178. // eslint-disable-next-line no-new-func -- fallback
  179. (function () { return this; })() || Function('return this')();
  180. var objectGetOwnPropertyDescriptor = {};
  181. var fails$q = function (exec) {
  182. try {
  183. return !!exec();
  184. } catch (error) {
  185. return true;
  186. }
  187. };
  188. var fails$p = fails$q;
  189. // Detect IE8's incomplete defineProperty implementation
  190. var descriptors = !fails$p(function () {
  191. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  192. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  193. });
  194. var fails$o = fails$q;
  195. var functionBindNative = !fails$o(function () {
  196. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  197. var test = (function () { /* empty */ }).bind();
  198. // eslint-disable-next-line no-prototype-builtins -- safe
  199. return typeof test != 'function' || test.hasOwnProperty('prototype');
  200. });
  201. var NATIVE_BIND$3 = functionBindNative;
  202. var call$j = Function.prototype.call;
  203. var functionCall = NATIVE_BIND$3 ? call$j.bind(call$j) : function () {
  204. return call$j.apply(call$j, arguments);
  205. };
  206. var objectPropertyIsEnumerable = {};
  207. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  208. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  209. var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
  210. // Nashorn ~ JDK8 bug
  211. var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  212. // `Object.prototype.propertyIsEnumerable` method implementation
  213. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  214. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  215. var descriptor = getOwnPropertyDescriptor$2(this, V);
  216. return !!descriptor && descriptor.enumerable;
  217. } : $propertyIsEnumerable$1;
  218. var createPropertyDescriptor$3 = function (bitmap, value) {
  219. return {
  220. enumerable: !(bitmap & 1),
  221. configurable: !(bitmap & 2),
  222. writable: !(bitmap & 4),
  223. value: value
  224. };
  225. };
  226. var NATIVE_BIND$2 = functionBindNative;
  227. var FunctionPrototype$2 = Function.prototype;
  228. var call$i = FunctionPrototype$2.call;
  229. var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$i, call$i);
  230. var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
  231. return function () {
  232. return call$i.apply(fn, arguments);
  233. };
  234. };
  235. var uncurryThis$s = functionUncurryThis;
  236. var toString$c = uncurryThis$s({}.toString);
  237. var stringSlice$6 = uncurryThis$s(''.slice);
  238. var classofRaw$2 = function (it) {
  239. return stringSlice$6(toString$c(it), 8, -1);
  240. };
  241. var uncurryThis$r = functionUncurryThis;
  242. var fails$n = fails$q;
  243. var classof$9 = classofRaw$2;
  244. var $Object$3 = Object;
  245. var split = uncurryThis$r(''.split);
  246. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  247. var indexedObject = fails$n(function () {
  248. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  249. // eslint-disable-next-line no-prototype-builtins -- safe
  250. return !$Object$3('z').propertyIsEnumerable(0);
  251. }) ? function (it) {
  252. return classof$9(it) == 'String' ? split(it, '') : $Object$3(it);
  253. } : $Object$3;
  254. // we can't use just `it == null` since of `document.all` special case
  255. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  256. var isNullOrUndefined$7 = function (it) {
  257. return it === null || it === undefined;
  258. };
  259. var isNullOrUndefined$6 = isNullOrUndefined$7;
  260. var $TypeError$g = TypeError;
  261. // `RequireObjectCoercible` abstract operation
  262. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  263. var requireObjectCoercible$8 = function (it) {
  264. if (isNullOrUndefined$6(it)) throw $TypeError$g("Can't call method on " + it);
  265. return it;
  266. };
  267. // toObject with fallback for non-array-like ES3 strings
  268. var IndexedObject$3 = indexedObject;
  269. var requireObjectCoercible$7 = requireObjectCoercible$8;
  270. var toIndexedObject$6 = function (it) {
  271. return IndexedObject$3(requireObjectCoercible$7(it));
  272. };
  273. var documentAll$2 = typeof document == 'object' && document.all;
  274. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  275. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  276. var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
  277. var documentAll_1 = {
  278. all: documentAll$2,
  279. IS_HTMLDDA: IS_HTMLDDA
  280. };
  281. var $documentAll$1 = documentAll_1;
  282. var documentAll$1 = $documentAll$1.all;
  283. // `IsCallable` abstract operation
  284. // https://tc39.es/ecma262/#sec-iscallable
  285. var isCallable$j = $documentAll$1.IS_HTMLDDA ? function (argument) {
  286. return typeof argument == 'function' || argument === documentAll$1;
  287. } : function (argument) {
  288. return typeof argument == 'function';
  289. };
  290. var isCallable$i = isCallable$j;
  291. var $documentAll = documentAll_1;
  292. var documentAll = $documentAll.all;
  293. var isObject$a = $documentAll.IS_HTMLDDA ? function (it) {
  294. return typeof it == 'object' ? it !== null : isCallable$i(it) || it === documentAll;
  295. } : function (it) {
  296. return typeof it == 'object' ? it !== null : isCallable$i(it);
  297. };
  298. var global$j = global$k;
  299. var isCallable$h = isCallable$j;
  300. var aFunction = function (argument) {
  301. return isCallable$h(argument) ? argument : undefined;
  302. };
  303. var getBuiltIn$7 = function (namespace, method) {
  304. return arguments.length < 2 ? aFunction(global$j[namespace]) : global$j[namespace] && global$j[namespace][method];
  305. };
  306. var uncurryThis$q = functionUncurryThis;
  307. var objectIsPrototypeOf = uncurryThis$q({}.isPrototypeOf);
  308. var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
  309. var global$i = global$k;
  310. var userAgent$5 = engineUserAgent;
  311. var process$4 = global$i.process;
  312. var Deno$1 = global$i.Deno;
  313. var versions = process$4 && process$4.versions || Deno$1 && Deno$1.version;
  314. var v8 = versions && versions.v8;
  315. var match, version;
  316. if (v8) {
  317. match = v8.split('.');
  318. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  319. // but their correct versions are not interesting for us
  320. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  321. }
  322. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  323. // so check `userAgent` even if `.v8` exists, but 0
  324. if (!version && userAgent$5) {
  325. match = userAgent$5.match(/Edge\/(\d+)/);
  326. if (!match || match[1] >= 74) {
  327. match = userAgent$5.match(/Chrome\/(\d+)/);
  328. if (match) version = +match[1];
  329. }
  330. }
  331. var engineV8Version = version;
  332. /* eslint-disable es/no-symbol -- required for testing */
  333. var V8_VERSION$3 = engineV8Version;
  334. var fails$m = fails$q;
  335. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  336. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$m(function () {
  337. var symbol = Symbol();
  338. // Chrome 38 Symbol has incorrect toString conversion
  339. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  340. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  341. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  342. !Symbol.sham && V8_VERSION$3 && V8_VERSION$3 < 41;
  343. });
  344. /* eslint-disable es/no-symbol -- required for testing */
  345. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  346. var useSymbolAsUid = NATIVE_SYMBOL$1
  347. && !Symbol.sham
  348. && typeof Symbol.iterator == 'symbol';
  349. var getBuiltIn$6 = getBuiltIn$7;
  350. var isCallable$g = isCallable$j;
  351. var isPrototypeOf$3 = objectIsPrototypeOf;
  352. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  353. var $Object$2 = Object;
  354. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  355. return typeof it == 'symbol';
  356. } : function (it) {
  357. var $Symbol = getBuiltIn$6('Symbol');
  358. return isCallable$g($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$2(it));
  359. };
  360. var $String$4 = String;
  361. var tryToString$5 = function (argument) {
  362. try {
  363. return $String$4(argument);
  364. } catch (error) {
  365. return 'Object';
  366. }
  367. };
  368. var isCallable$f = isCallable$j;
  369. var tryToString$4 = tryToString$5;
  370. var $TypeError$f = TypeError;
  371. // `Assert: IsCallable(argument) is true`
  372. var aCallable$9 = function (argument) {
  373. if (isCallable$f(argument)) return argument;
  374. throw $TypeError$f(tryToString$4(argument) + ' is not a function');
  375. };
  376. var aCallable$8 = aCallable$9;
  377. var isNullOrUndefined$5 = isNullOrUndefined$7;
  378. // `GetMethod` abstract operation
  379. // https://tc39.es/ecma262/#sec-getmethod
  380. var getMethod$6 = function (V, P) {
  381. var func = V[P];
  382. return isNullOrUndefined$5(func) ? undefined : aCallable$8(func);
  383. };
  384. var call$h = functionCall;
  385. var isCallable$e = isCallable$j;
  386. var isObject$9 = isObject$a;
  387. var $TypeError$e = TypeError;
  388. // `OrdinaryToPrimitive` abstract operation
  389. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  390. var ordinaryToPrimitive$1 = function (input, pref) {
  391. var fn, val;
  392. if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
  393. if (isCallable$e(fn = input.valueOf) && !isObject$9(val = call$h(fn, input))) return val;
  394. if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
  395. throw $TypeError$e("Can't convert object to primitive value");
  396. };
  397. var sharedExports = {};
  398. var shared$4 = {
  399. get exports(){ return sharedExports; },
  400. set exports(v){ sharedExports = v; },
  401. };
  402. var global$h = global$k;
  403. // eslint-disable-next-line es/no-object-defineproperty -- safe
  404. var defineProperty$5 = Object.defineProperty;
  405. var defineGlobalProperty$3 = function (key, value) {
  406. try {
  407. defineProperty$5(global$h, key, { value: value, configurable: true, writable: true });
  408. } catch (error) {
  409. global$h[key] = value;
  410. } return value;
  411. };
  412. var global$g = global$k;
  413. var defineGlobalProperty$2 = defineGlobalProperty$3;
  414. var SHARED = '__core-js_shared__';
  415. var store$3 = global$g[SHARED] || defineGlobalProperty$2(SHARED, {});
  416. var sharedStore = store$3;
  417. var store$2 = sharedStore;
  418. (shared$4.exports = function (key, value) {
  419. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  420. })('versions', []).push({
  421. version: '3.29.0',
  422. mode: 'global',
  423. copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
  424. license: 'https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE',
  425. source: 'https://github.com/zloirock/core-js'
  426. });
  427. var requireObjectCoercible$6 = requireObjectCoercible$8;
  428. var $Object$1 = Object;
  429. // `ToObject` abstract operation
  430. // https://tc39.es/ecma262/#sec-toobject
  431. var toObject$7 = function (argument) {
  432. return $Object$1(requireObjectCoercible$6(argument));
  433. };
  434. var uncurryThis$p = functionUncurryThis;
  435. var toObject$6 = toObject$7;
  436. var hasOwnProperty = uncurryThis$p({}.hasOwnProperty);
  437. // `HasOwnProperty` abstract operation
  438. // https://tc39.es/ecma262/#sec-hasownproperty
  439. // eslint-disable-next-line es/no-object-hasown -- safe
  440. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  441. return hasOwnProperty(toObject$6(it), key);
  442. };
  443. var uncurryThis$o = functionUncurryThis;
  444. var id = 0;
  445. var postfix = Math.random();
  446. var toString$b = uncurryThis$o(1.0.toString);
  447. var uid$2 = function (key) {
  448. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$b(++id + postfix, 36);
  449. };
  450. var global$f = global$k;
  451. var shared$3 = sharedExports;
  452. var hasOwn$9 = hasOwnProperty_1;
  453. var uid$1 = uid$2;
  454. var NATIVE_SYMBOL = symbolConstructorDetection;
  455. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  456. var Symbol$2 = global$f.Symbol;
  457. var WellKnownSymbolsStore = shared$3('wks');
  458. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
  459. var wellKnownSymbol$i = function (name) {
  460. if (!hasOwn$9(WellKnownSymbolsStore, name)) {
  461. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$2, name)
  462. ? Symbol$2[name]
  463. : createWellKnownSymbol('Symbol.' + name);
  464. } return WellKnownSymbolsStore[name];
  465. };
  466. var call$g = functionCall;
  467. var isObject$8 = isObject$a;
  468. var isSymbol$1 = isSymbol$2;
  469. var getMethod$5 = getMethod$6;
  470. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  471. var wellKnownSymbol$h = wellKnownSymbol$i;
  472. var $TypeError$d = TypeError;
  473. var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
  474. // `ToPrimitive` abstract operation
  475. // https://tc39.es/ecma262/#sec-toprimitive
  476. var toPrimitive$1 = function (input, pref) {
  477. if (!isObject$8(input) || isSymbol$1(input)) return input;
  478. var exoticToPrim = getMethod$5(input, TO_PRIMITIVE);
  479. var result;
  480. if (exoticToPrim) {
  481. if (pref === undefined) pref = 'default';
  482. result = call$g(exoticToPrim, input, pref);
  483. if (!isObject$8(result) || isSymbol$1(result)) return result;
  484. throw $TypeError$d("Can't convert object to primitive value");
  485. }
  486. if (pref === undefined) pref = 'number';
  487. return ordinaryToPrimitive(input, pref);
  488. };
  489. var toPrimitive = toPrimitive$1;
  490. var isSymbol = isSymbol$2;
  491. // `ToPropertyKey` abstract operation
  492. // https://tc39.es/ecma262/#sec-topropertykey
  493. var toPropertyKey$3 = function (argument) {
  494. var key = toPrimitive(argument, 'string');
  495. return isSymbol(key) ? key : key + '';
  496. };
  497. var global$e = global$k;
  498. var isObject$7 = isObject$a;
  499. var document$3 = global$e.document;
  500. // typeof document.createElement is 'object' in old IE
  501. var EXISTS$1 = isObject$7(document$3) && isObject$7(document$3.createElement);
  502. var documentCreateElement$2 = function (it) {
  503. return EXISTS$1 ? document$3.createElement(it) : {};
  504. };
  505. var DESCRIPTORS$a = descriptors;
  506. var fails$l = fails$q;
  507. var createElement$1 = documentCreateElement$2;
  508. // Thanks to IE8 for its funny defineProperty
  509. var ie8DomDefine = !DESCRIPTORS$a && !fails$l(function () {
  510. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  511. return Object.defineProperty(createElement$1('div'), 'a', {
  512. get: function () { return 7; }
  513. }).a != 7;
  514. });
  515. var DESCRIPTORS$9 = descriptors;
  516. var call$f = functionCall;
  517. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  518. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  519. var toIndexedObject$5 = toIndexedObject$6;
  520. var toPropertyKey$2 = toPropertyKey$3;
  521. var hasOwn$8 = hasOwnProperty_1;
  522. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  523. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  524. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  525. // `Object.getOwnPropertyDescriptor` method
  526. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  527. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  528. O = toIndexedObject$5(O);
  529. P = toPropertyKey$2(P);
  530. if (IE8_DOM_DEFINE$1) try {
  531. return $getOwnPropertyDescriptor$1(O, P);
  532. } catch (error) { /* empty */ }
  533. if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$f(propertyIsEnumerableModule$1.f, O, P), O[P]);
  534. };
  535. var objectDefineProperty = {};
  536. var DESCRIPTORS$8 = descriptors;
  537. var fails$k = fails$q;
  538. // V8 ~ Chrome 36-
  539. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  540. var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$k(function () {
  541. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  542. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  543. value: 42,
  544. writable: false
  545. }).prototype != 42;
  546. });
  547. var isObject$6 = isObject$a;
  548. var $String$3 = String;
  549. var $TypeError$c = TypeError;
  550. // `Assert: Type(argument) is Object`
  551. var anObject$g = function (argument) {
  552. if (isObject$6(argument)) return argument;
  553. throw $TypeError$c($String$3(argument) + ' is not an object');
  554. };
  555. var DESCRIPTORS$7 = descriptors;
  556. var IE8_DOM_DEFINE = ie8DomDefine;
  557. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  558. var anObject$f = anObject$g;
  559. var toPropertyKey$1 = toPropertyKey$3;
  560. var $TypeError$b = TypeError;
  561. // eslint-disable-next-line es/no-object-defineproperty -- safe
  562. var $defineProperty = Object.defineProperty;
  563. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  564. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  565. var ENUMERABLE = 'enumerable';
  566. var CONFIGURABLE$1 = 'configurable';
  567. var WRITABLE = 'writable';
  568. // `Object.defineProperty` method
  569. // https://tc39.es/ecma262/#sec-object.defineproperty
  570. objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  571. anObject$f(O);
  572. P = toPropertyKey$1(P);
  573. anObject$f(Attributes);
  574. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  575. var current = $getOwnPropertyDescriptor(O, P);
  576. if (current && current[WRITABLE]) {
  577. O[P] = Attributes.value;
  578. Attributes = {
  579. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  580. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  581. writable: false
  582. };
  583. }
  584. } return $defineProperty(O, P, Attributes);
  585. } : $defineProperty : function defineProperty(O, P, Attributes) {
  586. anObject$f(O);
  587. P = toPropertyKey$1(P);
  588. anObject$f(Attributes);
  589. if (IE8_DOM_DEFINE) try {
  590. return $defineProperty(O, P, Attributes);
  591. } catch (error) { /* empty */ }
  592. if ('get' in Attributes || 'set' in Attributes) throw $TypeError$b('Accessors not supported');
  593. if ('value' in Attributes) O[P] = Attributes.value;
  594. return O;
  595. };
  596. var DESCRIPTORS$6 = descriptors;
  597. var definePropertyModule$4 = objectDefineProperty;
  598. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  599. var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value) {
  600. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  601. } : function (object, key, value) {
  602. object[key] = value;
  603. return object;
  604. };
  605. var makeBuiltInExports = {};
  606. var makeBuiltIn$3 = {
  607. get exports(){ return makeBuiltInExports; },
  608. set exports(v){ makeBuiltInExports = v; },
  609. };
  610. var DESCRIPTORS$5 = descriptors;
  611. var hasOwn$7 = hasOwnProperty_1;
  612. var FunctionPrototype$1 = Function.prototype;
  613. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  614. var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
  615. var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
  616. // additional protection from minified / mangled / dropped function names
  617. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  618. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  619. var functionName = {
  620. EXISTS: EXISTS,
  621. PROPER: PROPER,
  622. CONFIGURABLE: CONFIGURABLE
  623. };
  624. var uncurryThis$n = functionUncurryThis;
  625. var isCallable$d = isCallable$j;
  626. var store$1 = sharedStore;
  627. var functionToString = uncurryThis$n(Function.toString);
  628. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  629. if (!isCallable$d(store$1.inspectSource)) {
  630. store$1.inspectSource = function (it) {
  631. return functionToString(it);
  632. };
  633. }
  634. var inspectSource$3 = store$1.inspectSource;
  635. var global$d = global$k;
  636. var isCallable$c = isCallable$j;
  637. var WeakMap$1 = global$d.WeakMap;
  638. var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1));
  639. var shared$2 = sharedExports;
  640. var uid = uid$2;
  641. var keys = shared$2('keys');
  642. var sharedKey$2 = function (key) {
  643. return keys[key] || (keys[key] = uid(key));
  644. };
  645. var hiddenKeys$4 = {};
  646. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  647. var global$c = global$k;
  648. var isObject$5 = isObject$a;
  649. var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
  650. var hasOwn$6 = hasOwnProperty_1;
  651. var shared$1 = sharedStore;
  652. var sharedKey$1 = sharedKey$2;
  653. var hiddenKeys$3 = hiddenKeys$4;
  654. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  655. var TypeError$2 = global$c.TypeError;
  656. var WeakMap = global$c.WeakMap;
  657. var set$1, get, has;
  658. var enforce = function (it) {
  659. return has(it) ? get(it) : set$1(it, {});
  660. };
  661. var getterFor = function (TYPE) {
  662. return function (it) {
  663. var state;
  664. if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
  665. throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
  666. } return state;
  667. };
  668. };
  669. if (NATIVE_WEAK_MAP || shared$1.state) {
  670. var store = shared$1.state || (shared$1.state = new WeakMap());
  671. /* eslint-disable no-self-assign -- prototype methods protection */
  672. store.get = store.get;
  673. store.has = store.has;
  674. store.set = store.set;
  675. /* eslint-enable no-self-assign -- prototype methods protection */
  676. set$1 = function (it, metadata) {
  677. if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
  678. metadata.facade = it;
  679. store.set(it, metadata);
  680. return metadata;
  681. };
  682. get = function (it) {
  683. return store.get(it) || {};
  684. };
  685. has = function (it) {
  686. return store.has(it);
  687. };
  688. } else {
  689. var STATE = sharedKey$1('state');
  690. hiddenKeys$3[STATE] = true;
  691. set$1 = function (it, metadata) {
  692. if (hasOwn$6(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
  693. metadata.facade = it;
  694. createNonEnumerableProperty$3(it, STATE, metadata);
  695. return metadata;
  696. };
  697. get = function (it) {
  698. return hasOwn$6(it, STATE) ? it[STATE] : {};
  699. };
  700. has = function (it) {
  701. return hasOwn$6(it, STATE);
  702. };
  703. }
  704. var internalState = {
  705. set: set$1,
  706. get: get,
  707. has: has,
  708. enforce: enforce,
  709. getterFor: getterFor
  710. };
  711. var uncurryThis$m = functionUncurryThis;
  712. var fails$j = fails$q;
  713. var isCallable$b = isCallable$j;
  714. var hasOwn$5 = hasOwnProperty_1;
  715. var DESCRIPTORS$4 = descriptors;
  716. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  717. var inspectSource$2 = inspectSource$3;
  718. var InternalStateModule$1 = internalState;
  719. var enforceInternalState = InternalStateModule$1.enforce;
  720. var getInternalState$1 = InternalStateModule$1.get;
  721. var $String$2 = String;
  722. // eslint-disable-next-line es/no-object-defineproperty -- safe
  723. var defineProperty$4 = Object.defineProperty;
  724. var stringSlice$5 = uncurryThis$m(''.slice);
  725. var replace$3 = uncurryThis$m(''.replace);
  726. var join = uncurryThis$m([].join);
  727. var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$j(function () {
  728. return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  729. });
  730. var TEMPLATE = String(String).split('String');
  731. var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
  732. if (stringSlice$5($String$2(name), 0, 7) === 'Symbol(') {
  733. name = '[' + replace$3($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
  734. }
  735. if (options && options.getter) name = 'get ' + name;
  736. if (options && options.setter) name = 'set ' + name;
  737. if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  738. if (DESCRIPTORS$4) defineProperty$4(value, 'name', { value: name, configurable: true });
  739. else value.name = name;
  740. }
  741. if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
  742. defineProperty$4(value, 'length', { value: options.arity });
  743. }
  744. try {
  745. if (options && hasOwn$5(options, 'constructor') && options.constructor) {
  746. if (DESCRIPTORS$4) defineProperty$4(value, 'prototype', { writable: false });
  747. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  748. } else if (value.prototype) value.prototype = undefined;
  749. } catch (error) { /* empty */ }
  750. var state = enforceInternalState(value);
  751. if (!hasOwn$5(state, 'source')) {
  752. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  753. } return value;
  754. };
  755. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  756. // eslint-disable-next-line no-extend-native -- required
  757. Function.prototype.toString = makeBuiltIn$2(function toString() {
  758. return isCallable$b(this) && getInternalState$1(this).source || inspectSource$2(this);
  759. }, 'toString');
  760. var isCallable$a = isCallable$j;
  761. var definePropertyModule$3 = objectDefineProperty;
  762. var makeBuiltIn$1 = makeBuiltInExports;
  763. var defineGlobalProperty$1 = defineGlobalProperty$3;
  764. var defineBuiltIn$6 = function (O, key, value, options) {
  765. if (!options) options = {};
  766. var simple = options.enumerable;
  767. var name = options.name !== undefined ? options.name : key;
  768. if (isCallable$a(value)) makeBuiltIn$1(value, name, options);
  769. if (options.global) {
  770. if (simple) O[key] = value;
  771. else defineGlobalProperty$1(key, value);
  772. } else {
  773. try {
  774. if (!options.unsafe) delete O[key];
  775. else if (O[key]) simple = true;
  776. } catch (error) { /* empty */ }
  777. if (simple) O[key] = value;
  778. else definePropertyModule$3.f(O, key, {
  779. value: value,
  780. enumerable: false,
  781. configurable: !options.nonConfigurable,
  782. writable: !options.nonWritable
  783. });
  784. } return O;
  785. };
  786. var objectGetOwnPropertyNames = {};
  787. var ceil = Math.ceil;
  788. var floor$2 = Math.floor;
  789. // `Math.trunc` method
  790. // https://tc39.es/ecma262/#sec-math.trunc
  791. // eslint-disable-next-line es/no-math-trunc -- safe
  792. var mathTrunc = Math.trunc || function trunc(x) {
  793. var n = +x;
  794. return (n > 0 ? floor$2 : ceil)(n);
  795. };
  796. var trunc = mathTrunc;
  797. // `ToIntegerOrInfinity` abstract operation
  798. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  799. var toIntegerOrInfinity$4 = function (argument) {
  800. var number = +argument;
  801. // eslint-disable-next-line no-self-compare -- NaN check
  802. return number !== number || number === 0 ? 0 : trunc(number);
  803. };
  804. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  805. var max$2 = Math.max;
  806. var min$3 = Math.min;
  807. // Helper for a popular repeating case of the spec:
  808. // Let integer be ? ToInteger(index).
  809. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  810. var toAbsoluteIndex$2 = function (index, length) {
  811. var integer = toIntegerOrInfinity$3(index);
  812. return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
  813. };
  814. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  815. var min$2 = Math.min;
  816. // `ToLength` abstract operation
  817. // https://tc39.es/ecma262/#sec-tolength
  818. var toLength$4 = function (argument) {
  819. return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  820. };
  821. var toLength$3 = toLength$4;
  822. // `LengthOfArrayLike` abstract operation
  823. // https://tc39.es/ecma262/#sec-lengthofarraylike
  824. var lengthOfArrayLike$6 = function (obj) {
  825. return toLength$3(obj.length);
  826. };
  827. var toIndexedObject$4 = toIndexedObject$6;
  828. var toAbsoluteIndex$1 = toAbsoluteIndex$2;
  829. var lengthOfArrayLike$5 = lengthOfArrayLike$6;
  830. // `Array.prototype.{ indexOf, includes }` methods implementation
  831. var createMethod$4 = function (IS_INCLUDES) {
  832. return function ($this, el, fromIndex) {
  833. var O = toIndexedObject$4($this);
  834. var length = lengthOfArrayLike$5(O);
  835. var index = toAbsoluteIndex$1(fromIndex, length);
  836. var value;
  837. // Array#includes uses SameValueZero equality algorithm
  838. // eslint-disable-next-line no-self-compare -- NaN check
  839. if (IS_INCLUDES && el != el) while (length > index) {
  840. value = O[index++];
  841. // eslint-disable-next-line no-self-compare -- NaN check
  842. if (value != value) return true;
  843. // Array#indexOf ignores holes, Array#includes - not
  844. } else for (;length > index; index++) {
  845. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  846. } return !IS_INCLUDES && -1;
  847. };
  848. };
  849. var arrayIncludes = {
  850. // `Array.prototype.includes` method
  851. // https://tc39.es/ecma262/#sec-array.prototype.includes
  852. includes: createMethod$4(true),
  853. // `Array.prototype.indexOf` method
  854. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  855. indexOf: createMethod$4(false)
  856. };
  857. var uncurryThis$l = functionUncurryThis;
  858. var hasOwn$4 = hasOwnProperty_1;
  859. var toIndexedObject$3 = toIndexedObject$6;
  860. var indexOf$1 = arrayIncludes.indexOf;
  861. var hiddenKeys$2 = hiddenKeys$4;
  862. var push$5 = uncurryThis$l([].push);
  863. var objectKeysInternal = function (object, names) {
  864. var O = toIndexedObject$3(object);
  865. var i = 0;
  866. var result = [];
  867. var key;
  868. for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push$5(result, key);
  869. // Don't enum bug & hidden keys
  870. while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
  871. ~indexOf$1(result, key) || push$5(result, key);
  872. }
  873. return result;
  874. };
  875. // IE8- don't enum bug keys
  876. var enumBugKeys$3 = [
  877. 'constructor',
  878. 'hasOwnProperty',
  879. 'isPrototypeOf',
  880. 'propertyIsEnumerable',
  881. 'toLocaleString',
  882. 'toString',
  883. 'valueOf'
  884. ];
  885. var internalObjectKeys$1 = objectKeysInternal;
  886. var enumBugKeys$2 = enumBugKeys$3;
  887. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  888. // `Object.getOwnPropertyNames` method
  889. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  890. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  891. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  892. return internalObjectKeys$1(O, hiddenKeys$1);
  893. };
  894. var objectGetOwnPropertySymbols = {};
  895. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  896. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  897. var getBuiltIn$5 = getBuiltIn$7;
  898. var uncurryThis$k = functionUncurryThis;
  899. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  900. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  901. var anObject$e = anObject$g;
  902. var concat$2 = uncurryThis$k([].concat);
  903. // all object keys, includes non-enumerable and symbols
  904. var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
  905. var keys = getOwnPropertyNamesModule.f(anObject$e(it));
  906. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  907. return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
  908. };
  909. var hasOwn$3 = hasOwnProperty_1;
  910. var ownKeys = ownKeys$1;
  911. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  912. var definePropertyModule$2 = objectDefineProperty;
  913. var copyConstructorProperties$1 = function (target, source, exceptions) {
  914. var keys = ownKeys(source);
  915. var defineProperty = definePropertyModule$2.f;
  916. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  917. for (var i = 0; i < keys.length; i++) {
  918. var key = keys[i];
  919. if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
  920. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  921. }
  922. }
  923. };
  924. var fails$i = fails$q;
  925. var isCallable$9 = isCallable$j;
  926. var replacement = /#|\.prototype\./;
  927. var isForced$2 = function (feature, detection) {
  928. var value = data[normalize(feature)];
  929. return value == POLYFILL ? true
  930. : value == NATIVE ? false
  931. : isCallable$9(detection) ? fails$i(detection)
  932. : !!detection;
  933. };
  934. var normalize = isForced$2.normalize = function (string) {
  935. return String(string).replace(replacement, '.').toLowerCase();
  936. };
  937. var data = isForced$2.data = {};
  938. var NATIVE = isForced$2.NATIVE = 'N';
  939. var POLYFILL = isForced$2.POLYFILL = 'P';
  940. var isForced_1 = isForced$2;
  941. var global$b = global$k;
  942. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  943. var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
  944. var defineBuiltIn$5 = defineBuiltIn$6;
  945. var defineGlobalProperty = defineGlobalProperty$3;
  946. var copyConstructorProperties = copyConstructorProperties$1;
  947. var isForced$1 = isForced_1;
  948. /*
  949. options.target - name of the target object
  950. options.global - target is the global object
  951. options.stat - export as static methods of target
  952. options.proto - export as prototype methods of target
  953. options.real - real prototype method for the `pure` version
  954. options.forced - export even if the native feature is available
  955. options.bind - bind methods to the target, required for the `pure` version
  956. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  957. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  958. options.sham - add a flag to not completely full polyfills
  959. options.enumerable - export as enumerable property
  960. options.dontCallGetSet - prevent calling a getter on target
  961. options.name - the .name of the function if it does not match the key
  962. */
  963. var _export = function (options, source) {
  964. var TARGET = options.target;
  965. var GLOBAL = options.global;
  966. var STATIC = options.stat;
  967. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  968. if (GLOBAL) {
  969. target = global$b;
  970. } else if (STATIC) {
  971. target = global$b[TARGET] || defineGlobalProperty(TARGET, {});
  972. } else {
  973. target = (global$b[TARGET] || {}).prototype;
  974. }
  975. if (target) for (key in source) {
  976. sourceProperty = source[key];
  977. if (options.dontCallGetSet) {
  978. descriptor = getOwnPropertyDescriptor$1(target, key);
  979. targetProperty = descriptor && descriptor.value;
  980. } else targetProperty = target[key];
  981. FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  982. // contained in target
  983. if (!FORCED && targetProperty !== undefined) {
  984. if (typeof sourceProperty == typeof targetProperty) continue;
  985. copyConstructorProperties(sourceProperty, targetProperty);
  986. }
  987. // add a flag to not completely full polyfills
  988. if (options.sham || (targetProperty && targetProperty.sham)) {
  989. createNonEnumerableProperty$2(sourceProperty, 'sham', true);
  990. }
  991. defineBuiltIn$5(target, key, sourceProperty, options);
  992. }
  993. };
  994. var internalObjectKeys = objectKeysInternal;
  995. var enumBugKeys$1 = enumBugKeys$3;
  996. // `Object.keys` method
  997. // https://tc39.es/ecma262/#sec-object.keys
  998. // eslint-disable-next-line es/no-object-keys -- safe
  999. var objectKeys$3 = Object.keys || function keys(O) {
  1000. return internalObjectKeys(O, enumBugKeys$1);
  1001. };
  1002. var DESCRIPTORS$3 = descriptors;
  1003. var uncurryThis$j = functionUncurryThis;
  1004. var call$e = functionCall;
  1005. var fails$h = fails$q;
  1006. var objectKeys$2 = objectKeys$3;
  1007. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1008. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1009. var toObject$5 = toObject$7;
  1010. var IndexedObject$2 = indexedObject;
  1011. // eslint-disable-next-line es/no-object-assign -- safe
  1012. var $assign = Object.assign;
  1013. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1014. var defineProperty$3 = Object.defineProperty;
  1015. var concat$1 = uncurryThis$j([].concat);
  1016. // `Object.assign` method
  1017. // https://tc39.es/ecma262/#sec-object.assign
  1018. var objectAssign = !$assign || fails$h(function () {
  1019. // should have correct order of operations (Edge bug)
  1020. if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
  1021. enumerable: true,
  1022. get: function () {
  1023. defineProperty$3(this, 'b', {
  1024. value: 3,
  1025. enumerable: false
  1026. });
  1027. }
  1028. }), { b: 2 })).b !== 1) return true;
  1029. // should work with symbols and should have deterministic property order (V8 bug)
  1030. var A = {};
  1031. var B = {};
  1032. // eslint-disable-next-line es/no-symbol -- safe
  1033. var symbol = Symbol();
  1034. var alphabet = 'abcdefghijklmnopqrst';
  1035. A[symbol] = 7;
  1036. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1037. return $assign({}, A)[symbol] != 7 || objectKeys$2($assign({}, B)).join('') != alphabet;
  1038. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1039. var T = toObject$5(target);
  1040. var argumentsLength = arguments.length;
  1041. var index = 1;
  1042. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1043. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1044. while (argumentsLength > index) {
  1045. var S = IndexedObject$2(arguments[index++]);
  1046. var keys = getOwnPropertySymbols ? concat$1(objectKeys$2(S), getOwnPropertySymbols(S)) : objectKeys$2(S);
  1047. var length = keys.length;
  1048. var j = 0;
  1049. var key;
  1050. while (length > j) {
  1051. key = keys[j++];
  1052. if (!DESCRIPTORS$3 || call$e(propertyIsEnumerable, S, key)) T[key] = S[key];
  1053. }
  1054. } return T;
  1055. } : $assign;
  1056. var $$j = _export;
  1057. var assign = objectAssign;
  1058. // `Object.assign` method
  1059. // https://tc39.es/ecma262/#sec-object.assign
  1060. // eslint-disable-next-line es/no-object-assign -- required for testing
  1061. $$j({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1062. assign: assign
  1063. });
  1064. var classofRaw$1 = classofRaw$2;
  1065. var uncurryThis$i = functionUncurryThis;
  1066. var functionUncurryThisClause = function (fn) {
  1067. // Nashorn bug:
  1068. // https://github.com/zloirock/core-js/issues/1128
  1069. // https://github.com/zloirock/core-js/issues/1130
  1070. if (classofRaw$1(fn) === 'Function') return uncurryThis$i(fn);
  1071. };
  1072. var uncurryThis$h = functionUncurryThisClause;
  1073. var aCallable$7 = aCallable$9;
  1074. var NATIVE_BIND$1 = functionBindNative;
  1075. var bind$5 = uncurryThis$h(uncurryThis$h.bind);
  1076. // optional / simple context binding
  1077. var functionBindContext = function (fn, that) {
  1078. aCallable$7(fn);
  1079. return that === undefined ? fn : NATIVE_BIND$1 ? bind$5(fn, that) : function (/* ...args */) {
  1080. return fn.apply(that, arguments);
  1081. };
  1082. };
  1083. var classof$8 = classofRaw$2;
  1084. // `IsArray` abstract operation
  1085. // https://tc39.es/ecma262/#sec-isarray
  1086. // eslint-disable-next-line es/no-array-isarray -- safe
  1087. var isArray$2 = Array.isArray || function isArray(argument) {
  1088. return classof$8(argument) == 'Array';
  1089. };
  1090. var wellKnownSymbol$g = wellKnownSymbol$i;
  1091. var TO_STRING_TAG$2 = wellKnownSymbol$g('toStringTag');
  1092. var test$1 = {};
  1093. test$1[TO_STRING_TAG$2] = 'z';
  1094. var toStringTagSupport = String(test$1) === '[object z]';
  1095. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  1096. var isCallable$8 = isCallable$j;
  1097. var classofRaw = classofRaw$2;
  1098. var wellKnownSymbol$f = wellKnownSymbol$i;
  1099. var TO_STRING_TAG$1 = wellKnownSymbol$f('toStringTag');
  1100. var $Object = Object;
  1101. // ES3 wrong here
  1102. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  1103. // fallback for IE11 Script Access Denied error
  1104. var tryGet = function (it, key) {
  1105. try {
  1106. return it[key];
  1107. } catch (error) { /* empty */ }
  1108. };
  1109. // getting tag from ES6+ `Object.prototype.toString`
  1110. var classof$7 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  1111. var O, tag, result;
  1112. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1113. // @@toStringTag case
  1114. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$1)) == 'string' ? tag
  1115. // builtinTag case
  1116. : CORRECT_ARGUMENTS ? classofRaw(O)
  1117. // ES3 arguments fallback
  1118. : (result = classofRaw(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
  1119. };
  1120. var uncurryThis$g = functionUncurryThis;
  1121. var fails$g = fails$q;
  1122. var isCallable$7 = isCallable$j;
  1123. var classof$6 = classof$7;
  1124. var getBuiltIn$4 = getBuiltIn$7;
  1125. var inspectSource$1 = inspectSource$3;
  1126. var noop = function () { /* empty */ };
  1127. var empty = [];
  1128. var construct = getBuiltIn$4('Reflect', 'construct');
  1129. var constructorRegExp = /^\s*(?:class|function)\b/;
  1130. var exec$3 = uncurryThis$g(constructorRegExp.exec);
  1131. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1132. var isConstructorModern = function isConstructor(argument) {
  1133. if (!isCallable$7(argument)) return false;
  1134. try {
  1135. construct(noop, empty, argument);
  1136. return true;
  1137. } catch (error) {
  1138. return false;
  1139. }
  1140. };
  1141. var isConstructorLegacy = function isConstructor(argument) {
  1142. if (!isCallable$7(argument)) return false;
  1143. switch (classof$6(argument)) {
  1144. case 'AsyncFunction':
  1145. case 'GeneratorFunction':
  1146. case 'AsyncGeneratorFunction': return false;
  1147. }
  1148. try {
  1149. // we can't check .prototype since constructors produced by .bind haven't it
  1150. // `Function#toString` throws on some built-it function in some legacy engines
  1151. // (for example, `DOMQuad` and similar in FF41-)
  1152. return INCORRECT_TO_STRING || !!exec$3(constructorRegExp, inspectSource$1(argument));
  1153. } catch (error) {
  1154. return true;
  1155. }
  1156. };
  1157. isConstructorLegacy.sham = true;
  1158. // `IsConstructor` abstract operation
  1159. // https://tc39.es/ecma262/#sec-isconstructor
  1160. var isConstructor$2 = !construct || fails$g(function () {
  1161. var called;
  1162. return isConstructorModern(isConstructorModern.call)
  1163. || !isConstructorModern(Object)
  1164. || !isConstructorModern(function () { called = true; })
  1165. || called;
  1166. }) ? isConstructorLegacy : isConstructorModern;
  1167. var isArray$1 = isArray$2;
  1168. var isConstructor$1 = isConstructor$2;
  1169. var isObject$4 = isObject$a;
  1170. var wellKnownSymbol$e = wellKnownSymbol$i;
  1171. var SPECIES$5 = wellKnownSymbol$e('species');
  1172. var $Array$1 = Array;
  1173. // a part of `ArraySpeciesCreate` abstract operation
  1174. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1175. var arraySpeciesConstructor$1 = function (originalArray) {
  1176. var C;
  1177. if (isArray$1(originalArray)) {
  1178. C = originalArray.constructor;
  1179. // cross-realm fallback
  1180. if (isConstructor$1(C) && (C === $Array$1 || isArray$1(C.prototype))) C = undefined;
  1181. else if (isObject$4(C)) {
  1182. C = C[SPECIES$5];
  1183. if (C === null) C = undefined;
  1184. }
  1185. } return C === undefined ? $Array$1 : C;
  1186. };
  1187. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1188. // `ArraySpeciesCreate` abstract operation
  1189. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1190. var arraySpeciesCreate$2 = function (originalArray, length) {
  1191. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1192. };
  1193. var bind$4 = functionBindContext;
  1194. var uncurryThis$f = functionUncurryThis;
  1195. var IndexedObject$1 = indexedObject;
  1196. var toObject$4 = toObject$7;
  1197. var lengthOfArrayLike$4 = lengthOfArrayLike$6;
  1198. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1199. var push$4 = uncurryThis$f([].push);
  1200. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1201. var createMethod$3 = function (TYPE) {
  1202. var IS_MAP = TYPE == 1;
  1203. var IS_FILTER = TYPE == 2;
  1204. var IS_SOME = TYPE == 3;
  1205. var IS_EVERY = TYPE == 4;
  1206. var IS_FIND_INDEX = TYPE == 6;
  1207. var IS_FILTER_REJECT = TYPE == 7;
  1208. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1209. return function ($this, callbackfn, that, specificCreate) {
  1210. var O = toObject$4($this);
  1211. var self = IndexedObject$1(O);
  1212. var boundFunction = bind$4(callbackfn, that);
  1213. var length = lengthOfArrayLike$4(self);
  1214. var index = 0;
  1215. var create = specificCreate || arraySpeciesCreate$1;
  1216. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1217. var value, result;
  1218. for (;length > index; index++) if (NO_HOLES || index in self) {
  1219. value = self[index];
  1220. result = boundFunction(value, index, O);
  1221. if (TYPE) {
  1222. if (IS_MAP) target[index] = result; // map
  1223. else if (result) switch (TYPE) {
  1224. case 3: return true; // some
  1225. case 5: return value; // find
  1226. case 6: return index; // findIndex
  1227. case 2: push$4(target, value); // filter
  1228. } else switch (TYPE) {
  1229. case 4: return false; // every
  1230. case 7: push$4(target, value); // filterReject
  1231. }
  1232. }
  1233. }
  1234. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1235. };
  1236. };
  1237. var arrayIteration = {
  1238. // `Array.prototype.forEach` method
  1239. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1240. forEach: createMethod$3(0),
  1241. // `Array.prototype.map` method
  1242. // https://tc39.es/ecma262/#sec-array.prototype.map
  1243. map: createMethod$3(1),
  1244. // `Array.prototype.filter` method
  1245. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1246. filter: createMethod$3(2),
  1247. // `Array.prototype.some` method
  1248. // https://tc39.es/ecma262/#sec-array.prototype.some
  1249. some: createMethod$3(3),
  1250. // `Array.prototype.every` method
  1251. // https://tc39.es/ecma262/#sec-array.prototype.every
  1252. every: createMethod$3(4),
  1253. // `Array.prototype.find` method
  1254. // https://tc39.es/ecma262/#sec-array.prototype.find
  1255. find: createMethod$3(5),
  1256. // `Array.prototype.findIndex` method
  1257. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1258. findIndex: createMethod$3(6),
  1259. // `Array.prototype.filterReject` method
  1260. // https://github.com/tc39/proposal-array-filtering
  1261. filterReject: createMethod$3(7)
  1262. };
  1263. var fails$f = fails$q;
  1264. var wellKnownSymbol$d = wellKnownSymbol$i;
  1265. var V8_VERSION$2 = engineV8Version;
  1266. var SPECIES$4 = wellKnownSymbol$d('species');
  1267. var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
  1268. // We can't use this feature detection in V8 since it causes
  1269. // deoptimization and serious performance degradation
  1270. // https://github.com/zloirock/core-js/issues/677
  1271. return V8_VERSION$2 >= 51 || !fails$f(function () {
  1272. var array = [];
  1273. var constructor = array.constructor = {};
  1274. constructor[SPECIES$4] = function () {
  1275. return { foo: 1 };
  1276. };
  1277. return array[METHOD_NAME](Boolean).foo !== 1;
  1278. });
  1279. };
  1280. var $$i = _export;
  1281. var $filter = arrayIteration.filter;
  1282. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
  1283. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('filter');
  1284. // `Array.prototype.filter` method
  1285. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1286. // with adding support of @@species
  1287. $$i({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1288. filter: function filter(callbackfn /* , thisArg */) {
  1289. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1290. }
  1291. });
  1292. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1293. var classof$5 = classof$7;
  1294. // `Object.prototype.toString` method implementation
  1295. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1296. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1297. return '[object ' + classof$5(this) + ']';
  1298. };
  1299. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1300. var defineBuiltIn$4 = defineBuiltIn$6;
  1301. var toString$a = objectToString;
  1302. // `Object.prototype.toString` method
  1303. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1304. if (!TO_STRING_TAG_SUPPORT) {
  1305. defineBuiltIn$4(Object.prototype, 'toString', toString$a, { unsafe: true });
  1306. }
  1307. var $$h = _export;
  1308. var toObject$3 = toObject$7;
  1309. var nativeKeys = objectKeys$3;
  1310. var fails$e = fails$q;
  1311. var FAILS_ON_PRIMITIVES = fails$e(function () { nativeKeys(1); });
  1312. // `Object.keys` method
  1313. // https://tc39.es/ecma262/#sec-object.keys
  1314. $$h({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  1315. keys: function keys(it) {
  1316. return nativeKeys(toObject$3(it));
  1317. }
  1318. });
  1319. var $TypeError$a = TypeError;
  1320. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1321. var doesNotExceedSafeInteger$1 = function (it) {
  1322. if (it > MAX_SAFE_INTEGER) throw $TypeError$a('Maximum allowed index exceeded');
  1323. return it;
  1324. };
  1325. var toPropertyKey = toPropertyKey$3;
  1326. var definePropertyModule$1 = objectDefineProperty;
  1327. var createPropertyDescriptor = createPropertyDescriptor$3;
  1328. var createProperty$2 = function (object, key, value) {
  1329. var propertyKey = toPropertyKey(key);
  1330. if (propertyKey in object) definePropertyModule$1.f(object, propertyKey, createPropertyDescriptor(0, value));
  1331. else object[propertyKey] = value;
  1332. };
  1333. var $$g = _export;
  1334. var fails$d = fails$q;
  1335. var isArray = isArray$2;
  1336. var isObject$3 = isObject$a;
  1337. var toObject$2 = toObject$7;
  1338. var lengthOfArrayLike$3 = lengthOfArrayLike$6;
  1339. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1340. var createProperty$1 = createProperty$2;
  1341. var arraySpeciesCreate = arraySpeciesCreate$2;
  1342. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
  1343. var wellKnownSymbol$c = wellKnownSymbol$i;
  1344. var V8_VERSION$1 = engineV8Version;
  1345. var IS_CONCAT_SPREADABLE = wellKnownSymbol$c('isConcatSpreadable');
  1346. // We can't use this feature detection in V8 since it causes
  1347. // deoptimization and serious performance degradation
  1348. // https://github.com/zloirock/core-js/issues/679
  1349. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION$1 >= 51 || !fails$d(function () {
  1350. var array = [];
  1351. array[IS_CONCAT_SPREADABLE] = false;
  1352. return array.concat()[0] !== array;
  1353. });
  1354. var isConcatSpreadable = function (O) {
  1355. if (!isObject$3(O)) return false;
  1356. var spreadable = O[IS_CONCAT_SPREADABLE];
  1357. return spreadable !== undefined ? !!spreadable : isArray(O);
  1358. };
  1359. var FORCED$4 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');
  1360. // `Array.prototype.concat` method
  1361. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1362. // with adding support of @@isConcatSpreadable and @@species
  1363. $$g({ target: 'Array', proto: true, arity: 1, forced: FORCED$4 }, {
  1364. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1365. concat: function concat(arg) {
  1366. var O = toObject$2(this);
  1367. var A = arraySpeciesCreate(O, 0);
  1368. var n = 0;
  1369. var i, k, length, len, E;
  1370. for (i = -1, length = arguments.length; i < length; i++) {
  1371. E = i === -1 ? O : arguments[i];
  1372. if (isConcatSpreadable(E)) {
  1373. len = lengthOfArrayLike$3(E);
  1374. doesNotExceedSafeInteger(n + len);
  1375. for (k = 0; k < len; k++, n++) if (k in E) createProperty$1(A, n, E[k]);
  1376. } else {
  1377. doesNotExceedSafeInteger(n + 1);
  1378. createProperty$1(A, n++, E);
  1379. }
  1380. }
  1381. A.length = n;
  1382. return A;
  1383. }
  1384. });
  1385. var objectDefineProperties = {};
  1386. var DESCRIPTORS$2 = descriptors;
  1387. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1388. var definePropertyModule = objectDefineProperty;
  1389. var anObject$d = anObject$g;
  1390. var toIndexedObject$2 = toIndexedObject$6;
  1391. var objectKeys$1 = objectKeys$3;
  1392. // `Object.defineProperties` method
  1393. // https://tc39.es/ecma262/#sec-object.defineproperties
  1394. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1395. objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1396. anObject$d(O);
  1397. var props = toIndexedObject$2(Properties);
  1398. var keys = objectKeys$1(Properties);
  1399. var length = keys.length;
  1400. var index = 0;
  1401. var key;
  1402. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1403. return O;
  1404. };
  1405. var getBuiltIn$3 = getBuiltIn$7;
  1406. var html$2 = getBuiltIn$3('document', 'documentElement');
  1407. /* global ActiveXObject -- old IE, WSH */
  1408. var anObject$c = anObject$g;
  1409. var definePropertiesModule = objectDefineProperties;
  1410. var enumBugKeys = enumBugKeys$3;
  1411. var hiddenKeys = hiddenKeys$4;
  1412. var html$1 = html$2;
  1413. var documentCreateElement$1 = documentCreateElement$2;
  1414. var sharedKey = sharedKey$2;
  1415. var GT = '>';
  1416. var LT = '<';
  1417. var PROTOTYPE = 'prototype';
  1418. var SCRIPT = 'script';
  1419. var IE_PROTO = sharedKey('IE_PROTO');
  1420. var EmptyConstructor = function () { /* empty */ };
  1421. var scriptTag = function (content) {
  1422. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1423. };
  1424. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1425. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1426. activeXDocument.write(scriptTag(''));
  1427. activeXDocument.close();
  1428. var temp = activeXDocument.parentWindow.Object;
  1429. activeXDocument = null; // avoid memory leak
  1430. return temp;
  1431. };
  1432. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1433. var NullProtoObjectViaIFrame = function () {
  1434. // Thrash, waste and sodomy: IE GC bug
  1435. var iframe = documentCreateElement$1('iframe');
  1436. var JS = 'java' + SCRIPT + ':';
  1437. var iframeDocument;
  1438. iframe.style.display = 'none';
  1439. html$1.appendChild(iframe);
  1440. // https://github.com/zloirock/core-js/issues/475
  1441. iframe.src = String(JS);
  1442. iframeDocument = iframe.contentWindow.document;
  1443. iframeDocument.open();
  1444. iframeDocument.write(scriptTag('document.F=Object'));
  1445. iframeDocument.close();
  1446. return iframeDocument.F;
  1447. };
  1448. // Check for document.domain and active x support
  1449. // No need to use active x approach when document.domain is not set
  1450. // see https://github.com/es-shims/es5-shim/issues/150
  1451. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1452. // avoid IE GC bug
  1453. var activeXDocument;
  1454. var NullProtoObject = function () {
  1455. try {
  1456. activeXDocument = new ActiveXObject('htmlfile');
  1457. } catch (error) { /* ignore */ }
  1458. NullProtoObject = typeof document != 'undefined'
  1459. ? document.domain && activeXDocument
  1460. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1461. : NullProtoObjectViaIFrame()
  1462. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1463. var length = enumBugKeys.length;
  1464. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1465. return NullProtoObject();
  1466. };
  1467. hiddenKeys[IE_PROTO] = true;
  1468. // `Object.create` method
  1469. // https://tc39.es/ecma262/#sec-object.create
  1470. // eslint-disable-next-line es/no-object-create -- safe
  1471. var objectCreate = Object.create || function create(O, Properties) {
  1472. var result;
  1473. if (O !== null) {
  1474. EmptyConstructor[PROTOTYPE] = anObject$c(O);
  1475. result = new EmptyConstructor();
  1476. EmptyConstructor[PROTOTYPE] = null;
  1477. // add "__proto__" for Object.getPrototypeOf polyfill
  1478. result[IE_PROTO] = O;
  1479. } else result = NullProtoObject();
  1480. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1481. };
  1482. var wellKnownSymbol$b = wellKnownSymbol$i;
  1483. var create$1 = objectCreate;
  1484. var defineProperty$2 = objectDefineProperty.f;
  1485. var UNSCOPABLES = wellKnownSymbol$b('unscopables');
  1486. var ArrayPrototype$1 = Array.prototype;
  1487. // Array.prototype[@@unscopables]
  1488. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1489. if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
  1490. defineProperty$2(ArrayPrototype$1, UNSCOPABLES, {
  1491. configurable: true,
  1492. value: create$1(null)
  1493. });
  1494. }
  1495. // add a key to Array.prototype[@@unscopables]
  1496. var addToUnscopables$2 = function (key) {
  1497. ArrayPrototype$1[UNSCOPABLES][key] = true;
  1498. };
  1499. var $$f = _export;
  1500. var $includes = arrayIncludes.includes;
  1501. var fails$c = fails$q;
  1502. var addToUnscopables$1 = addToUnscopables$2;
  1503. // FF99+ bug
  1504. var BROKEN_ON_SPARSE = fails$c(function () {
  1505. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  1506. return !Array(1).includes();
  1507. });
  1508. // `Array.prototype.includes` method
  1509. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1510. $$f({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1511. includes: function includes(el /* , fromIndex = 0 */) {
  1512. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1513. }
  1514. });
  1515. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1516. addToUnscopables$1('includes');
  1517. var isObject$2 = isObject$a;
  1518. var classof$4 = classofRaw$2;
  1519. var wellKnownSymbol$a = wellKnownSymbol$i;
  1520. var MATCH$1 = wellKnownSymbol$a('match');
  1521. // `IsRegExp` abstract operation
  1522. // https://tc39.es/ecma262/#sec-isregexp
  1523. var isRegexp = function (it) {
  1524. var isRegExp;
  1525. return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$4(it) == 'RegExp');
  1526. };
  1527. var isRegExp$1 = isRegexp;
  1528. var $TypeError$9 = TypeError;
  1529. var notARegexp = function (it) {
  1530. if (isRegExp$1(it)) {
  1531. throw $TypeError$9("The method doesn't accept regular expressions");
  1532. } return it;
  1533. };
  1534. var classof$3 = classof$7;
  1535. var $String$1 = String;
  1536. var toString$9 = function (argument) {
  1537. if (classof$3(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1538. return $String$1(argument);
  1539. };
  1540. var wellKnownSymbol$9 = wellKnownSymbol$i;
  1541. var MATCH = wellKnownSymbol$9('match');
  1542. var correctIsRegexpLogic = function (METHOD_NAME) {
  1543. var regexp = /./;
  1544. try {
  1545. '/./'[METHOD_NAME](regexp);
  1546. } catch (error1) {
  1547. try {
  1548. regexp[MATCH] = false;
  1549. return '/./'[METHOD_NAME](regexp);
  1550. } catch (error2) { /* empty */ }
  1551. } return false;
  1552. };
  1553. var $$e = _export;
  1554. var uncurryThis$e = functionUncurryThis;
  1555. var notARegExp = notARegexp;
  1556. var requireObjectCoercible$5 = requireObjectCoercible$8;
  1557. var toString$8 = toString$9;
  1558. var correctIsRegExpLogic = correctIsRegexpLogic;
  1559. var stringIndexOf$1 = uncurryThis$e(''.indexOf);
  1560. // `String.prototype.includes` method
  1561. // https://tc39.es/ecma262/#sec-string.prototype.includes
  1562. $$e({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  1563. includes: function includes(searchString /* , position = 0 */) {
  1564. return !!~stringIndexOf$1(
  1565. toString$8(requireObjectCoercible$5(this)),
  1566. toString$8(notARegExp(searchString)),
  1567. arguments.length > 1 ? arguments[1] : undefined
  1568. );
  1569. }
  1570. });
  1571. // iterable DOM collections
  1572. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  1573. var domIterables = {
  1574. CSSRuleList: 0,
  1575. CSSStyleDeclaration: 0,
  1576. CSSValueList: 0,
  1577. ClientRectList: 0,
  1578. DOMRectList: 0,
  1579. DOMStringList: 0,
  1580. DOMTokenList: 1,
  1581. DataTransferItemList: 0,
  1582. FileList: 0,
  1583. HTMLAllCollection: 0,
  1584. HTMLCollection: 0,
  1585. HTMLFormElement: 0,
  1586. HTMLSelectElement: 0,
  1587. MediaList: 0,
  1588. MimeTypeArray: 0,
  1589. NamedNodeMap: 0,
  1590. NodeList: 1,
  1591. PaintRequestList: 0,
  1592. Plugin: 0,
  1593. PluginArray: 0,
  1594. SVGLengthList: 0,
  1595. SVGNumberList: 0,
  1596. SVGPathSegList: 0,
  1597. SVGPointList: 0,
  1598. SVGStringList: 0,
  1599. SVGTransformList: 0,
  1600. SourceBufferList: 0,
  1601. StyleSheetList: 0,
  1602. TextTrackCueList: 0,
  1603. TextTrackList: 0,
  1604. TouchList: 0
  1605. };
  1606. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  1607. var documentCreateElement = documentCreateElement$2;
  1608. var classList = documentCreateElement('span').classList;
  1609. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  1610. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  1611. var fails$b = fails$q;
  1612. var arrayMethodIsStrict$4 = function (METHOD_NAME, argument) {
  1613. var method = [][METHOD_NAME];
  1614. return !!method && fails$b(function () {
  1615. // eslint-disable-next-line no-useless-call -- required for testing
  1616. method.call(null, argument || function () { return 1; }, 1);
  1617. });
  1618. };
  1619. var $forEach = arrayIteration.forEach;
  1620. var arrayMethodIsStrict$3 = arrayMethodIsStrict$4;
  1621. var STRICT_METHOD$1 = arrayMethodIsStrict$3('forEach');
  1622. // `Array.prototype.forEach` method implementation
  1623. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1624. var arrayForEach = !STRICT_METHOD$1 ? function forEach(callbackfn /* , thisArg */) {
  1625. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1626. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  1627. } : [].forEach;
  1628. var global$a = global$k;
  1629. var DOMIterables = domIterables;
  1630. var DOMTokenListPrototype = domTokenListPrototype;
  1631. var forEach = arrayForEach;
  1632. var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
  1633. var handlePrototype = function (CollectionPrototype) {
  1634. // some Chrome versions have non-configurable methods on DOMTokenList
  1635. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  1636. createNonEnumerableProperty$1(CollectionPrototype, 'forEach', forEach);
  1637. } catch (error) {
  1638. CollectionPrototype.forEach = forEach;
  1639. }
  1640. };
  1641. for (var COLLECTION_NAME in DOMIterables) {
  1642. if (DOMIterables[COLLECTION_NAME]) {
  1643. handlePrototype(global$a[COLLECTION_NAME] && global$a[COLLECTION_NAME].prototype);
  1644. }
  1645. }
  1646. handlePrototype(DOMTokenListPrototype);
  1647. var anObject$b = anObject$g;
  1648. // `RegExp.prototype.flags` getter implementation
  1649. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1650. var regexpFlags$1 = function () {
  1651. var that = anObject$b(this);
  1652. var result = '';
  1653. if (that.hasIndices) result += 'd';
  1654. if (that.global) result += 'g';
  1655. if (that.ignoreCase) result += 'i';
  1656. if (that.multiline) result += 'm';
  1657. if (that.dotAll) result += 's';
  1658. if (that.unicode) result += 'u';
  1659. if (that.unicodeSets) result += 'v';
  1660. if (that.sticky) result += 'y';
  1661. return result;
  1662. };
  1663. var fails$a = fails$q;
  1664. var global$9 = global$k;
  1665. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  1666. var $RegExp$2 = global$9.RegExp;
  1667. var UNSUPPORTED_Y$2 = fails$a(function () {
  1668. var re = $RegExp$2('a', 'y');
  1669. re.lastIndex = 2;
  1670. return re.exec('abcd') != null;
  1671. });
  1672. // UC Browser bug
  1673. // https://github.com/zloirock/core-js/issues/1008
  1674. var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$a(function () {
  1675. return !$RegExp$2('a', 'y').sticky;
  1676. });
  1677. var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$a(function () {
  1678. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  1679. var re = $RegExp$2('^r', 'gy');
  1680. re.lastIndex = 2;
  1681. return re.exec('str') != null;
  1682. });
  1683. var regexpStickyHelpers = {
  1684. BROKEN_CARET: BROKEN_CARET,
  1685. MISSED_STICKY: MISSED_STICKY,
  1686. UNSUPPORTED_Y: UNSUPPORTED_Y$2
  1687. };
  1688. var fails$9 = fails$q;
  1689. var global$8 = global$k;
  1690. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  1691. var $RegExp$1 = global$8.RegExp;
  1692. var regexpUnsupportedDotAll = fails$9(function () {
  1693. var re = $RegExp$1('.', 's');
  1694. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  1695. });
  1696. var fails$8 = fails$q;
  1697. var global$7 = global$k;
  1698. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  1699. var $RegExp = global$7.RegExp;
  1700. var regexpUnsupportedNcg = fails$8(function () {
  1701. var re = $RegExp('(?<a>b)', 'g');
  1702. return re.exec('b').groups.a !== 'b' ||
  1703. 'b'.replace(re, '$<a>c') !== 'bc';
  1704. });
  1705. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1706. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1707. var call$d = functionCall;
  1708. var uncurryThis$d = functionUncurryThis;
  1709. var toString$7 = toString$9;
  1710. var regexpFlags = regexpFlags$1;
  1711. var stickyHelpers$1 = regexpStickyHelpers;
  1712. var shared = sharedExports;
  1713. var create = objectCreate;
  1714. var getInternalState = internalState.get;
  1715. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  1716. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  1717. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1718. var nativeExec = RegExp.prototype.exec;
  1719. var patchedExec = nativeExec;
  1720. var charAt$3 = uncurryThis$d(''.charAt);
  1721. var indexOf = uncurryThis$d(''.indexOf);
  1722. var replace$2 = uncurryThis$d(''.replace);
  1723. var stringSlice$4 = uncurryThis$d(''.slice);
  1724. var UPDATES_LAST_INDEX_WRONG = (function () {
  1725. var re1 = /a/;
  1726. var re2 = /b*/g;
  1727. call$d(nativeExec, re1, 'a');
  1728. call$d(nativeExec, re2, 'a');
  1729. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1730. })();
  1731. var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
  1732. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1733. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1734. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  1735. if (PATCH) {
  1736. patchedExec = function exec(string) {
  1737. var re = this;
  1738. var state = getInternalState(re);
  1739. var str = toString$7(string);
  1740. var raw = state.raw;
  1741. var result, reCopy, lastIndex, match, i, object, group;
  1742. if (raw) {
  1743. raw.lastIndex = re.lastIndex;
  1744. result = call$d(patchedExec, raw, str);
  1745. re.lastIndex = raw.lastIndex;
  1746. return result;
  1747. }
  1748. var groups = state.groups;
  1749. var sticky = UNSUPPORTED_Y$1 && re.sticky;
  1750. var flags = call$d(regexpFlags, re);
  1751. var source = re.source;
  1752. var charsAdded = 0;
  1753. var strCopy = str;
  1754. if (sticky) {
  1755. flags = replace$2(flags, 'y', '');
  1756. if (indexOf(flags, 'g') === -1) {
  1757. flags += 'g';
  1758. }
  1759. strCopy = stringSlice$4(str, re.lastIndex);
  1760. // Support anchored sticky behavior.
  1761. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  1762. source = '(?: ' + source + ')';
  1763. strCopy = ' ' + strCopy;
  1764. charsAdded++;
  1765. }
  1766. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1767. // simulate the 'y' flag.
  1768. reCopy = new RegExp('^(?:' + source + ')', flags);
  1769. }
  1770. if (NPCG_INCLUDED) {
  1771. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1772. }
  1773. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1774. match = call$d(nativeExec, sticky ? reCopy : re, strCopy);
  1775. if (sticky) {
  1776. if (match) {
  1777. match.input = stringSlice$4(match.input, charsAdded);
  1778. match[0] = stringSlice$4(match[0], charsAdded);
  1779. match.index = re.lastIndex;
  1780. re.lastIndex += match[0].length;
  1781. } else re.lastIndex = 0;
  1782. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1783. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1784. }
  1785. if (NPCG_INCLUDED && match && match.length > 1) {
  1786. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1787. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  1788. call$d(nativeReplace, match[0], reCopy, function () {
  1789. for (i = 1; i < arguments.length - 2; i++) {
  1790. if (arguments[i] === undefined) match[i] = undefined;
  1791. }
  1792. });
  1793. }
  1794. if (match && groups) {
  1795. match.groups = object = create(null);
  1796. for (i = 0; i < groups.length; i++) {
  1797. group = groups[i];
  1798. object[group[0]] = match[group[1]];
  1799. }
  1800. }
  1801. return match;
  1802. };
  1803. }
  1804. var regexpExec$3 = patchedExec;
  1805. var $$d = _export;
  1806. var exec$2 = regexpExec$3;
  1807. // `RegExp.prototype.exec` method
  1808. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1809. $$d({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
  1810. exec: exec$2
  1811. });
  1812. var NATIVE_BIND = functionBindNative;
  1813. var FunctionPrototype = Function.prototype;
  1814. var apply$3 = FunctionPrototype.apply;
  1815. var call$c = FunctionPrototype.call;
  1816. // eslint-disable-next-line es/no-reflect -- safe
  1817. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$c.bind(apply$3) : function () {
  1818. return call$c.apply(apply$3, arguments);
  1819. });
  1820. // TODO: Remove from `core-js@4` since it's moved to entry points
  1821. var uncurryThis$c = functionUncurryThisClause;
  1822. var defineBuiltIn$3 = defineBuiltIn$6;
  1823. var regexpExec$2 = regexpExec$3;
  1824. var fails$7 = fails$q;
  1825. var wellKnownSymbol$8 = wellKnownSymbol$i;
  1826. var createNonEnumerableProperty = createNonEnumerableProperty$4;
  1827. var SPECIES$3 = wellKnownSymbol$8('species');
  1828. var RegExpPrototype$2 = RegExp.prototype;
  1829. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1830. var SYMBOL = wellKnownSymbol$8(KEY);
  1831. var DELEGATES_TO_SYMBOL = !fails$7(function () {
  1832. // String methods call symbol-named RegEp methods
  1833. var O = {};
  1834. O[SYMBOL] = function () { return 7; };
  1835. return ''[KEY](O) != 7;
  1836. });
  1837. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$7(function () {
  1838. // Symbol-named RegExp methods call .exec
  1839. var execCalled = false;
  1840. var re = /a/;
  1841. if (KEY === 'split') {
  1842. // We can't use real regex here since it causes deoptimization
  1843. // and serious performance degradation in V8
  1844. // https://github.com/zloirock/core-js/issues/306
  1845. re = {};
  1846. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1847. // a new one. We need to return the patched regex when creating the new one.
  1848. re.constructor = {};
  1849. re.constructor[SPECIES$3] = function () { return re; };
  1850. re.flags = '';
  1851. re[SYMBOL] = /./[SYMBOL];
  1852. }
  1853. re.exec = function () { execCalled = true; return null; };
  1854. re[SYMBOL]('');
  1855. return !execCalled;
  1856. });
  1857. if (
  1858. !DELEGATES_TO_SYMBOL ||
  1859. !DELEGATES_TO_EXEC ||
  1860. FORCED
  1861. ) {
  1862. var uncurriedNativeRegExpMethod = uncurryThis$c(/./[SYMBOL]);
  1863. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1864. var uncurriedNativeMethod = uncurryThis$c(nativeMethod);
  1865. var $exec = regexp.exec;
  1866. if ($exec === regexpExec$2 || $exec === RegExpPrototype$2.exec) {
  1867. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1868. // The native String method already delegates to @@method (this
  1869. // polyfilled function), leasing to infinite recursion.
  1870. // We avoid it by directly calling the native @@method method.
  1871. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  1872. }
  1873. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  1874. }
  1875. return { done: false };
  1876. });
  1877. defineBuiltIn$3(String.prototype, KEY, methods[0]);
  1878. defineBuiltIn$3(RegExpPrototype$2, SYMBOL, methods[1]);
  1879. }
  1880. if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
  1881. };
  1882. var isConstructor = isConstructor$2;
  1883. var tryToString$3 = tryToString$5;
  1884. var $TypeError$8 = TypeError;
  1885. // `Assert: IsConstructor(argument) is true`
  1886. var aConstructor$1 = function (argument) {
  1887. if (isConstructor(argument)) return argument;
  1888. throw $TypeError$8(tryToString$3(argument) + ' is not a constructor');
  1889. };
  1890. var anObject$a = anObject$g;
  1891. var aConstructor = aConstructor$1;
  1892. var isNullOrUndefined$4 = isNullOrUndefined$7;
  1893. var wellKnownSymbol$7 = wellKnownSymbol$i;
  1894. var SPECIES$2 = wellKnownSymbol$7('species');
  1895. // `SpeciesConstructor` abstract operation
  1896. // https://tc39.es/ecma262/#sec-speciesconstructor
  1897. var speciesConstructor$2 = function (O, defaultConstructor) {
  1898. var C = anObject$a(O).constructor;
  1899. var S;
  1900. return C === undefined || isNullOrUndefined$4(S = anObject$a(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
  1901. };
  1902. var uncurryThis$b = functionUncurryThis;
  1903. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  1904. var toString$6 = toString$9;
  1905. var requireObjectCoercible$4 = requireObjectCoercible$8;
  1906. var charAt$2 = uncurryThis$b(''.charAt);
  1907. var charCodeAt = uncurryThis$b(''.charCodeAt);
  1908. var stringSlice$3 = uncurryThis$b(''.slice);
  1909. var createMethod$2 = function (CONVERT_TO_STRING) {
  1910. return function ($this, pos) {
  1911. var S = toString$6(requireObjectCoercible$4($this));
  1912. var position = toIntegerOrInfinity$1(pos);
  1913. var size = S.length;
  1914. var first, second;
  1915. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  1916. first = charCodeAt(S, position);
  1917. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  1918. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  1919. ? CONVERT_TO_STRING
  1920. ? charAt$2(S, position)
  1921. : first
  1922. : CONVERT_TO_STRING
  1923. ? stringSlice$3(S, position, position + 2)
  1924. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  1925. };
  1926. };
  1927. var stringMultibyte = {
  1928. // `String.prototype.codePointAt` method
  1929. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  1930. codeAt: createMethod$2(false),
  1931. // `String.prototype.at` method
  1932. // https://github.com/mathiasbynens/String.prototype.at
  1933. charAt: createMethod$2(true)
  1934. };
  1935. var charAt$1 = stringMultibyte.charAt;
  1936. // `AdvanceStringIndex` abstract operation
  1937. // https://tc39.es/ecma262/#sec-advancestringindex
  1938. var advanceStringIndex$3 = function (S, index, unicode) {
  1939. return index + (unicode ? charAt$1(S, index).length : 1);
  1940. };
  1941. var toAbsoluteIndex = toAbsoluteIndex$2;
  1942. var lengthOfArrayLike$2 = lengthOfArrayLike$6;
  1943. var createProperty = createProperty$2;
  1944. var $Array = Array;
  1945. var max$1 = Math.max;
  1946. var arraySliceSimple = function (O, start, end) {
  1947. var length = lengthOfArrayLike$2(O);
  1948. var k = toAbsoluteIndex(start, length);
  1949. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1950. var result = $Array(max$1(fin - k, 0));
  1951. for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
  1952. result.length = n;
  1953. return result;
  1954. };
  1955. var call$b = functionCall;
  1956. var anObject$9 = anObject$g;
  1957. var isCallable$6 = isCallable$j;
  1958. var classof$2 = classofRaw$2;
  1959. var regexpExec$1 = regexpExec$3;
  1960. var $TypeError$7 = TypeError;
  1961. // `RegExpExec` abstract operation
  1962. // https://tc39.es/ecma262/#sec-regexpexec
  1963. var regexpExecAbstract = function (R, S) {
  1964. var exec = R.exec;
  1965. if (isCallable$6(exec)) {
  1966. var result = call$b(exec, R, S);
  1967. if (result !== null) anObject$9(result);
  1968. return result;
  1969. }
  1970. if (classof$2(R) === 'RegExp') return call$b(regexpExec$1, R, S);
  1971. throw $TypeError$7('RegExp#exec called on incompatible receiver');
  1972. };
  1973. var apply$2 = functionApply;
  1974. var call$a = functionCall;
  1975. var uncurryThis$a = functionUncurryThis;
  1976. var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
  1977. var anObject$8 = anObject$g;
  1978. var isNullOrUndefined$3 = isNullOrUndefined$7;
  1979. var isRegExp = isRegexp;
  1980. var requireObjectCoercible$3 = requireObjectCoercible$8;
  1981. var speciesConstructor$1 = speciesConstructor$2;
  1982. var advanceStringIndex$2 = advanceStringIndex$3;
  1983. var toLength$2 = toLength$4;
  1984. var toString$5 = toString$9;
  1985. var getMethod$4 = getMethod$6;
  1986. var arraySlice$3 = arraySliceSimple;
  1987. var callRegExpExec = regexpExecAbstract;
  1988. var regexpExec = regexpExec$3;
  1989. var stickyHelpers = regexpStickyHelpers;
  1990. var fails$6 = fails$q;
  1991. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  1992. var MAX_UINT32 = 0xFFFFFFFF;
  1993. var min$1 = Math.min;
  1994. var $push = [].push;
  1995. var exec$1 = uncurryThis$a(/./.exec);
  1996. var push$3 = uncurryThis$a($push);
  1997. var stringSlice$2 = uncurryThis$a(''.slice);
  1998. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  1999. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  2000. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$6(function () {
  2001. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  2002. var re = /(?:)/;
  2003. var originalExec = re.exec;
  2004. re.exec = function () { return originalExec.apply(this, arguments); };
  2005. var result = 'ab'.split(re);
  2006. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  2007. });
  2008. // @@split logic
  2009. fixRegExpWellKnownSymbolLogic$2('split', function (SPLIT, nativeSplit, maybeCallNative) {
  2010. var internalSplit;
  2011. if (
  2012. 'abbc'.split(/(b)*/)[1] == 'c' ||
  2013. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  2014. 'test'.split(/(?:)/, -1).length != 4 ||
  2015. 'ab'.split(/(?:ab)*/).length != 2 ||
  2016. '.'.split(/(.?)(.?)/).length != 4 ||
  2017. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  2018. '.'.split(/()()/).length > 1 ||
  2019. ''.split(/.?/).length
  2020. ) {
  2021. // based on es5-shim implementation, need to rework it
  2022. internalSplit = function (separator, limit) {
  2023. var string = toString$5(requireObjectCoercible$3(this));
  2024. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  2025. if (lim === 0) return [];
  2026. if (separator === undefined) return [string];
  2027. // If `separator` is not a regex, use native split
  2028. if (!isRegExp(separator)) {
  2029. return call$a(nativeSplit, string, separator, lim);
  2030. }
  2031. var output = [];
  2032. var flags = (separator.ignoreCase ? 'i' : '') +
  2033. (separator.multiline ? 'm' : '') +
  2034. (separator.unicode ? 'u' : '') +
  2035. (separator.sticky ? 'y' : '');
  2036. var lastLastIndex = 0;
  2037. // Make `global` and avoid `lastIndex` issues by working with a copy
  2038. var separatorCopy = new RegExp(separator.source, flags + 'g');
  2039. var match, lastIndex, lastLength;
  2040. while (match = call$a(regexpExec, separatorCopy, string)) {
  2041. lastIndex = separatorCopy.lastIndex;
  2042. if (lastIndex > lastLastIndex) {
  2043. push$3(output, stringSlice$2(string, lastLastIndex, match.index));
  2044. if (match.length > 1 && match.index < string.length) apply$2($push, output, arraySlice$3(match, 1));
  2045. lastLength = match[0].length;
  2046. lastLastIndex = lastIndex;
  2047. if (output.length >= lim) break;
  2048. }
  2049. if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
  2050. }
  2051. if (lastLastIndex === string.length) {
  2052. if (lastLength || !exec$1(separatorCopy, '')) push$3(output, '');
  2053. } else push$3(output, stringSlice$2(string, lastLastIndex));
  2054. return output.length > lim ? arraySlice$3(output, 0, lim) : output;
  2055. };
  2056. // Chakra, V8
  2057. } else if ('0'.split(undefined, 0).length) {
  2058. internalSplit = function (separator, limit) {
  2059. return separator === undefined && limit === 0 ? [] : call$a(nativeSplit, this, separator, limit);
  2060. };
  2061. } else internalSplit = nativeSplit;
  2062. return [
  2063. // `String.prototype.split` method
  2064. // https://tc39.es/ecma262/#sec-string.prototype.split
  2065. function split(separator, limit) {
  2066. var O = requireObjectCoercible$3(this);
  2067. var splitter = isNullOrUndefined$3(separator) ? undefined : getMethod$4(separator, SPLIT);
  2068. return splitter
  2069. ? call$a(splitter, separator, O, limit)
  2070. : call$a(internalSplit, toString$5(O), separator, limit);
  2071. },
  2072. // `RegExp.prototype[@@split]` method
  2073. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  2074. //
  2075. // NOTE: This cannot be properly polyfilled in engines that don't support
  2076. // the 'y' flag.
  2077. function (string, limit) {
  2078. var rx = anObject$8(this);
  2079. var S = toString$5(string);
  2080. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  2081. if (res.done) return res.value;
  2082. var C = speciesConstructor$1(rx, RegExp);
  2083. var unicodeMatching = rx.unicode;
  2084. var flags = (rx.ignoreCase ? 'i' : '') +
  2085. (rx.multiline ? 'm' : '') +
  2086. (rx.unicode ? 'u' : '') +
  2087. (UNSUPPORTED_Y ? 'g' : 'y');
  2088. // ^(? + rx + ) is needed, in combination with some S slicing, to
  2089. // simulate the 'y' flag.
  2090. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  2091. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  2092. if (lim === 0) return [];
  2093. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  2094. var p = 0;
  2095. var q = 0;
  2096. var A = [];
  2097. while (q < S.length) {
  2098. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  2099. var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice$2(S, q) : S);
  2100. var e;
  2101. if (
  2102. z === null ||
  2103. (e = min$1(toLength$2(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  2104. ) {
  2105. q = advanceStringIndex$2(S, q, unicodeMatching);
  2106. } else {
  2107. push$3(A, stringSlice$2(S, p, q));
  2108. if (A.length === lim) return A;
  2109. for (var i = 1; i <= z.length - 1; i++) {
  2110. push$3(A, z[i]);
  2111. if (A.length === lim) return A;
  2112. }
  2113. q = p = e;
  2114. }
  2115. }
  2116. push$3(A, stringSlice$2(S, p));
  2117. return A;
  2118. }
  2119. ];
  2120. }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  2121. // a string of all valid unicode whitespaces
  2122. var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  2123. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  2124. var uncurryThis$9 = functionUncurryThis;
  2125. var requireObjectCoercible$2 = requireObjectCoercible$8;
  2126. var toString$4 = toString$9;
  2127. var whitespaces$2 = whitespaces$3;
  2128. var replace$1 = uncurryThis$9(''.replace);
  2129. var ltrim = RegExp('^[' + whitespaces$2 + ']+');
  2130. var rtrim = RegExp('(^|[^' + whitespaces$2 + '])[' + whitespaces$2 + ']+$');
  2131. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  2132. var createMethod$1 = function (TYPE) {
  2133. return function ($this) {
  2134. var string = toString$4(requireObjectCoercible$2($this));
  2135. if (TYPE & 1) string = replace$1(string, ltrim, '');
  2136. if (TYPE & 2) string = replace$1(string, rtrim, '$1');
  2137. return string;
  2138. };
  2139. };
  2140. var stringTrim = {
  2141. // `String.prototype.{ trimLeft, trimStart }` methods
  2142. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  2143. start: createMethod$1(1),
  2144. // `String.prototype.{ trimRight, trimEnd }` methods
  2145. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  2146. end: createMethod$1(2),
  2147. // `String.prototype.trim` method
  2148. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2149. trim: createMethod$1(3)
  2150. };
  2151. var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
  2152. var fails$5 = fails$q;
  2153. var whitespaces$1 = whitespaces$3;
  2154. var non = '\u200B\u0085\u180E';
  2155. // check that a method works with the correct list
  2156. // of whitespaces and has a correct name
  2157. var stringTrimForced = function (METHOD_NAME) {
  2158. return fails$5(function () {
  2159. return !!whitespaces$1[METHOD_NAME]()
  2160. || non[METHOD_NAME]() !== non
  2161. || (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
  2162. });
  2163. };
  2164. var $$c = _export;
  2165. var $trim = stringTrim.trim;
  2166. var forcedStringTrimMethod = stringTrimForced;
  2167. // `String.prototype.trim` method
  2168. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2169. $$c({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  2170. trim: function trim() {
  2171. return $trim(this);
  2172. }
  2173. });
  2174. var DESCRIPTORS$1 = descriptors;
  2175. var uncurryThis$8 = functionUncurryThis;
  2176. var objectKeys = objectKeys$3;
  2177. var toIndexedObject$1 = toIndexedObject$6;
  2178. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  2179. var propertyIsEnumerable = uncurryThis$8($propertyIsEnumerable);
  2180. var push$2 = uncurryThis$8([].push);
  2181. // `Object.{ entries, values }` methods implementation
  2182. var createMethod = function (TO_ENTRIES) {
  2183. return function (it) {
  2184. var O = toIndexedObject$1(it);
  2185. var keys = objectKeys(O);
  2186. var length = keys.length;
  2187. var i = 0;
  2188. var result = [];
  2189. var key;
  2190. while (length > i) {
  2191. key = keys[i++];
  2192. if (!DESCRIPTORS$1 || propertyIsEnumerable(O, key)) {
  2193. push$2(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  2194. }
  2195. }
  2196. return result;
  2197. };
  2198. };
  2199. var objectToArray = {
  2200. // `Object.entries` method
  2201. // https://tc39.es/ecma262/#sec-object.entries
  2202. entries: createMethod(true),
  2203. // `Object.values` method
  2204. // https://tc39.es/ecma262/#sec-object.values
  2205. values: createMethod(false)
  2206. };
  2207. var $$b = _export;
  2208. var $values = objectToArray.values;
  2209. // `Object.values` method
  2210. // https://tc39.es/ecma262/#sec-object.values
  2211. $$b({ target: 'Object', stat: true }, {
  2212. values: function values(O) {
  2213. return $values(O);
  2214. }
  2215. });
  2216. var call$9 = functionCall;
  2217. var hasOwn$2 = hasOwnProperty_1;
  2218. var isPrototypeOf$2 = objectIsPrototypeOf;
  2219. var regExpFlags = regexpFlags$1;
  2220. var RegExpPrototype$1 = RegExp.prototype;
  2221. var regexpGetFlags = function (R) {
  2222. var flags = R.flags;
  2223. return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn$2(R, 'flags') && isPrototypeOf$2(RegExpPrototype$1, R)
  2224. ? call$9(regExpFlags, R) : flags;
  2225. };
  2226. var PROPER_FUNCTION_NAME = functionName.PROPER;
  2227. var defineBuiltIn$2 = defineBuiltIn$6;
  2228. var anObject$7 = anObject$g;
  2229. var $toString = toString$9;
  2230. var fails$4 = fails$q;
  2231. var getRegExpFlags = regexpGetFlags;
  2232. var TO_STRING = 'toString';
  2233. var RegExpPrototype = RegExp.prototype;
  2234. var nativeToString = RegExpPrototype[TO_STRING];
  2235. var NOT_GENERIC = fails$4(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  2236. // FF44- RegExp#toString has a wrong name
  2237. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
  2238. // `RegExp.prototype.toString` method
  2239. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  2240. if (NOT_GENERIC || INCORRECT_NAME) {
  2241. defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
  2242. var R = anObject$7(this);
  2243. var pattern = $toString(R.source);
  2244. var flags = $toString(getRegExpFlags(R));
  2245. return '/' + pattern + '/' + flags;
  2246. }, { unsafe: true });
  2247. }
  2248. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  2249. var $$a = _export;
  2250. var uncurryThis$7 = functionUncurryThisClause;
  2251. var $indexOf = arrayIncludes.indexOf;
  2252. var arrayMethodIsStrict$2 = arrayMethodIsStrict$4;
  2253. var nativeIndexOf = uncurryThis$7([].indexOf);
  2254. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  2255. var FORCED$3 = NEGATIVE_ZERO || !arrayMethodIsStrict$2('indexOf');
  2256. // `Array.prototype.indexOf` method
  2257. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  2258. $$a({ target: 'Array', proto: true, forced: FORCED$3 }, {
  2259. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  2260. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  2261. return NEGATIVE_ZERO
  2262. // convert -0 to +0
  2263. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  2264. : $indexOf(this, searchElement, fromIndex);
  2265. }
  2266. });
  2267. var global$6 = global$k;
  2268. var fails$3 = fails$q;
  2269. var uncurryThis$6 = functionUncurryThis;
  2270. var toString$3 = toString$9;
  2271. var trim = stringTrim.trim;
  2272. var whitespaces = whitespaces$3;
  2273. var $parseInt$1 = global$6.parseInt;
  2274. var Symbol$1 = global$6.Symbol;
  2275. var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
  2276. var hex = /^[+-]?0x/i;
  2277. var exec = uncurryThis$6(hex.exec);
  2278. var FORCED$2 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
  2279. // MS Edge 18- broken with boxed symbols
  2280. || (ITERATOR$3 && !fails$3(function () { $parseInt$1(Object(ITERATOR$3)); }));
  2281. // `parseInt` method
  2282. // https://tc39.es/ecma262/#sec-parseint-string-radix
  2283. var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
  2284. var S = trim(toString$3(string));
  2285. return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
  2286. } : $parseInt$1;
  2287. var $$9 = _export;
  2288. var $parseInt = numberParseInt;
  2289. // `parseInt` method
  2290. // https://tc39.es/ecma262/#sec-parseint-string-radix
  2291. $$9({ global: true, forced: parseInt != $parseInt }, {
  2292. parseInt: $parseInt
  2293. });
  2294. var $$8 = _export;
  2295. var $find = arrayIteration.find;
  2296. var addToUnscopables = addToUnscopables$2;
  2297. var FIND = 'find';
  2298. var SKIPS_HOLES = true;
  2299. // Shouldn't skip holes
  2300. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  2301. // `Array.prototype.find` method
  2302. // https://tc39.es/ecma262/#sec-array.prototype.find
  2303. $$8({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  2304. find: function find(callbackfn /* , that = undefined */) {
  2305. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  2306. }
  2307. });
  2308. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  2309. addToUnscopables(FIND);
  2310. var classof$1 = classofRaw$2;
  2311. var engineIsNode = typeof process != 'undefined' && classof$1(process) == 'process';
  2312. var uncurryThis$5 = functionUncurryThis;
  2313. var aCallable$6 = aCallable$9;
  2314. var functionUncurryThisAccessor = function (object, key, method) {
  2315. try {
  2316. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  2317. return uncurryThis$5(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
  2318. } catch (error) { /* empty */ }
  2319. };
  2320. var isCallable$5 = isCallable$j;
  2321. var $String = String;
  2322. var $TypeError$6 = TypeError;
  2323. var aPossiblePrototype$1 = function (argument) {
  2324. if (typeof argument == 'object' || isCallable$5(argument)) return argument;
  2325. throw $TypeError$6("Can't set " + $String(argument) + ' as a prototype');
  2326. };
  2327. /* eslint-disable no-proto -- safe */
  2328. var uncurryThisAccessor = functionUncurryThisAccessor;
  2329. var anObject$6 = anObject$g;
  2330. var aPossiblePrototype = aPossiblePrototype$1;
  2331. // `Object.setPrototypeOf` method
  2332. // https://tc39.es/ecma262/#sec-object.setprototypeof
  2333. // Works with __proto__ only. Old v8 can't work with null proto objects.
  2334. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  2335. var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  2336. var CORRECT_SETTER = false;
  2337. var test = {};
  2338. var setter;
  2339. try {
  2340. setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
  2341. setter(test, []);
  2342. CORRECT_SETTER = test instanceof Array;
  2343. } catch (error) { /* empty */ }
  2344. return function setPrototypeOf(O, proto) {
  2345. anObject$6(O);
  2346. aPossiblePrototype(proto);
  2347. if (CORRECT_SETTER) setter(O, proto);
  2348. else O.__proto__ = proto;
  2349. return O;
  2350. };
  2351. }() : undefined);
  2352. var defineProperty$1 = objectDefineProperty.f;
  2353. var hasOwn$1 = hasOwnProperty_1;
  2354. var wellKnownSymbol$6 = wellKnownSymbol$i;
  2355. var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
  2356. var setToStringTag$1 = function (target, TAG, STATIC) {
  2357. if (target && !STATIC) target = target.prototype;
  2358. if (target && !hasOwn$1(target, TO_STRING_TAG)) {
  2359. defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
  2360. }
  2361. };
  2362. var makeBuiltIn = makeBuiltInExports;
  2363. var defineProperty = objectDefineProperty;
  2364. var defineBuiltInAccessor$1 = function (target, name, descriptor) {
  2365. if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
  2366. if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
  2367. return defineProperty.f(target, name, descriptor);
  2368. };
  2369. var getBuiltIn$2 = getBuiltIn$7;
  2370. var defineBuiltInAccessor = defineBuiltInAccessor$1;
  2371. var wellKnownSymbol$5 = wellKnownSymbol$i;
  2372. var DESCRIPTORS = descriptors;
  2373. var SPECIES$1 = wellKnownSymbol$5('species');
  2374. var setSpecies$1 = function (CONSTRUCTOR_NAME) {
  2375. var Constructor = getBuiltIn$2(CONSTRUCTOR_NAME);
  2376. if (DESCRIPTORS && Constructor && !Constructor[SPECIES$1]) {
  2377. defineBuiltInAccessor(Constructor, SPECIES$1, {
  2378. configurable: true,
  2379. get: function () { return this; }
  2380. });
  2381. }
  2382. };
  2383. var isPrototypeOf$1 = objectIsPrototypeOf;
  2384. var $TypeError$5 = TypeError;
  2385. var anInstance$1 = function (it, Prototype) {
  2386. if (isPrototypeOf$1(Prototype, it)) return it;
  2387. throw $TypeError$5('Incorrect invocation');
  2388. };
  2389. var uncurryThis$4 = functionUncurryThis;
  2390. var arraySlice$2 = uncurryThis$4([].slice);
  2391. var $TypeError$4 = TypeError;
  2392. var validateArgumentsLength$1 = function (passed, required) {
  2393. if (passed < required) throw $TypeError$4('Not enough arguments');
  2394. return passed;
  2395. };
  2396. var userAgent$4 = engineUserAgent;
  2397. // eslint-disable-next-line redos/no-vulnerable -- safe
  2398. var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
  2399. var global$5 = global$k;
  2400. var apply$1 = functionApply;
  2401. var bind$3 = functionBindContext;
  2402. var isCallable$4 = isCallable$j;
  2403. var hasOwn = hasOwnProperty_1;
  2404. var fails$2 = fails$q;
  2405. var html = html$2;
  2406. var arraySlice$1 = arraySlice$2;
  2407. var createElement = documentCreateElement$2;
  2408. var validateArgumentsLength = validateArgumentsLength$1;
  2409. var IS_IOS$1 = engineIsIos;
  2410. var IS_NODE$3 = engineIsNode;
  2411. var set = global$5.setImmediate;
  2412. var clear = global$5.clearImmediate;
  2413. var process$3 = global$5.process;
  2414. var Dispatch = global$5.Dispatch;
  2415. var Function$1 = global$5.Function;
  2416. var MessageChannel = global$5.MessageChannel;
  2417. var String$1 = global$5.String;
  2418. var counter = 0;
  2419. var queue$2 = {};
  2420. var ONREADYSTATECHANGE = 'onreadystatechange';
  2421. var $location, defer, channel, port;
  2422. fails$2(function () {
  2423. // Deno throws a ReferenceError on `location` access without `--location` flag
  2424. $location = global$5.location;
  2425. });
  2426. var run = function (id) {
  2427. if (hasOwn(queue$2, id)) {
  2428. var fn = queue$2[id];
  2429. delete queue$2[id];
  2430. fn();
  2431. }
  2432. };
  2433. var runner = function (id) {
  2434. return function () {
  2435. run(id);
  2436. };
  2437. };
  2438. var eventListener = function (event) {
  2439. run(event.data);
  2440. };
  2441. var globalPostMessageDefer = function (id) {
  2442. // old engines have not location.origin
  2443. global$5.postMessage(String$1(id), $location.protocol + '//' + $location.host);
  2444. };
  2445. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  2446. if (!set || !clear) {
  2447. set = function setImmediate(handler) {
  2448. validateArgumentsLength(arguments.length, 1);
  2449. var fn = isCallable$4(handler) ? handler : Function$1(handler);
  2450. var args = arraySlice$1(arguments, 1);
  2451. queue$2[++counter] = function () {
  2452. apply$1(fn, undefined, args);
  2453. };
  2454. defer(counter);
  2455. return counter;
  2456. };
  2457. clear = function clearImmediate(id) {
  2458. delete queue$2[id];
  2459. };
  2460. // Node.js 0.8-
  2461. if (IS_NODE$3) {
  2462. defer = function (id) {
  2463. process$3.nextTick(runner(id));
  2464. };
  2465. // Sphere (JS game engine) Dispatch API
  2466. } else if (Dispatch && Dispatch.now) {
  2467. defer = function (id) {
  2468. Dispatch.now(runner(id));
  2469. };
  2470. // Browsers with MessageChannel, includes WebWorkers
  2471. // except iOS - https://github.com/zloirock/core-js/issues/624
  2472. } else if (MessageChannel && !IS_IOS$1) {
  2473. channel = new MessageChannel();
  2474. port = channel.port2;
  2475. channel.port1.onmessage = eventListener;
  2476. defer = bind$3(port.postMessage, port);
  2477. // Browsers with postMessage, skip WebWorkers
  2478. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  2479. } else if (
  2480. global$5.addEventListener &&
  2481. isCallable$4(global$5.postMessage) &&
  2482. !global$5.importScripts &&
  2483. $location && $location.protocol !== 'file:' &&
  2484. !fails$2(globalPostMessageDefer)
  2485. ) {
  2486. defer = globalPostMessageDefer;
  2487. global$5.addEventListener('message', eventListener, false);
  2488. // IE8-
  2489. } else if (ONREADYSTATECHANGE in createElement('script')) {
  2490. defer = function (id) {
  2491. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  2492. html.removeChild(this);
  2493. run(id);
  2494. };
  2495. };
  2496. // Rest old browsers
  2497. } else {
  2498. defer = function (id) {
  2499. setTimeout(runner(id), 0);
  2500. };
  2501. }
  2502. }
  2503. var task$1 = {
  2504. set: set,
  2505. clear: clear
  2506. };
  2507. var Queue$2 = function () {
  2508. this.head = null;
  2509. this.tail = null;
  2510. };
  2511. Queue$2.prototype = {
  2512. add: function (item) {
  2513. var entry = { item: item, next: null };
  2514. var tail = this.tail;
  2515. if (tail) tail.next = entry;
  2516. else this.head = entry;
  2517. this.tail = entry;
  2518. },
  2519. get: function () {
  2520. var entry = this.head;
  2521. if (entry) {
  2522. var next = this.head = entry.next;
  2523. if (next === null) this.tail = null;
  2524. return entry.item;
  2525. }
  2526. }
  2527. };
  2528. var queue$1 = Queue$2;
  2529. var userAgent$3 = engineUserAgent;
  2530. var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && typeof Pebble != 'undefined';
  2531. var userAgent$2 = engineUserAgent;
  2532. var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
  2533. var global$4 = global$k;
  2534. var bind$2 = functionBindContext;
  2535. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  2536. var macrotask = task$1.set;
  2537. var Queue$1 = queue$1;
  2538. var IS_IOS = engineIsIos;
  2539. var IS_IOS_PEBBLE = engineIsIosPebble;
  2540. var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
  2541. var IS_NODE$2 = engineIsNode;
  2542. var MutationObserver = global$4.MutationObserver || global$4.WebKitMutationObserver;
  2543. var document$2 = global$4.document;
  2544. var process$2 = global$4.process;
  2545. var Promise$1 = global$4.Promise;
  2546. // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
  2547. var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$4, 'queueMicrotask');
  2548. var microtask$1 = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
  2549. var notify$1, toggle, node, promise, then;
  2550. // modern engines have queueMicrotask method
  2551. if (!microtask$1) {
  2552. var queue = new Queue$1();
  2553. var flush = function () {
  2554. var parent, fn;
  2555. if (IS_NODE$2 && (parent = process$2.domain)) parent.exit();
  2556. while (fn = queue.get()) try {
  2557. fn();
  2558. } catch (error) {
  2559. if (queue.head) notify$1();
  2560. throw error;
  2561. }
  2562. if (parent) parent.enter();
  2563. };
  2564. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  2565. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  2566. if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
  2567. toggle = true;
  2568. node = document$2.createTextNode('');
  2569. new MutationObserver(flush).observe(node, { characterData: true });
  2570. notify$1 = function () {
  2571. node.data = toggle = !toggle;
  2572. };
  2573. // environments with maybe non-completely correct, but existent Promise
  2574. } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
  2575. // Promise.resolve without an argument throws an error in LG WebOS 2
  2576. promise = Promise$1.resolve(undefined);
  2577. // workaround of WebKit ~ iOS Safari 10.1 bug
  2578. promise.constructor = Promise$1;
  2579. then = bind$2(promise.then, promise);
  2580. notify$1 = function () {
  2581. then(flush);
  2582. };
  2583. // Node.js without promises
  2584. } else if (IS_NODE$2) {
  2585. notify$1 = function () {
  2586. process$2.nextTick(flush);
  2587. };
  2588. // for other environments - macrotask based on:
  2589. // - setImmediate
  2590. // - MessageChannel
  2591. // - window.postMessage
  2592. // - onreadystatechange
  2593. // - setTimeout
  2594. } else {
  2595. // `webpack` dev server bug on IE global methods - use bind(fn, global)
  2596. macrotask = bind$2(macrotask, global$4);
  2597. notify$1 = function () {
  2598. macrotask(flush);
  2599. };
  2600. }
  2601. microtask$1 = function (fn) {
  2602. if (!queue.head) notify$1();
  2603. queue.add(fn);
  2604. };
  2605. }
  2606. var microtask_1 = microtask$1;
  2607. var hostReportErrors$1 = function (a, b) {
  2608. try {
  2609. // eslint-disable-next-line no-console -- safe
  2610. arguments.length == 1 ? console.error(a) : console.error(a, b);
  2611. } catch (error) { /* empty */ }
  2612. };
  2613. var perform$3 = function (exec) {
  2614. try {
  2615. return { error: false, value: exec() };
  2616. } catch (error) {
  2617. return { error: true, value: error };
  2618. }
  2619. };
  2620. var global$3 = global$k;
  2621. var promiseNativeConstructor = global$3.Promise;
  2622. /* global Deno -- Deno case */
  2623. var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
  2624. var IS_DENO$1 = engineIsDeno;
  2625. var IS_NODE$1 = engineIsNode;
  2626. var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
  2627. && typeof window == 'object'
  2628. && typeof document == 'object';
  2629. var global$2 = global$k;
  2630. var NativePromiseConstructor$3 = promiseNativeConstructor;
  2631. var isCallable$3 = isCallable$j;
  2632. var isForced = isForced_1;
  2633. var inspectSource = inspectSource$3;
  2634. var wellKnownSymbol$4 = wellKnownSymbol$i;
  2635. var IS_BROWSER = engineIsBrowser;
  2636. var IS_DENO = engineIsDeno;
  2637. var V8_VERSION = engineV8Version;
  2638. NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
  2639. var SPECIES = wellKnownSymbol$4('species');
  2640. var SUBCLASSING = false;
  2641. var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$2.PromiseRejectionEvent);
  2642. var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
  2643. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
  2644. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
  2645. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  2646. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  2647. // We can't detect it synchronously, so just check versions
  2648. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  2649. // We can't use @@species feature detection in V8 since it causes
  2650. // deoptimization and performance degradation
  2651. // https://github.com/zloirock/core-js/issues/679
  2652. if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
  2653. // Detect correctness of subclassing with @@species support
  2654. var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
  2655. var FakePromise = function (exec) {
  2656. exec(function () { /* empty */ }, function () { /* empty */ });
  2657. };
  2658. var constructor = promise.constructor = {};
  2659. constructor[SPECIES] = FakePromise;
  2660. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  2661. if (!SUBCLASSING) return true;
  2662. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  2663. } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
  2664. });
  2665. var promiseConstructorDetection = {
  2666. CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
  2667. REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
  2668. SUBCLASSING: SUBCLASSING
  2669. };
  2670. var newPromiseCapability$2 = {};
  2671. var aCallable$5 = aCallable$9;
  2672. var $TypeError$3 = TypeError;
  2673. var PromiseCapability = function (C) {
  2674. var resolve, reject;
  2675. this.promise = new C(function ($$resolve, $$reject) {
  2676. if (resolve !== undefined || reject !== undefined) throw $TypeError$3('Bad Promise constructor');
  2677. resolve = $$resolve;
  2678. reject = $$reject;
  2679. });
  2680. this.resolve = aCallable$5(resolve);
  2681. this.reject = aCallable$5(reject);
  2682. };
  2683. // `NewPromiseCapability` abstract operation
  2684. // https://tc39.es/ecma262/#sec-newpromisecapability
  2685. newPromiseCapability$2.f = function (C) {
  2686. return new PromiseCapability(C);
  2687. };
  2688. var $$7 = _export;
  2689. var IS_NODE = engineIsNode;
  2690. var global$1 = global$k;
  2691. var call$8 = functionCall;
  2692. var defineBuiltIn$1 = defineBuiltIn$6;
  2693. var setPrototypeOf = objectSetPrototypeOf;
  2694. var setToStringTag = setToStringTag$1;
  2695. var setSpecies = setSpecies$1;
  2696. var aCallable$4 = aCallable$9;
  2697. var isCallable$2 = isCallable$j;
  2698. var isObject$1 = isObject$a;
  2699. var anInstance = anInstance$1;
  2700. var speciesConstructor = speciesConstructor$2;
  2701. var task = task$1.set;
  2702. var microtask = microtask_1;
  2703. var hostReportErrors = hostReportErrors$1;
  2704. var perform$2 = perform$3;
  2705. var Queue = queue$1;
  2706. var InternalStateModule = internalState;
  2707. var NativePromiseConstructor$2 = promiseNativeConstructor;
  2708. var PromiseConstructorDetection = promiseConstructorDetection;
  2709. var newPromiseCapabilityModule$3 = newPromiseCapability$2;
  2710. var PROMISE = 'Promise';
  2711. var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
  2712. var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
  2713. var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
  2714. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  2715. var setInternalState = InternalStateModule.set;
  2716. var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
  2717. var PromiseConstructor = NativePromiseConstructor$2;
  2718. var PromisePrototype = NativePromisePrototype$1;
  2719. var TypeError$1 = global$1.TypeError;
  2720. var document$1 = global$1.document;
  2721. var process$1 = global$1.process;
  2722. var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
  2723. var newGenericPromiseCapability = newPromiseCapability$1;
  2724. var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
  2725. var UNHANDLED_REJECTION = 'unhandledrejection';
  2726. var REJECTION_HANDLED = 'rejectionhandled';
  2727. var PENDING = 0;
  2728. var FULFILLED = 1;
  2729. var REJECTED = 2;
  2730. var HANDLED = 1;
  2731. var UNHANDLED = 2;
  2732. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  2733. // helpers
  2734. var isThenable = function (it) {
  2735. var then;
  2736. return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
  2737. };
  2738. var callReaction = function (reaction, state) {
  2739. var value = state.value;
  2740. var ok = state.state == FULFILLED;
  2741. var handler = ok ? reaction.ok : reaction.fail;
  2742. var resolve = reaction.resolve;
  2743. var reject = reaction.reject;
  2744. var domain = reaction.domain;
  2745. var result, then, exited;
  2746. try {
  2747. if (handler) {
  2748. if (!ok) {
  2749. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  2750. state.rejection = HANDLED;
  2751. }
  2752. if (handler === true) result = value;
  2753. else {
  2754. if (domain) domain.enter();
  2755. result = handler(value); // can throw
  2756. if (domain) {
  2757. domain.exit();
  2758. exited = true;
  2759. }
  2760. }
  2761. if (result === reaction.promise) {
  2762. reject(TypeError$1('Promise-chain cycle'));
  2763. } else if (then = isThenable(result)) {
  2764. call$8(then, result, resolve, reject);
  2765. } else resolve(result);
  2766. } else reject(value);
  2767. } catch (error) {
  2768. if (domain && !exited) domain.exit();
  2769. reject(error);
  2770. }
  2771. };
  2772. var notify = function (state, isReject) {
  2773. if (state.notified) return;
  2774. state.notified = true;
  2775. microtask(function () {
  2776. var reactions = state.reactions;
  2777. var reaction;
  2778. while (reaction = reactions.get()) {
  2779. callReaction(reaction, state);
  2780. }
  2781. state.notified = false;
  2782. if (isReject && !state.rejection) onUnhandled(state);
  2783. });
  2784. };
  2785. var dispatchEvent = function (name, promise, reason) {
  2786. var event, handler;
  2787. if (DISPATCH_EVENT) {
  2788. event = document$1.createEvent('Event');
  2789. event.promise = promise;
  2790. event.reason = reason;
  2791. event.initEvent(name, false, true);
  2792. global$1.dispatchEvent(event);
  2793. } else event = { promise: promise, reason: reason };
  2794. if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
  2795. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  2796. };
  2797. var onUnhandled = function (state) {
  2798. call$8(task, global$1, function () {
  2799. var promise = state.facade;
  2800. var value = state.value;
  2801. var IS_UNHANDLED = isUnhandled(state);
  2802. var result;
  2803. if (IS_UNHANDLED) {
  2804. result = perform$2(function () {
  2805. if (IS_NODE) {
  2806. process$1.emit('unhandledRejection', value, promise);
  2807. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  2808. });
  2809. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  2810. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  2811. if (result.error) throw result.value;
  2812. }
  2813. });
  2814. };
  2815. var isUnhandled = function (state) {
  2816. return state.rejection !== HANDLED && !state.parent;
  2817. };
  2818. var onHandleUnhandled = function (state) {
  2819. call$8(task, global$1, function () {
  2820. var promise = state.facade;
  2821. if (IS_NODE) {
  2822. process$1.emit('rejectionHandled', promise);
  2823. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  2824. });
  2825. };
  2826. var bind$1 = function (fn, state, unwrap) {
  2827. return function (value) {
  2828. fn(state, value, unwrap);
  2829. };
  2830. };
  2831. var internalReject = function (state, value, unwrap) {
  2832. if (state.done) return;
  2833. state.done = true;
  2834. if (unwrap) state = unwrap;
  2835. state.value = value;
  2836. state.state = REJECTED;
  2837. notify(state, true);
  2838. };
  2839. var internalResolve = function (state, value, unwrap) {
  2840. if (state.done) return;
  2841. state.done = true;
  2842. if (unwrap) state = unwrap;
  2843. try {
  2844. if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
  2845. var then = isThenable(value);
  2846. if (then) {
  2847. microtask(function () {
  2848. var wrapper = { done: false };
  2849. try {
  2850. call$8(then, value,
  2851. bind$1(internalResolve, wrapper, state),
  2852. bind$1(internalReject, wrapper, state)
  2853. );
  2854. } catch (error) {
  2855. internalReject(wrapper, error, state);
  2856. }
  2857. });
  2858. } else {
  2859. state.value = value;
  2860. state.state = FULFILLED;
  2861. notify(state, false);
  2862. }
  2863. } catch (error) {
  2864. internalReject({ done: false }, error, state);
  2865. }
  2866. };
  2867. // constructor polyfill
  2868. if (FORCED_PROMISE_CONSTRUCTOR$4) {
  2869. // 25.4.3.1 Promise(executor)
  2870. PromiseConstructor = function Promise(executor) {
  2871. anInstance(this, PromisePrototype);
  2872. aCallable$4(executor);
  2873. call$8(Internal, this);
  2874. var state = getInternalPromiseState(this);
  2875. try {
  2876. executor(bind$1(internalResolve, state), bind$1(internalReject, state));
  2877. } catch (error) {
  2878. internalReject(state, error);
  2879. }
  2880. };
  2881. PromisePrototype = PromiseConstructor.prototype;
  2882. // eslint-disable-next-line no-unused-vars -- required for `.length`
  2883. Internal = function Promise(executor) {
  2884. setInternalState(this, {
  2885. type: PROMISE,
  2886. done: false,
  2887. notified: false,
  2888. parent: false,
  2889. reactions: new Queue(),
  2890. rejection: false,
  2891. state: PENDING,
  2892. value: undefined
  2893. });
  2894. };
  2895. // `Promise.prototype.then` method
  2896. // https://tc39.es/ecma262/#sec-promise.prototype.then
  2897. Internal.prototype = defineBuiltIn$1(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
  2898. var state = getInternalPromiseState(this);
  2899. var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
  2900. state.parent = true;
  2901. reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
  2902. reaction.fail = isCallable$2(onRejected) && onRejected;
  2903. reaction.domain = IS_NODE ? process$1.domain : undefined;
  2904. if (state.state == PENDING) state.reactions.add(reaction);
  2905. else microtask(function () {
  2906. callReaction(reaction, state);
  2907. });
  2908. return reaction.promise;
  2909. });
  2910. OwnPromiseCapability = function () {
  2911. var promise = new Internal();
  2912. var state = getInternalPromiseState(promise);
  2913. this.promise = promise;
  2914. this.resolve = bind$1(internalResolve, state);
  2915. this.reject = bind$1(internalReject, state);
  2916. };
  2917. newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
  2918. return C === PromiseConstructor || C === PromiseWrapper
  2919. ? new OwnPromiseCapability(C)
  2920. : newGenericPromiseCapability(C);
  2921. };
  2922. if (isCallable$2(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
  2923. nativeThen = NativePromisePrototype$1.then;
  2924. if (!NATIVE_PROMISE_SUBCLASSING) {
  2925. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  2926. defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
  2927. var that = this;
  2928. return new PromiseConstructor(function (resolve, reject) {
  2929. call$8(nativeThen, that, resolve, reject);
  2930. }).then(onFulfilled, onRejected);
  2931. // https://github.com/zloirock/core-js/issues/640
  2932. }, { unsafe: true });
  2933. }
  2934. // make `.constructor === Promise` work for native promise-based APIs
  2935. try {
  2936. delete NativePromisePrototype$1.constructor;
  2937. } catch (error) { /* empty */ }
  2938. // make `instanceof Promise` work for native promise-based APIs
  2939. if (setPrototypeOf) {
  2940. setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
  2941. }
  2942. }
  2943. }
  2944. $$7({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
  2945. Promise: PromiseConstructor
  2946. });
  2947. setToStringTag(PromiseConstructor, PROMISE, false);
  2948. setSpecies(PROMISE);
  2949. var iterators = {};
  2950. var wellKnownSymbol$3 = wellKnownSymbol$i;
  2951. var Iterators$1 = iterators;
  2952. var ITERATOR$2 = wellKnownSymbol$3('iterator');
  2953. var ArrayPrototype = Array.prototype;
  2954. // check on default Array iterator
  2955. var isArrayIteratorMethod$1 = function (it) {
  2956. return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
  2957. };
  2958. var classof = classof$7;
  2959. var getMethod$3 = getMethod$6;
  2960. var isNullOrUndefined$2 = isNullOrUndefined$7;
  2961. var Iterators = iterators;
  2962. var wellKnownSymbol$2 = wellKnownSymbol$i;
  2963. var ITERATOR$1 = wellKnownSymbol$2('iterator');
  2964. var getIteratorMethod$2 = function (it) {
  2965. if (!isNullOrUndefined$2(it)) return getMethod$3(it, ITERATOR$1)
  2966. || getMethod$3(it, '@@iterator')
  2967. || Iterators[classof(it)];
  2968. };
  2969. var call$7 = functionCall;
  2970. var aCallable$3 = aCallable$9;
  2971. var anObject$5 = anObject$g;
  2972. var tryToString$2 = tryToString$5;
  2973. var getIteratorMethod$1 = getIteratorMethod$2;
  2974. var $TypeError$2 = TypeError;
  2975. var getIterator$1 = function (argument, usingIterator) {
  2976. var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
  2977. if (aCallable$3(iteratorMethod)) return anObject$5(call$7(iteratorMethod, argument));
  2978. throw $TypeError$2(tryToString$2(argument) + ' is not iterable');
  2979. };
  2980. var call$6 = functionCall;
  2981. var anObject$4 = anObject$g;
  2982. var getMethod$2 = getMethod$6;
  2983. var iteratorClose$1 = function (iterator, kind, value) {
  2984. var innerResult, innerError;
  2985. anObject$4(iterator);
  2986. try {
  2987. innerResult = getMethod$2(iterator, 'return');
  2988. if (!innerResult) {
  2989. if (kind === 'throw') throw value;
  2990. return value;
  2991. }
  2992. innerResult = call$6(innerResult, iterator);
  2993. } catch (error) {
  2994. innerError = true;
  2995. innerResult = error;
  2996. }
  2997. if (kind === 'throw') throw value;
  2998. if (innerError) throw innerResult;
  2999. anObject$4(innerResult);
  3000. return value;
  3001. };
  3002. var bind = functionBindContext;
  3003. var call$5 = functionCall;
  3004. var anObject$3 = anObject$g;
  3005. var tryToString$1 = tryToString$5;
  3006. var isArrayIteratorMethod = isArrayIteratorMethod$1;
  3007. var lengthOfArrayLike$1 = lengthOfArrayLike$6;
  3008. var isPrototypeOf = objectIsPrototypeOf;
  3009. var getIterator = getIterator$1;
  3010. var getIteratorMethod = getIteratorMethod$2;
  3011. var iteratorClose = iteratorClose$1;
  3012. var $TypeError$1 = TypeError;
  3013. var Result = function (stopped, result) {
  3014. this.stopped = stopped;
  3015. this.result = result;
  3016. };
  3017. var ResultPrototype = Result.prototype;
  3018. var iterate$2 = function (iterable, unboundFunction, options) {
  3019. var that = options && options.that;
  3020. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  3021. var IS_RECORD = !!(options && options.IS_RECORD);
  3022. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  3023. var INTERRUPTED = !!(options && options.INTERRUPTED);
  3024. var fn = bind(unboundFunction, that);
  3025. var iterator, iterFn, index, length, result, next, step;
  3026. var stop = function (condition) {
  3027. if (iterator) iteratorClose(iterator, 'normal', condition);
  3028. return new Result(true, condition);
  3029. };
  3030. var callFn = function (value) {
  3031. if (AS_ENTRIES) {
  3032. anObject$3(value);
  3033. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  3034. } return INTERRUPTED ? fn(value, stop) : fn(value);
  3035. };
  3036. if (IS_RECORD) {
  3037. iterator = iterable.iterator;
  3038. } else if (IS_ITERATOR) {
  3039. iterator = iterable;
  3040. } else {
  3041. iterFn = getIteratorMethod(iterable);
  3042. if (!iterFn) throw $TypeError$1(tryToString$1(iterable) + ' is not iterable');
  3043. // optimisation for array iterators
  3044. if (isArrayIteratorMethod(iterFn)) {
  3045. for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
  3046. result = callFn(iterable[index]);
  3047. if (result && isPrototypeOf(ResultPrototype, result)) return result;
  3048. } return new Result(false);
  3049. }
  3050. iterator = getIterator(iterable, iterFn);
  3051. }
  3052. next = IS_RECORD ? iterable.next : iterator.next;
  3053. while (!(step = call$5(next, iterator)).done) {
  3054. try {
  3055. result = callFn(step.value);
  3056. } catch (error) {
  3057. iteratorClose(iterator, 'throw', error);
  3058. }
  3059. if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
  3060. } return new Result(false);
  3061. };
  3062. var wellKnownSymbol$1 = wellKnownSymbol$i;
  3063. var ITERATOR = wellKnownSymbol$1('iterator');
  3064. var SAFE_CLOSING = false;
  3065. try {
  3066. var called = 0;
  3067. var iteratorWithReturn = {
  3068. next: function () {
  3069. return { done: !!called++ };
  3070. },
  3071. 'return': function () {
  3072. SAFE_CLOSING = true;
  3073. }
  3074. };
  3075. iteratorWithReturn[ITERATOR] = function () {
  3076. return this;
  3077. };
  3078. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  3079. Array.from(iteratorWithReturn, function () { throw 2; });
  3080. } catch (error) { /* empty */ }
  3081. var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
  3082. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  3083. var ITERATION_SUPPORT = false;
  3084. try {
  3085. var object = {};
  3086. object[ITERATOR] = function () {
  3087. return {
  3088. next: function () {
  3089. return { done: ITERATION_SUPPORT = true };
  3090. }
  3091. };
  3092. };
  3093. exec(object);
  3094. } catch (error) { /* empty */ }
  3095. return ITERATION_SUPPORT;
  3096. };
  3097. var NativePromiseConstructor$1 = promiseNativeConstructor;
  3098. var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
  3099. var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
  3100. var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
  3101. NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
  3102. });
  3103. var $$6 = _export;
  3104. var call$4 = functionCall;
  3105. var aCallable$2 = aCallable$9;
  3106. var newPromiseCapabilityModule$2 = newPromiseCapability$2;
  3107. var perform$1 = perform$3;
  3108. var iterate$1 = iterate$2;
  3109. var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
  3110. // `Promise.all` method
  3111. // https://tc39.es/ecma262/#sec-promise.all
  3112. $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
  3113. all: function all(iterable) {
  3114. var C = this;
  3115. var capability = newPromiseCapabilityModule$2.f(C);
  3116. var resolve = capability.resolve;
  3117. var reject = capability.reject;
  3118. var result = perform$1(function () {
  3119. var $promiseResolve = aCallable$2(C.resolve);
  3120. var values = [];
  3121. var counter = 0;
  3122. var remaining = 1;
  3123. iterate$1(iterable, function (promise) {
  3124. var index = counter++;
  3125. var alreadyCalled = false;
  3126. remaining++;
  3127. call$4($promiseResolve, C, promise).then(function (value) {
  3128. if (alreadyCalled) return;
  3129. alreadyCalled = true;
  3130. values[index] = value;
  3131. --remaining || resolve(values);
  3132. }, reject);
  3133. });
  3134. --remaining || resolve(values);
  3135. });
  3136. if (result.error) reject(result.value);
  3137. return capability.promise;
  3138. }
  3139. });
  3140. var $$5 = _export;
  3141. var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
  3142. var NativePromiseConstructor = promiseNativeConstructor;
  3143. var getBuiltIn$1 = getBuiltIn$7;
  3144. var isCallable$1 = isCallable$j;
  3145. var defineBuiltIn = defineBuiltIn$6;
  3146. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  3147. // `Promise.prototype.catch` method
  3148. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  3149. $$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
  3150. 'catch': function (onRejected) {
  3151. return this.then(undefined, onRejected);
  3152. }
  3153. });
  3154. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  3155. if (isCallable$1(NativePromiseConstructor)) {
  3156. var method = getBuiltIn$1('Promise').prototype['catch'];
  3157. if (NativePromisePrototype['catch'] !== method) {
  3158. defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
  3159. }
  3160. }
  3161. var $$4 = _export;
  3162. var call$3 = functionCall;
  3163. var aCallable$1 = aCallable$9;
  3164. var newPromiseCapabilityModule$1 = newPromiseCapability$2;
  3165. var perform = perform$3;
  3166. var iterate = iterate$2;
  3167. var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
  3168. // `Promise.race` method
  3169. // https://tc39.es/ecma262/#sec-promise.race
  3170. $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  3171. race: function race(iterable) {
  3172. var C = this;
  3173. var capability = newPromiseCapabilityModule$1.f(C);
  3174. var reject = capability.reject;
  3175. var result = perform(function () {
  3176. var $promiseResolve = aCallable$1(C.resolve);
  3177. iterate(iterable, function (promise) {
  3178. call$3($promiseResolve, C, promise).then(capability.resolve, reject);
  3179. });
  3180. });
  3181. if (result.error) reject(result.value);
  3182. return capability.promise;
  3183. }
  3184. });
  3185. var $$3 = _export;
  3186. var call$2 = functionCall;
  3187. var newPromiseCapabilityModule = newPromiseCapability$2;
  3188. var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
  3189. // `Promise.reject` method
  3190. // https://tc39.es/ecma262/#sec-promise.reject
  3191. $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
  3192. reject: function reject(r) {
  3193. var capability = newPromiseCapabilityModule.f(this);
  3194. call$2(capability.reject, undefined, r);
  3195. return capability.promise;
  3196. }
  3197. });
  3198. var anObject$2 = anObject$g;
  3199. var isObject = isObject$a;
  3200. var newPromiseCapability = newPromiseCapability$2;
  3201. var promiseResolve$1 = function (C, x) {
  3202. anObject$2(C);
  3203. if (isObject(x) && x.constructor === C) return x;
  3204. var promiseCapability = newPromiseCapability.f(C);
  3205. var resolve = promiseCapability.resolve;
  3206. resolve(x);
  3207. return promiseCapability.promise;
  3208. };
  3209. var $$2 = _export;
  3210. var getBuiltIn = getBuiltIn$7;
  3211. var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
  3212. var promiseResolve = promiseResolve$1;
  3213. getBuiltIn('Promise');
  3214. // `Promise.resolve` method
  3215. // https://tc39.es/ecma262/#sec-promise.resolve
  3216. $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  3217. resolve: function resolve(x) {
  3218. return promiseResolve(this, x);
  3219. }
  3220. });
  3221. var tryToString = tryToString$5;
  3222. var $TypeError = TypeError;
  3223. var deletePropertyOrThrow$1 = function (O, P) {
  3224. if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  3225. };
  3226. var arraySlice = arraySliceSimple;
  3227. var floor$1 = Math.floor;
  3228. var mergeSort = function (array, comparefn) {
  3229. var length = array.length;
  3230. var middle = floor$1(length / 2);
  3231. return length < 8 ? insertionSort(array, comparefn) : merge(
  3232. array,
  3233. mergeSort(arraySlice(array, 0, middle), comparefn),
  3234. mergeSort(arraySlice(array, middle), comparefn),
  3235. comparefn
  3236. );
  3237. };
  3238. var insertionSort = function (array, comparefn) {
  3239. var length = array.length;
  3240. var i = 1;
  3241. var element, j;
  3242. while (i < length) {
  3243. j = i;
  3244. element = array[i];
  3245. while (j && comparefn(array[j - 1], element) > 0) {
  3246. array[j] = array[--j];
  3247. }
  3248. if (j !== i++) array[j] = element;
  3249. } return array;
  3250. };
  3251. var merge = function (array, left, right, comparefn) {
  3252. var llength = left.length;
  3253. var rlength = right.length;
  3254. var lindex = 0;
  3255. var rindex = 0;
  3256. while (lindex < llength || rindex < rlength) {
  3257. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  3258. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  3259. : lindex < llength ? left[lindex++] : right[rindex++];
  3260. } return array;
  3261. };
  3262. var arraySort = mergeSort;
  3263. var userAgent$1 = engineUserAgent;
  3264. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  3265. var engineFfVersion = !!firefox && +firefox[1];
  3266. var UA = engineUserAgent;
  3267. var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
  3268. var userAgent = engineUserAgent;
  3269. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  3270. var engineWebkitVersion = !!webkit && +webkit[1];
  3271. var $$1 = _export;
  3272. var uncurryThis$3 = functionUncurryThis;
  3273. var aCallable = aCallable$9;
  3274. var toObject$1 = toObject$7;
  3275. var lengthOfArrayLike = lengthOfArrayLike$6;
  3276. var deletePropertyOrThrow = deletePropertyOrThrow$1;
  3277. var toString$2 = toString$9;
  3278. var fails$1 = fails$q;
  3279. var internalSort = arraySort;
  3280. var arrayMethodIsStrict$1 = arrayMethodIsStrict$4;
  3281. var FF = engineFfVersion;
  3282. var IE_OR_EDGE = engineIsIeOrEdge;
  3283. var V8 = engineV8Version;
  3284. var WEBKIT = engineWebkitVersion;
  3285. var test = [];
  3286. var nativeSort = uncurryThis$3(test.sort);
  3287. var push$1 = uncurryThis$3(test.push);
  3288. // IE8-
  3289. var FAILS_ON_UNDEFINED = fails$1(function () {
  3290. test.sort(undefined);
  3291. });
  3292. // V8 bug
  3293. var FAILS_ON_NULL = fails$1(function () {
  3294. test.sort(null);
  3295. });
  3296. // Old WebKit
  3297. var STRICT_METHOD = arrayMethodIsStrict$1('sort');
  3298. var STABLE_SORT = !fails$1(function () {
  3299. // feature detection can be too slow, so check engines versions
  3300. if (V8) return V8 < 70;
  3301. if (FF && FF > 3) return;
  3302. if (IE_OR_EDGE) return true;
  3303. if (WEBKIT) return WEBKIT < 603;
  3304. var result = '';
  3305. var code, chr, value, index;
  3306. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  3307. for (code = 65; code < 76; code++) {
  3308. chr = String.fromCharCode(code);
  3309. switch (code) {
  3310. case 66: case 69: case 70: case 72: value = 3; break;
  3311. case 68: case 71: value = 4; break;
  3312. default: value = 2;
  3313. }
  3314. for (index = 0; index < 47; index++) {
  3315. test.push({ k: chr + index, v: value });
  3316. }
  3317. }
  3318. test.sort(function (a, b) { return b.v - a.v; });
  3319. for (index = 0; index < test.length; index++) {
  3320. chr = test[index].k.charAt(0);
  3321. if (result.charAt(result.length - 1) !== chr) result += chr;
  3322. }
  3323. return result !== 'DGBEFHACIJK';
  3324. });
  3325. var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  3326. var getSortCompare = function (comparefn) {
  3327. return function (x, y) {
  3328. if (y === undefined) return -1;
  3329. if (x === undefined) return 1;
  3330. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  3331. return toString$2(x) > toString$2(y) ? 1 : -1;
  3332. };
  3333. };
  3334. // `Array.prototype.sort` method
  3335. // https://tc39.es/ecma262/#sec-array.prototype.sort
  3336. $$1({ target: 'Array', proto: true, forced: FORCED$1 }, {
  3337. sort: function sort(comparefn) {
  3338. if (comparefn !== undefined) aCallable(comparefn);
  3339. var array = toObject$1(this);
  3340. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  3341. var items = [];
  3342. var arrayLength = lengthOfArrayLike(array);
  3343. var itemsLength, index;
  3344. for (index = 0; index < arrayLength; index++) {
  3345. if (index in array) push$1(items, array[index]);
  3346. }
  3347. internalSort(items, getSortCompare(comparefn));
  3348. itemsLength = lengthOfArrayLike(items);
  3349. index = 0;
  3350. while (index < itemsLength) array[index] = items[index++];
  3351. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  3352. return array;
  3353. }
  3354. });
  3355. var uncurryThis$2 = functionUncurryThis;
  3356. var toObject = toObject$7;
  3357. var floor = Math.floor;
  3358. var charAt = uncurryThis$2(''.charAt);
  3359. var replace = uncurryThis$2(''.replace);
  3360. var stringSlice$1 = uncurryThis$2(''.slice);
  3361. // eslint-disable-next-line redos/no-vulnerable -- safe
  3362. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  3363. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  3364. // `GetSubstitution` abstract operation
  3365. // https://tc39.es/ecma262/#sec-getsubstitution
  3366. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  3367. var tailPos = position + matched.length;
  3368. var m = captures.length;
  3369. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  3370. if (namedCaptures !== undefined) {
  3371. namedCaptures = toObject(namedCaptures);
  3372. symbols = SUBSTITUTION_SYMBOLS;
  3373. }
  3374. return replace(replacement, symbols, function (match, ch) {
  3375. var capture;
  3376. switch (charAt(ch, 0)) {
  3377. case '$': return '$';
  3378. case '&': return matched;
  3379. case '`': return stringSlice$1(str, 0, position);
  3380. case "'": return stringSlice$1(str, tailPos);
  3381. case '<':
  3382. capture = namedCaptures[stringSlice$1(ch, 1, -1)];
  3383. break;
  3384. default: // \d\d?
  3385. var n = +ch;
  3386. if (n === 0) return match;
  3387. if (n > m) {
  3388. var f = floor(n / 10);
  3389. if (f === 0) return match;
  3390. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  3391. return match;
  3392. }
  3393. capture = captures[n - 1];
  3394. }
  3395. return capture === undefined ? '' : capture;
  3396. });
  3397. };
  3398. var apply = functionApply;
  3399. var call$1 = functionCall;
  3400. var uncurryThis$1 = functionUncurryThis;
  3401. var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
  3402. var fails = fails$q;
  3403. var anObject$1 = anObject$g;
  3404. var isCallable = isCallable$j;
  3405. var isNullOrUndefined$1 = isNullOrUndefined$7;
  3406. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  3407. var toLength$1 = toLength$4;
  3408. var toString$1 = toString$9;
  3409. var requireObjectCoercible$1 = requireObjectCoercible$8;
  3410. var advanceStringIndex$1 = advanceStringIndex$3;
  3411. var getMethod$1 = getMethod$6;
  3412. var getSubstitution = getSubstitution$1;
  3413. var regExpExec$1 = regexpExecAbstract;
  3414. var wellKnownSymbol = wellKnownSymbol$i;
  3415. var REPLACE = wellKnownSymbol('replace');
  3416. var max = Math.max;
  3417. var min = Math.min;
  3418. var concat = uncurryThis$1([].concat);
  3419. var push = uncurryThis$1([].push);
  3420. var stringIndexOf = uncurryThis$1(''.indexOf);
  3421. var stringSlice = uncurryThis$1(''.slice);
  3422. var maybeToString = function (it) {
  3423. return it === undefined ? it : String(it);
  3424. };
  3425. // IE <= 11 replaces $0 with the whole match, as if it was $&
  3426. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  3427. var REPLACE_KEEPS_$0 = (function () {
  3428. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  3429. return 'a'.replace(/./, '$0') === '$0';
  3430. })();
  3431. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  3432. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  3433. if (/./[REPLACE]) {
  3434. return /./[REPLACE]('a', '$0') === '';
  3435. }
  3436. return false;
  3437. })();
  3438. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  3439. var re = /./;
  3440. re.exec = function () {
  3441. var result = [];
  3442. result.groups = { a: '7' };
  3443. return result;
  3444. };
  3445. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  3446. return ''.replace(re, '$<a>') !== '7';
  3447. });
  3448. // @@replace logic
  3449. fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCallNative) {
  3450. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  3451. return [
  3452. // `String.prototype.replace` method
  3453. // https://tc39.es/ecma262/#sec-string.prototype.replace
  3454. function replace(searchValue, replaceValue) {
  3455. var O = requireObjectCoercible$1(this);
  3456. var replacer = isNullOrUndefined$1(searchValue) ? undefined : getMethod$1(searchValue, REPLACE);
  3457. return replacer
  3458. ? call$1(replacer, searchValue, O, replaceValue)
  3459. : call$1(nativeReplace, toString$1(O), searchValue, replaceValue);
  3460. },
  3461. // `RegExp.prototype[@@replace]` method
  3462. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  3463. function (string, replaceValue) {
  3464. var rx = anObject$1(this);
  3465. var S = toString$1(string);
  3466. if (
  3467. typeof replaceValue == 'string' &&
  3468. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  3469. stringIndexOf(replaceValue, '$<') === -1
  3470. ) {
  3471. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  3472. if (res.done) return res.value;
  3473. }
  3474. var functionalReplace = isCallable(replaceValue);
  3475. if (!functionalReplace) replaceValue = toString$1(replaceValue);
  3476. var global = rx.global;
  3477. if (global) {
  3478. var fullUnicode = rx.unicode;
  3479. rx.lastIndex = 0;
  3480. }
  3481. var results = [];
  3482. while (true) {
  3483. var result = regExpExec$1(rx, S);
  3484. if (result === null) break;
  3485. push(results, result);
  3486. if (!global) break;
  3487. var matchStr = toString$1(result[0]);
  3488. if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode);
  3489. }
  3490. var accumulatedResult = '';
  3491. var nextSourcePosition = 0;
  3492. for (var i = 0; i < results.length; i++) {
  3493. result = results[i];
  3494. var matched = toString$1(result[0]);
  3495. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  3496. var captures = [];
  3497. // NOTE: This is equivalent to
  3498. // captures = result.slice(1).map(maybeToString)
  3499. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  3500. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  3501. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  3502. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  3503. var namedCaptures = result.groups;
  3504. if (functionalReplace) {
  3505. var replacerArgs = concat([matched], captures, position, S);
  3506. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  3507. var replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
  3508. } else {
  3509. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  3510. }
  3511. if (position >= nextSourcePosition) {
  3512. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  3513. nextSourcePosition = position + matched.length;
  3514. }
  3515. }
  3516. return accumulatedResult + stringSlice(S, nextSourcePosition);
  3517. }
  3518. ];
  3519. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  3520. var call = functionCall;
  3521. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  3522. var anObject = anObject$g;
  3523. var isNullOrUndefined = isNullOrUndefined$7;
  3524. var toLength = toLength$4;
  3525. var toString = toString$9;
  3526. var requireObjectCoercible = requireObjectCoercible$8;
  3527. var getMethod = getMethod$6;
  3528. var advanceStringIndex = advanceStringIndex$3;
  3529. var regExpExec = regexpExecAbstract;
  3530. // @@match logic
  3531. fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
  3532. return [
  3533. // `String.prototype.match` method
  3534. // https://tc39.es/ecma262/#sec-string.prototype.match
  3535. function match(regexp) {
  3536. var O = requireObjectCoercible(this);
  3537. var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
  3538. return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
  3539. },
  3540. // `RegExp.prototype[@@match]` method
  3541. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  3542. function (string) {
  3543. var rx = anObject(this);
  3544. var S = toString(string);
  3545. var res = maybeCallNative(nativeMatch, rx, S);
  3546. if (res.done) return res.value;
  3547. if (!rx.global) return regExpExec(rx, S);
  3548. var fullUnicode = rx.unicode;
  3549. rx.lastIndex = 0;
  3550. var A = [];
  3551. var n = 0;
  3552. var result;
  3553. while ((result = regExpExec(rx, S)) !== null) {
  3554. var matchStr = toString(result[0]);
  3555. A[n] = matchStr;
  3556. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  3557. n++;
  3558. }
  3559. return n === 0 ? null : A;
  3560. }
  3561. ];
  3562. });
  3563. var $ = _export;
  3564. var uncurryThis = functionUncurryThis;
  3565. var IndexedObject = indexedObject;
  3566. var toIndexedObject = toIndexedObject$6;
  3567. var arrayMethodIsStrict = arrayMethodIsStrict$4;
  3568. var nativeJoin = uncurryThis([].join);
  3569. var ES3_STRINGS = IndexedObject != Object;
  3570. var FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');
  3571. // `Array.prototype.join` method
  3572. // https://tc39.es/ecma262/#sec-array.prototype.join
  3573. $({ target: 'Array', proto: true, forced: FORCED }, {
  3574. join: function join(separator) {
  3575. return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  3576. }
  3577. });
  3578. /* eslint-disable no-use-before-define */
  3579. var Utils$1 = $$k.fn.bootstrapTable.utils;
  3580. var searchControls = 'select, input:not([type="checkbox"]):not([type="radio"])';
  3581. function getInputClass(that) {
  3582. var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3583. var formControlClass = isSelect ? that.constants.classes.select : that.constants.classes.input;
  3584. return that.options.iconSize ? Utils$1.sprintf('%s %s-%s', formControlClass, formControlClass, that.options.iconSize) : formControlClass;
  3585. }
  3586. function getOptionsFromSelectControl(selectControl) {
  3587. return selectControl[0].options;
  3588. }
  3589. function getControlContainer(that) {
  3590. if (that.options.filterControlContainer) {
  3591. return $$k("".concat(that.options.filterControlContainer));
  3592. }
  3593. if (that.options.height && that._initialized) {
  3594. return that.$tableContainer.find('.fixed-table-header table thead');
  3595. }
  3596. return that.$header;
  3597. }
  3598. function isKeyAllowed(keyCode) {
  3599. return $$k.inArray(keyCode, [37, 38, 39, 40]) > -1;
  3600. }
  3601. function getSearchControls(that) {
  3602. return getControlContainer(that).find(searchControls);
  3603. }
  3604. function existOptionInSelectControl(selectControl, value) {
  3605. var options = getOptionsFromSelectControl(selectControl);
  3606. for (var i = 0; i < options.length; i++) {
  3607. if (options[i].value === Utils$1.unescapeHTML(value)) {
  3608. // The value is not valid to add
  3609. return true;
  3610. }
  3611. }
  3612. // If we get here, the value is valid to add
  3613. return false;
  3614. }
  3615. function addOptionToSelectControl(selectControl, _value, text, selected, shouldCompareText) {
  3616. var value = _value === undefined || _value === null ? '' : _value.toString().trim();
  3617. value = Utils$1.removeHTML(Utils$1.unescapeHTML(value));
  3618. text = Utils$1.removeHTML(Utils$1.unescapeHTML(text));
  3619. if (existOptionInSelectControl(selectControl, value)) {
  3620. return;
  3621. }
  3622. var isSelected = shouldCompareText ? value === selected || text === selected : value === selected;
  3623. var option = new Option(text, value, false, isSelected);
  3624. selectControl.get(0).add(option);
  3625. }
  3626. function sortSelectControl(selectControl, orderBy, options) {
  3627. var $selectControl = selectControl.get(0);
  3628. if (orderBy === 'server') {
  3629. return;
  3630. }
  3631. var tmpAry = new Array();
  3632. for (var i = 0; i < $selectControl.options.length; i++) {
  3633. tmpAry[i] = new Array();
  3634. tmpAry[i][0] = $selectControl.options[i].text;
  3635. tmpAry[i][1] = $selectControl.options[i].value;
  3636. tmpAry[i][2] = $selectControl.options[i].selected;
  3637. }
  3638. tmpAry.sort(function (a, b) {
  3639. return Utils$1.sort(a[0], b[0], orderBy === 'desc' ? -1 : 1, options);
  3640. });
  3641. while ($selectControl.options.length > 0) {
  3642. $selectControl.options[0] = null;
  3643. }
  3644. for (var _i = 0; _i < tmpAry.length; _i++) {
  3645. var op = new Option(tmpAry[_i][0], tmpAry[_i][1], false, tmpAry[_i][2]);
  3646. $selectControl.add(op);
  3647. }
  3648. }
  3649. function fixHeaderCSS(_ref) {
  3650. var $tableHeader = _ref.$tableHeader;
  3651. $tableHeader.css('height', $tableHeader.find('table').outerHeight(true));
  3652. }
  3653. function getElementClass($element) {
  3654. return $element.attr('class').replace('form-control', '').replace('form-select', '').replace('focus-temp', '').replace('search-input', '').trim();
  3655. }
  3656. function getCursorPosition(el) {
  3657. if ($$k(el).is('input[type=search]')) {
  3658. var pos = 0;
  3659. if ('selectionStart' in el) {
  3660. pos = el.selectionStart;
  3661. } else if ('selection' in document) {
  3662. el.focus();
  3663. var Sel = document.selection.createRange();
  3664. var SelLength = document.selection.createRange().text.length;
  3665. Sel.moveStart('character', -el.value.length);
  3666. pos = Sel.text.length - SelLength;
  3667. }
  3668. return pos;
  3669. }
  3670. return -1;
  3671. }
  3672. function cacheValues(that) {
  3673. var searchControls = getSearchControls(that);
  3674. that._valuesFilterControl = [];
  3675. searchControls.each(function () {
  3676. var $field = $$k(this);
  3677. var fieldClass = escapeID(getElementClass($field));
  3678. if (that.options.height && !that.options.filterControlContainer) {
  3679. $field = that.$el.find(".fixed-table-header .".concat(fieldClass));
  3680. } else if (that.options.filterControlContainer) {
  3681. $field = $$k("".concat(that.options.filterControlContainer, " .").concat(fieldClass));
  3682. } else {
  3683. $field = that.$el.find(".".concat(fieldClass));
  3684. }
  3685. that._valuesFilterControl.push({
  3686. field: $field.closest('[data-field]').data('field'),
  3687. value: $field.val(),
  3688. position: getCursorPosition($field.get(0)),
  3689. hasFocus: $field.is(':focus')
  3690. });
  3691. });
  3692. }
  3693. function setCaretPosition(elem, caretPos) {
  3694. try {
  3695. if (elem) {
  3696. if (elem.createTextRange) {
  3697. var range = elem.createTextRange();
  3698. range.move('character', caretPos);
  3699. range.select();
  3700. } else {
  3701. elem.setSelectionRange(caretPos, caretPos);
  3702. }
  3703. }
  3704. } catch (ex) {
  3705. // ignored
  3706. }
  3707. }
  3708. function setValues(that) {
  3709. var field = null;
  3710. var result = [];
  3711. var searchControls = getSearchControls(that);
  3712. if (that._valuesFilterControl.length > 0) {
  3713. // Callback to apply after settings fields values
  3714. var callbacks = [];
  3715. searchControls.each(function (i, el) {
  3716. var $this = $$k(el);
  3717. field = $this.closest('[data-field]').data('field');
  3718. result = that._valuesFilterControl.filter(function (valueObj) {
  3719. return valueObj.field === field;
  3720. });
  3721. if (result.length > 0) {
  3722. if (result[0].hasFocus || result[0].value) {
  3723. var fieldToFocusCallback = function (element, cacheElementInfo) {
  3724. // Closure here to capture the field information
  3725. var closedCallback = function closedCallback() {
  3726. if (cacheElementInfo.hasFocus) {
  3727. element.focus();
  3728. }
  3729. if (Array.isArray(cacheElementInfo.value)) {
  3730. var $element = $$k(element);
  3731. $$k.each(cacheElementInfo.value, function (i, e) {
  3732. $element.find(Utils$1.sprintf('option[value=\'%s\']', e)).prop('selected', true);
  3733. });
  3734. } else {
  3735. element.value = cacheElementInfo.value;
  3736. }
  3737. setCaretPosition(element, cacheElementInfo.position);
  3738. };
  3739. return closedCallback;
  3740. }($this.get(0), result[0]);
  3741. callbacks.push(fieldToFocusCallback);
  3742. }
  3743. }
  3744. });
  3745. // Callback call.
  3746. if (callbacks.length > 0) {
  3747. callbacks.forEach(function (callback) {
  3748. return callback();
  3749. });
  3750. }
  3751. }
  3752. }
  3753. function collectBootstrapTableFilterCookies() {
  3754. var cookies = [];
  3755. var foundCookies = document.cookie.match(/bs\.table\.(filterControl|searchText)/g);
  3756. var foundLocalStorage = localStorage;
  3757. if (foundCookies) {
  3758. $$k.each(foundCookies, function (i, _cookie) {
  3759. var cookie = _cookie;
  3760. if (/./.test(cookie)) {
  3761. cookie = cookie.split('.').pop();
  3762. }
  3763. if ($$k.inArray(cookie, cookies) === -1) {
  3764. cookies.push(cookie);
  3765. }
  3766. });
  3767. }
  3768. if (foundLocalStorage) {
  3769. for (var i = 0; i < foundLocalStorage.length; i++) {
  3770. var cookie = foundLocalStorage.key(i);
  3771. if (/./.test(cookie)) {
  3772. cookie = cookie.split('.').pop();
  3773. }
  3774. if (!cookies.includes(cookie)) {
  3775. cookies.push(cookie);
  3776. }
  3777. }
  3778. }
  3779. return cookies;
  3780. }
  3781. function escapeID(id) {
  3782. // eslint-disable-next-line no-useless-escape
  3783. return String(id).replace(/([:.\[\],])/g, '\\$1');
  3784. }
  3785. function isColumnSearchableViaSelect(_ref2) {
  3786. var filterControl = _ref2.filterControl,
  3787. searchable = _ref2.searchable;
  3788. return filterControl && filterControl.toLowerCase() === 'select' && searchable;
  3789. }
  3790. function isFilterDataNotGiven(_ref3) {
  3791. var filterData = _ref3.filterData;
  3792. return filterData === undefined || filterData.toLowerCase() === 'column';
  3793. }
  3794. function hasSelectControlElement(selectControl) {
  3795. return selectControl && selectControl.length > 0;
  3796. }
  3797. function initFilterSelectControls(that) {
  3798. var data = that.options.data;
  3799. $$k.each(that.header.fields, function (j, field) {
  3800. var column = that.columns[that.fieldsColumnsIndex[field]];
  3801. var selectControl = getControlContainer(that).find("select.bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3802. if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
  3803. if (!selectControl[0].multiple && selectControl.get(selectControl.length - 1).options.length === 0) {
  3804. // Added the default option, must use a non-breaking space(&nbsp;) to pass the W3C validator
  3805. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder || ' ', column.filterDefault);
  3806. }
  3807. var uniqueValues = {};
  3808. for (var i = 0; i < data.length; i++) {
  3809. // Added a new value
  3810. var fieldValue = Utils$1.getItemField(data[i], field, false);
  3811. var formatter = that.options.editable && column.editable ? column._formatter : that.header.formatters[j];
  3812. var formattedValue = Utils$1.calculateObjectValue(that.header, formatter, [fieldValue, data[i], i], fieldValue);
  3813. if (fieldValue === undefined || fieldValue === null) {
  3814. fieldValue = formattedValue;
  3815. column._forceFormatter = true;
  3816. }
  3817. if (column.filterDataCollector) {
  3818. formattedValue = Utils$1.calculateObjectValue(that.header, column.filterDataCollector, [fieldValue, data[i], formattedValue], formattedValue);
  3819. }
  3820. if (column.searchFormatter) {
  3821. fieldValue = formattedValue;
  3822. }
  3823. uniqueValues[formattedValue] = fieldValue;
  3824. if (_typeof(formattedValue) === 'object' && formattedValue !== null) {
  3825. formattedValue.forEach(function (value) {
  3826. addOptionToSelectControl(selectControl, value, value, column.filterDefault);
  3827. });
  3828. continue;
  3829. }
  3830. }
  3831. // eslint-disable-next-line guard-for-in
  3832. for (var key in uniqueValues) {
  3833. addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
  3834. }
  3835. if (that.options.sortSelectOptions) {
  3836. sortSelectControl(selectControl, 'asc', that.options);
  3837. }
  3838. }
  3839. });
  3840. }
  3841. function getFilterDataMethod(objFilterDataMethod, searchTerm) {
  3842. var keys = Object.keys(objFilterDataMethod);
  3843. for (var i = 0; i < keys.length; i++) {
  3844. if (keys[i] === searchTerm) {
  3845. return objFilterDataMethod[searchTerm];
  3846. }
  3847. }
  3848. return null;
  3849. }
  3850. function createControls(that, header) {
  3851. var addedFilterControl = false;
  3852. var html;
  3853. $$k.each(that.columns, function (_, column) {
  3854. html = [];
  3855. if (!column.visible && !(that.options.filterControlContainer && $$k(".bootstrap-table-filter-control-".concat(escapeID(column.field))).length >= 1)) {
  3856. return;
  3857. }
  3858. if (!column.filterControl && !that.options.filterControlContainer) {
  3859. html.push('<div class="no-filter-control"></div>');
  3860. } else if (that.options.filterControlContainer) {
  3861. // Use a filter control container instead of th
  3862. var $filterControls = $$k(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3863. $$k.each($filterControls, function (_, filterControl) {
  3864. var $filterControl = $$k(filterControl);
  3865. if (!$filterControl.is('[type=radio]')) {
  3866. var placeholder = column.filterControlPlaceholder || '';
  3867. $filterControl.attr('placeholder', placeholder).val(column.filterDefault);
  3868. }
  3869. $filterControl.attr('data-field', column.field);
  3870. });
  3871. addedFilterControl = true;
  3872. } else {
  3873. // Create the control based on the html defined in the filterTemplate array.
  3874. var nameControl = column.filterControl.toLowerCase();
  3875. html.push('<div class="filter-control">');
  3876. addedFilterControl = true;
  3877. if (column.searchable && that.options.filterTemplate[nameControl]) {
  3878. html.push(that.options.filterTemplate[nameControl](that, column, column.filterControlPlaceholder ? column.filterControlPlaceholder : '', column.filterDefault));
  3879. }
  3880. }
  3881. // Filtering by default when it is set.
  3882. if (column.filterControl && '' !== column.filterDefault && 'undefined' !== typeof column.filterDefault) {
  3883. if ($$k.isEmptyObject(that.filterColumnsPartial)) {
  3884. that.filterColumnsPartial = {};
  3885. }
  3886. if (!(column.field in that.filterColumnsPartial)) {
  3887. that.filterColumnsPartial[column.field] = column.filterDefault;
  3888. }
  3889. }
  3890. $$k.each(header.find('th'), function (_, th) {
  3891. var $th = $$k(th);
  3892. if ($th.data('field') === column.field) {
  3893. $th.find('.filter-control').remove();
  3894. $th.find('.fht-cell').html(html.join(''));
  3895. return false;
  3896. }
  3897. });
  3898. if (column.filterData && column.filterData.toLowerCase() !== 'column') {
  3899. var filterDataType = getFilterDataMethod(filterDataMethods, column.filterData.substring(0, column.filterData.indexOf(':')));
  3900. var filterDataSource;
  3901. var selectControl;
  3902. if (filterDataType) {
  3903. filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
  3904. selectControl = header.find(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3905. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault, true);
  3906. filterDataType(that, filterDataSource, selectControl, that.options.filterOrderBy, column.filterDefault);
  3907. } else {
  3908. 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"}');
  3909. }
  3910. }
  3911. });
  3912. if (addedFilterControl) {
  3913. header.off('keyup', 'input').on('keyup', 'input', function (_ref4, obj) {
  3914. var currentTarget = _ref4.currentTarget,
  3915. keyCode = _ref4.keyCode;
  3916. keyCode = obj ? obj.keyCode : keyCode;
  3917. if (that.options.searchOnEnterKey && keyCode !== 13) {
  3918. return;
  3919. }
  3920. if (isKeyAllowed(keyCode)) {
  3921. return;
  3922. }
  3923. var $currentTarget = $$k(currentTarget);
  3924. if ($currentTarget.is(':checkbox') || $currentTarget.is(':radio')) {
  3925. return;
  3926. }
  3927. clearTimeout(currentTarget.timeoutId || 0);
  3928. currentTarget.timeoutId = setTimeout(function () {
  3929. that.onColumnSearch({
  3930. currentTarget: currentTarget,
  3931. keyCode: keyCode
  3932. });
  3933. }, that.options.searchTimeOut);
  3934. });
  3935. header.off('change', 'select', '.fc-multipleselect').on('change', 'select', '.fc-multipleselect', function (_ref5) {
  3936. var currentTarget = _ref5.currentTarget,
  3937. keyCode = _ref5.keyCode;
  3938. var $selectControl = $$k(currentTarget);
  3939. var value = $selectControl.val();
  3940. if (Array.isArray(value)) {
  3941. for (var i = 0; i < value.length; i++) {
  3942. if (value[i] && value[i].length > 0 && value[i].trim()) {
  3943. $selectControl.find("option[value=\"".concat(value[i], "\"]")).attr('selected', true);
  3944. }
  3945. }
  3946. } else if (value && value.length > 0 && value.trim()) {
  3947. $selectControl.find('option[selected]').removeAttr('selected');
  3948. $selectControl.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  3949. } else {
  3950. $selectControl.find('option[selected]').removeAttr('selected');
  3951. }
  3952. clearTimeout(currentTarget.timeoutId || 0);
  3953. currentTarget.timeoutId = setTimeout(function () {
  3954. that.onColumnSearch({
  3955. currentTarget: currentTarget,
  3956. keyCode: keyCode
  3957. });
  3958. }, that.options.searchTimeOut);
  3959. });
  3960. header.off('mouseup', 'input:not([type=radio])').on('mouseup', 'input:not([type=radio])', function (_ref6) {
  3961. var currentTarget = _ref6.currentTarget,
  3962. keyCode = _ref6.keyCode;
  3963. var $input = $$k(currentTarget);
  3964. var oldValue = $input.val();
  3965. if (oldValue === '') {
  3966. return;
  3967. }
  3968. setTimeout(function () {
  3969. var newValue = $input.val();
  3970. if (newValue === '') {
  3971. clearTimeout(currentTarget.timeoutId || 0);
  3972. currentTarget.timeoutId = setTimeout(function () {
  3973. that.onColumnSearch({
  3974. currentTarget: currentTarget,
  3975. keyCode: keyCode
  3976. });
  3977. }, that.options.searchTimeOut);
  3978. }
  3979. }, 1);
  3980. });
  3981. header.off('change', 'input[type=radio]').on('change', 'input[type=radio]', function (_ref7) {
  3982. var currentTarget = _ref7.currentTarget,
  3983. keyCode = _ref7.keyCode;
  3984. clearTimeout(currentTarget.timeoutId || 0);
  3985. currentTarget.timeoutId = setTimeout(function () {
  3986. that.onColumnSearch({
  3987. currentTarget: currentTarget,
  3988. keyCode: keyCode
  3989. });
  3990. }, that.options.searchTimeOut);
  3991. });
  3992. // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  3993. if (header.find('.date-filter-control').length > 0) {
  3994. $$k.each(that.columns, function (i, _ref8) {
  3995. var filterDefault = _ref8.filterDefault,
  3996. filterControl = _ref8.filterControl,
  3997. field = _ref8.field,
  3998. filterDatepickerOptions = _ref8.filterDatepickerOptions;
  3999. if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
  4000. var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(escapeID(field)));
  4001. if (filterDefault) {
  4002. $datepicker.value(filterDefault);
  4003. }
  4004. if (filterDatepickerOptions.min) {
  4005. $datepicker.attr('min', filterDatepickerOptions.min);
  4006. }
  4007. if (filterDatepickerOptions.max) {
  4008. $datepicker.attr('max', filterDatepickerOptions.max);
  4009. }
  4010. if (filterDatepickerOptions.step) {
  4011. $datepicker.attr('step', filterDatepickerOptions.step);
  4012. }
  4013. if (filterDatepickerOptions.pattern) {
  4014. $datepicker.attr('pattern', filterDatepickerOptions.pattern);
  4015. }
  4016. $datepicker.on('change', function (_ref9) {
  4017. var currentTarget = _ref9.currentTarget;
  4018. clearTimeout(currentTarget.timeoutId || 0);
  4019. currentTarget.timeoutId = setTimeout(function () {
  4020. that.onColumnSearch({
  4021. currentTarget: currentTarget
  4022. });
  4023. }, that.options.searchTimeOut);
  4024. });
  4025. }
  4026. });
  4027. }
  4028. if (that.options.sidePagination !== 'server') {
  4029. that.triggerSearch();
  4030. }
  4031. if (!that.options.filterControlVisible) {
  4032. header.find('.filter-control, .no-filter-control').hide();
  4033. }
  4034. } else {
  4035. header.find('.filter-control, .no-filter-control').hide();
  4036. }
  4037. that.trigger('created-controls');
  4038. }
  4039. function getDirectionOfSelectOptions(_alignment) {
  4040. var alignment = _alignment === undefined ? 'left' : _alignment.toLowerCase();
  4041. switch (alignment) {
  4042. case 'left':
  4043. return 'ltr';
  4044. case 'right':
  4045. return 'rtl';
  4046. case 'auto':
  4047. return 'auto';
  4048. default:
  4049. return 'ltr';
  4050. }
  4051. }
  4052. function syncHeaders(that) {
  4053. if (!that.options.height) {
  4054. return;
  4055. }
  4056. var fixedHeader = that.$tableContainer.find('.fixed-table-header table thead');
  4057. if (fixedHeader.length === 0) {
  4058. return;
  4059. }
  4060. that.$header.children().find('th[data-field]').each(function (_, element) {
  4061. if (element.classList[0] !== 'bs-checkbox') {
  4062. var $element = $$k(element);
  4063. var $field = $element.data('field');
  4064. var $fixedField = that.$tableContainer.find("th[data-field='".concat($field, "']")).not($element);
  4065. var input = $element.find('input');
  4066. var fixedInput = $fixedField.find('input');
  4067. if (input.length > 0 && fixedInput.length > 0) {
  4068. if (input.val() !== fixedInput.val()) {
  4069. input.val(fixedInput.val());
  4070. }
  4071. }
  4072. }
  4073. });
  4074. }
  4075. var filterDataMethods = {
  4076. func: function func(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4077. var variableValues = window[filterDataSource].apply();
  4078. // eslint-disable-next-line guard-for-in
  4079. for (var key in variableValues) {
  4080. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4081. }
  4082. if (that.options.sortSelectOptions) {
  4083. sortSelectControl(selectControl, filterOrderBy, that.options);
  4084. }
  4085. setValues(that);
  4086. },
  4087. obj: function obj(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4088. var objectKeys = filterDataSource.split('.');
  4089. var variableName = objectKeys.shift();
  4090. var variableValues = window[variableName];
  4091. if (objectKeys.length > 0) {
  4092. objectKeys.forEach(function (key) {
  4093. variableValues = variableValues[key];
  4094. });
  4095. }
  4096. // eslint-disable-next-line guard-for-in
  4097. for (var key in variableValues) {
  4098. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4099. }
  4100. if (that.options.sortSelectOptions) {
  4101. sortSelectControl(selectControl, filterOrderBy, that.options);
  4102. }
  4103. setValues(that);
  4104. },
  4105. var: function _var(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4106. var variableValues = window[filterDataSource];
  4107. var isArray = Array.isArray(variableValues);
  4108. for (var key in variableValues) {
  4109. if (isArray) {
  4110. addOptionToSelectControl(selectControl, variableValues[key], variableValues[key], selected, true);
  4111. } else {
  4112. addOptionToSelectControl(selectControl, key, variableValues[key], selected, true);
  4113. }
  4114. }
  4115. if (that.options.sortSelectOptions) {
  4116. sortSelectControl(selectControl, filterOrderBy, that.options);
  4117. }
  4118. setValues(that);
  4119. },
  4120. url: function url(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4121. $$k.ajax({
  4122. url: filterDataSource,
  4123. dataType: 'json',
  4124. success: function success(data) {
  4125. // eslint-disable-next-line guard-for-in
  4126. for (var key in data) {
  4127. addOptionToSelectControl(selectControl, key, data[key], selected);
  4128. }
  4129. if (that.options.sortSelectOptions) {
  4130. sortSelectControl(selectControl, filterOrderBy, that.options);
  4131. }
  4132. setValues(that);
  4133. }
  4134. });
  4135. },
  4136. json: function json(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4137. var variableValues = JSON.parse(filterDataSource);
  4138. // eslint-disable-next-line guard-for-in
  4139. for (var key in variableValues) {
  4140. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4141. }
  4142. if (that.options.sortSelectOptions) {
  4143. sortSelectControl(selectControl, filterOrderBy, that.options);
  4144. }
  4145. setValues(that);
  4146. }
  4147. };
  4148. var Utils = $$k.fn.bootstrapTable.utils;
  4149. Object.assign($$k.fn.bootstrapTable.defaults, {
  4150. filterControl: false,
  4151. filterControlVisible: true,
  4152. filterControlMultipleSearch: false,
  4153. filterControlMultipleSearchDelimiter: ',',
  4154. // eslint-disable-next-line no-unused-vars
  4155. onColumnSearch: function onColumnSearch(field, text) {
  4156. return false;
  4157. },
  4158. onCreatedControls: function onCreatedControls() {
  4159. return false;
  4160. },
  4161. alignmentSelectControlOptions: undefined,
  4162. filterTemplate: {
  4163. input: function input(that, column, placeholder, value) {
  4164. return Utils.sprintf('<input type="search" class="%s bootstrap-table-filter-control-%s search-input" style="width: 100%;" placeholder="%s" value="%s">', getInputClass(that), column.field, 'undefined' === typeof placeholder ? '' : placeholder, 'undefined' === typeof value ? '' : value);
  4165. },
  4166. select: function select(that, column) {
  4167. return Utils.sprintf('<select class="%s bootstrap-table-filter-control-%s %s" %s style="width: 100%;" dir="%s"></select>', getInputClass(that, true), column.field, '', '', getDirectionOfSelectOptions(that.options.alignmentSelectControlOptions));
  4168. },
  4169. datepicker: function datepicker(that, column, value) {
  4170. return Utils.sprintf('<input type="date" class="%s date-filter-control bootstrap-table-filter-control-%s" style="width: 100%;" value="%s">', getInputClass(that), column.field, 'undefined' === typeof value ? '' : value);
  4171. }
  4172. },
  4173. searchOnEnterKey: false,
  4174. showFilterControlSwitch: false,
  4175. sortSelectOptions: false,
  4176. // internal variables
  4177. _valuesFilterControl: [],
  4178. _initialized: false,
  4179. _isRendering: false,
  4180. _usingMultipleSelect: false
  4181. });
  4182. Object.assign($$k.fn.bootstrapTable.columnDefaults, {
  4183. filterControl: undefined,
  4184. // input, select, datepicker
  4185. filterControlMultipleSelect: false,
  4186. filterControlMultipleSelectOptions: {},
  4187. filterDataCollector: undefined,
  4188. filterData: undefined,
  4189. filterDatepickerOptions: {},
  4190. filterStrictSearch: false,
  4191. filterStartsWithSearch: false,
  4192. filterControlPlaceholder: '',
  4193. filterDefault: '',
  4194. filterOrderBy: 'asc',
  4195. // asc || desc
  4196. filterCustomSearch: undefined
  4197. });
  4198. Object.assign($$k.fn.bootstrapTable.events, {
  4199. 'column-search.bs.table': 'onColumnSearch',
  4200. 'created-controls.bs.table': 'onCreatedControls'
  4201. });
  4202. Object.assign($$k.fn.bootstrapTable.defaults.icons, {
  4203. filterControlSwitchHide: {
  4204. bootstrap3: 'glyphicon-zoom-out icon-zoom-out',
  4205. bootstrap5: 'bi-zoom-out',
  4206. materialize: 'zoom_out'
  4207. }[$$k.fn.bootstrapTable.theme] || 'fa-search-minus',
  4208. filterControlSwitchShow: {
  4209. bootstrap3: 'glyphicon-zoom-in icon-zoom-in',
  4210. bootstrap5: 'bi-zoom-in',
  4211. materialize: 'zoom_in'
  4212. }[$$k.fn.bootstrapTable.theme] || 'fa-search-plus'
  4213. });
  4214. Object.assign($$k.fn.bootstrapTable.locales, {
  4215. formatFilterControlSwitch: function formatFilterControlSwitch() {
  4216. return 'Hide/Show controls';
  4217. },
  4218. formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
  4219. return 'Hide controls';
  4220. },
  4221. formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
  4222. return 'Show controls';
  4223. },
  4224. formatClearSearch: function formatClearSearch() {
  4225. return 'Clear filters';
  4226. }
  4227. });
  4228. Object.assign($$k.fn.bootstrapTable.defaults, $$k.fn.bootstrapTable.locales);
  4229. $$k.fn.bootstrapTable.methods.push('triggerSearch');
  4230. $$k.fn.bootstrapTable.methods.push('clearFilterControl');
  4231. $$k.fn.bootstrapTable.methods.push('toggleFilterControl');
  4232. $$k.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  4233. _inherits(_class, _$$BootstrapTable);
  4234. var _super = _createSuper(_class);
  4235. function _class() {
  4236. _classCallCheck(this, _class);
  4237. return _super.apply(this, arguments);
  4238. }
  4239. _createClass(_class, [{
  4240. key: "init",
  4241. value: function init() {
  4242. var _this = this;
  4243. // Make sure that the filterControl option is set
  4244. if (this.options.filterControl) {
  4245. // Make sure that the internal variables are set correctly
  4246. this._valuesFilterControl = [];
  4247. this._initialized = false;
  4248. this._usingMultipleSelect = false;
  4249. this._isRendering = false;
  4250. this.$el.on('reset-view.bs.table', Utils.debounce(function () {
  4251. initFilterSelectControls(_this);
  4252. setValues(_this);
  4253. }, 3)).on('toggle.bs.table', Utils.debounce(function (_, cardView) {
  4254. _this._initialized = false;
  4255. if (!cardView) {
  4256. initFilterSelectControls(_this);
  4257. setValues(_this);
  4258. _this._initialized = true;
  4259. }
  4260. }, 1)).on('post-header.bs.table', Utils.debounce(function () {
  4261. initFilterSelectControls(_this);
  4262. setValues(_this);
  4263. }, 3)).on('column-switch.bs.table', Utils.debounce(function () {
  4264. setValues(_this);
  4265. if (_this.options.height) {
  4266. _this.fitHeader();
  4267. }
  4268. }, 1)).on('post-body.bs.table', Utils.debounce(function () {
  4269. if (_this.options.height && !_this.options.filterControlContainer && _this.options.filterControlVisible) {
  4270. fixHeaderCSS(_this);
  4271. }
  4272. _this.$tableLoading.css('top', _this.$header.outerHeight() + 1);
  4273. }, 1)).on('all.bs.table', function () {
  4274. syncHeaders(_this);
  4275. });
  4276. }
  4277. _get(_getPrototypeOf(_class.prototype), "init", this).call(this);
  4278. }
  4279. }, {
  4280. key: "initBody",
  4281. value: function initBody() {
  4282. var _this2 = this;
  4283. _get(_getPrototypeOf(_class.prototype), "initBody", this).call(this);
  4284. if (!this.options.filterControl) {
  4285. return;
  4286. }
  4287. setTimeout(function () {
  4288. initFilterSelectControls(_this2);
  4289. setValues(_this2);
  4290. }, 3);
  4291. }
  4292. }, {
  4293. key: "load",
  4294. value: function load(data) {
  4295. _get(_getPrototypeOf(_class.prototype), "load", this).call(this, data);
  4296. if (!this.options.filterControl) {
  4297. return;
  4298. }
  4299. createControls(this, getControlContainer(this));
  4300. setValues(this);
  4301. }
  4302. }, {
  4303. key: "initHeader",
  4304. value: function initHeader() {
  4305. _get(_getPrototypeOf(_class.prototype), "initHeader", this).call(this);
  4306. if (!this.options.filterControl) {
  4307. return;
  4308. }
  4309. createControls(this, getControlContainer(this));
  4310. this._initialized = true;
  4311. }
  4312. }, {
  4313. key: "initSearch",
  4314. value: function initSearch() {
  4315. var _this3 = this;
  4316. var that = this;
  4317. var filterPartial = $$k.isEmptyObject(that.filterColumnsPartial) ? null : that.filterColumnsPartial;
  4318. _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
  4319. if (this.options.sidePagination === 'server' || filterPartial === null) {
  4320. return;
  4321. }
  4322. // Check partial column filter
  4323. that.data = filterPartial ? that.data.filter(function (item, i) {
  4324. var itemIsExpected = [];
  4325. var keys1 = Object.keys(item);
  4326. var keys2 = Object.keys(filterPartial);
  4327. var keys = keys1.concat(keys2.filter(function (item) {
  4328. return !keys1.includes(item);
  4329. }));
  4330. keys.forEach(function (key) {
  4331. var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
  4332. var rawFilterValue = filterPartial[key] || '';
  4333. var filterValue = rawFilterValue.toLowerCase();
  4334. var value = Utils.unescapeHTML(Utils.getItemField(item, key, false));
  4335. var tmpItemIsExpected;
  4336. if (_this3.options.searchAccentNeutralise) {
  4337. filterValue = Utils.normalizeAccent(filterValue);
  4338. }
  4339. var filterValues = [filterValue];
  4340. if (_this3.options.filterControlMultipleSearch) {
  4341. filterValues = filterValue.split(_this3.options.filterControlMultipleSearchDelimiter);
  4342. }
  4343. filterValues.forEach(function (filterValue) {
  4344. if (tmpItemIsExpected === true) {
  4345. return;
  4346. }
  4347. filterValue = filterValue.trim();
  4348. if (filterValue === '') {
  4349. tmpItemIsExpected = true;
  4350. } else {
  4351. // Fix #142: search use formatted data
  4352. if (thisColumn) {
  4353. if (thisColumn.searchFormatter || thisColumn._forceFormatter) {
  4354. value = $$k.fn.bootstrapTable.utils.calculateObjectValue(thisColumn, that.header.formatters[$$k.inArray(key, that.header.fields)], [value, item, i], value);
  4355. }
  4356. }
  4357. if ($$k.inArray(key, that.header.fields) !== -1) {
  4358. if (value === undefined || value === null) {
  4359. tmpItemIsExpected = false;
  4360. } else if (_typeof(value) === 'object' && thisColumn.filterCustomSearch) {
  4361. itemIsExpected.push(that.isValueExpected(rawFilterValue, value, thisColumn, key));
  4362. } else if (_typeof(value) === 'object' && Array.isArray(value)) {
  4363. value.forEach(function (objectValue) {
  4364. if (tmpItemIsExpected) {
  4365. return;
  4366. }
  4367. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4368. });
  4369. } else if (_typeof(value) === 'object' && !Array.isArray(value)) {
  4370. Object.values(value).forEach(function (objectValue) {
  4371. if (tmpItemIsExpected) {
  4372. return;
  4373. }
  4374. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4375. });
  4376. } else if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
  4377. tmpItemIsExpected = that.isValueExpected(filterValue, value, thisColumn, key);
  4378. }
  4379. }
  4380. }
  4381. });
  4382. itemIsExpected.push(tmpItemIsExpected);
  4383. });
  4384. return !itemIsExpected.includes(false);
  4385. }) : that.data;
  4386. that.unsortedData = _toConsumableArray(that.data);
  4387. }
  4388. }, {
  4389. key: "isValueExpected",
  4390. value: function isValueExpected(searchValue, value, column, key) {
  4391. var tmpItemIsExpected;
  4392. if (column.filterControl === 'select') {
  4393. value = Utils.removeHTML(value.toString().toLowerCase());
  4394. }
  4395. if (column.filterStrictSearch || column.filterControl === 'select' && column.passed.filterStrictSearch !== false) {
  4396. tmpItemIsExpected = value.toString().toLowerCase() === searchValue.toString().toLowerCase();
  4397. } else if (column.filterStartsWithSearch) {
  4398. tmpItemIsExpected = "".concat(value).toLowerCase().indexOf(searchValue) === 0;
  4399. } else if (column.filterControl === 'datepicker') {
  4400. tmpItemIsExpected = new Date(value).getTime() === new Date(searchValue).getTime();
  4401. } else if (this.options.regexSearch) {
  4402. tmpItemIsExpected = Utils.regexCompare(value, searchValue);
  4403. } else {
  4404. tmpItemIsExpected = "".concat(value).toLowerCase().includes(searchValue);
  4405. }
  4406. var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(\d+)?|(\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm;
  4407. var matches = largerSmallerEqualsRegex.exec(searchValue);
  4408. if (matches) {
  4409. var operator = matches[1] || "".concat(matches[5], "l");
  4410. var comparisonValue = matches[2] || matches[3];
  4411. var int = parseInt(value, 10);
  4412. var comparisonInt = parseInt(comparisonValue, 10);
  4413. switch (operator) {
  4414. case '>':
  4415. case '<l':
  4416. tmpItemIsExpected = int > comparisonInt;
  4417. break;
  4418. case '<':
  4419. case '>l':
  4420. tmpItemIsExpected = int < comparisonInt;
  4421. break;
  4422. case '<=':
  4423. case '=<':
  4424. case '>=l':
  4425. case '=>l':
  4426. tmpItemIsExpected = int <= comparisonInt;
  4427. break;
  4428. case '>=':
  4429. case '=>':
  4430. case '<=l':
  4431. case '=<l':
  4432. tmpItemIsExpected = int >= comparisonInt;
  4433. break;
  4434. }
  4435. }
  4436. if (column.filterCustomSearch) {
  4437. var customSearchResult = Utils.calculateObjectValue(column, column.filterCustomSearch, [searchValue, value, key, this.options.data], true);
  4438. if (customSearchResult !== null) {
  4439. tmpItemIsExpected = customSearchResult;
  4440. }
  4441. }
  4442. return tmpItemIsExpected;
  4443. }
  4444. }, {
  4445. key: "initColumnSearch",
  4446. value: function initColumnSearch(filterColumnsDefaults) {
  4447. cacheValues(this);
  4448. if (filterColumnsDefaults) {
  4449. this.filterColumnsPartial = filterColumnsDefaults;
  4450. this.updatePagination();
  4451. // eslint-disable-next-line guard-for-in
  4452. for (var filter in filterColumnsDefaults) {
  4453. this.trigger('column-search', filter, filterColumnsDefaults[filter]);
  4454. }
  4455. }
  4456. }
  4457. }, {
  4458. key: "initToolbar",
  4459. value: function initToolbar() {
  4460. this.showToolbar = this.showToolbar || this.options.showFilterControlSwitch;
  4461. this.showSearchClearButton = this.options.filterControl && this.options.showSearchClearButton;
  4462. if (this.options.showFilterControlSwitch) {
  4463. this.buttons = Object.assign(this.buttons, {
  4464. filterControlSwitch: {
  4465. text: this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
  4466. icon: this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
  4467. event: this.toggleFilterControl,
  4468. attributes: {
  4469. 'aria-label': this.options.formatFilterControlSwitch(),
  4470. title: this.options.formatFilterControlSwitch()
  4471. }
  4472. }
  4473. });
  4474. }
  4475. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  4476. }
  4477. }, {
  4478. key: "resetSearch",
  4479. value: function resetSearch(text) {
  4480. if (this.options.filterControl && this.options.showSearchClearButton) {
  4481. this.clearFilterControl();
  4482. }
  4483. _get(_getPrototypeOf(_class.prototype), "resetSearch", this).call(this, text);
  4484. }
  4485. }, {
  4486. key: "clearFilterControl",
  4487. value: function clearFilterControl() {
  4488. if (!this.options.filterControl) {
  4489. return;
  4490. }
  4491. var that = this;
  4492. var table = this.$el.closest('table');
  4493. var cookies = collectBootstrapTableFilterCookies();
  4494. var controls = getSearchControls(that);
  4495. // const search = Utils.getSearchInput(this)
  4496. var hasValues = false;
  4497. var timeoutId = 0;
  4498. // Clear cache values
  4499. $$k.each(that._valuesFilterControl, function (i, item) {
  4500. hasValues = hasValues ? true : item.value !== '';
  4501. item.value = '';
  4502. });
  4503. // Clear controls in UI
  4504. $$k.each(controls, function (i, item) {
  4505. item.value = '';
  4506. });
  4507. // Cache controls again
  4508. setValues(that);
  4509. // clear cookies once the filters are clean
  4510. clearTimeout(timeoutId);
  4511. timeoutId = setTimeout(function () {
  4512. if (cookies && cookies.length > 0) {
  4513. $$k.each(cookies, function (i, item) {
  4514. if (that.deleteCookie !== undefined) {
  4515. that.deleteCookie(item);
  4516. }
  4517. });
  4518. }
  4519. }, that.options.searchTimeOut);
  4520. // If there is not any value in the controls exit this method
  4521. if (!hasValues) {
  4522. return;
  4523. }
  4524. // Clear each type of filter if it exists.
  4525. // Requires the body to reload each time a type of filter is found because we never know
  4526. // which ones are going to be present.
  4527. if (controls.length > 0) {
  4528. this.filterColumnsPartial = {};
  4529. controls.eq(0).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', {
  4530. keyCode: 13
  4531. });
  4532. /* controls.each(function () {
  4533. $(this).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', { keyCode: 13 })
  4534. })*/
  4535. } else {
  4536. return;
  4537. }
  4538. /* if (search.length > 0) {
  4539. that.resetSearch('fc')
  4540. }*/
  4541. // use the default sort order if it exists. do nothing if it does not
  4542. if (that.options.sortName !== table.data('sortName') || that.options.sortOrder !== table.data('sortOrder')) {
  4543. var sorter = this.$header.find(Utils.sprintf('[data-field="%s"]', $$k(controls[0]).closest('table').data('sortName')));
  4544. if (sorter.length > 0) {
  4545. that.onSort({
  4546. type: 'keypress',
  4547. currentTarget: sorter
  4548. });
  4549. $$k(sorter).find('.sortable').trigger('click');
  4550. }
  4551. }
  4552. }
  4553. // EVENTS
  4554. }, {
  4555. key: "onColumnSearch",
  4556. value: function onColumnSearch(_ref) {
  4557. var _this4 = this;
  4558. var currentTarget = _ref.currentTarget,
  4559. keyCode = _ref.keyCode;
  4560. if (isKeyAllowed(keyCode)) {
  4561. return;
  4562. }
  4563. cacheValues(this);
  4564. // Cookie extension support
  4565. if (!this.options.cookie) {
  4566. this.options.pageNumber = 1;
  4567. } else {
  4568. // Force call the initServer method in Cookie extension
  4569. this._filterControlValuesLoaded = true;
  4570. }
  4571. if ($$k.isEmptyObject(this.filterColumnsPartial)) {
  4572. this.filterColumnsPartial = {};
  4573. }
  4574. // If searchOnEnterKey is set to true, then we need to iterate over all controls and grab their values.
  4575. var controls = this.options.searchOnEnterKey ? getSearchControls(this).toArray() : [currentTarget];
  4576. controls.forEach(function (element) {
  4577. var $element = $$k(element);
  4578. var elementValue = $element.val();
  4579. var text = elementValue ? elementValue.trim() : '';
  4580. var $field = $element.closest('[data-field]').data('field');
  4581. _this4.trigger('column-search', $field, text);
  4582. if (text) {
  4583. _this4.filterColumnsPartial[$field] = text;
  4584. } else {
  4585. delete _this4.filterColumnsPartial[$field];
  4586. }
  4587. });
  4588. this.onSearch({
  4589. currentTarget: currentTarget
  4590. }, false);
  4591. }
  4592. }, {
  4593. key: "toggleFilterControl",
  4594. value: function toggleFilterControl() {
  4595. this.options.filterControlVisible = !this.options.filterControlVisible;
  4596. // Controls in original header or container.
  4597. var $filterControls = getControlContainer(this).find('.filter-control, .no-filter-control');
  4598. if (this.options.filterControlVisible) {
  4599. $filterControls.show();
  4600. } else {
  4601. $filterControls.hide();
  4602. this.clearFilterControl();
  4603. }
  4604. // Controls in fixed header
  4605. if (this.options.height) {
  4606. var $fixedControls = this.$tableContainer.find('.fixed-table-header table thead').find('.filter-control, .no-filter-control');
  4607. $fixedControls.toggle(this.options.filterControlVisible);
  4608. fixHeaderCSS(this);
  4609. }
  4610. var icon = this.options.showButtonIcons ? this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow : '';
  4611. var text = this.options.showButtonText ? this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow() : '';
  4612. this.$toolbar.find('>.columns').find('.filter-control-switch').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
  4613. }
  4614. }, {
  4615. key: "triggerSearch",
  4616. value: function triggerSearch() {
  4617. var searchControls = getSearchControls(this);
  4618. searchControls.each(function () {
  4619. var $element = $$k(this);
  4620. if ($element.is('select')) {
  4621. $element.trigger('change');
  4622. } else {
  4623. $element.trigger('keyup');
  4624. }
  4625. });
  4626. }
  4627. }, {
  4628. key: "_toggleColumn",
  4629. value: function _toggleColumn(index, checked, needUpdate) {
  4630. this._initialized = false;
  4631. _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this).call(this, index, checked, needUpdate);
  4632. syncHeaders(this);
  4633. }
  4634. }]);
  4635. return _class;
  4636. }($$k.BootstrapTable);
  4637. }));