bootstrap-table-filter-control.js 231 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788
  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 ($) { 'use strict';
  6. function _arrayLikeToArray(r, a) {
  7. (null == a || a > r.length) && (a = r.length);
  8. for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  9. return n;
  10. }
  11. function _arrayWithoutHoles(r) {
  12. if (Array.isArray(r)) return _arrayLikeToArray(r);
  13. }
  14. function _assertThisInitialized(e) {
  15. if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  16. return e;
  17. }
  18. function _callSuper(t, o, e) {
  19. return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
  20. }
  21. function _classCallCheck(a, n) {
  22. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  23. }
  24. function _defineProperties(e, r) {
  25. for (var t = 0; t < r.length; t++) {
  26. var o = r[t];
  27. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
  28. }
  29. }
  30. function _createClass(e, r, t) {
  31. return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
  32. writable: !1
  33. }), e;
  34. }
  35. function _get() {
  36. return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
  37. var p = _superPropBase(e, t);
  38. if (p) {
  39. var n = Object.getOwnPropertyDescriptor(p, t);
  40. return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
  41. }
  42. }, _get.apply(null, arguments);
  43. }
  44. function _getPrototypeOf(t) {
  45. return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
  46. return t.__proto__ || Object.getPrototypeOf(t);
  47. }, _getPrototypeOf(t);
  48. }
  49. function _inherits(t, e) {
  50. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  51. t.prototype = Object.create(e && e.prototype, {
  52. constructor: {
  53. value: t,
  54. writable: !0,
  55. configurable: !0
  56. }
  57. }), Object.defineProperty(t, "prototype", {
  58. writable: !1
  59. }), e && _setPrototypeOf(t, e);
  60. }
  61. function _isNativeReflectConstruct() {
  62. try {
  63. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  64. } catch (t) {}
  65. return (_isNativeReflectConstruct = function () {
  66. return !!t;
  67. })();
  68. }
  69. function _iterableToArray(r) {
  70. if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
  71. }
  72. function _nonIterableSpread() {
  73. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  74. }
  75. function _possibleConstructorReturn(t, e) {
  76. if (e && ("object" == typeof e || "function" == typeof e)) return e;
  77. if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
  78. return _assertThisInitialized(t);
  79. }
  80. function _setPrototypeOf(t, e) {
  81. return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
  82. return t.__proto__ = e, t;
  83. }, _setPrototypeOf(t, e);
  84. }
  85. function _superPropBase(t, o) {
  86. for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
  87. return t;
  88. }
  89. function _superPropGet(t, e, r, o) {
  90. var p = _get(_getPrototypeOf(t.prototype ), e, r);
  91. return function (t) {
  92. return p.apply(r, t);
  93. } ;
  94. }
  95. function _toConsumableArray(r) {
  96. return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
  97. }
  98. function _toPrimitive(t, r) {
  99. if ("object" != typeof t || !t) return t;
  100. var e = t[Symbol.toPrimitive];
  101. if (void 0 !== e) {
  102. var i = e.call(t, r);
  103. if ("object" != typeof i) return i;
  104. throw new TypeError("@@toPrimitive must return a primitive value.");
  105. }
  106. return (String )(t);
  107. }
  108. function _toPropertyKey(t) {
  109. var i = _toPrimitive(t, "string");
  110. return "symbol" == typeof i ? i : i + "";
  111. }
  112. function _typeof(o) {
  113. "@babel/helpers - typeof";
  114. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  115. return typeof o;
  116. } : function (o) {
  117. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  118. }, _typeof(o);
  119. }
  120. function _unsupportedIterableToArray(r, a) {
  121. if (r) {
  122. if ("string" == typeof r) return _arrayLikeToArray(r, a);
  123. var t = {}.toString.call(r).slice(8, -1);
  124. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  125. }
  126. }
  127. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  128. var es_array_concat = {};
  129. var globalThis_1;
  130. var hasRequiredGlobalThis;
  131. function requireGlobalThis () {
  132. if (hasRequiredGlobalThis) return globalThis_1;
  133. hasRequiredGlobalThis = 1;
  134. var check = function (it) {
  135. return it && it.Math === Math && it;
  136. };
  137. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  138. globalThis_1 =
  139. // eslint-disable-next-line es/no-global-this -- safe
  140. check(typeof globalThis == 'object' && globalThis) ||
  141. check(typeof window == 'object' && window) ||
  142. // eslint-disable-next-line no-restricted-globals -- safe
  143. check(typeof self == 'object' && self) ||
  144. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  145. check(typeof globalThis_1 == 'object' && globalThis_1) ||
  146. // eslint-disable-next-line no-new-func -- fallback
  147. (function () { return this; })() || Function('return this')();
  148. return globalThis_1;
  149. }
  150. var objectGetOwnPropertyDescriptor = {};
  151. var fails;
  152. var hasRequiredFails;
  153. function requireFails () {
  154. if (hasRequiredFails) return fails;
  155. hasRequiredFails = 1;
  156. fails = function (exec) {
  157. try {
  158. return !!exec();
  159. } catch (error) {
  160. return true;
  161. }
  162. };
  163. return fails;
  164. }
  165. var descriptors;
  166. var hasRequiredDescriptors;
  167. function requireDescriptors () {
  168. if (hasRequiredDescriptors) return descriptors;
  169. hasRequiredDescriptors = 1;
  170. var fails = requireFails();
  171. // Detect IE8's incomplete defineProperty implementation
  172. descriptors = !fails(function () {
  173. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  174. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  175. });
  176. return descriptors;
  177. }
  178. var functionBindNative;
  179. var hasRequiredFunctionBindNative;
  180. function requireFunctionBindNative () {
  181. if (hasRequiredFunctionBindNative) return functionBindNative;
  182. hasRequiredFunctionBindNative = 1;
  183. var fails = requireFails();
  184. functionBindNative = !fails(function () {
  185. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  186. var test = (function () { /* empty */ }).bind();
  187. // eslint-disable-next-line no-prototype-builtins -- safe
  188. return typeof test != 'function' || test.hasOwnProperty('prototype');
  189. });
  190. return functionBindNative;
  191. }
  192. var functionCall;
  193. var hasRequiredFunctionCall;
  194. function requireFunctionCall () {
  195. if (hasRequiredFunctionCall) return functionCall;
  196. hasRequiredFunctionCall = 1;
  197. var NATIVE_BIND = requireFunctionBindNative();
  198. var call = Function.prototype.call;
  199. functionCall = NATIVE_BIND ? call.bind(call) : function () {
  200. return call.apply(call, arguments);
  201. };
  202. return functionCall;
  203. }
  204. var objectPropertyIsEnumerable = {};
  205. var hasRequiredObjectPropertyIsEnumerable;
  206. function requireObjectPropertyIsEnumerable () {
  207. if (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable;
  208. hasRequiredObjectPropertyIsEnumerable = 1;
  209. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  210. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  211. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  212. // Nashorn ~ JDK8 bug
  213. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  214. // `Object.prototype.propertyIsEnumerable` method implementation
  215. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  216. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  217. var descriptor = getOwnPropertyDescriptor(this, V);
  218. return !!descriptor && descriptor.enumerable;
  219. } : $propertyIsEnumerable;
  220. return objectPropertyIsEnumerable;
  221. }
  222. var createPropertyDescriptor;
  223. var hasRequiredCreatePropertyDescriptor;
  224. function requireCreatePropertyDescriptor () {
  225. if (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor;
  226. hasRequiredCreatePropertyDescriptor = 1;
  227. createPropertyDescriptor = function (bitmap, value) {
  228. return {
  229. enumerable: !(bitmap & 1),
  230. configurable: !(bitmap & 2),
  231. writable: !(bitmap & 4),
  232. value: value
  233. };
  234. };
  235. return createPropertyDescriptor;
  236. }
  237. var functionUncurryThis;
  238. var hasRequiredFunctionUncurryThis;
  239. function requireFunctionUncurryThis () {
  240. if (hasRequiredFunctionUncurryThis) return functionUncurryThis;
  241. hasRequiredFunctionUncurryThis = 1;
  242. var NATIVE_BIND = requireFunctionBindNative();
  243. var FunctionPrototype = Function.prototype;
  244. var call = FunctionPrototype.call;
  245. var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
  246. functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  247. return function () {
  248. return call.apply(fn, arguments);
  249. };
  250. };
  251. return functionUncurryThis;
  252. }
  253. var classofRaw;
  254. var hasRequiredClassofRaw;
  255. function requireClassofRaw () {
  256. if (hasRequiredClassofRaw) return classofRaw;
  257. hasRequiredClassofRaw = 1;
  258. var uncurryThis = requireFunctionUncurryThis();
  259. var toString = uncurryThis({}.toString);
  260. var stringSlice = uncurryThis(''.slice);
  261. classofRaw = function (it) {
  262. return stringSlice(toString(it), 8, -1);
  263. };
  264. return classofRaw;
  265. }
  266. var indexedObject;
  267. var hasRequiredIndexedObject;
  268. function requireIndexedObject () {
  269. if (hasRequiredIndexedObject) return indexedObject;
  270. hasRequiredIndexedObject = 1;
  271. var uncurryThis = requireFunctionUncurryThis();
  272. var fails = requireFails();
  273. var classof = requireClassofRaw();
  274. var $Object = Object;
  275. var split = uncurryThis(''.split);
  276. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  277. indexedObject = fails(function () {
  278. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  279. // eslint-disable-next-line no-prototype-builtins -- safe
  280. return !$Object('z').propertyIsEnumerable(0);
  281. }) ? function (it) {
  282. return classof(it) === 'String' ? split(it, '') : $Object(it);
  283. } : $Object;
  284. return indexedObject;
  285. }
  286. var isNullOrUndefined;
  287. var hasRequiredIsNullOrUndefined;
  288. function requireIsNullOrUndefined () {
  289. if (hasRequiredIsNullOrUndefined) return isNullOrUndefined;
  290. hasRequiredIsNullOrUndefined = 1;
  291. // we can't use just `it == null` since of `document.all` special case
  292. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  293. isNullOrUndefined = function (it) {
  294. return it === null || it === undefined;
  295. };
  296. return isNullOrUndefined;
  297. }
  298. var requireObjectCoercible;
  299. var hasRequiredRequireObjectCoercible;
  300. function requireRequireObjectCoercible () {
  301. if (hasRequiredRequireObjectCoercible) return requireObjectCoercible;
  302. hasRequiredRequireObjectCoercible = 1;
  303. var isNullOrUndefined = requireIsNullOrUndefined();
  304. var $TypeError = TypeError;
  305. // `RequireObjectCoercible` abstract operation
  306. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  307. requireObjectCoercible = function (it) {
  308. if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
  309. return it;
  310. };
  311. return requireObjectCoercible;
  312. }
  313. var toIndexedObject;
  314. var hasRequiredToIndexedObject;
  315. function requireToIndexedObject () {
  316. if (hasRequiredToIndexedObject) return toIndexedObject;
  317. hasRequiredToIndexedObject = 1;
  318. // toObject with fallback for non-array-like ES3 strings
  319. var IndexedObject = requireIndexedObject();
  320. var requireObjectCoercible = requireRequireObjectCoercible();
  321. toIndexedObject = function (it) {
  322. return IndexedObject(requireObjectCoercible(it));
  323. };
  324. return toIndexedObject;
  325. }
  326. var isCallable;
  327. var hasRequiredIsCallable;
  328. function requireIsCallable () {
  329. if (hasRequiredIsCallable) return isCallable;
  330. hasRequiredIsCallable = 1;
  331. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  332. var documentAll = typeof document == 'object' && document.all;
  333. // `IsCallable` abstract operation
  334. // https://tc39.es/ecma262/#sec-iscallable
  335. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  336. isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  337. return typeof argument == 'function' || argument === documentAll;
  338. } : function (argument) {
  339. return typeof argument == 'function';
  340. };
  341. return isCallable;
  342. }
  343. var isObject;
  344. var hasRequiredIsObject;
  345. function requireIsObject () {
  346. if (hasRequiredIsObject) return isObject;
  347. hasRequiredIsObject = 1;
  348. var isCallable = requireIsCallable();
  349. isObject = function (it) {
  350. return typeof it == 'object' ? it !== null : isCallable(it);
  351. };
  352. return isObject;
  353. }
  354. var getBuiltIn;
  355. var hasRequiredGetBuiltIn;
  356. function requireGetBuiltIn () {
  357. if (hasRequiredGetBuiltIn) return getBuiltIn;
  358. hasRequiredGetBuiltIn = 1;
  359. var globalThis = requireGlobalThis();
  360. var isCallable = requireIsCallable();
  361. var aFunction = function (argument) {
  362. return isCallable(argument) ? argument : undefined;
  363. };
  364. getBuiltIn = function (namespace, method) {
  365. return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
  366. };
  367. return getBuiltIn;
  368. }
  369. var objectIsPrototypeOf;
  370. var hasRequiredObjectIsPrototypeOf;
  371. function requireObjectIsPrototypeOf () {
  372. if (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf;
  373. hasRequiredObjectIsPrototypeOf = 1;
  374. var uncurryThis = requireFunctionUncurryThis();
  375. objectIsPrototypeOf = uncurryThis({}.isPrototypeOf);
  376. return objectIsPrototypeOf;
  377. }
  378. var environmentUserAgent;
  379. var hasRequiredEnvironmentUserAgent;
  380. function requireEnvironmentUserAgent () {
  381. if (hasRequiredEnvironmentUserAgent) return environmentUserAgent;
  382. hasRequiredEnvironmentUserAgent = 1;
  383. var globalThis = requireGlobalThis();
  384. var navigator = globalThis.navigator;
  385. var userAgent = navigator && navigator.userAgent;
  386. environmentUserAgent = userAgent ? String(userAgent) : '';
  387. return environmentUserAgent;
  388. }
  389. var environmentV8Version;
  390. var hasRequiredEnvironmentV8Version;
  391. function requireEnvironmentV8Version () {
  392. if (hasRequiredEnvironmentV8Version) return environmentV8Version;
  393. hasRequiredEnvironmentV8Version = 1;
  394. var globalThis = requireGlobalThis();
  395. var userAgent = requireEnvironmentUserAgent();
  396. var process = globalThis.process;
  397. var Deno = globalThis.Deno;
  398. var versions = process && process.versions || Deno && Deno.version;
  399. var v8 = versions && versions.v8;
  400. var match, version;
  401. if (v8) {
  402. match = v8.split('.');
  403. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  404. // but their correct versions are not interesting for us
  405. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  406. }
  407. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  408. // so check `userAgent` even if `.v8` exists, but 0
  409. if (!version && userAgent) {
  410. match = userAgent.match(/Edge\/(\d+)/);
  411. if (!match || match[1] >= 74) {
  412. match = userAgent.match(/Chrome\/(\d+)/);
  413. if (match) version = +match[1];
  414. }
  415. }
  416. environmentV8Version = version;
  417. return environmentV8Version;
  418. }
  419. var symbolConstructorDetection;
  420. var hasRequiredSymbolConstructorDetection;
  421. function requireSymbolConstructorDetection () {
  422. if (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection;
  423. hasRequiredSymbolConstructorDetection = 1;
  424. /* eslint-disable es/no-symbol -- required for testing */
  425. var V8_VERSION = requireEnvironmentV8Version();
  426. var fails = requireFails();
  427. var globalThis = requireGlobalThis();
  428. var $String = globalThis.String;
  429. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  430. symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
  431. var symbol = Symbol('symbol detection');
  432. // Chrome 38 Symbol has incorrect toString conversion
  433. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  434. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  435. // of course, fail.
  436. return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
  437. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  438. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  439. });
  440. return symbolConstructorDetection;
  441. }
  442. var useSymbolAsUid;
  443. var hasRequiredUseSymbolAsUid;
  444. function requireUseSymbolAsUid () {
  445. if (hasRequiredUseSymbolAsUid) return useSymbolAsUid;
  446. hasRequiredUseSymbolAsUid = 1;
  447. /* eslint-disable es/no-symbol -- required for testing */
  448. var NATIVE_SYMBOL = requireSymbolConstructorDetection();
  449. useSymbolAsUid = NATIVE_SYMBOL
  450. && !Symbol.sham
  451. && typeof Symbol.iterator == 'symbol';
  452. return useSymbolAsUid;
  453. }
  454. var isSymbol;
  455. var hasRequiredIsSymbol;
  456. function requireIsSymbol () {
  457. if (hasRequiredIsSymbol) return isSymbol;
  458. hasRequiredIsSymbol = 1;
  459. var getBuiltIn = requireGetBuiltIn();
  460. var isCallable = requireIsCallable();
  461. var isPrototypeOf = requireObjectIsPrototypeOf();
  462. var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
  463. var $Object = Object;
  464. isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  465. return typeof it == 'symbol';
  466. } : function (it) {
  467. var $Symbol = getBuiltIn('Symbol');
  468. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  469. };
  470. return isSymbol;
  471. }
  472. var tryToString;
  473. var hasRequiredTryToString;
  474. function requireTryToString () {
  475. if (hasRequiredTryToString) return tryToString;
  476. hasRequiredTryToString = 1;
  477. var $String = String;
  478. tryToString = function (argument) {
  479. try {
  480. return $String(argument);
  481. } catch (error) {
  482. return 'Object';
  483. }
  484. };
  485. return tryToString;
  486. }
  487. var aCallable;
  488. var hasRequiredACallable;
  489. function requireACallable () {
  490. if (hasRequiredACallable) return aCallable;
  491. hasRequiredACallable = 1;
  492. var isCallable = requireIsCallable();
  493. var tryToString = requireTryToString();
  494. var $TypeError = TypeError;
  495. // `Assert: IsCallable(argument) is true`
  496. aCallable = function (argument) {
  497. if (isCallable(argument)) return argument;
  498. throw new $TypeError(tryToString(argument) + ' is not a function');
  499. };
  500. return aCallable;
  501. }
  502. var getMethod;
  503. var hasRequiredGetMethod;
  504. function requireGetMethod () {
  505. if (hasRequiredGetMethod) return getMethod;
  506. hasRequiredGetMethod = 1;
  507. var aCallable = requireACallable();
  508. var isNullOrUndefined = requireIsNullOrUndefined();
  509. // `GetMethod` abstract operation
  510. // https://tc39.es/ecma262/#sec-getmethod
  511. getMethod = function (V, P) {
  512. var func = V[P];
  513. return isNullOrUndefined(func) ? undefined : aCallable(func);
  514. };
  515. return getMethod;
  516. }
  517. var ordinaryToPrimitive;
  518. var hasRequiredOrdinaryToPrimitive;
  519. function requireOrdinaryToPrimitive () {
  520. if (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive;
  521. hasRequiredOrdinaryToPrimitive = 1;
  522. var call = requireFunctionCall();
  523. var isCallable = requireIsCallable();
  524. var isObject = requireIsObject();
  525. var $TypeError = TypeError;
  526. // `OrdinaryToPrimitive` abstract operation
  527. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  528. ordinaryToPrimitive = function (input, pref) {
  529. var fn, val;
  530. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  531. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  532. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  533. throw new $TypeError("Can't convert object to primitive value");
  534. };
  535. return ordinaryToPrimitive;
  536. }
  537. var sharedStore = {exports: {}};
  538. var isPure;
  539. var hasRequiredIsPure;
  540. function requireIsPure () {
  541. if (hasRequiredIsPure) return isPure;
  542. hasRequiredIsPure = 1;
  543. isPure = false;
  544. return isPure;
  545. }
  546. var defineGlobalProperty;
  547. var hasRequiredDefineGlobalProperty;
  548. function requireDefineGlobalProperty () {
  549. if (hasRequiredDefineGlobalProperty) return defineGlobalProperty;
  550. hasRequiredDefineGlobalProperty = 1;
  551. var globalThis = requireGlobalThis();
  552. // eslint-disable-next-line es/no-object-defineproperty -- safe
  553. var defineProperty = Object.defineProperty;
  554. defineGlobalProperty = function (key, value) {
  555. try {
  556. defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
  557. } catch (error) {
  558. globalThis[key] = value;
  559. } return value;
  560. };
  561. return defineGlobalProperty;
  562. }
  563. var hasRequiredSharedStore;
  564. function requireSharedStore () {
  565. if (hasRequiredSharedStore) return sharedStore.exports;
  566. hasRequiredSharedStore = 1;
  567. var IS_PURE = requireIsPure();
  568. var globalThis = requireGlobalThis();
  569. var defineGlobalProperty = requireDefineGlobalProperty();
  570. var SHARED = '__core-js_shared__';
  571. var store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
  572. (store.versions || (store.versions = [])).push({
  573. version: '3.38.1',
  574. mode: IS_PURE ? 'pure' : 'global',
  575. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  576. license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
  577. source: 'https://github.com/zloirock/core-js'
  578. });
  579. return sharedStore.exports;
  580. }
  581. var shared;
  582. var hasRequiredShared;
  583. function requireShared () {
  584. if (hasRequiredShared) return shared;
  585. hasRequiredShared = 1;
  586. var store = requireSharedStore();
  587. shared = function (key, value) {
  588. return store[key] || (store[key] = value || {});
  589. };
  590. return shared;
  591. }
  592. var toObject;
  593. var hasRequiredToObject;
  594. function requireToObject () {
  595. if (hasRequiredToObject) return toObject;
  596. hasRequiredToObject = 1;
  597. var requireObjectCoercible = requireRequireObjectCoercible();
  598. var $Object = Object;
  599. // `ToObject` abstract operation
  600. // https://tc39.es/ecma262/#sec-toobject
  601. toObject = function (argument) {
  602. return $Object(requireObjectCoercible(argument));
  603. };
  604. return toObject;
  605. }
  606. var hasOwnProperty_1;
  607. var hasRequiredHasOwnProperty;
  608. function requireHasOwnProperty () {
  609. if (hasRequiredHasOwnProperty) return hasOwnProperty_1;
  610. hasRequiredHasOwnProperty = 1;
  611. var uncurryThis = requireFunctionUncurryThis();
  612. var toObject = requireToObject();
  613. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  614. // `HasOwnProperty` abstract operation
  615. // https://tc39.es/ecma262/#sec-hasownproperty
  616. // eslint-disable-next-line es/no-object-hasown -- safe
  617. hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  618. return hasOwnProperty(toObject(it), key);
  619. };
  620. return hasOwnProperty_1;
  621. }
  622. var uid;
  623. var hasRequiredUid;
  624. function requireUid () {
  625. if (hasRequiredUid) return uid;
  626. hasRequiredUid = 1;
  627. var uncurryThis = requireFunctionUncurryThis();
  628. var id = 0;
  629. var postfix = Math.random();
  630. var toString = uncurryThis(1.0.toString);
  631. uid = function (key) {
  632. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  633. };
  634. return uid;
  635. }
  636. var wellKnownSymbol;
  637. var hasRequiredWellKnownSymbol;
  638. function requireWellKnownSymbol () {
  639. if (hasRequiredWellKnownSymbol) return wellKnownSymbol;
  640. hasRequiredWellKnownSymbol = 1;
  641. var globalThis = requireGlobalThis();
  642. var shared = requireShared();
  643. var hasOwn = requireHasOwnProperty();
  644. var uid = requireUid();
  645. var NATIVE_SYMBOL = requireSymbolConstructorDetection();
  646. var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
  647. var Symbol = globalThis.Symbol;
  648. var WellKnownSymbolsStore = shared('wks');
  649. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
  650. wellKnownSymbol = function (name) {
  651. if (!hasOwn(WellKnownSymbolsStore, name)) {
  652. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
  653. ? Symbol[name]
  654. : createWellKnownSymbol('Symbol.' + name);
  655. } return WellKnownSymbolsStore[name];
  656. };
  657. return wellKnownSymbol;
  658. }
  659. var toPrimitive;
  660. var hasRequiredToPrimitive;
  661. function requireToPrimitive () {
  662. if (hasRequiredToPrimitive) return toPrimitive;
  663. hasRequiredToPrimitive = 1;
  664. var call = requireFunctionCall();
  665. var isObject = requireIsObject();
  666. var isSymbol = requireIsSymbol();
  667. var getMethod = requireGetMethod();
  668. var ordinaryToPrimitive = requireOrdinaryToPrimitive();
  669. var wellKnownSymbol = requireWellKnownSymbol();
  670. var $TypeError = TypeError;
  671. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  672. // `ToPrimitive` abstract operation
  673. // https://tc39.es/ecma262/#sec-toprimitive
  674. toPrimitive = function (input, pref) {
  675. if (!isObject(input) || isSymbol(input)) return input;
  676. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  677. var result;
  678. if (exoticToPrim) {
  679. if (pref === undefined) pref = 'default';
  680. result = call(exoticToPrim, input, pref);
  681. if (!isObject(result) || isSymbol(result)) return result;
  682. throw new $TypeError("Can't convert object to primitive value");
  683. }
  684. if (pref === undefined) pref = 'number';
  685. return ordinaryToPrimitive(input, pref);
  686. };
  687. return toPrimitive;
  688. }
  689. var toPropertyKey;
  690. var hasRequiredToPropertyKey;
  691. function requireToPropertyKey () {
  692. if (hasRequiredToPropertyKey) return toPropertyKey;
  693. hasRequiredToPropertyKey = 1;
  694. var toPrimitive = requireToPrimitive();
  695. var isSymbol = requireIsSymbol();
  696. // `ToPropertyKey` abstract operation
  697. // https://tc39.es/ecma262/#sec-topropertykey
  698. toPropertyKey = function (argument) {
  699. var key = toPrimitive(argument, 'string');
  700. return isSymbol(key) ? key : key + '';
  701. };
  702. return toPropertyKey;
  703. }
  704. var documentCreateElement;
  705. var hasRequiredDocumentCreateElement;
  706. function requireDocumentCreateElement () {
  707. if (hasRequiredDocumentCreateElement) return documentCreateElement;
  708. hasRequiredDocumentCreateElement = 1;
  709. var globalThis = requireGlobalThis();
  710. var isObject = requireIsObject();
  711. var document = globalThis.document;
  712. // typeof document.createElement is 'object' in old IE
  713. var EXISTS = isObject(document) && isObject(document.createElement);
  714. documentCreateElement = function (it) {
  715. return EXISTS ? document.createElement(it) : {};
  716. };
  717. return documentCreateElement;
  718. }
  719. var ie8DomDefine;
  720. var hasRequiredIe8DomDefine;
  721. function requireIe8DomDefine () {
  722. if (hasRequiredIe8DomDefine) return ie8DomDefine;
  723. hasRequiredIe8DomDefine = 1;
  724. var DESCRIPTORS = requireDescriptors();
  725. var fails = requireFails();
  726. var createElement = requireDocumentCreateElement();
  727. // Thanks to IE8 for its funny defineProperty
  728. ie8DomDefine = !DESCRIPTORS && !fails(function () {
  729. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  730. return Object.defineProperty(createElement('div'), 'a', {
  731. get: function () { return 7; }
  732. }).a !== 7;
  733. });
  734. return ie8DomDefine;
  735. }
  736. var hasRequiredObjectGetOwnPropertyDescriptor;
  737. function requireObjectGetOwnPropertyDescriptor () {
  738. if (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor;
  739. hasRequiredObjectGetOwnPropertyDescriptor = 1;
  740. var DESCRIPTORS = requireDescriptors();
  741. var call = requireFunctionCall();
  742. var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
  743. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  744. var toIndexedObject = requireToIndexedObject();
  745. var toPropertyKey = requireToPropertyKey();
  746. var hasOwn = requireHasOwnProperty();
  747. var IE8_DOM_DEFINE = requireIe8DomDefine();
  748. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  749. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  750. // `Object.getOwnPropertyDescriptor` method
  751. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  752. objectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  753. O = toIndexedObject(O);
  754. P = toPropertyKey(P);
  755. if (IE8_DOM_DEFINE) try {
  756. return $getOwnPropertyDescriptor(O, P);
  757. } catch (error) { /* empty */ }
  758. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  759. };
  760. return objectGetOwnPropertyDescriptor;
  761. }
  762. var objectDefineProperty = {};
  763. var v8PrototypeDefineBug;
  764. var hasRequiredV8PrototypeDefineBug;
  765. function requireV8PrototypeDefineBug () {
  766. if (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug;
  767. hasRequiredV8PrototypeDefineBug = 1;
  768. var DESCRIPTORS = requireDescriptors();
  769. var fails = requireFails();
  770. // V8 ~ Chrome 36-
  771. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  772. v8PrototypeDefineBug = DESCRIPTORS && fails(function () {
  773. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  774. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  775. value: 42,
  776. writable: false
  777. }).prototype !== 42;
  778. });
  779. return v8PrototypeDefineBug;
  780. }
  781. var anObject;
  782. var hasRequiredAnObject;
  783. function requireAnObject () {
  784. if (hasRequiredAnObject) return anObject;
  785. hasRequiredAnObject = 1;
  786. var isObject = requireIsObject();
  787. var $String = String;
  788. var $TypeError = TypeError;
  789. // `Assert: Type(argument) is Object`
  790. anObject = function (argument) {
  791. if (isObject(argument)) return argument;
  792. throw new $TypeError($String(argument) + ' is not an object');
  793. };
  794. return anObject;
  795. }
  796. var hasRequiredObjectDefineProperty;
  797. function requireObjectDefineProperty () {
  798. if (hasRequiredObjectDefineProperty) return objectDefineProperty;
  799. hasRequiredObjectDefineProperty = 1;
  800. var DESCRIPTORS = requireDescriptors();
  801. var IE8_DOM_DEFINE = requireIe8DomDefine();
  802. var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
  803. var anObject = requireAnObject();
  804. var toPropertyKey = requireToPropertyKey();
  805. var $TypeError = TypeError;
  806. // eslint-disable-next-line es/no-object-defineproperty -- safe
  807. var $defineProperty = Object.defineProperty;
  808. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  809. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  810. var ENUMERABLE = 'enumerable';
  811. var CONFIGURABLE = 'configurable';
  812. var WRITABLE = 'writable';
  813. // `Object.defineProperty` method
  814. // https://tc39.es/ecma262/#sec-object.defineproperty
  815. objectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  816. anObject(O);
  817. P = toPropertyKey(P);
  818. anObject(Attributes);
  819. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  820. var current = $getOwnPropertyDescriptor(O, P);
  821. if (current && current[WRITABLE]) {
  822. O[P] = Attributes.value;
  823. Attributes = {
  824. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  825. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  826. writable: false
  827. };
  828. }
  829. } return $defineProperty(O, P, Attributes);
  830. } : $defineProperty : function defineProperty(O, P, Attributes) {
  831. anObject(O);
  832. P = toPropertyKey(P);
  833. anObject(Attributes);
  834. if (IE8_DOM_DEFINE) try {
  835. return $defineProperty(O, P, Attributes);
  836. } catch (error) { /* empty */ }
  837. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
  838. if ('value' in Attributes) O[P] = Attributes.value;
  839. return O;
  840. };
  841. return objectDefineProperty;
  842. }
  843. var createNonEnumerableProperty;
  844. var hasRequiredCreateNonEnumerableProperty;
  845. function requireCreateNonEnumerableProperty () {
  846. if (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty;
  847. hasRequiredCreateNonEnumerableProperty = 1;
  848. var DESCRIPTORS = requireDescriptors();
  849. var definePropertyModule = requireObjectDefineProperty();
  850. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  851. createNonEnumerableProperty = DESCRIPTORS ? function (object, key, value) {
  852. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  853. } : function (object, key, value) {
  854. object[key] = value;
  855. return object;
  856. };
  857. return createNonEnumerableProperty;
  858. }
  859. var makeBuiltIn = {exports: {}};
  860. var functionName;
  861. var hasRequiredFunctionName;
  862. function requireFunctionName () {
  863. if (hasRequiredFunctionName) return functionName;
  864. hasRequiredFunctionName = 1;
  865. var DESCRIPTORS = requireDescriptors();
  866. var hasOwn = requireHasOwnProperty();
  867. var FunctionPrototype = Function.prototype;
  868. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  869. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  870. var EXISTS = hasOwn(FunctionPrototype, 'name');
  871. // additional protection from minified / mangled / dropped function names
  872. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  873. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  874. functionName = {
  875. EXISTS: EXISTS,
  876. PROPER: PROPER,
  877. CONFIGURABLE: CONFIGURABLE
  878. };
  879. return functionName;
  880. }
  881. var inspectSource;
  882. var hasRequiredInspectSource;
  883. function requireInspectSource () {
  884. if (hasRequiredInspectSource) return inspectSource;
  885. hasRequiredInspectSource = 1;
  886. var uncurryThis = requireFunctionUncurryThis();
  887. var isCallable = requireIsCallable();
  888. var store = requireSharedStore();
  889. var functionToString = uncurryThis(Function.toString);
  890. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  891. if (!isCallable(store.inspectSource)) {
  892. store.inspectSource = function (it) {
  893. return functionToString(it);
  894. };
  895. }
  896. inspectSource = store.inspectSource;
  897. return inspectSource;
  898. }
  899. var weakMapBasicDetection;
  900. var hasRequiredWeakMapBasicDetection;
  901. function requireWeakMapBasicDetection () {
  902. if (hasRequiredWeakMapBasicDetection) return weakMapBasicDetection;
  903. hasRequiredWeakMapBasicDetection = 1;
  904. var globalThis = requireGlobalThis();
  905. var isCallable = requireIsCallable();
  906. var WeakMap = globalThis.WeakMap;
  907. weakMapBasicDetection = isCallable(WeakMap) && /native code/.test(String(WeakMap));
  908. return weakMapBasicDetection;
  909. }
  910. var sharedKey;
  911. var hasRequiredSharedKey;
  912. function requireSharedKey () {
  913. if (hasRequiredSharedKey) return sharedKey;
  914. hasRequiredSharedKey = 1;
  915. var shared = requireShared();
  916. var uid = requireUid();
  917. var keys = shared('keys');
  918. sharedKey = function (key) {
  919. return keys[key] || (keys[key] = uid(key));
  920. };
  921. return sharedKey;
  922. }
  923. var hiddenKeys;
  924. var hasRequiredHiddenKeys;
  925. function requireHiddenKeys () {
  926. if (hasRequiredHiddenKeys) return hiddenKeys;
  927. hasRequiredHiddenKeys = 1;
  928. hiddenKeys = {};
  929. return hiddenKeys;
  930. }
  931. var internalState;
  932. var hasRequiredInternalState;
  933. function requireInternalState () {
  934. if (hasRequiredInternalState) return internalState;
  935. hasRequiredInternalState = 1;
  936. var NATIVE_WEAK_MAP = requireWeakMapBasicDetection();
  937. var globalThis = requireGlobalThis();
  938. var isObject = requireIsObject();
  939. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  940. var hasOwn = requireHasOwnProperty();
  941. var shared = requireSharedStore();
  942. var sharedKey = requireSharedKey();
  943. var hiddenKeys = requireHiddenKeys();
  944. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  945. var TypeError = globalThis.TypeError;
  946. var WeakMap = globalThis.WeakMap;
  947. var set, get, has;
  948. var enforce = function (it) {
  949. return has(it) ? get(it) : set(it, {});
  950. };
  951. var getterFor = function (TYPE) {
  952. return function (it) {
  953. var state;
  954. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  955. throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
  956. } return state;
  957. };
  958. };
  959. if (NATIVE_WEAK_MAP || shared.state) {
  960. var store = shared.state || (shared.state = new WeakMap());
  961. /* eslint-disable no-self-assign -- prototype methods protection */
  962. store.get = store.get;
  963. store.has = store.has;
  964. store.set = store.set;
  965. /* eslint-enable no-self-assign -- prototype methods protection */
  966. set = function (it, metadata) {
  967. if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  968. metadata.facade = it;
  969. store.set(it, metadata);
  970. return metadata;
  971. };
  972. get = function (it) {
  973. return store.get(it) || {};
  974. };
  975. has = function (it) {
  976. return store.has(it);
  977. };
  978. } else {
  979. var STATE = sharedKey('state');
  980. hiddenKeys[STATE] = true;
  981. set = function (it, metadata) {
  982. if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  983. metadata.facade = it;
  984. createNonEnumerableProperty(it, STATE, metadata);
  985. return metadata;
  986. };
  987. get = function (it) {
  988. return hasOwn(it, STATE) ? it[STATE] : {};
  989. };
  990. has = function (it) {
  991. return hasOwn(it, STATE);
  992. };
  993. }
  994. internalState = {
  995. set: set,
  996. get: get,
  997. has: has,
  998. enforce: enforce,
  999. getterFor: getterFor
  1000. };
  1001. return internalState;
  1002. }
  1003. var hasRequiredMakeBuiltIn;
  1004. function requireMakeBuiltIn () {
  1005. if (hasRequiredMakeBuiltIn) return makeBuiltIn.exports;
  1006. hasRequiredMakeBuiltIn = 1;
  1007. var uncurryThis = requireFunctionUncurryThis();
  1008. var fails = requireFails();
  1009. var isCallable = requireIsCallable();
  1010. var hasOwn = requireHasOwnProperty();
  1011. var DESCRIPTORS = requireDescriptors();
  1012. var CONFIGURABLE_FUNCTION_NAME = requireFunctionName().CONFIGURABLE;
  1013. var inspectSource = requireInspectSource();
  1014. var InternalStateModule = requireInternalState();
  1015. var enforceInternalState = InternalStateModule.enforce;
  1016. var getInternalState = InternalStateModule.get;
  1017. var $String = String;
  1018. // eslint-disable-next-line es/no-object-defineproperty -- safe
  1019. var defineProperty = Object.defineProperty;
  1020. var stringSlice = uncurryThis(''.slice);
  1021. var replace = uncurryThis(''.replace);
  1022. var join = uncurryThis([].join);
  1023. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  1024. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  1025. });
  1026. var TEMPLATE = String(String).split('String');
  1027. var makeBuiltIn$1 = makeBuiltIn.exports = function (value, name, options) {
  1028. if (stringSlice($String(name), 0, 7) === 'Symbol(') {
  1029. name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  1030. }
  1031. if (options && options.getter) name = 'get ' + name;
  1032. if (options && options.setter) name = 'set ' + name;
  1033. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  1034. if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
  1035. else value.name = name;
  1036. }
  1037. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  1038. defineProperty(value, 'length', { value: options.arity });
  1039. }
  1040. try {
  1041. if (options && hasOwn(options, 'constructor') && options.constructor) {
  1042. if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
  1043. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  1044. } else if (value.prototype) value.prototype = undefined;
  1045. } catch (error) { /* empty */ }
  1046. var state = enforceInternalState(value);
  1047. if (!hasOwn(state, 'source')) {
  1048. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  1049. } return value;
  1050. };
  1051. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  1052. // eslint-disable-next-line no-extend-native -- required
  1053. Function.prototype.toString = makeBuiltIn$1(function toString() {
  1054. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  1055. }, 'toString');
  1056. return makeBuiltIn.exports;
  1057. }
  1058. var defineBuiltIn;
  1059. var hasRequiredDefineBuiltIn;
  1060. function requireDefineBuiltIn () {
  1061. if (hasRequiredDefineBuiltIn) return defineBuiltIn;
  1062. hasRequiredDefineBuiltIn = 1;
  1063. var isCallable = requireIsCallable();
  1064. var definePropertyModule = requireObjectDefineProperty();
  1065. var makeBuiltIn = requireMakeBuiltIn();
  1066. var defineGlobalProperty = requireDefineGlobalProperty();
  1067. defineBuiltIn = function (O, key, value, options) {
  1068. if (!options) options = {};
  1069. var simple = options.enumerable;
  1070. var name = options.name !== undefined ? options.name : key;
  1071. if (isCallable(value)) makeBuiltIn(value, name, options);
  1072. if (options.global) {
  1073. if (simple) O[key] = value;
  1074. else defineGlobalProperty(key, value);
  1075. } else {
  1076. try {
  1077. if (!options.unsafe) delete O[key];
  1078. else if (O[key]) simple = true;
  1079. } catch (error) { /* empty */ }
  1080. if (simple) O[key] = value;
  1081. else definePropertyModule.f(O, key, {
  1082. value: value,
  1083. enumerable: false,
  1084. configurable: !options.nonConfigurable,
  1085. writable: !options.nonWritable
  1086. });
  1087. } return O;
  1088. };
  1089. return defineBuiltIn;
  1090. }
  1091. var objectGetOwnPropertyNames = {};
  1092. var mathTrunc;
  1093. var hasRequiredMathTrunc;
  1094. function requireMathTrunc () {
  1095. if (hasRequiredMathTrunc) return mathTrunc;
  1096. hasRequiredMathTrunc = 1;
  1097. var ceil = Math.ceil;
  1098. var floor = Math.floor;
  1099. // `Math.trunc` method
  1100. // https://tc39.es/ecma262/#sec-math.trunc
  1101. // eslint-disable-next-line es/no-math-trunc -- safe
  1102. mathTrunc = Math.trunc || function trunc(x) {
  1103. var n = +x;
  1104. return (n > 0 ? floor : ceil)(n);
  1105. };
  1106. return mathTrunc;
  1107. }
  1108. var toIntegerOrInfinity;
  1109. var hasRequiredToIntegerOrInfinity;
  1110. function requireToIntegerOrInfinity () {
  1111. if (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity;
  1112. hasRequiredToIntegerOrInfinity = 1;
  1113. var trunc = requireMathTrunc();
  1114. // `ToIntegerOrInfinity` abstract operation
  1115. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  1116. toIntegerOrInfinity = function (argument) {
  1117. var number = +argument;
  1118. // eslint-disable-next-line no-self-compare -- NaN check
  1119. return number !== number || number === 0 ? 0 : trunc(number);
  1120. };
  1121. return toIntegerOrInfinity;
  1122. }
  1123. var toAbsoluteIndex;
  1124. var hasRequiredToAbsoluteIndex;
  1125. function requireToAbsoluteIndex () {
  1126. if (hasRequiredToAbsoluteIndex) return toAbsoluteIndex;
  1127. hasRequiredToAbsoluteIndex = 1;
  1128. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  1129. var max = Math.max;
  1130. var min = Math.min;
  1131. // Helper for a popular repeating case of the spec:
  1132. // Let integer be ? ToInteger(index).
  1133. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  1134. toAbsoluteIndex = function (index, length) {
  1135. var integer = toIntegerOrInfinity(index);
  1136. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  1137. };
  1138. return toAbsoluteIndex;
  1139. }
  1140. var toLength;
  1141. var hasRequiredToLength;
  1142. function requireToLength () {
  1143. if (hasRequiredToLength) return toLength;
  1144. hasRequiredToLength = 1;
  1145. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  1146. var min = Math.min;
  1147. // `ToLength` abstract operation
  1148. // https://tc39.es/ecma262/#sec-tolength
  1149. toLength = function (argument) {
  1150. var len = toIntegerOrInfinity(argument);
  1151. return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  1152. };
  1153. return toLength;
  1154. }
  1155. var lengthOfArrayLike;
  1156. var hasRequiredLengthOfArrayLike;
  1157. function requireLengthOfArrayLike () {
  1158. if (hasRequiredLengthOfArrayLike) return lengthOfArrayLike;
  1159. hasRequiredLengthOfArrayLike = 1;
  1160. var toLength = requireToLength();
  1161. // `LengthOfArrayLike` abstract operation
  1162. // https://tc39.es/ecma262/#sec-lengthofarraylike
  1163. lengthOfArrayLike = function (obj) {
  1164. return toLength(obj.length);
  1165. };
  1166. return lengthOfArrayLike;
  1167. }
  1168. var arrayIncludes;
  1169. var hasRequiredArrayIncludes;
  1170. function requireArrayIncludes () {
  1171. if (hasRequiredArrayIncludes) return arrayIncludes;
  1172. hasRequiredArrayIncludes = 1;
  1173. var toIndexedObject = requireToIndexedObject();
  1174. var toAbsoluteIndex = requireToAbsoluteIndex();
  1175. var lengthOfArrayLike = requireLengthOfArrayLike();
  1176. // `Array.prototype.{ indexOf, includes }` methods implementation
  1177. var createMethod = function (IS_INCLUDES) {
  1178. return function ($this, el, fromIndex) {
  1179. var O = toIndexedObject($this);
  1180. var length = lengthOfArrayLike(O);
  1181. if (length === 0) return !IS_INCLUDES && -1;
  1182. var index = toAbsoluteIndex(fromIndex, length);
  1183. var value;
  1184. // Array#includes uses SameValueZero equality algorithm
  1185. // eslint-disable-next-line no-self-compare -- NaN check
  1186. if (IS_INCLUDES && el !== el) while (length > index) {
  1187. value = O[index++];
  1188. // eslint-disable-next-line no-self-compare -- NaN check
  1189. if (value !== value) return true;
  1190. // Array#indexOf ignores holes, Array#includes - not
  1191. } else for (;length > index; index++) {
  1192. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  1193. } return !IS_INCLUDES && -1;
  1194. };
  1195. };
  1196. arrayIncludes = {
  1197. // `Array.prototype.includes` method
  1198. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1199. includes: createMethod(true),
  1200. // `Array.prototype.indexOf` method
  1201. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1202. indexOf: createMethod(false)
  1203. };
  1204. return arrayIncludes;
  1205. }
  1206. var objectKeysInternal;
  1207. var hasRequiredObjectKeysInternal;
  1208. function requireObjectKeysInternal () {
  1209. if (hasRequiredObjectKeysInternal) return objectKeysInternal;
  1210. hasRequiredObjectKeysInternal = 1;
  1211. var uncurryThis = requireFunctionUncurryThis();
  1212. var hasOwn = requireHasOwnProperty();
  1213. var toIndexedObject = requireToIndexedObject();
  1214. var indexOf = requireArrayIncludes().indexOf;
  1215. var hiddenKeys = requireHiddenKeys();
  1216. var push = uncurryThis([].push);
  1217. objectKeysInternal = function (object, names) {
  1218. var O = toIndexedObject(object);
  1219. var i = 0;
  1220. var result = [];
  1221. var key;
  1222. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  1223. // Don't enum bug & hidden keys
  1224. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  1225. ~indexOf(result, key) || push(result, key);
  1226. }
  1227. return result;
  1228. };
  1229. return objectKeysInternal;
  1230. }
  1231. var enumBugKeys;
  1232. var hasRequiredEnumBugKeys;
  1233. function requireEnumBugKeys () {
  1234. if (hasRequiredEnumBugKeys) return enumBugKeys;
  1235. hasRequiredEnumBugKeys = 1;
  1236. // IE8- don't enum bug keys
  1237. enumBugKeys = [
  1238. 'constructor',
  1239. 'hasOwnProperty',
  1240. 'isPrototypeOf',
  1241. 'propertyIsEnumerable',
  1242. 'toLocaleString',
  1243. 'toString',
  1244. 'valueOf'
  1245. ];
  1246. return enumBugKeys;
  1247. }
  1248. var hasRequiredObjectGetOwnPropertyNames;
  1249. function requireObjectGetOwnPropertyNames () {
  1250. if (hasRequiredObjectGetOwnPropertyNames) return objectGetOwnPropertyNames;
  1251. hasRequiredObjectGetOwnPropertyNames = 1;
  1252. var internalObjectKeys = requireObjectKeysInternal();
  1253. var enumBugKeys = requireEnumBugKeys();
  1254. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  1255. // `Object.getOwnPropertyNames` method
  1256. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  1257. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  1258. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  1259. return internalObjectKeys(O, hiddenKeys);
  1260. };
  1261. return objectGetOwnPropertyNames;
  1262. }
  1263. var objectGetOwnPropertySymbols = {};
  1264. var hasRequiredObjectGetOwnPropertySymbols;
  1265. function requireObjectGetOwnPropertySymbols () {
  1266. if (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols;
  1267. hasRequiredObjectGetOwnPropertySymbols = 1;
  1268. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  1269. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  1270. return objectGetOwnPropertySymbols;
  1271. }
  1272. var ownKeys;
  1273. var hasRequiredOwnKeys;
  1274. function requireOwnKeys () {
  1275. if (hasRequiredOwnKeys) return ownKeys;
  1276. hasRequiredOwnKeys = 1;
  1277. var getBuiltIn = requireGetBuiltIn();
  1278. var uncurryThis = requireFunctionUncurryThis();
  1279. var getOwnPropertyNamesModule = requireObjectGetOwnPropertyNames();
  1280. var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
  1281. var anObject = requireAnObject();
  1282. var concat = uncurryThis([].concat);
  1283. // all object keys, includes non-enumerable and symbols
  1284. ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  1285. var keys = getOwnPropertyNamesModule.f(anObject(it));
  1286. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1287. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  1288. };
  1289. return ownKeys;
  1290. }
  1291. var copyConstructorProperties;
  1292. var hasRequiredCopyConstructorProperties;
  1293. function requireCopyConstructorProperties () {
  1294. if (hasRequiredCopyConstructorProperties) return copyConstructorProperties;
  1295. hasRequiredCopyConstructorProperties = 1;
  1296. var hasOwn = requireHasOwnProperty();
  1297. var ownKeys = requireOwnKeys();
  1298. var getOwnPropertyDescriptorModule = requireObjectGetOwnPropertyDescriptor();
  1299. var definePropertyModule = requireObjectDefineProperty();
  1300. copyConstructorProperties = function (target, source, exceptions) {
  1301. var keys = ownKeys(source);
  1302. var defineProperty = definePropertyModule.f;
  1303. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  1304. for (var i = 0; i < keys.length; i++) {
  1305. var key = keys[i];
  1306. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  1307. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  1308. }
  1309. }
  1310. };
  1311. return copyConstructorProperties;
  1312. }
  1313. var isForced_1;
  1314. var hasRequiredIsForced;
  1315. function requireIsForced () {
  1316. if (hasRequiredIsForced) return isForced_1;
  1317. hasRequiredIsForced = 1;
  1318. var fails = requireFails();
  1319. var isCallable = requireIsCallable();
  1320. var replacement = /#|\.prototype\./;
  1321. var isForced = function (feature, detection) {
  1322. var value = data[normalize(feature)];
  1323. return value === POLYFILL ? true
  1324. : value === NATIVE ? false
  1325. : isCallable(detection) ? fails(detection)
  1326. : !!detection;
  1327. };
  1328. var normalize = isForced.normalize = function (string) {
  1329. return String(string).replace(replacement, '.').toLowerCase();
  1330. };
  1331. var data = isForced.data = {};
  1332. var NATIVE = isForced.NATIVE = 'N';
  1333. var POLYFILL = isForced.POLYFILL = 'P';
  1334. isForced_1 = isForced;
  1335. return isForced_1;
  1336. }
  1337. var _export;
  1338. var hasRequired_export;
  1339. function require_export () {
  1340. if (hasRequired_export) return _export;
  1341. hasRequired_export = 1;
  1342. var globalThis = requireGlobalThis();
  1343. var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
  1344. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  1345. var defineBuiltIn = requireDefineBuiltIn();
  1346. var defineGlobalProperty = requireDefineGlobalProperty();
  1347. var copyConstructorProperties = requireCopyConstructorProperties();
  1348. var isForced = requireIsForced();
  1349. /*
  1350. options.target - name of the target object
  1351. options.global - target is the global object
  1352. options.stat - export as static methods of target
  1353. options.proto - export as prototype methods of target
  1354. options.real - real prototype method for the `pure` version
  1355. options.forced - export even if the native feature is available
  1356. options.bind - bind methods to the target, required for the `pure` version
  1357. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  1358. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  1359. options.sham - add a flag to not completely full polyfills
  1360. options.enumerable - export as enumerable property
  1361. options.dontCallGetSet - prevent calling a getter on target
  1362. options.name - the .name of the function if it does not match the key
  1363. */
  1364. _export = function (options, source) {
  1365. var TARGET = options.target;
  1366. var GLOBAL = options.global;
  1367. var STATIC = options.stat;
  1368. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  1369. if (GLOBAL) {
  1370. target = globalThis;
  1371. } else if (STATIC) {
  1372. target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
  1373. } else {
  1374. target = globalThis[TARGET] && globalThis[TARGET].prototype;
  1375. }
  1376. if (target) for (key in source) {
  1377. sourceProperty = source[key];
  1378. if (options.dontCallGetSet) {
  1379. descriptor = getOwnPropertyDescriptor(target, key);
  1380. targetProperty = descriptor && descriptor.value;
  1381. } else targetProperty = target[key];
  1382. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1383. // contained in target
  1384. if (!FORCED && targetProperty !== undefined) {
  1385. if (typeof sourceProperty == typeof targetProperty) continue;
  1386. copyConstructorProperties(sourceProperty, targetProperty);
  1387. }
  1388. // add a flag to not completely full polyfills
  1389. if (options.sham || (targetProperty && targetProperty.sham)) {
  1390. createNonEnumerableProperty(sourceProperty, 'sham', true);
  1391. }
  1392. defineBuiltIn(target, key, sourceProperty, options);
  1393. }
  1394. };
  1395. return _export;
  1396. }
  1397. var isArray;
  1398. var hasRequiredIsArray;
  1399. function requireIsArray () {
  1400. if (hasRequiredIsArray) return isArray;
  1401. hasRequiredIsArray = 1;
  1402. var classof = requireClassofRaw();
  1403. // `IsArray` abstract operation
  1404. // https://tc39.es/ecma262/#sec-isarray
  1405. // eslint-disable-next-line es/no-array-isarray -- safe
  1406. isArray = Array.isArray || function isArray(argument) {
  1407. return classof(argument) === 'Array';
  1408. };
  1409. return isArray;
  1410. }
  1411. var doesNotExceedSafeInteger;
  1412. var hasRequiredDoesNotExceedSafeInteger;
  1413. function requireDoesNotExceedSafeInteger () {
  1414. if (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger;
  1415. hasRequiredDoesNotExceedSafeInteger = 1;
  1416. var $TypeError = TypeError;
  1417. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1418. doesNotExceedSafeInteger = function (it) {
  1419. if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
  1420. return it;
  1421. };
  1422. return doesNotExceedSafeInteger;
  1423. }
  1424. var createProperty;
  1425. var hasRequiredCreateProperty;
  1426. function requireCreateProperty () {
  1427. if (hasRequiredCreateProperty) return createProperty;
  1428. hasRequiredCreateProperty = 1;
  1429. var DESCRIPTORS = requireDescriptors();
  1430. var definePropertyModule = requireObjectDefineProperty();
  1431. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  1432. createProperty = function (object, key, value) {
  1433. if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
  1434. else object[key] = value;
  1435. };
  1436. return createProperty;
  1437. }
  1438. var toStringTagSupport;
  1439. var hasRequiredToStringTagSupport;
  1440. function requireToStringTagSupport () {
  1441. if (hasRequiredToStringTagSupport) return toStringTagSupport;
  1442. hasRequiredToStringTagSupport = 1;
  1443. var wellKnownSymbol = requireWellKnownSymbol();
  1444. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  1445. var test = {};
  1446. test[TO_STRING_TAG] = 'z';
  1447. toStringTagSupport = String(test) === '[object z]';
  1448. return toStringTagSupport;
  1449. }
  1450. var classof;
  1451. var hasRequiredClassof;
  1452. function requireClassof () {
  1453. if (hasRequiredClassof) return classof;
  1454. hasRequiredClassof = 1;
  1455. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  1456. var isCallable = requireIsCallable();
  1457. var classofRaw = requireClassofRaw();
  1458. var wellKnownSymbol = requireWellKnownSymbol();
  1459. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  1460. var $Object = Object;
  1461. // ES3 wrong here
  1462. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
  1463. // fallback for IE11 Script Access Denied error
  1464. var tryGet = function (it, key) {
  1465. try {
  1466. return it[key];
  1467. } catch (error) { /* empty */ }
  1468. };
  1469. // getting tag from ES6+ `Object.prototype.toString`
  1470. classof = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  1471. var O, tag, result;
  1472. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1473. // @@toStringTag case
  1474. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  1475. // builtinTag case
  1476. : CORRECT_ARGUMENTS ? classofRaw(O)
  1477. // ES3 arguments fallback
  1478. : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  1479. };
  1480. return classof;
  1481. }
  1482. var isConstructor;
  1483. var hasRequiredIsConstructor;
  1484. function requireIsConstructor () {
  1485. if (hasRequiredIsConstructor) return isConstructor;
  1486. hasRequiredIsConstructor = 1;
  1487. var uncurryThis = requireFunctionUncurryThis();
  1488. var fails = requireFails();
  1489. var isCallable = requireIsCallable();
  1490. var classof = requireClassof();
  1491. var getBuiltIn = requireGetBuiltIn();
  1492. var inspectSource = requireInspectSource();
  1493. var noop = function () { /* empty */ };
  1494. var construct = getBuiltIn('Reflect', 'construct');
  1495. var constructorRegExp = /^\s*(?:class|function)\b/;
  1496. var exec = uncurryThis(constructorRegExp.exec);
  1497. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  1498. var isConstructorModern = function isConstructor(argument) {
  1499. if (!isCallable(argument)) return false;
  1500. try {
  1501. construct(noop, [], argument);
  1502. return true;
  1503. } catch (error) {
  1504. return false;
  1505. }
  1506. };
  1507. var isConstructorLegacy = function isConstructor(argument) {
  1508. if (!isCallable(argument)) return false;
  1509. switch (classof(argument)) {
  1510. case 'AsyncFunction':
  1511. case 'GeneratorFunction':
  1512. case 'AsyncGeneratorFunction': return false;
  1513. }
  1514. try {
  1515. // we can't check .prototype since constructors produced by .bind haven't it
  1516. // `Function#toString` throws on some built-it function in some legacy engines
  1517. // (for example, `DOMQuad` and similar in FF41-)
  1518. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1519. } catch (error) {
  1520. return true;
  1521. }
  1522. };
  1523. isConstructorLegacy.sham = true;
  1524. // `IsConstructor` abstract operation
  1525. // https://tc39.es/ecma262/#sec-isconstructor
  1526. isConstructor = !construct || fails(function () {
  1527. var called;
  1528. return isConstructorModern(isConstructorModern.call)
  1529. || !isConstructorModern(Object)
  1530. || !isConstructorModern(function () { called = true; })
  1531. || called;
  1532. }) ? isConstructorLegacy : isConstructorModern;
  1533. return isConstructor;
  1534. }
  1535. var arraySpeciesConstructor;
  1536. var hasRequiredArraySpeciesConstructor;
  1537. function requireArraySpeciesConstructor () {
  1538. if (hasRequiredArraySpeciesConstructor) return arraySpeciesConstructor;
  1539. hasRequiredArraySpeciesConstructor = 1;
  1540. var isArray = requireIsArray();
  1541. var isConstructor = requireIsConstructor();
  1542. var isObject = requireIsObject();
  1543. var wellKnownSymbol = requireWellKnownSymbol();
  1544. var SPECIES = wellKnownSymbol('species');
  1545. var $Array = Array;
  1546. // a part of `ArraySpeciesCreate` abstract operation
  1547. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1548. arraySpeciesConstructor = function (originalArray) {
  1549. var C;
  1550. if (isArray(originalArray)) {
  1551. C = originalArray.constructor;
  1552. // cross-realm fallback
  1553. if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
  1554. else if (isObject(C)) {
  1555. C = C[SPECIES];
  1556. if (C === null) C = undefined;
  1557. }
  1558. } return C === undefined ? $Array : C;
  1559. };
  1560. return arraySpeciesConstructor;
  1561. }
  1562. var arraySpeciesCreate;
  1563. var hasRequiredArraySpeciesCreate;
  1564. function requireArraySpeciesCreate () {
  1565. if (hasRequiredArraySpeciesCreate) return arraySpeciesCreate;
  1566. hasRequiredArraySpeciesCreate = 1;
  1567. var arraySpeciesConstructor = requireArraySpeciesConstructor();
  1568. // `ArraySpeciesCreate` abstract operation
  1569. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1570. arraySpeciesCreate = function (originalArray, length) {
  1571. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1572. };
  1573. return arraySpeciesCreate;
  1574. }
  1575. var arrayMethodHasSpeciesSupport;
  1576. var hasRequiredArrayMethodHasSpeciesSupport;
  1577. function requireArrayMethodHasSpeciesSupport () {
  1578. if (hasRequiredArrayMethodHasSpeciesSupport) return arrayMethodHasSpeciesSupport;
  1579. hasRequiredArrayMethodHasSpeciesSupport = 1;
  1580. var fails = requireFails();
  1581. var wellKnownSymbol = requireWellKnownSymbol();
  1582. var V8_VERSION = requireEnvironmentV8Version();
  1583. var SPECIES = wellKnownSymbol('species');
  1584. arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1585. // We can't use this feature detection in V8 since it causes
  1586. // deoptimization and serious performance degradation
  1587. // https://github.com/zloirock/core-js/issues/677
  1588. return V8_VERSION >= 51 || !fails(function () {
  1589. var array = [];
  1590. var constructor = array.constructor = {};
  1591. constructor[SPECIES] = function () {
  1592. return { foo: 1 };
  1593. };
  1594. return array[METHOD_NAME](Boolean).foo !== 1;
  1595. });
  1596. };
  1597. return arrayMethodHasSpeciesSupport;
  1598. }
  1599. var hasRequiredEs_array_concat;
  1600. function requireEs_array_concat () {
  1601. if (hasRequiredEs_array_concat) return es_array_concat;
  1602. hasRequiredEs_array_concat = 1;
  1603. var $ = require_export();
  1604. var fails = requireFails();
  1605. var isArray = requireIsArray();
  1606. var isObject = requireIsObject();
  1607. var toObject = requireToObject();
  1608. var lengthOfArrayLike = requireLengthOfArrayLike();
  1609. var doesNotExceedSafeInteger = requireDoesNotExceedSafeInteger();
  1610. var createProperty = requireCreateProperty();
  1611. var arraySpeciesCreate = requireArraySpeciesCreate();
  1612. var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
  1613. var wellKnownSymbol = requireWellKnownSymbol();
  1614. var V8_VERSION = requireEnvironmentV8Version();
  1615. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1616. // We can't use this feature detection in V8 since it causes
  1617. // deoptimization and serious performance degradation
  1618. // https://github.com/zloirock/core-js/issues/679
  1619. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  1620. var array = [];
  1621. array[IS_CONCAT_SPREADABLE] = false;
  1622. return array.concat()[0] !== array;
  1623. });
  1624. var isConcatSpreadable = function (O) {
  1625. if (!isObject(O)) return false;
  1626. var spreadable = O[IS_CONCAT_SPREADABLE];
  1627. return spreadable !== undefined ? !!spreadable : isArray(O);
  1628. };
  1629. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');
  1630. // `Array.prototype.concat` method
  1631. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1632. // with adding support of @@isConcatSpreadable and @@species
  1633. $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1634. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1635. concat: function concat(arg) {
  1636. var O = toObject(this);
  1637. var A = arraySpeciesCreate(O, 0);
  1638. var n = 0;
  1639. var i, k, length, len, E;
  1640. for (i = -1, length = arguments.length; i < length; i++) {
  1641. E = i === -1 ? O : arguments[i];
  1642. if (isConcatSpreadable(E)) {
  1643. len = lengthOfArrayLike(E);
  1644. doesNotExceedSafeInteger(n + len);
  1645. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1646. } else {
  1647. doesNotExceedSafeInteger(n + 1);
  1648. createProperty(A, n++, E);
  1649. }
  1650. }
  1651. A.length = n;
  1652. return A;
  1653. }
  1654. });
  1655. return es_array_concat;
  1656. }
  1657. requireEs_array_concat();
  1658. var es_array_filter = {};
  1659. var functionUncurryThisClause;
  1660. var hasRequiredFunctionUncurryThisClause;
  1661. function requireFunctionUncurryThisClause () {
  1662. if (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause;
  1663. hasRequiredFunctionUncurryThisClause = 1;
  1664. var classofRaw = requireClassofRaw();
  1665. var uncurryThis = requireFunctionUncurryThis();
  1666. functionUncurryThisClause = function (fn) {
  1667. // Nashorn bug:
  1668. // https://github.com/zloirock/core-js/issues/1128
  1669. // https://github.com/zloirock/core-js/issues/1130
  1670. if (classofRaw(fn) === 'Function') return uncurryThis(fn);
  1671. };
  1672. return functionUncurryThisClause;
  1673. }
  1674. var functionBindContext;
  1675. var hasRequiredFunctionBindContext;
  1676. function requireFunctionBindContext () {
  1677. if (hasRequiredFunctionBindContext) return functionBindContext;
  1678. hasRequiredFunctionBindContext = 1;
  1679. var uncurryThis = requireFunctionUncurryThisClause();
  1680. var aCallable = requireACallable();
  1681. var NATIVE_BIND = requireFunctionBindNative();
  1682. var bind = uncurryThis(uncurryThis.bind);
  1683. // optional / simple context binding
  1684. functionBindContext = function (fn, that) {
  1685. aCallable(fn);
  1686. return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
  1687. return fn.apply(that, arguments);
  1688. };
  1689. };
  1690. return functionBindContext;
  1691. }
  1692. var arrayIteration;
  1693. var hasRequiredArrayIteration;
  1694. function requireArrayIteration () {
  1695. if (hasRequiredArrayIteration) return arrayIteration;
  1696. hasRequiredArrayIteration = 1;
  1697. var bind = requireFunctionBindContext();
  1698. var uncurryThis = requireFunctionUncurryThis();
  1699. var IndexedObject = requireIndexedObject();
  1700. var toObject = requireToObject();
  1701. var lengthOfArrayLike = requireLengthOfArrayLike();
  1702. var arraySpeciesCreate = requireArraySpeciesCreate();
  1703. var push = uncurryThis([].push);
  1704. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1705. var createMethod = function (TYPE) {
  1706. var IS_MAP = TYPE === 1;
  1707. var IS_FILTER = TYPE === 2;
  1708. var IS_SOME = TYPE === 3;
  1709. var IS_EVERY = TYPE === 4;
  1710. var IS_FIND_INDEX = TYPE === 6;
  1711. var IS_FILTER_REJECT = TYPE === 7;
  1712. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  1713. return function ($this, callbackfn, that, specificCreate) {
  1714. var O = toObject($this);
  1715. var self = IndexedObject(O);
  1716. var length = lengthOfArrayLike(self);
  1717. var boundFunction = bind(callbackfn, that);
  1718. var index = 0;
  1719. var create = specificCreate || arraySpeciesCreate;
  1720. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1721. var value, result;
  1722. for (;length > index; index++) if (NO_HOLES || index in self) {
  1723. value = self[index];
  1724. result = boundFunction(value, index, O);
  1725. if (TYPE) {
  1726. if (IS_MAP) target[index] = result; // map
  1727. else if (result) switch (TYPE) {
  1728. case 3: return true; // some
  1729. case 5: return value; // find
  1730. case 6: return index; // findIndex
  1731. case 2: push(target, value); // filter
  1732. } else switch (TYPE) {
  1733. case 4: return false; // every
  1734. case 7: push(target, value); // filterReject
  1735. }
  1736. }
  1737. }
  1738. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1739. };
  1740. };
  1741. arrayIteration = {
  1742. // `Array.prototype.forEach` method
  1743. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1744. forEach: createMethod(0),
  1745. // `Array.prototype.map` method
  1746. // https://tc39.es/ecma262/#sec-array.prototype.map
  1747. map: createMethod(1),
  1748. // `Array.prototype.filter` method
  1749. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1750. filter: createMethod(2),
  1751. // `Array.prototype.some` method
  1752. // https://tc39.es/ecma262/#sec-array.prototype.some
  1753. some: createMethod(3),
  1754. // `Array.prototype.every` method
  1755. // https://tc39.es/ecma262/#sec-array.prototype.every
  1756. every: createMethod(4),
  1757. // `Array.prototype.find` method
  1758. // https://tc39.es/ecma262/#sec-array.prototype.find
  1759. find: createMethod(5),
  1760. // `Array.prototype.findIndex` method
  1761. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1762. findIndex: createMethod(6),
  1763. // `Array.prototype.filterReject` method
  1764. // https://github.com/tc39/proposal-array-filtering
  1765. filterReject: createMethod(7)
  1766. };
  1767. return arrayIteration;
  1768. }
  1769. var hasRequiredEs_array_filter;
  1770. function requireEs_array_filter () {
  1771. if (hasRequiredEs_array_filter) return es_array_filter;
  1772. hasRequiredEs_array_filter = 1;
  1773. var $ = require_export();
  1774. var $filter = requireArrayIteration().filter;
  1775. var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
  1776. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  1777. // `Array.prototype.filter` method
  1778. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1779. // with adding support of @@species
  1780. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1781. filter: function filter(callbackfn /* , thisArg */) {
  1782. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1783. }
  1784. });
  1785. return es_array_filter;
  1786. }
  1787. requireEs_array_filter();
  1788. var es_array_find = {};
  1789. var objectDefineProperties = {};
  1790. var objectKeys;
  1791. var hasRequiredObjectKeys;
  1792. function requireObjectKeys () {
  1793. if (hasRequiredObjectKeys) return objectKeys;
  1794. hasRequiredObjectKeys = 1;
  1795. var internalObjectKeys = requireObjectKeysInternal();
  1796. var enumBugKeys = requireEnumBugKeys();
  1797. // `Object.keys` method
  1798. // https://tc39.es/ecma262/#sec-object.keys
  1799. // eslint-disable-next-line es/no-object-keys -- safe
  1800. objectKeys = Object.keys || function keys(O) {
  1801. return internalObjectKeys(O, enumBugKeys);
  1802. };
  1803. return objectKeys;
  1804. }
  1805. var hasRequiredObjectDefineProperties;
  1806. function requireObjectDefineProperties () {
  1807. if (hasRequiredObjectDefineProperties) return objectDefineProperties;
  1808. hasRequiredObjectDefineProperties = 1;
  1809. var DESCRIPTORS = requireDescriptors();
  1810. var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
  1811. var definePropertyModule = requireObjectDefineProperty();
  1812. var anObject = requireAnObject();
  1813. var toIndexedObject = requireToIndexedObject();
  1814. var objectKeys = requireObjectKeys();
  1815. // `Object.defineProperties` method
  1816. // https://tc39.es/ecma262/#sec-object.defineproperties
  1817. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1818. objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1819. anObject(O);
  1820. var props = toIndexedObject(Properties);
  1821. var keys = objectKeys(Properties);
  1822. var length = keys.length;
  1823. var index = 0;
  1824. var key;
  1825. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1826. return O;
  1827. };
  1828. return objectDefineProperties;
  1829. }
  1830. var html;
  1831. var hasRequiredHtml;
  1832. function requireHtml () {
  1833. if (hasRequiredHtml) return html;
  1834. hasRequiredHtml = 1;
  1835. var getBuiltIn = requireGetBuiltIn();
  1836. html = getBuiltIn('document', 'documentElement');
  1837. return html;
  1838. }
  1839. var objectCreate;
  1840. var hasRequiredObjectCreate;
  1841. function requireObjectCreate () {
  1842. if (hasRequiredObjectCreate) return objectCreate;
  1843. hasRequiredObjectCreate = 1;
  1844. /* global ActiveXObject -- old IE, WSH */
  1845. var anObject = requireAnObject();
  1846. var definePropertiesModule = requireObjectDefineProperties();
  1847. var enumBugKeys = requireEnumBugKeys();
  1848. var hiddenKeys = requireHiddenKeys();
  1849. var html = requireHtml();
  1850. var documentCreateElement = requireDocumentCreateElement();
  1851. var sharedKey = requireSharedKey();
  1852. var GT = '>';
  1853. var LT = '<';
  1854. var PROTOTYPE = 'prototype';
  1855. var SCRIPT = 'script';
  1856. var IE_PROTO = sharedKey('IE_PROTO');
  1857. var EmptyConstructor = function () { /* empty */ };
  1858. var scriptTag = function (content) {
  1859. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1860. };
  1861. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1862. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1863. activeXDocument.write(scriptTag(''));
  1864. activeXDocument.close();
  1865. var temp = activeXDocument.parentWindow.Object;
  1866. // eslint-disable-next-line no-useless-assignment -- avoid memory leak
  1867. activeXDocument = null;
  1868. return temp;
  1869. };
  1870. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1871. var NullProtoObjectViaIFrame = function () {
  1872. // Thrash, waste and sodomy: IE GC bug
  1873. var iframe = documentCreateElement('iframe');
  1874. var JS = 'java' + SCRIPT + ':';
  1875. var iframeDocument;
  1876. iframe.style.display = 'none';
  1877. html.appendChild(iframe);
  1878. // https://github.com/zloirock/core-js/issues/475
  1879. iframe.src = String(JS);
  1880. iframeDocument = iframe.contentWindow.document;
  1881. iframeDocument.open();
  1882. iframeDocument.write(scriptTag('document.F=Object'));
  1883. iframeDocument.close();
  1884. return iframeDocument.F;
  1885. };
  1886. // Check for document.domain and active x support
  1887. // No need to use active x approach when document.domain is not set
  1888. // see https://github.com/es-shims/es5-shim/issues/150
  1889. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1890. // avoid IE GC bug
  1891. var activeXDocument;
  1892. var NullProtoObject = function () {
  1893. try {
  1894. activeXDocument = new ActiveXObject('htmlfile');
  1895. } catch (error) { /* ignore */ }
  1896. NullProtoObject = typeof document != 'undefined'
  1897. ? document.domain && activeXDocument
  1898. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1899. : NullProtoObjectViaIFrame()
  1900. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1901. var length = enumBugKeys.length;
  1902. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1903. return NullProtoObject();
  1904. };
  1905. hiddenKeys[IE_PROTO] = true;
  1906. // `Object.create` method
  1907. // https://tc39.es/ecma262/#sec-object.create
  1908. // eslint-disable-next-line es/no-object-create -- safe
  1909. objectCreate = Object.create || function create(O, Properties) {
  1910. var result;
  1911. if (O !== null) {
  1912. EmptyConstructor[PROTOTYPE] = anObject(O);
  1913. result = new EmptyConstructor();
  1914. EmptyConstructor[PROTOTYPE] = null;
  1915. // add "__proto__" for Object.getPrototypeOf polyfill
  1916. result[IE_PROTO] = O;
  1917. } else result = NullProtoObject();
  1918. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1919. };
  1920. return objectCreate;
  1921. }
  1922. var addToUnscopables;
  1923. var hasRequiredAddToUnscopables;
  1924. function requireAddToUnscopables () {
  1925. if (hasRequiredAddToUnscopables) return addToUnscopables;
  1926. hasRequiredAddToUnscopables = 1;
  1927. var wellKnownSymbol = requireWellKnownSymbol();
  1928. var create = requireObjectCreate();
  1929. var defineProperty = requireObjectDefineProperty().f;
  1930. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1931. var ArrayPrototype = Array.prototype;
  1932. // Array.prototype[@@unscopables]
  1933. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1934. if (ArrayPrototype[UNSCOPABLES] === undefined) {
  1935. defineProperty(ArrayPrototype, UNSCOPABLES, {
  1936. configurable: true,
  1937. value: create(null)
  1938. });
  1939. }
  1940. // add a key to Array.prototype[@@unscopables]
  1941. addToUnscopables = function (key) {
  1942. ArrayPrototype[UNSCOPABLES][key] = true;
  1943. };
  1944. return addToUnscopables;
  1945. }
  1946. var hasRequiredEs_array_find;
  1947. function requireEs_array_find () {
  1948. if (hasRequiredEs_array_find) return es_array_find;
  1949. hasRequiredEs_array_find = 1;
  1950. var $ = require_export();
  1951. var $find = requireArrayIteration().find;
  1952. var addToUnscopables = requireAddToUnscopables();
  1953. var FIND = 'find';
  1954. var SKIPS_HOLES = true;
  1955. // Shouldn't skip holes
  1956. // eslint-disable-next-line es/no-array-prototype-find -- testing
  1957. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1958. // `Array.prototype.find` method
  1959. // https://tc39.es/ecma262/#sec-array.prototype.find
  1960. $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1961. find: function find(callbackfn /* , that = undefined */) {
  1962. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1963. }
  1964. });
  1965. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1966. addToUnscopables(FIND);
  1967. return es_array_find;
  1968. }
  1969. requireEs_array_find();
  1970. var es_array_includes = {};
  1971. var hasRequiredEs_array_includes;
  1972. function requireEs_array_includes () {
  1973. if (hasRequiredEs_array_includes) return es_array_includes;
  1974. hasRequiredEs_array_includes = 1;
  1975. var $ = require_export();
  1976. var $includes = requireArrayIncludes().includes;
  1977. var fails = requireFails();
  1978. var addToUnscopables = requireAddToUnscopables();
  1979. // FF99+ bug
  1980. var BROKEN_ON_SPARSE = fails(function () {
  1981. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  1982. return !Array(1).includes();
  1983. });
  1984. // `Array.prototype.includes` method
  1985. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1986. $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1987. includes: function includes(el /* , fromIndex = 0 */) {
  1988. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1989. }
  1990. });
  1991. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1992. addToUnscopables('includes');
  1993. return es_array_includes;
  1994. }
  1995. requireEs_array_includes();
  1996. var es_array_indexOf = {};
  1997. var arrayMethodIsStrict;
  1998. var hasRequiredArrayMethodIsStrict;
  1999. function requireArrayMethodIsStrict () {
  2000. if (hasRequiredArrayMethodIsStrict) return arrayMethodIsStrict;
  2001. hasRequiredArrayMethodIsStrict = 1;
  2002. var fails = requireFails();
  2003. arrayMethodIsStrict = function (METHOD_NAME, argument) {
  2004. var method = [][METHOD_NAME];
  2005. return !!method && fails(function () {
  2006. // eslint-disable-next-line no-useless-call -- required for testing
  2007. method.call(null, argument || function () { return 1; }, 1);
  2008. });
  2009. };
  2010. return arrayMethodIsStrict;
  2011. }
  2012. var hasRequiredEs_array_indexOf;
  2013. function requireEs_array_indexOf () {
  2014. if (hasRequiredEs_array_indexOf) return es_array_indexOf;
  2015. hasRequiredEs_array_indexOf = 1;
  2016. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  2017. var $ = require_export();
  2018. var uncurryThis = requireFunctionUncurryThisClause();
  2019. var $indexOf = requireArrayIncludes().indexOf;
  2020. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  2021. var nativeIndexOf = uncurryThis([].indexOf);
  2022. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  2023. var FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');
  2024. // `Array.prototype.indexOf` method
  2025. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  2026. $({ target: 'Array', proto: true, forced: FORCED }, {
  2027. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  2028. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  2029. return NEGATIVE_ZERO
  2030. // convert -0 to +0
  2031. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  2032. : $indexOf(this, searchElement, fromIndex);
  2033. }
  2034. });
  2035. return es_array_indexOf;
  2036. }
  2037. requireEs_array_indexOf();
  2038. var es_object_assign = {};
  2039. var objectAssign;
  2040. var hasRequiredObjectAssign;
  2041. function requireObjectAssign () {
  2042. if (hasRequiredObjectAssign) return objectAssign;
  2043. hasRequiredObjectAssign = 1;
  2044. var DESCRIPTORS = requireDescriptors();
  2045. var uncurryThis = requireFunctionUncurryThis();
  2046. var call = requireFunctionCall();
  2047. var fails = requireFails();
  2048. var objectKeys = requireObjectKeys();
  2049. var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
  2050. var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
  2051. var toObject = requireToObject();
  2052. var IndexedObject = requireIndexedObject();
  2053. // eslint-disable-next-line es/no-object-assign -- safe
  2054. var $assign = Object.assign;
  2055. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  2056. var defineProperty = Object.defineProperty;
  2057. var concat = uncurryThis([].concat);
  2058. // `Object.assign` method
  2059. // https://tc39.es/ecma262/#sec-object.assign
  2060. objectAssign = !$assign || fails(function () {
  2061. // should have correct order of operations (Edge bug)
  2062. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  2063. enumerable: true,
  2064. get: function () {
  2065. defineProperty(this, 'b', {
  2066. value: 3,
  2067. enumerable: false
  2068. });
  2069. }
  2070. }), { b: 2 })).b !== 1) return true;
  2071. // should work with symbols and should have deterministic property order (V8 bug)
  2072. var A = {};
  2073. var B = {};
  2074. // eslint-disable-next-line es/no-symbol -- safe
  2075. var symbol = Symbol('assign detection');
  2076. var alphabet = 'abcdefghijklmnopqrst';
  2077. A[symbol] = 7;
  2078. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  2079. return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
  2080. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  2081. var T = toObject(target);
  2082. var argumentsLength = arguments.length;
  2083. var index = 1;
  2084. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  2085. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  2086. while (argumentsLength > index) {
  2087. var S = IndexedObject(arguments[index++]);
  2088. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  2089. var length = keys.length;
  2090. var j = 0;
  2091. var key;
  2092. while (length > j) {
  2093. key = keys[j++];
  2094. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  2095. }
  2096. } return T;
  2097. } : $assign;
  2098. return objectAssign;
  2099. }
  2100. var hasRequiredEs_object_assign;
  2101. function requireEs_object_assign () {
  2102. if (hasRequiredEs_object_assign) return es_object_assign;
  2103. hasRequiredEs_object_assign = 1;
  2104. var $ = require_export();
  2105. var assign = requireObjectAssign();
  2106. // `Object.assign` method
  2107. // https://tc39.es/ecma262/#sec-object.assign
  2108. // eslint-disable-next-line es/no-object-assign -- required for testing
  2109. $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  2110. assign: assign
  2111. });
  2112. return es_object_assign;
  2113. }
  2114. requireEs_object_assign();
  2115. var es_object_keys = {};
  2116. var hasRequiredEs_object_keys;
  2117. function requireEs_object_keys () {
  2118. if (hasRequiredEs_object_keys) return es_object_keys;
  2119. hasRequiredEs_object_keys = 1;
  2120. var $ = require_export();
  2121. var toObject = requireToObject();
  2122. var nativeKeys = requireObjectKeys();
  2123. var fails = requireFails();
  2124. var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
  2125. // `Object.keys` method
  2126. // https://tc39.es/ecma262/#sec-object.keys
  2127. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  2128. keys: function keys(it) {
  2129. return nativeKeys(toObject(it));
  2130. }
  2131. });
  2132. return es_object_keys;
  2133. }
  2134. requireEs_object_keys();
  2135. var es_object_toString = {};
  2136. var objectToString;
  2137. var hasRequiredObjectToString;
  2138. function requireObjectToString () {
  2139. if (hasRequiredObjectToString) return objectToString;
  2140. hasRequiredObjectToString = 1;
  2141. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  2142. var classof = requireClassof();
  2143. // `Object.prototype.toString` method implementation
  2144. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  2145. objectToString = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  2146. return '[object ' + classof(this) + ']';
  2147. };
  2148. return objectToString;
  2149. }
  2150. var hasRequiredEs_object_toString;
  2151. function requireEs_object_toString () {
  2152. if (hasRequiredEs_object_toString) return es_object_toString;
  2153. hasRequiredEs_object_toString = 1;
  2154. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  2155. var defineBuiltIn = requireDefineBuiltIn();
  2156. var toString = requireObjectToString();
  2157. // `Object.prototype.toString` method
  2158. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  2159. if (!TO_STRING_TAG_SUPPORT) {
  2160. defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
  2161. }
  2162. return es_object_toString;
  2163. }
  2164. requireEs_object_toString();
  2165. var es_object_values = {};
  2166. var correctPrototypeGetter;
  2167. var hasRequiredCorrectPrototypeGetter;
  2168. function requireCorrectPrototypeGetter () {
  2169. if (hasRequiredCorrectPrototypeGetter) return correctPrototypeGetter;
  2170. hasRequiredCorrectPrototypeGetter = 1;
  2171. var fails = requireFails();
  2172. correctPrototypeGetter = !fails(function () {
  2173. function F() { /* empty */ }
  2174. F.prototype.constructor = null;
  2175. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  2176. return Object.getPrototypeOf(new F()) !== F.prototype;
  2177. });
  2178. return correctPrototypeGetter;
  2179. }
  2180. var objectGetPrototypeOf;
  2181. var hasRequiredObjectGetPrototypeOf;
  2182. function requireObjectGetPrototypeOf () {
  2183. if (hasRequiredObjectGetPrototypeOf) return objectGetPrototypeOf;
  2184. hasRequiredObjectGetPrototypeOf = 1;
  2185. var hasOwn = requireHasOwnProperty();
  2186. var isCallable = requireIsCallable();
  2187. var toObject = requireToObject();
  2188. var sharedKey = requireSharedKey();
  2189. var CORRECT_PROTOTYPE_GETTER = requireCorrectPrototypeGetter();
  2190. var IE_PROTO = sharedKey('IE_PROTO');
  2191. var $Object = Object;
  2192. var ObjectPrototype = $Object.prototype;
  2193. // `Object.getPrototypeOf` method
  2194. // https://tc39.es/ecma262/#sec-object.getprototypeof
  2195. // eslint-disable-next-line es/no-object-getprototypeof -- safe
  2196. objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
  2197. var object = toObject(O);
  2198. if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
  2199. var constructor = object.constructor;
  2200. if (isCallable(constructor) && object instanceof constructor) {
  2201. return constructor.prototype;
  2202. } return object instanceof $Object ? ObjectPrototype : null;
  2203. };
  2204. return objectGetPrototypeOf;
  2205. }
  2206. var objectToArray;
  2207. var hasRequiredObjectToArray;
  2208. function requireObjectToArray () {
  2209. if (hasRequiredObjectToArray) return objectToArray;
  2210. hasRequiredObjectToArray = 1;
  2211. var DESCRIPTORS = requireDescriptors();
  2212. var fails = requireFails();
  2213. var uncurryThis = requireFunctionUncurryThis();
  2214. var objectGetPrototypeOf = requireObjectGetPrototypeOf();
  2215. var objectKeys = requireObjectKeys();
  2216. var toIndexedObject = requireToIndexedObject();
  2217. var $propertyIsEnumerable = requireObjectPropertyIsEnumerable().f;
  2218. var propertyIsEnumerable = uncurryThis($propertyIsEnumerable);
  2219. var push = uncurryThis([].push);
  2220. // in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys
  2221. // of `null` prototype objects
  2222. var IE_BUG = DESCRIPTORS && fails(function () {
  2223. // eslint-disable-next-line es/no-object-create -- safe
  2224. var O = Object.create(null);
  2225. O[2] = 2;
  2226. return !propertyIsEnumerable(O, 2);
  2227. });
  2228. // `Object.{ entries, values }` methods implementation
  2229. var createMethod = function (TO_ENTRIES) {
  2230. return function (it) {
  2231. var O = toIndexedObject(it);
  2232. var keys = objectKeys(O);
  2233. var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;
  2234. var length = keys.length;
  2235. var i = 0;
  2236. var result = [];
  2237. var key;
  2238. while (length > i) {
  2239. key = keys[i++];
  2240. if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {
  2241. push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  2242. }
  2243. }
  2244. return result;
  2245. };
  2246. };
  2247. objectToArray = {
  2248. // `Object.entries` method
  2249. // https://tc39.es/ecma262/#sec-object.entries
  2250. entries: createMethod(true),
  2251. // `Object.values` method
  2252. // https://tc39.es/ecma262/#sec-object.values
  2253. values: createMethod(false)
  2254. };
  2255. return objectToArray;
  2256. }
  2257. var hasRequiredEs_object_values;
  2258. function requireEs_object_values () {
  2259. if (hasRequiredEs_object_values) return es_object_values;
  2260. hasRequiredEs_object_values = 1;
  2261. var $ = require_export();
  2262. var $values = requireObjectToArray().values;
  2263. // `Object.values` method
  2264. // https://tc39.es/ecma262/#sec-object.values
  2265. $({ target: 'Object', stat: true }, {
  2266. values: function values(O) {
  2267. return $values(O);
  2268. }
  2269. });
  2270. return es_object_values;
  2271. }
  2272. requireEs_object_values();
  2273. var es_parseInt = {};
  2274. var toString;
  2275. var hasRequiredToString;
  2276. function requireToString () {
  2277. if (hasRequiredToString) return toString;
  2278. hasRequiredToString = 1;
  2279. var classof = requireClassof();
  2280. var $String = String;
  2281. toString = function (argument) {
  2282. if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  2283. return $String(argument);
  2284. };
  2285. return toString;
  2286. }
  2287. var whitespaces;
  2288. var hasRequiredWhitespaces;
  2289. function requireWhitespaces () {
  2290. if (hasRequiredWhitespaces) return whitespaces;
  2291. hasRequiredWhitespaces = 1;
  2292. // a string of all valid unicode whitespaces
  2293. whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  2294. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  2295. return whitespaces;
  2296. }
  2297. var stringTrim;
  2298. var hasRequiredStringTrim;
  2299. function requireStringTrim () {
  2300. if (hasRequiredStringTrim) return stringTrim;
  2301. hasRequiredStringTrim = 1;
  2302. var uncurryThis = requireFunctionUncurryThis();
  2303. var requireObjectCoercible = requireRequireObjectCoercible();
  2304. var toString = requireToString();
  2305. var whitespaces = requireWhitespaces();
  2306. var replace = uncurryThis(''.replace);
  2307. var ltrim = RegExp('^[' + whitespaces + ']+');
  2308. var rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');
  2309. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  2310. var createMethod = function (TYPE) {
  2311. return function ($this) {
  2312. var string = toString(requireObjectCoercible($this));
  2313. if (TYPE & 1) string = replace(string, ltrim, '');
  2314. if (TYPE & 2) string = replace(string, rtrim, '$1');
  2315. return string;
  2316. };
  2317. };
  2318. stringTrim = {
  2319. // `String.prototype.{ trimLeft, trimStart }` methods
  2320. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  2321. start: createMethod(1),
  2322. // `String.prototype.{ trimRight, trimEnd }` methods
  2323. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  2324. end: createMethod(2),
  2325. // `String.prototype.trim` method
  2326. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2327. trim: createMethod(3)
  2328. };
  2329. return stringTrim;
  2330. }
  2331. var numberParseInt;
  2332. var hasRequiredNumberParseInt;
  2333. function requireNumberParseInt () {
  2334. if (hasRequiredNumberParseInt) return numberParseInt;
  2335. hasRequiredNumberParseInt = 1;
  2336. var globalThis = requireGlobalThis();
  2337. var fails = requireFails();
  2338. var uncurryThis = requireFunctionUncurryThis();
  2339. var toString = requireToString();
  2340. var trim = requireStringTrim().trim;
  2341. var whitespaces = requireWhitespaces();
  2342. var $parseInt = globalThis.parseInt;
  2343. var Symbol = globalThis.Symbol;
  2344. var ITERATOR = Symbol && Symbol.iterator;
  2345. var hex = /^[+-]?0x/i;
  2346. var exec = uncurryThis(hex.exec);
  2347. var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22
  2348. // MS Edge 18- broken with boxed symbols
  2349. || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); }));
  2350. // `parseInt` method
  2351. // https://tc39.es/ecma262/#sec-parseint-string-radix
  2352. numberParseInt = FORCED ? function parseInt(string, radix) {
  2353. var S = trim(toString(string));
  2354. return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
  2355. } : $parseInt;
  2356. return numberParseInt;
  2357. }
  2358. var hasRequiredEs_parseInt;
  2359. function requireEs_parseInt () {
  2360. if (hasRequiredEs_parseInt) return es_parseInt;
  2361. hasRequiredEs_parseInt = 1;
  2362. var $ = require_export();
  2363. var $parseInt = requireNumberParseInt();
  2364. // `parseInt` method
  2365. // https://tc39.es/ecma262/#sec-parseint-string-radix
  2366. $({ global: true, forced: parseInt !== $parseInt }, {
  2367. parseInt: $parseInt
  2368. });
  2369. return es_parseInt;
  2370. }
  2371. requireEs_parseInt();
  2372. var es_promise = {};
  2373. var es_promise_constructor = {};
  2374. var environment;
  2375. var hasRequiredEnvironment;
  2376. function requireEnvironment () {
  2377. if (hasRequiredEnvironment) return environment;
  2378. hasRequiredEnvironment = 1;
  2379. /* global Bun, Deno -- detection */
  2380. var globalThis = requireGlobalThis();
  2381. var userAgent = requireEnvironmentUserAgent();
  2382. var classof = requireClassofRaw();
  2383. var userAgentStartsWith = function (string) {
  2384. return userAgent.slice(0, string.length) === string;
  2385. };
  2386. environment = (function () {
  2387. if (userAgentStartsWith('Bun/')) return 'BUN';
  2388. if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
  2389. if (userAgentStartsWith('Deno/')) return 'DENO';
  2390. if (userAgentStartsWith('Node.js/')) return 'NODE';
  2391. if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';
  2392. if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';
  2393. if (classof(globalThis.process) === 'process') return 'NODE';
  2394. if (globalThis.window && globalThis.document) return 'BROWSER';
  2395. return 'REST';
  2396. })();
  2397. return environment;
  2398. }
  2399. var environmentIsNode;
  2400. var hasRequiredEnvironmentIsNode;
  2401. function requireEnvironmentIsNode () {
  2402. if (hasRequiredEnvironmentIsNode) return environmentIsNode;
  2403. hasRequiredEnvironmentIsNode = 1;
  2404. var ENVIRONMENT = requireEnvironment();
  2405. environmentIsNode = ENVIRONMENT === 'NODE';
  2406. return environmentIsNode;
  2407. }
  2408. var functionUncurryThisAccessor;
  2409. var hasRequiredFunctionUncurryThisAccessor;
  2410. function requireFunctionUncurryThisAccessor () {
  2411. if (hasRequiredFunctionUncurryThisAccessor) return functionUncurryThisAccessor;
  2412. hasRequiredFunctionUncurryThisAccessor = 1;
  2413. var uncurryThis = requireFunctionUncurryThis();
  2414. var aCallable = requireACallable();
  2415. functionUncurryThisAccessor = function (object, key, method) {
  2416. try {
  2417. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  2418. return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
  2419. } catch (error) { /* empty */ }
  2420. };
  2421. return functionUncurryThisAccessor;
  2422. }
  2423. var isPossiblePrototype;
  2424. var hasRequiredIsPossiblePrototype;
  2425. function requireIsPossiblePrototype () {
  2426. if (hasRequiredIsPossiblePrototype) return isPossiblePrototype;
  2427. hasRequiredIsPossiblePrototype = 1;
  2428. var isObject = requireIsObject();
  2429. isPossiblePrototype = function (argument) {
  2430. return isObject(argument) || argument === null;
  2431. };
  2432. return isPossiblePrototype;
  2433. }
  2434. var aPossiblePrototype;
  2435. var hasRequiredAPossiblePrototype;
  2436. function requireAPossiblePrototype () {
  2437. if (hasRequiredAPossiblePrototype) return aPossiblePrototype;
  2438. hasRequiredAPossiblePrototype = 1;
  2439. var isPossiblePrototype = requireIsPossiblePrototype();
  2440. var $String = String;
  2441. var $TypeError = TypeError;
  2442. aPossiblePrototype = function (argument) {
  2443. if (isPossiblePrototype(argument)) return argument;
  2444. throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
  2445. };
  2446. return aPossiblePrototype;
  2447. }
  2448. var objectSetPrototypeOf;
  2449. var hasRequiredObjectSetPrototypeOf;
  2450. function requireObjectSetPrototypeOf () {
  2451. if (hasRequiredObjectSetPrototypeOf) return objectSetPrototypeOf;
  2452. hasRequiredObjectSetPrototypeOf = 1;
  2453. /* eslint-disable no-proto -- safe */
  2454. var uncurryThisAccessor = requireFunctionUncurryThisAccessor();
  2455. var isObject = requireIsObject();
  2456. var requireObjectCoercible = requireRequireObjectCoercible();
  2457. var aPossiblePrototype = requireAPossiblePrototype();
  2458. // `Object.setPrototypeOf` method
  2459. // https://tc39.es/ecma262/#sec-object.setprototypeof
  2460. // Works with __proto__ only. Old v8 can't work with null proto objects.
  2461. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  2462. objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  2463. var CORRECT_SETTER = false;
  2464. var test = {};
  2465. var setter;
  2466. try {
  2467. setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
  2468. setter(test, []);
  2469. CORRECT_SETTER = test instanceof Array;
  2470. } catch (error) { /* empty */ }
  2471. return function setPrototypeOf(O, proto) {
  2472. requireObjectCoercible(O);
  2473. aPossiblePrototype(proto);
  2474. if (!isObject(O)) return O;
  2475. if (CORRECT_SETTER) setter(O, proto);
  2476. else O.__proto__ = proto;
  2477. return O;
  2478. };
  2479. }() : undefined);
  2480. return objectSetPrototypeOf;
  2481. }
  2482. var setToStringTag;
  2483. var hasRequiredSetToStringTag;
  2484. function requireSetToStringTag () {
  2485. if (hasRequiredSetToStringTag) return setToStringTag;
  2486. hasRequiredSetToStringTag = 1;
  2487. var defineProperty = requireObjectDefineProperty().f;
  2488. var hasOwn = requireHasOwnProperty();
  2489. var wellKnownSymbol = requireWellKnownSymbol();
  2490. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  2491. setToStringTag = function (target, TAG, STATIC) {
  2492. if (target && !STATIC) target = target.prototype;
  2493. if (target && !hasOwn(target, TO_STRING_TAG)) {
  2494. defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
  2495. }
  2496. };
  2497. return setToStringTag;
  2498. }
  2499. var defineBuiltInAccessor;
  2500. var hasRequiredDefineBuiltInAccessor;
  2501. function requireDefineBuiltInAccessor () {
  2502. if (hasRequiredDefineBuiltInAccessor) return defineBuiltInAccessor;
  2503. hasRequiredDefineBuiltInAccessor = 1;
  2504. var makeBuiltIn = requireMakeBuiltIn();
  2505. var defineProperty = requireObjectDefineProperty();
  2506. defineBuiltInAccessor = function (target, name, descriptor) {
  2507. if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
  2508. if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
  2509. return defineProperty.f(target, name, descriptor);
  2510. };
  2511. return defineBuiltInAccessor;
  2512. }
  2513. var setSpecies;
  2514. var hasRequiredSetSpecies;
  2515. function requireSetSpecies () {
  2516. if (hasRequiredSetSpecies) return setSpecies;
  2517. hasRequiredSetSpecies = 1;
  2518. var getBuiltIn = requireGetBuiltIn();
  2519. var defineBuiltInAccessor = requireDefineBuiltInAccessor();
  2520. var wellKnownSymbol = requireWellKnownSymbol();
  2521. var DESCRIPTORS = requireDescriptors();
  2522. var SPECIES = wellKnownSymbol('species');
  2523. setSpecies = function (CONSTRUCTOR_NAME) {
  2524. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  2525. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  2526. defineBuiltInAccessor(Constructor, SPECIES, {
  2527. configurable: true,
  2528. get: function () { return this; }
  2529. });
  2530. }
  2531. };
  2532. return setSpecies;
  2533. }
  2534. var anInstance;
  2535. var hasRequiredAnInstance;
  2536. function requireAnInstance () {
  2537. if (hasRequiredAnInstance) return anInstance;
  2538. hasRequiredAnInstance = 1;
  2539. var isPrototypeOf = requireObjectIsPrototypeOf();
  2540. var $TypeError = TypeError;
  2541. anInstance = function (it, Prototype) {
  2542. if (isPrototypeOf(Prototype, it)) return it;
  2543. throw new $TypeError('Incorrect invocation');
  2544. };
  2545. return anInstance;
  2546. }
  2547. var aConstructor;
  2548. var hasRequiredAConstructor;
  2549. function requireAConstructor () {
  2550. if (hasRequiredAConstructor) return aConstructor;
  2551. hasRequiredAConstructor = 1;
  2552. var isConstructor = requireIsConstructor();
  2553. var tryToString = requireTryToString();
  2554. var $TypeError = TypeError;
  2555. // `Assert: IsConstructor(argument) is true`
  2556. aConstructor = function (argument) {
  2557. if (isConstructor(argument)) return argument;
  2558. throw new $TypeError(tryToString(argument) + ' is not a constructor');
  2559. };
  2560. return aConstructor;
  2561. }
  2562. var speciesConstructor;
  2563. var hasRequiredSpeciesConstructor;
  2564. function requireSpeciesConstructor () {
  2565. if (hasRequiredSpeciesConstructor) return speciesConstructor;
  2566. hasRequiredSpeciesConstructor = 1;
  2567. var anObject = requireAnObject();
  2568. var aConstructor = requireAConstructor();
  2569. var isNullOrUndefined = requireIsNullOrUndefined();
  2570. var wellKnownSymbol = requireWellKnownSymbol();
  2571. var SPECIES = wellKnownSymbol('species');
  2572. // `SpeciesConstructor` abstract operation
  2573. // https://tc39.es/ecma262/#sec-speciesconstructor
  2574. speciesConstructor = function (O, defaultConstructor) {
  2575. var C = anObject(O).constructor;
  2576. var S;
  2577. return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S);
  2578. };
  2579. return speciesConstructor;
  2580. }
  2581. var functionApply;
  2582. var hasRequiredFunctionApply;
  2583. function requireFunctionApply () {
  2584. if (hasRequiredFunctionApply) return functionApply;
  2585. hasRequiredFunctionApply = 1;
  2586. var NATIVE_BIND = requireFunctionBindNative();
  2587. var FunctionPrototype = Function.prototype;
  2588. var apply = FunctionPrototype.apply;
  2589. var call = FunctionPrototype.call;
  2590. // eslint-disable-next-line es/no-reflect -- safe
  2591. functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  2592. return call.apply(apply, arguments);
  2593. });
  2594. return functionApply;
  2595. }
  2596. var arraySlice;
  2597. var hasRequiredArraySlice;
  2598. function requireArraySlice () {
  2599. if (hasRequiredArraySlice) return arraySlice;
  2600. hasRequiredArraySlice = 1;
  2601. var uncurryThis = requireFunctionUncurryThis();
  2602. arraySlice = uncurryThis([].slice);
  2603. return arraySlice;
  2604. }
  2605. var validateArgumentsLength;
  2606. var hasRequiredValidateArgumentsLength;
  2607. function requireValidateArgumentsLength () {
  2608. if (hasRequiredValidateArgumentsLength) return validateArgumentsLength;
  2609. hasRequiredValidateArgumentsLength = 1;
  2610. var $TypeError = TypeError;
  2611. validateArgumentsLength = function (passed, required) {
  2612. if (passed < required) throw new $TypeError('Not enough arguments');
  2613. return passed;
  2614. };
  2615. return validateArgumentsLength;
  2616. }
  2617. var environmentIsIos;
  2618. var hasRequiredEnvironmentIsIos;
  2619. function requireEnvironmentIsIos () {
  2620. if (hasRequiredEnvironmentIsIos) return environmentIsIos;
  2621. hasRequiredEnvironmentIsIos = 1;
  2622. var userAgent = requireEnvironmentUserAgent();
  2623. // eslint-disable-next-line redos/no-vulnerable -- safe
  2624. environmentIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
  2625. return environmentIsIos;
  2626. }
  2627. var task;
  2628. var hasRequiredTask;
  2629. function requireTask () {
  2630. if (hasRequiredTask) return task;
  2631. hasRequiredTask = 1;
  2632. var globalThis = requireGlobalThis();
  2633. var apply = requireFunctionApply();
  2634. var bind = requireFunctionBindContext();
  2635. var isCallable = requireIsCallable();
  2636. var hasOwn = requireHasOwnProperty();
  2637. var fails = requireFails();
  2638. var html = requireHtml();
  2639. var arraySlice = requireArraySlice();
  2640. var createElement = requireDocumentCreateElement();
  2641. var validateArgumentsLength = requireValidateArgumentsLength();
  2642. var IS_IOS = requireEnvironmentIsIos();
  2643. var IS_NODE = requireEnvironmentIsNode();
  2644. var set = globalThis.setImmediate;
  2645. var clear = globalThis.clearImmediate;
  2646. var process = globalThis.process;
  2647. var Dispatch = globalThis.Dispatch;
  2648. var Function = globalThis.Function;
  2649. var MessageChannel = globalThis.MessageChannel;
  2650. var String = globalThis.String;
  2651. var counter = 0;
  2652. var queue = {};
  2653. var ONREADYSTATECHANGE = 'onreadystatechange';
  2654. var $location, defer, channel, port;
  2655. fails(function () {
  2656. // Deno throws a ReferenceError on `location` access without `--location` flag
  2657. $location = globalThis.location;
  2658. });
  2659. var run = function (id) {
  2660. if (hasOwn(queue, id)) {
  2661. var fn = queue[id];
  2662. delete queue[id];
  2663. fn();
  2664. }
  2665. };
  2666. var runner = function (id) {
  2667. return function () {
  2668. run(id);
  2669. };
  2670. };
  2671. var eventListener = function (event) {
  2672. run(event.data);
  2673. };
  2674. var globalPostMessageDefer = function (id) {
  2675. // old engines have not location.origin
  2676. globalThis.postMessage(String(id), $location.protocol + '//' + $location.host);
  2677. };
  2678. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  2679. if (!set || !clear) {
  2680. set = function setImmediate(handler) {
  2681. validateArgumentsLength(arguments.length, 1);
  2682. var fn = isCallable(handler) ? handler : Function(handler);
  2683. var args = arraySlice(arguments, 1);
  2684. queue[++counter] = function () {
  2685. apply(fn, undefined, args);
  2686. };
  2687. defer(counter);
  2688. return counter;
  2689. };
  2690. clear = function clearImmediate(id) {
  2691. delete queue[id];
  2692. };
  2693. // Node.js 0.8-
  2694. if (IS_NODE) {
  2695. defer = function (id) {
  2696. process.nextTick(runner(id));
  2697. };
  2698. // Sphere (JS game engine) Dispatch API
  2699. } else if (Dispatch && Dispatch.now) {
  2700. defer = function (id) {
  2701. Dispatch.now(runner(id));
  2702. };
  2703. // Browsers with MessageChannel, includes WebWorkers
  2704. // except iOS - https://github.com/zloirock/core-js/issues/624
  2705. } else if (MessageChannel && !IS_IOS) {
  2706. channel = new MessageChannel();
  2707. port = channel.port2;
  2708. channel.port1.onmessage = eventListener;
  2709. defer = bind(port.postMessage, port);
  2710. // Browsers with postMessage, skip WebWorkers
  2711. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  2712. } else if (
  2713. globalThis.addEventListener &&
  2714. isCallable(globalThis.postMessage) &&
  2715. !globalThis.importScripts &&
  2716. $location && $location.protocol !== 'file:' &&
  2717. !fails(globalPostMessageDefer)
  2718. ) {
  2719. defer = globalPostMessageDefer;
  2720. globalThis.addEventListener('message', eventListener, false);
  2721. // IE8-
  2722. } else if (ONREADYSTATECHANGE in createElement('script')) {
  2723. defer = function (id) {
  2724. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  2725. html.removeChild(this);
  2726. run(id);
  2727. };
  2728. };
  2729. // Rest old browsers
  2730. } else {
  2731. defer = function (id) {
  2732. setTimeout(runner(id), 0);
  2733. };
  2734. }
  2735. }
  2736. task = {
  2737. set: set,
  2738. clear: clear
  2739. };
  2740. return task;
  2741. }
  2742. var safeGetBuiltIn;
  2743. var hasRequiredSafeGetBuiltIn;
  2744. function requireSafeGetBuiltIn () {
  2745. if (hasRequiredSafeGetBuiltIn) return safeGetBuiltIn;
  2746. hasRequiredSafeGetBuiltIn = 1;
  2747. var globalThis = requireGlobalThis();
  2748. var DESCRIPTORS = requireDescriptors();
  2749. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  2750. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2751. // Avoid NodeJS experimental warning
  2752. safeGetBuiltIn = function (name) {
  2753. if (!DESCRIPTORS) return globalThis[name];
  2754. var descriptor = getOwnPropertyDescriptor(globalThis, name);
  2755. return descriptor && descriptor.value;
  2756. };
  2757. return safeGetBuiltIn;
  2758. }
  2759. var queue;
  2760. var hasRequiredQueue;
  2761. function requireQueue () {
  2762. if (hasRequiredQueue) return queue;
  2763. hasRequiredQueue = 1;
  2764. var Queue = function () {
  2765. this.head = null;
  2766. this.tail = null;
  2767. };
  2768. Queue.prototype = {
  2769. add: function (item) {
  2770. var entry = { item: item, next: null };
  2771. var tail = this.tail;
  2772. if (tail) tail.next = entry;
  2773. else this.head = entry;
  2774. this.tail = entry;
  2775. },
  2776. get: function () {
  2777. var entry = this.head;
  2778. if (entry) {
  2779. var next = this.head = entry.next;
  2780. if (next === null) this.tail = null;
  2781. return entry.item;
  2782. }
  2783. }
  2784. };
  2785. queue = Queue;
  2786. return queue;
  2787. }
  2788. var environmentIsIosPebble;
  2789. var hasRequiredEnvironmentIsIosPebble;
  2790. function requireEnvironmentIsIosPebble () {
  2791. if (hasRequiredEnvironmentIsIosPebble) return environmentIsIosPebble;
  2792. hasRequiredEnvironmentIsIosPebble = 1;
  2793. var userAgent = requireEnvironmentUserAgent();
  2794. environmentIsIosPebble = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined';
  2795. return environmentIsIosPebble;
  2796. }
  2797. var environmentIsWebosWebkit;
  2798. var hasRequiredEnvironmentIsWebosWebkit;
  2799. function requireEnvironmentIsWebosWebkit () {
  2800. if (hasRequiredEnvironmentIsWebosWebkit) return environmentIsWebosWebkit;
  2801. hasRequiredEnvironmentIsWebosWebkit = 1;
  2802. var userAgent = requireEnvironmentUserAgent();
  2803. environmentIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
  2804. return environmentIsWebosWebkit;
  2805. }
  2806. var microtask_1;
  2807. var hasRequiredMicrotask;
  2808. function requireMicrotask () {
  2809. if (hasRequiredMicrotask) return microtask_1;
  2810. hasRequiredMicrotask = 1;
  2811. var globalThis = requireGlobalThis();
  2812. var safeGetBuiltIn = requireSafeGetBuiltIn();
  2813. var bind = requireFunctionBindContext();
  2814. var macrotask = requireTask().set;
  2815. var Queue = requireQueue();
  2816. var IS_IOS = requireEnvironmentIsIos();
  2817. var IS_IOS_PEBBLE = requireEnvironmentIsIosPebble();
  2818. var IS_WEBOS_WEBKIT = requireEnvironmentIsWebosWebkit();
  2819. var IS_NODE = requireEnvironmentIsNode();
  2820. var MutationObserver = globalThis.MutationObserver || globalThis.WebKitMutationObserver;
  2821. var document = globalThis.document;
  2822. var process = globalThis.process;
  2823. var Promise = globalThis.Promise;
  2824. var microtask = safeGetBuiltIn('queueMicrotask');
  2825. var notify, toggle, node, promise, then;
  2826. // modern engines have queueMicrotask method
  2827. if (!microtask) {
  2828. var queue = new Queue();
  2829. var flush = function () {
  2830. var parent, fn;
  2831. if (IS_NODE && (parent = process.domain)) parent.exit();
  2832. while (fn = queue.get()) try {
  2833. fn();
  2834. } catch (error) {
  2835. if (queue.head) notify();
  2836. throw error;
  2837. }
  2838. if (parent) parent.enter();
  2839. };
  2840. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  2841. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  2842. if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
  2843. toggle = true;
  2844. node = document.createTextNode('');
  2845. new MutationObserver(flush).observe(node, { characterData: true });
  2846. notify = function () {
  2847. node.data = toggle = !toggle;
  2848. };
  2849. // environments with maybe non-completely correct, but existent Promise
  2850. } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {
  2851. // Promise.resolve without an argument throws an error in LG WebOS 2
  2852. promise = Promise.resolve(undefined);
  2853. // workaround of WebKit ~ iOS Safari 10.1 bug
  2854. promise.constructor = Promise;
  2855. then = bind(promise.then, promise);
  2856. notify = function () {
  2857. then(flush);
  2858. };
  2859. // Node.js without promises
  2860. } else if (IS_NODE) {
  2861. notify = function () {
  2862. process.nextTick(flush);
  2863. };
  2864. // for other environments - macrotask based on:
  2865. // - setImmediate
  2866. // - MessageChannel
  2867. // - window.postMessage
  2868. // - onreadystatechange
  2869. // - setTimeout
  2870. } else {
  2871. // `webpack` dev server bug on IE global methods - use bind(fn, global)
  2872. macrotask = bind(macrotask, globalThis);
  2873. notify = function () {
  2874. macrotask(flush);
  2875. };
  2876. }
  2877. microtask = function (fn) {
  2878. if (!queue.head) notify();
  2879. queue.add(fn);
  2880. };
  2881. }
  2882. microtask_1 = microtask;
  2883. return microtask_1;
  2884. }
  2885. var hostReportErrors;
  2886. var hasRequiredHostReportErrors;
  2887. function requireHostReportErrors () {
  2888. if (hasRequiredHostReportErrors) return hostReportErrors;
  2889. hasRequiredHostReportErrors = 1;
  2890. hostReportErrors = function (a, b) {
  2891. try {
  2892. // eslint-disable-next-line no-console -- safe
  2893. arguments.length === 1 ? console.error(a) : console.error(a, b);
  2894. } catch (error) { /* empty */ }
  2895. };
  2896. return hostReportErrors;
  2897. }
  2898. var perform;
  2899. var hasRequiredPerform;
  2900. function requirePerform () {
  2901. if (hasRequiredPerform) return perform;
  2902. hasRequiredPerform = 1;
  2903. perform = function (exec) {
  2904. try {
  2905. return { error: false, value: exec() };
  2906. } catch (error) {
  2907. return { error: true, value: error };
  2908. }
  2909. };
  2910. return perform;
  2911. }
  2912. var promiseNativeConstructor;
  2913. var hasRequiredPromiseNativeConstructor;
  2914. function requirePromiseNativeConstructor () {
  2915. if (hasRequiredPromiseNativeConstructor) return promiseNativeConstructor;
  2916. hasRequiredPromiseNativeConstructor = 1;
  2917. var globalThis = requireGlobalThis();
  2918. promiseNativeConstructor = globalThis.Promise;
  2919. return promiseNativeConstructor;
  2920. }
  2921. var promiseConstructorDetection;
  2922. var hasRequiredPromiseConstructorDetection;
  2923. function requirePromiseConstructorDetection () {
  2924. if (hasRequiredPromiseConstructorDetection) return promiseConstructorDetection;
  2925. hasRequiredPromiseConstructorDetection = 1;
  2926. var globalThis = requireGlobalThis();
  2927. var NativePromiseConstructor = requirePromiseNativeConstructor();
  2928. var isCallable = requireIsCallable();
  2929. var isForced = requireIsForced();
  2930. var inspectSource = requireInspectSource();
  2931. var wellKnownSymbol = requireWellKnownSymbol();
  2932. var ENVIRONMENT = requireEnvironment();
  2933. var IS_PURE = requireIsPure();
  2934. var V8_VERSION = requireEnvironmentV8Version();
  2935. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  2936. var SPECIES = wellKnownSymbol('species');
  2937. var SUBCLASSING = false;
  2938. var NATIVE_PROMISE_REJECTION_EVENT = isCallable(globalThis.PromiseRejectionEvent);
  2939. var FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {
  2940. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);
  2941. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);
  2942. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  2943. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  2944. // We can't detect it synchronously, so just check versions
  2945. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  2946. // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution
  2947. if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;
  2948. // We can't use @@species feature detection in V8 since it causes
  2949. // deoptimization and performance degradation
  2950. // https://github.com/zloirock/core-js/issues/679
  2951. if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
  2952. // Detect correctness of subclassing with @@species support
  2953. var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });
  2954. var FakePromise = function (exec) {
  2955. exec(function () { /* empty */ }, function () { /* empty */ });
  2956. };
  2957. var constructor = promise.constructor = {};
  2958. constructor[SPECIES] = FakePromise;
  2959. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  2960. if (!SUBCLASSING) return true;
  2961. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  2962. } return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT;
  2963. });
  2964. promiseConstructorDetection = {
  2965. CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,
  2966. REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,
  2967. SUBCLASSING: SUBCLASSING
  2968. };
  2969. return promiseConstructorDetection;
  2970. }
  2971. var newPromiseCapability = {};
  2972. var hasRequiredNewPromiseCapability;
  2973. function requireNewPromiseCapability () {
  2974. if (hasRequiredNewPromiseCapability) return newPromiseCapability;
  2975. hasRequiredNewPromiseCapability = 1;
  2976. var aCallable = requireACallable();
  2977. var $TypeError = TypeError;
  2978. var PromiseCapability = function (C) {
  2979. var resolve, reject;
  2980. this.promise = new C(function ($$resolve, $$reject) {
  2981. if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');
  2982. resolve = $$resolve;
  2983. reject = $$reject;
  2984. });
  2985. this.resolve = aCallable(resolve);
  2986. this.reject = aCallable(reject);
  2987. };
  2988. // `NewPromiseCapability` abstract operation
  2989. // https://tc39.es/ecma262/#sec-newpromisecapability
  2990. newPromiseCapability.f = function (C) {
  2991. return new PromiseCapability(C);
  2992. };
  2993. return newPromiseCapability;
  2994. }
  2995. var hasRequiredEs_promise_constructor;
  2996. function requireEs_promise_constructor () {
  2997. if (hasRequiredEs_promise_constructor) return es_promise_constructor;
  2998. hasRequiredEs_promise_constructor = 1;
  2999. var $ = require_export();
  3000. var IS_PURE = requireIsPure();
  3001. var IS_NODE = requireEnvironmentIsNode();
  3002. var globalThis = requireGlobalThis();
  3003. var call = requireFunctionCall();
  3004. var defineBuiltIn = requireDefineBuiltIn();
  3005. var setPrototypeOf = requireObjectSetPrototypeOf();
  3006. var setToStringTag = requireSetToStringTag();
  3007. var setSpecies = requireSetSpecies();
  3008. var aCallable = requireACallable();
  3009. var isCallable = requireIsCallable();
  3010. var isObject = requireIsObject();
  3011. var anInstance = requireAnInstance();
  3012. var speciesConstructor = requireSpeciesConstructor();
  3013. var task = requireTask().set;
  3014. var microtask = requireMicrotask();
  3015. var hostReportErrors = requireHostReportErrors();
  3016. var perform = requirePerform();
  3017. var Queue = requireQueue();
  3018. var InternalStateModule = requireInternalState();
  3019. var NativePromiseConstructor = requirePromiseNativeConstructor();
  3020. var PromiseConstructorDetection = requirePromiseConstructorDetection();
  3021. var newPromiseCapabilityModule = requireNewPromiseCapability();
  3022. var PROMISE = 'Promise';
  3023. var FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;
  3024. var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
  3025. var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
  3026. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  3027. var setInternalState = InternalStateModule.set;
  3028. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  3029. var PromiseConstructor = NativePromiseConstructor;
  3030. var PromisePrototype = NativePromisePrototype;
  3031. var TypeError = globalThis.TypeError;
  3032. var document = globalThis.document;
  3033. var process = globalThis.process;
  3034. var newPromiseCapability = newPromiseCapabilityModule.f;
  3035. var newGenericPromiseCapability = newPromiseCapability;
  3036. var DISPATCH_EVENT = !!(document && document.createEvent && globalThis.dispatchEvent);
  3037. var UNHANDLED_REJECTION = 'unhandledrejection';
  3038. var REJECTION_HANDLED = 'rejectionhandled';
  3039. var PENDING = 0;
  3040. var FULFILLED = 1;
  3041. var REJECTED = 2;
  3042. var HANDLED = 1;
  3043. var UNHANDLED = 2;
  3044. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  3045. // helpers
  3046. var isThenable = function (it) {
  3047. var then;
  3048. return isObject(it) && isCallable(then = it.then) ? then : false;
  3049. };
  3050. var callReaction = function (reaction, state) {
  3051. var value = state.value;
  3052. var ok = state.state === FULFILLED;
  3053. var handler = ok ? reaction.ok : reaction.fail;
  3054. var resolve = reaction.resolve;
  3055. var reject = reaction.reject;
  3056. var domain = reaction.domain;
  3057. var result, then, exited;
  3058. try {
  3059. if (handler) {
  3060. if (!ok) {
  3061. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  3062. state.rejection = HANDLED;
  3063. }
  3064. if (handler === true) result = value;
  3065. else {
  3066. if (domain) domain.enter();
  3067. result = handler(value); // can throw
  3068. if (domain) {
  3069. domain.exit();
  3070. exited = true;
  3071. }
  3072. }
  3073. if (result === reaction.promise) {
  3074. reject(new TypeError('Promise-chain cycle'));
  3075. } else if (then = isThenable(result)) {
  3076. call(then, result, resolve, reject);
  3077. } else resolve(result);
  3078. } else reject(value);
  3079. } catch (error) {
  3080. if (domain && !exited) domain.exit();
  3081. reject(error);
  3082. }
  3083. };
  3084. var notify = function (state, isReject) {
  3085. if (state.notified) return;
  3086. state.notified = true;
  3087. microtask(function () {
  3088. var reactions = state.reactions;
  3089. var reaction;
  3090. while (reaction = reactions.get()) {
  3091. callReaction(reaction, state);
  3092. }
  3093. state.notified = false;
  3094. if (isReject && !state.rejection) onUnhandled(state);
  3095. });
  3096. };
  3097. var dispatchEvent = function (name, promise, reason) {
  3098. var event, handler;
  3099. if (DISPATCH_EVENT) {
  3100. event = document.createEvent('Event');
  3101. event.promise = promise;
  3102. event.reason = reason;
  3103. event.initEvent(name, false, true);
  3104. globalThis.dispatchEvent(event);
  3105. } else event = { promise: promise, reason: reason };
  3106. if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis['on' + name])) handler(event);
  3107. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  3108. };
  3109. var onUnhandled = function (state) {
  3110. call(task, globalThis, function () {
  3111. var promise = state.facade;
  3112. var value = state.value;
  3113. var IS_UNHANDLED = isUnhandled(state);
  3114. var result;
  3115. if (IS_UNHANDLED) {
  3116. result = perform(function () {
  3117. if (IS_NODE) {
  3118. process.emit('unhandledRejection', value, promise);
  3119. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  3120. });
  3121. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  3122. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  3123. if (result.error) throw result.value;
  3124. }
  3125. });
  3126. };
  3127. var isUnhandled = function (state) {
  3128. return state.rejection !== HANDLED && !state.parent;
  3129. };
  3130. var onHandleUnhandled = function (state) {
  3131. call(task, globalThis, function () {
  3132. var promise = state.facade;
  3133. if (IS_NODE) {
  3134. process.emit('rejectionHandled', promise);
  3135. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  3136. });
  3137. };
  3138. var bind = function (fn, state, unwrap) {
  3139. return function (value) {
  3140. fn(state, value, unwrap);
  3141. };
  3142. };
  3143. var internalReject = function (state, value, unwrap) {
  3144. if (state.done) return;
  3145. state.done = true;
  3146. if (unwrap) state = unwrap;
  3147. state.value = value;
  3148. state.state = REJECTED;
  3149. notify(state, true);
  3150. };
  3151. var internalResolve = function (state, value, unwrap) {
  3152. if (state.done) return;
  3153. state.done = true;
  3154. if (unwrap) state = unwrap;
  3155. try {
  3156. if (state.facade === value) throw new TypeError("Promise can't be resolved itself");
  3157. var then = isThenable(value);
  3158. if (then) {
  3159. microtask(function () {
  3160. var wrapper = { done: false };
  3161. try {
  3162. call(then, value,
  3163. bind(internalResolve, wrapper, state),
  3164. bind(internalReject, wrapper, state)
  3165. );
  3166. } catch (error) {
  3167. internalReject(wrapper, error, state);
  3168. }
  3169. });
  3170. } else {
  3171. state.value = value;
  3172. state.state = FULFILLED;
  3173. notify(state, false);
  3174. }
  3175. } catch (error) {
  3176. internalReject({ done: false }, error, state);
  3177. }
  3178. };
  3179. // constructor polyfill
  3180. if (FORCED_PROMISE_CONSTRUCTOR) {
  3181. // 25.4.3.1 Promise(executor)
  3182. PromiseConstructor = function Promise(executor) {
  3183. anInstance(this, PromisePrototype);
  3184. aCallable(executor);
  3185. call(Internal, this);
  3186. var state = getInternalPromiseState(this);
  3187. try {
  3188. executor(bind(internalResolve, state), bind(internalReject, state));
  3189. } catch (error) {
  3190. internalReject(state, error);
  3191. }
  3192. };
  3193. PromisePrototype = PromiseConstructor.prototype;
  3194. // eslint-disable-next-line no-unused-vars -- required for `.length`
  3195. Internal = function Promise(executor) {
  3196. setInternalState(this, {
  3197. type: PROMISE,
  3198. done: false,
  3199. notified: false,
  3200. parent: false,
  3201. reactions: new Queue(),
  3202. rejection: false,
  3203. state: PENDING,
  3204. value: null
  3205. });
  3206. };
  3207. // `Promise.prototype.then` method
  3208. // https://tc39.es/ecma262/#sec-promise.prototype.then
  3209. Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
  3210. var state = getInternalPromiseState(this);
  3211. var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
  3212. state.parent = true;
  3213. reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
  3214. reaction.fail = isCallable(onRejected) && onRejected;
  3215. reaction.domain = IS_NODE ? process.domain : undefined;
  3216. if (state.state === PENDING) state.reactions.add(reaction);
  3217. else microtask(function () {
  3218. callReaction(reaction, state);
  3219. });
  3220. return reaction.promise;
  3221. });
  3222. OwnPromiseCapability = function () {
  3223. var promise = new Internal();
  3224. var state = getInternalPromiseState(promise);
  3225. this.promise = promise;
  3226. this.resolve = bind(internalResolve, state);
  3227. this.reject = bind(internalReject, state);
  3228. };
  3229. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  3230. return C === PromiseConstructor || C === PromiseWrapper
  3231. ? new OwnPromiseCapability(C)
  3232. : newGenericPromiseCapability(C);
  3233. };
  3234. if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
  3235. nativeThen = NativePromisePrototype.then;
  3236. if (!NATIVE_PROMISE_SUBCLASSING) {
  3237. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  3238. defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
  3239. var that = this;
  3240. return new PromiseConstructor(function (resolve, reject) {
  3241. call(nativeThen, that, resolve, reject);
  3242. }).then(onFulfilled, onRejected);
  3243. // https://github.com/zloirock/core-js/issues/640
  3244. }, { unsafe: true });
  3245. }
  3246. // make `.constructor === Promise` work for native promise-based APIs
  3247. try {
  3248. delete NativePromisePrototype.constructor;
  3249. } catch (error) { /* empty */ }
  3250. // make `instanceof Promise` work for native promise-based APIs
  3251. if (setPrototypeOf) {
  3252. setPrototypeOf(NativePromisePrototype, PromisePrototype);
  3253. }
  3254. }
  3255. }
  3256. $({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  3257. Promise: PromiseConstructor
  3258. });
  3259. setToStringTag(PromiseConstructor, PROMISE, false, true);
  3260. setSpecies(PROMISE);
  3261. return es_promise_constructor;
  3262. }
  3263. var es_promise_all = {};
  3264. var iterators;
  3265. var hasRequiredIterators;
  3266. function requireIterators () {
  3267. if (hasRequiredIterators) return iterators;
  3268. hasRequiredIterators = 1;
  3269. iterators = {};
  3270. return iterators;
  3271. }
  3272. var isArrayIteratorMethod;
  3273. var hasRequiredIsArrayIteratorMethod;
  3274. function requireIsArrayIteratorMethod () {
  3275. if (hasRequiredIsArrayIteratorMethod) return isArrayIteratorMethod;
  3276. hasRequiredIsArrayIteratorMethod = 1;
  3277. var wellKnownSymbol = requireWellKnownSymbol();
  3278. var Iterators = requireIterators();
  3279. var ITERATOR = wellKnownSymbol('iterator');
  3280. var ArrayPrototype = Array.prototype;
  3281. // check on default Array iterator
  3282. isArrayIteratorMethod = function (it) {
  3283. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  3284. };
  3285. return isArrayIteratorMethod;
  3286. }
  3287. var getIteratorMethod;
  3288. var hasRequiredGetIteratorMethod;
  3289. function requireGetIteratorMethod () {
  3290. if (hasRequiredGetIteratorMethod) return getIteratorMethod;
  3291. hasRequiredGetIteratorMethod = 1;
  3292. var classof = requireClassof();
  3293. var getMethod = requireGetMethod();
  3294. var isNullOrUndefined = requireIsNullOrUndefined();
  3295. var Iterators = requireIterators();
  3296. var wellKnownSymbol = requireWellKnownSymbol();
  3297. var ITERATOR = wellKnownSymbol('iterator');
  3298. getIteratorMethod = function (it) {
  3299. if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
  3300. || getMethod(it, '@@iterator')
  3301. || Iterators[classof(it)];
  3302. };
  3303. return getIteratorMethod;
  3304. }
  3305. var getIterator;
  3306. var hasRequiredGetIterator;
  3307. function requireGetIterator () {
  3308. if (hasRequiredGetIterator) return getIterator;
  3309. hasRequiredGetIterator = 1;
  3310. var call = requireFunctionCall();
  3311. var aCallable = requireACallable();
  3312. var anObject = requireAnObject();
  3313. var tryToString = requireTryToString();
  3314. var getIteratorMethod = requireGetIteratorMethod();
  3315. var $TypeError = TypeError;
  3316. getIterator = function (argument, usingIterator) {
  3317. var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
  3318. if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
  3319. throw new $TypeError(tryToString(argument) + ' is not iterable');
  3320. };
  3321. return getIterator;
  3322. }
  3323. var iteratorClose;
  3324. var hasRequiredIteratorClose;
  3325. function requireIteratorClose () {
  3326. if (hasRequiredIteratorClose) return iteratorClose;
  3327. hasRequiredIteratorClose = 1;
  3328. var call = requireFunctionCall();
  3329. var anObject = requireAnObject();
  3330. var getMethod = requireGetMethod();
  3331. iteratorClose = function (iterator, kind, value) {
  3332. var innerResult, innerError;
  3333. anObject(iterator);
  3334. try {
  3335. innerResult = getMethod(iterator, 'return');
  3336. if (!innerResult) {
  3337. if (kind === 'throw') throw value;
  3338. return value;
  3339. }
  3340. innerResult = call(innerResult, iterator);
  3341. } catch (error) {
  3342. innerError = true;
  3343. innerResult = error;
  3344. }
  3345. if (kind === 'throw') throw value;
  3346. if (innerError) throw innerResult;
  3347. anObject(innerResult);
  3348. return value;
  3349. };
  3350. return iteratorClose;
  3351. }
  3352. var iterate;
  3353. var hasRequiredIterate;
  3354. function requireIterate () {
  3355. if (hasRequiredIterate) return iterate;
  3356. hasRequiredIterate = 1;
  3357. var bind = requireFunctionBindContext();
  3358. var call = requireFunctionCall();
  3359. var anObject = requireAnObject();
  3360. var tryToString = requireTryToString();
  3361. var isArrayIteratorMethod = requireIsArrayIteratorMethod();
  3362. var lengthOfArrayLike = requireLengthOfArrayLike();
  3363. var isPrototypeOf = requireObjectIsPrototypeOf();
  3364. var getIterator = requireGetIterator();
  3365. var getIteratorMethod = requireGetIteratorMethod();
  3366. var iteratorClose = requireIteratorClose();
  3367. var $TypeError = TypeError;
  3368. var Result = function (stopped, result) {
  3369. this.stopped = stopped;
  3370. this.result = result;
  3371. };
  3372. var ResultPrototype = Result.prototype;
  3373. iterate = function (iterable, unboundFunction, options) {
  3374. var that = options && options.that;
  3375. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  3376. var IS_RECORD = !!(options && options.IS_RECORD);
  3377. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  3378. var INTERRUPTED = !!(options && options.INTERRUPTED);
  3379. var fn = bind(unboundFunction, that);
  3380. var iterator, iterFn, index, length, result, next, step;
  3381. var stop = function (condition) {
  3382. if (iterator) iteratorClose(iterator, 'normal', condition);
  3383. return new Result(true, condition);
  3384. };
  3385. var callFn = function (value) {
  3386. if (AS_ENTRIES) {
  3387. anObject(value);
  3388. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  3389. } return INTERRUPTED ? fn(value, stop) : fn(value);
  3390. };
  3391. if (IS_RECORD) {
  3392. iterator = iterable.iterator;
  3393. } else if (IS_ITERATOR) {
  3394. iterator = iterable;
  3395. } else {
  3396. iterFn = getIteratorMethod(iterable);
  3397. if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
  3398. // optimisation for array iterators
  3399. if (isArrayIteratorMethod(iterFn)) {
  3400. for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
  3401. result = callFn(iterable[index]);
  3402. if (result && isPrototypeOf(ResultPrototype, result)) return result;
  3403. } return new Result(false);
  3404. }
  3405. iterator = getIterator(iterable, iterFn);
  3406. }
  3407. next = IS_RECORD ? iterable.next : iterator.next;
  3408. while (!(step = call(next, iterator)).done) {
  3409. try {
  3410. result = callFn(step.value);
  3411. } catch (error) {
  3412. iteratorClose(iterator, 'throw', error);
  3413. }
  3414. if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
  3415. } return new Result(false);
  3416. };
  3417. return iterate;
  3418. }
  3419. var checkCorrectnessOfIteration;
  3420. var hasRequiredCheckCorrectnessOfIteration;
  3421. function requireCheckCorrectnessOfIteration () {
  3422. if (hasRequiredCheckCorrectnessOfIteration) return checkCorrectnessOfIteration;
  3423. hasRequiredCheckCorrectnessOfIteration = 1;
  3424. var wellKnownSymbol = requireWellKnownSymbol();
  3425. var ITERATOR = wellKnownSymbol('iterator');
  3426. var SAFE_CLOSING = false;
  3427. try {
  3428. var called = 0;
  3429. var iteratorWithReturn = {
  3430. next: function () {
  3431. return { done: !!called++ };
  3432. },
  3433. 'return': function () {
  3434. SAFE_CLOSING = true;
  3435. }
  3436. };
  3437. iteratorWithReturn[ITERATOR] = function () {
  3438. return this;
  3439. };
  3440. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  3441. Array.from(iteratorWithReturn, function () { throw 2; });
  3442. } catch (error) { /* empty */ }
  3443. checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
  3444. try {
  3445. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  3446. } catch (error) { return false; } // workaround of old WebKit + `eval` bug
  3447. var ITERATION_SUPPORT = false;
  3448. try {
  3449. var object = {};
  3450. object[ITERATOR] = function () {
  3451. return {
  3452. next: function () {
  3453. return { done: ITERATION_SUPPORT = true };
  3454. }
  3455. };
  3456. };
  3457. exec(object);
  3458. } catch (error) { /* empty */ }
  3459. return ITERATION_SUPPORT;
  3460. };
  3461. return checkCorrectnessOfIteration;
  3462. }
  3463. var promiseStaticsIncorrectIteration;
  3464. var hasRequiredPromiseStaticsIncorrectIteration;
  3465. function requirePromiseStaticsIncorrectIteration () {
  3466. if (hasRequiredPromiseStaticsIncorrectIteration) return promiseStaticsIncorrectIteration;
  3467. hasRequiredPromiseStaticsIncorrectIteration = 1;
  3468. var NativePromiseConstructor = requirePromiseNativeConstructor();
  3469. var checkCorrectnessOfIteration = requireCheckCorrectnessOfIteration();
  3470. var FORCED_PROMISE_CONSTRUCTOR = requirePromiseConstructorDetection().CONSTRUCTOR;
  3471. promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {
  3472. NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ });
  3473. });
  3474. return promiseStaticsIncorrectIteration;
  3475. }
  3476. var hasRequiredEs_promise_all;
  3477. function requireEs_promise_all () {
  3478. if (hasRequiredEs_promise_all) return es_promise_all;
  3479. hasRequiredEs_promise_all = 1;
  3480. var $ = require_export();
  3481. var call = requireFunctionCall();
  3482. var aCallable = requireACallable();
  3483. var newPromiseCapabilityModule = requireNewPromiseCapability();
  3484. var perform = requirePerform();
  3485. var iterate = requireIterate();
  3486. var PROMISE_STATICS_INCORRECT_ITERATION = requirePromiseStaticsIncorrectIteration();
  3487. // `Promise.all` method
  3488. // https://tc39.es/ecma262/#sec-promise.all
  3489. $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  3490. all: function all(iterable) {
  3491. var C = this;
  3492. var capability = newPromiseCapabilityModule.f(C);
  3493. var resolve = capability.resolve;
  3494. var reject = capability.reject;
  3495. var result = perform(function () {
  3496. var $promiseResolve = aCallable(C.resolve);
  3497. var values = [];
  3498. var counter = 0;
  3499. var remaining = 1;
  3500. iterate(iterable, function (promise) {
  3501. var index = counter++;
  3502. var alreadyCalled = false;
  3503. remaining++;
  3504. call($promiseResolve, C, promise).then(function (value) {
  3505. if (alreadyCalled) return;
  3506. alreadyCalled = true;
  3507. values[index] = value;
  3508. --remaining || resolve(values);
  3509. }, reject);
  3510. });
  3511. --remaining || resolve(values);
  3512. });
  3513. if (result.error) reject(result.value);
  3514. return capability.promise;
  3515. }
  3516. });
  3517. return es_promise_all;
  3518. }
  3519. var es_promise_catch = {};
  3520. var hasRequiredEs_promise_catch;
  3521. function requireEs_promise_catch () {
  3522. if (hasRequiredEs_promise_catch) return es_promise_catch;
  3523. hasRequiredEs_promise_catch = 1;
  3524. var $ = require_export();
  3525. var IS_PURE = requireIsPure();
  3526. var FORCED_PROMISE_CONSTRUCTOR = requirePromiseConstructorDetection().CONSTRUCTOR;
  3527. var NativePromiseConstructor = requirePromiseNativeConstructor();
  3528. var getBuiltIn = requireGetBuiltIn();
  3529. var isCallable = requireIsCallable();
  3530. var defineBuiltIn = requireDefineBuiltIn();
  3531. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  3532. // `Promise.prototype.catch` method
  3533. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  3534. $({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {
  3535. 'catch': function (onRejected) {
  3536. return this.then(undefined, onRejected);
  3537. }
  3538. });
  3539. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  3540. if (!IS_PURE && isCallable(NativePromiseConstructor)) {
  3541. var method = getBuiltIn('Promise').prototype['catch'];
  3542. if (NativePromisePrototype['catch'] !== method) {
  3543. defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
  3544. }
  3545. }
  3546. return es_promise_catch;
  3547. }
  3548. var es_promise_race = {};
  3549. var hasRequiredEs_promise_race;
  3550. function requireEs_promise_race () {
  3551. if (hasRequiredEs_promise_race) return es_promise_race;
  3552. hasRequiredEs_promise_race = 1;
  3553. var $ = require_export();
  3554. var call = requireFunctionCall();
  3555. var aCallable = requireACallable();
  3556. var newPromiseCapabilityModule = requireNewPromiseCapability();
  3557. var perform = requirePerform();
  3558. var iterate = requireIterate();
  3559. var PROMISE_STATICS_INCORRECT_ITERATION = requirePromiseStaticsIncorrectIteration();
  3560. // `Promise.race` method
  3561. // https://tc39.es/ecma262/#sec-promise.race
  3562. $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  3563. race: function race(iterable) {
  3564. var C = this;
  3565. var capability = newPromiseCapabilityModule.f(C);
  3566. var reject = capability.reject;
  3567. var result = perform(function () {
  3568. var $promiseResolve = aCallable(C.resolve);
  3569. iterate(iterable, function (promise) {
  3570. call($promiseResolve, C, promise).then(capability.resolve, reject);
  3571. });
  3572. });
  3573. if (result.error) reject(result.value);
  3574. return capability.promise;
  3575. }
  3576. });
  3577. return es_promise_race;
  3578. }
  3579. var es_promise_reject = {};
  3580. var hasRequiredEs_promise_reject;
  3581. function requireEs_promise_reject () {
  3582. if (hasRequiredEs_promise_reject) return es_promise_reject;
  3583. hasRequiredEs_promise_reject = 1;
  3584. var $ = require_export();
  3585. var newPromiseCapabilityModule = requireNewPromiseCapability();
  3586. var FORCED_PROMISE_CONSTRUCTOR = requirePromiseConstructorDetection().CONSTRUCTOR;
  3587. // `Promise.reject` method
  3588. // https://tc39.es/ecma262/#sec-promise.reject
  3589. $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  3590. reject: function reject(r) {
  3591. var capability = newPromiseCapabilityModule.f(this);
  3592. var capabilityReject = capability.reject;
  3593. capabilityReject(r);
  3594. return capability.promise;
  3595. }
  3596. });
  3597. return es_promise_reject;
  3598. }
  3599. var es_promise_resolve = {};
  3600. var promiseResolve;
  3601. var hasRequiredPromiseResolve;
  3602. function requirePromiseResolve () {
  3603. if (hasRequiredPromiseResolve) return promiseResolve;
  3604. hasRequiredPromiseResolve = 1;
  3605. var anObject = requireAnObject();
  3606. var isObject = requireIsObject();
  3607. var newPromiseCapability = requireNewPromiseCapability();
  3608. promiseResolve = function (C, x) {
  3609. anObject(C);
  3610. if (isObject(x) && x.constructor === C) return x;
  3611. var promiseCapability = newPromiseCapability.f(C);
  3612. var resolve = promiseCapability.resolve;
  3613. resolve(x);
  3614. return promiseCapability.promise;
  3615. };
  3616. return promiseResolve;
  3617. }
  3618. var hasRequiredEs_promise_resolve;
  3619. function requireEs_promise_resolve () {
  3620. if (hasRequiredEs_promise_resolve) return es_promise_resolve;
  3621. hasRequiredEs_promise_resolve = 1;
  3622. var $ = require_export();
  3623. var getBuiltIn = requireGetBuiltIn();
  3624. var IS_PURE = requireIsPure();
  3625. var NativePromiseConstructor = requirePromiseNativeConstructor();
  3626. var FORCED_PROMISE_CONSTRUCTOR = requirePromiseConstructorDetection().CONSTRUCTOR;
  3627. var promiseResolve = requirePromiseResolve();
  3628. var PromiseConstructorWrapper = getBuiltIn('Promise');
  3629. var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
  3630. // `Promise.resolve` method
  3631. // https://tc39.es/ecma262/#sec-promise.resolve
  3632. $({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
  3633. resolve: function resolve(x) {
  3634. return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);
  3635. }
  3636. });
  3637. return es_promise_resolve;
  3638. }
  3639. var hasRequiredEs_promise;
  3640. function requireEs_promise () {
  3641. if (hasRequiredEs_promise) return es_promise;
  3642. hasRequiredEs_promise = 1;
  3643. // TODO: Remove this module from `core-js@4` since it's split to modules listed below
  3644. requireEs_promise_constructor();
  3645. requireEs_promise_all();
  3646. requireEs_promise_catch();
  3647. requireEs_promise_race();
  3648. requireEs_promise_reject();
  3649. requireEs_promise_resolve();
  3650. return es_promise;
  3651. }
  3652. requireEs_promise();
  3653. var es_regexp_exec = {};
  3654. var regexpFlags;
  3655. var hasRequiredRegexpFlags;
  3656. function requireRegexpFlags () {
  3657. if (hasRequiredRegexpFlags) return regexpFlags;
  3658. hasRequiredRegexpFlags = 1;
  3659. var anObject = requireAnObject();
  3660. // `RegExp.prototype.flags` getter implementation
  3661. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  3662. regexpFlags = function () {
  3663. var that = anObject(this);
  3664. var result = '';
  3665. if (that.hasIndices) result += 'd';
  3666. if (that.global) result += 'g';
  3667. if (that.ignoreCase) result += 'i';
  3668. if (that.multiline) result += 'm';
  3669. if (that.dotAll) result += 's';
  3670. if (that.unicode) result += 'u';
  3671. if (that.unicodeSets) result += 'v';
  3672. if (that.sticky) result += 'y';
  3673. return result;
  3674. };
  3675. return regexpFlags;
  3676. }
  3677. var regexpStickyHelpers;
  3678. var hasRequiredRegexpStickyHelpers;
  3679. function requireRegexpStickyHelpers () {
  3680. if (hasRequiredRegexpStickyHelpers) return regexpStickyHelpers;
  3681. hasRequiredRegexpStickyHelpers = 1;
  3682. var fails = requireFails();
  3683. var globalThis = requireGlobalThis();
  3684. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  3685. var $RegExp = globalThis.RegExp;
  3686. var UNSUPPORTED_Y = fails(function () {
  3687. var re = $RegExp('a', 'y');
  3688. re.lastIndex = 2;
  3689. return re.exec('abcd') !== null;
  3690. });
  3691. // UC Browser bug
  3692. // https://github.com/zloirock/core-js/issues/1008
  3693. var MISSED_STICKY = UNSUPPORTED_Y || fails(function () {
  3694. return !$RegExp('a', 'y').sticky;
  3695. });
  3696. var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
  3697. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  3698. var re = $RegExp('^r', 'gy');
  3699. re.lastIndex = 2;
  3700. return re.exec('str') !== null;
  3701. });
  3702. regexpStickyHelpers = {
  3703. BROKEN_CARET: BROKEN_CARET,
  3704. MISSED_STICKY: MISSED_STICKY,
  3705. UNSUPPORTED_Y: UNSUPPORTED_Y
  3706. };
  3707. return regexpStickyHelpers;
  3708. }
  3709. var regexpUnsupportedDotAll;
  3710. var hasRequiredRegexpUnsupportedDotAll;
  3711. function requireRegexpUnsupportedDotAll () {
  3712. if (hasRequiredRegexpUnsupportedDotAll) return regexpUnsupportedDotAll;
  3713. hasRequiredRegexpUnsupportedDotAll = 1;
  3714. var fails = requireFails();
  3715. var globalThis = requireGlobalThis();
  3716. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  3717. var $RegExp = globalThis.RegExp;
  3718. regexpUnsupportedDotAll = fails(function () {
  3719. var re = $RegExp('.', 's');
  3720. return !(re.dotAll && re.test('\n') && re.flags === 's');
  3721. });
  3722. return regexpUnsupportedDotAll;
  3723. }
  3724. var regexpUnsupportedNcg;
  3725. var hasRequiredRegexpUnsupportedNcg;
  3726. function requireRegexpUnsupportedNcg () {
  3727. if (hasRequiredRegexpUnsupportedNcg) return regexpUnsupportedNcg;
  3728. hasRequiredRegexpUnsupportedNcg = 1;
  3729. var fails = requireFails();
  3730. var globalThis = requireGlobalThis();
  3731. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  3732. var $RegExp = globalThis.RegExp;
  3733. regexpUnsupportedNcg = fails(function () {
  3734. var re = $RegExp('(?<a>b)', 'g');
  3735. return re.exec('b').groups.a !== 'b' ||
  3736. 'b'.replace(re, '$<a>c') !== 'bc';
  3737. });
  3738. return regexpUnsupportedNcg;
  3739. }
  3740. var regexpExec;
  3741. var hasRequiredRegexpExec;
  3742. function requireRegexpExec () {
  3743. if (hasRequiredRegexpExec) return regexpExec;
  3744. hasRequiredRegexpExec = 1;
  3745. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  3746. /* eslint-disable regexp/no-useless-quantifier -- testing */
  3747. var call = requireFunctionCall();
  3748. var uncurryThis = requireFunctionUncurryThis();
  3749. var toString = requireToString();
  3750. var regexpFlags = requireRegexpFlags();
  3751. var stickyHelpers = requireRegexpStickyHelpers();
  3752. var shared = requireShared();
  3753. var create = requireObjectCreate();
  3754. var getInternalState = requireInternalState().get;
  3755. var UNSUPPORTED_DOT_ALL = requireRegexpUnsupportedDotAll();
  3756. var UNSUPPORTED_NCG = requireRegexpUnsupportedNcg();
  3757. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  3758. var nativeExec = RegExp.prototype.exec;
  3759. var patchedExec = nativeExec;
  3760. var charAt = uncurryThis(''.charAt);
  3761. var indexOf = uncurryThis(''.indexOf);
  3762. var replace = uncurryThis(''.replace);
  3763. var stringSlice = uncurryThis(''.slice);
  3764. var UPDATES_LAST_INDEX_WRONG = (function () {
  3765. var re1 = /a/;
  3766. var re2 = /b*/g;
  3767. call(nativeExec, re1, 'a');
  3768. call(nativeExec, re2, 'a');
  3769. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  3770. })();
  3771. var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
  3772. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  3773. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  3774. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  3775. if (PATCH) {
  3776. patchedExec = function exec(string) {
  3777. var re = this;
  3778. var state = getInternalState(re);
  3779. var str = toString(string);
  3780. var raw = state.raw;
  3781. var result, reCopy, lastIndex, match, i, object, group;
  3782. if (raw) {
  3783. raw.lastIndex = re.lastIndex;
  3784. result = call(patchedExec, raw, str);
  3785. re.lastIndex = raw.lastIndex;
  3786. return result;
  3787. }
  3788. var groups = state.groups;
  3789. var sticky = UNSUPPORTED_Y && re.sticky;
  3790. var flags = call(regexpFlags, re);
  3791. var source = re.source;
  3792. var charsAdded = 0;
  3793. var strCopy = str;
  3794. if (sticky) {
  3795. flags = replace(flags, 'y', '');
  3796. if (indexOf(flags, 'g') === -1) {
  3797. flags += 'g';
  3798. }
  3799. strCopy = stringSlice(str, re.lastIndex);
  3800. // Support anchored sticky behavior.
  3801. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
  3802. source = '(?: ' + source + ')';
  3803. strCopy = ' ' + strCopy;
  3804. charsAdded++;
  3805. }
  3806. // ^(? + rx + ) is needed, in combination with some str slicing, to
  3807. // simulate the 'y' flag.
  3808. reCopy = new RegExp('^(?:' + source + ')', flags);
  3809. }
  3810. if (NPCG_INCLUDED) {
  3811. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  3812. }
  3813. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  3814. match = call(nativeExec, sticky ? reCopy : re, strCopy);
  3815. if (sticky) {
  3816. if (match) {
  3817. match.input = stringSlice(match.input, charsAdded);
  3818. match[0] = stringSlice(match[0], charsAdded);
  3819. match.index = re.lastIndex;
  3820. re.lastIndex += match[0].length;
  3821. } else re.lastIndex = 0;
  3822. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  3823. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  3824. }
  3825. if (NPCG_INCLUDED && match && match.length > 1) {
  3826. // Fix browsers whose `exec` methods don't consistently return `undefined`
  3827. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  3828. call(nativeReplace, match[0], reCopy, function () {
  3829. for (i = 1; i < arguments.length - 2; i++) {
  3830. if (arguments[i] === undefined) match[i] = undefined;
  3831. }
  3832. });
  3833. }
  3834. if (match && groups) {
  3835. match.groups = object = create(null);
  3836. for (i = 0; i < groups.length; i++) {
  3837. group = groups[i];
  3838. object[group[0]] = match[group[1]];
  3839. }
  3840. }
  3841. return match;
  3842. };
  3843. }
  3844. regexpExec = patchedExec;
  3845. return regexpExec;
  3846. }
  3847. var hasRequiredEs_regexp_exec;
  3848. function requireEs_regexp_exec () {
  3849. if (hasRequiredEs_regexp_exec) return es_regexp_exec;
  3850. hasRequiredEs_regexp_exec = 1;
  3851. var $ = require_export();
  3852. var exec = requireRegexpExec();
  3853. // `RegExp.prototype.exec` method
  3854. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  3855. $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  3856. exec: exec
  3857. });
  3858. return es_regexp_exec;
  3859. }
  3860. requireEs_regexp_exec();
  3861. var es_regexp_toString = {};
  3862. var regexpGetFlags;
  3863. var hasRequiredRegexpGetFlags;
  3864. function requireRegexpGetFlags () {
  3865. if (hasRequiredRegexpGetFlags) return regexpGetFlags;
  3866. hasRequiredRegexpGetFlags = 1;
  3867. var call = requireFunctionCall();
  3868. var hasOwn = requireHasOwnProperty();
  3869. var isPrototypeOf = requireObjectIsPrototypeOf();
  3870. var regExpFlags = requireRegexpFlags();
  3871. var RegExpPrototype = RegExp.prototype;
  3872. regexpGetFlags = function (R) {
  3873. var flags = R.flags;
  3874. return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)
  3875. ? call(regExpFlags, R) : flags;
  3876. };
  3877. return regexpGetFlags;
  3878. }
  3879. var hasRequiredEs_regexp_toString;
  3880. function requireEs_regexp_toString () {
  3881. if (hasRequiredEs_regexp_toString) return es_regexp_toString;
  3882. hasRequiredEs_regexp_toString = 1;
  3883. var PROPER_FUNCTION_NAME = requireFunctionName().PROPER;
  3884. var defineBuiltIn = requireDefineBuiltIn();
  3885. var anObject = requireAnObject();
  3886. var $toString = requireToString();
  3887. var fails = requireFails();
  3888. var getRegExpFlags = requireRegexpGetFlags();
  3889. var TO_STRING = 'toString';
  3890. var RegExpPrototype = RegExp.prototype;
  3891. var nativeToString = RegExpPrototype[TO_STRING];
  3892. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  3893. // FF44- RegExp#toString has a wrong name
  3894. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
  3895. // `RegExp.prototype.toString` method
  3896. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  3897. if (NOT_GENERIC || INCORRECT_NAME) {
  3898. defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
  3899. var R = anObject(this);
  3900. var pattern = $toString(R.source);
  3901. var flags = $toString(getRegExpFlags(R));
  3902. return '/' + pattern + '/' + flags;
  3903. }, { unsafe: true });
  3904. }
  3905. return es_regexp_toString;
  3906. }
  3907. requireEs_regexp_toString();
  3908. var es_string_includes = {};
  3909. var isRegexp;
  3910. var hasRequiredIsRegexp;
  3911. function requireIsRegexp () {
  3912. if (hasRequiredIsRegexp) return isRegexp;
  3913. hasRequiredIsRegexp = 1;
  3914. var isObject = requireIsObject();
  3915. var classof = requireClassofRaw();
  3916. var wellKnownSymbol = requireWellKnownSymbol();
  3917. var MATCH = wellKnownSymbol('match');
  3918. // `IsRegExp` abstract operation
  3919. // https://tc39.es/ecma262/#sec-isregexp
  3920. isRegexp = function (it) {
  3921. var isRegExp;
  3922. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
  3923. };
  3924. return isRegexp;
  3925. }
  3926. var notARegexp;
  3927. var hasRequiredNotARegexp;
  3928. function requireNotARegexp () {
  3929. if (hasRequiredNotARegexp) return notARegexp;
  3930. hasRequiredNotARegexp = 1;
  3931. var isRegExp = requireIsRegexp();
  3932. var $TypeError = TypeError;
  3933. notARegexp = function (it) {
  3934. if (isRegExp(it)) {
  3935. throw new $TypeError("The method doesn't accept regular expressions");
  3936. } return it;
  3937. };
  3938. return notARegexp;
  3939. }
  3940. var correctIsRegexpLogic;
  3941. var hasRequiredCorrectIsRegexpLogic;
  3942. function requireCorrectIsRegexpLogic () {
  3943. if (hasRequiredCorrectIsRegexpLogic) return correctIsRegexpLogic;
  3944. hasRequiredCorrectIsRegexpLogic = 1;
  3945. var wellKnownSymbol = requireWellKnownSymbol();
  3946. var MATCH = wellKnownSymbol('match');
  3947. correctIsRegexpLogic = function (METHOD_NAME) {
  3948. var regexp = /./;
  3949. try {
  3950. '/./'[METHOD_NAME](regexp);
  3951. } catch (error1) {
  3952. try {
  3953. regexp[MATCH] = false;
  3954. return '/./'[METHOD_NAME](regexp);
  3955. } catch (error2) { /* empty */ }
  3956. } return false;
  3957. };
  3958. return correctIsRegexpLogic;
  3959. }
  3960. var hasRequiredEs_string_includes;
  3961. function requireEs_string_includes () {
  3962. if (hasRequiredEs_string_includes) return es_string_includes;
  3963. hasRequiredEs_string_includes = 1;
  3964. var $ = require_export();
  3965. var uncurryThis = requireFunctionUncurryThis();
  3966. var notARegExp = requireNotARegexp();
  3967. var requireObjectCoercible = requireRequireObjectCoercible();
  3968. var toString = requireToString();
  3969. var correctIsRegExpLogic = requireCorrectIsRegexpLogic();
  3970. var stringIndexOf = uncurryThis(''.indexOf);
  3971. // `String.prototype.includes` method
  3972. // https://tc39.es/ecma262/#sec-string.prototype.includes
  3973. $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  3974. includes: function includes(searchString /* , position = 0 */) {
  3975. return !!~stringIndexOf(
  3976. toString(requireObjectCoercible(this)),
  3977. toString(notARegExp(searchString)),
  3978. arguments.length > 1 ? arguments[1] : undefined
  3979. );
  3980. }
  3981. });
  3982. return es_string_includes;
  3983. }
  3984. requireEs_string_includes();
  3985. var es_string_split = {};
  3986. var fixRegexpWellKnownSymbolLogic;
  3987. var hasRequiredFixRegexpWellKnownSymbolLogic;
  3988. function requireFixRegexpWellKnownSymbolLogic () {
  3989. if (hasRequiredFixRegexpWellKnownSymbolLogic) return fixRegexpWellKnownSymbolLogic;
  3990. hasRequiredFixRegexpWellKnownSymbolLogic = 1;
  3991. // TODO: Remove from `core-js@4` since it's moved to entry points
  3992. requireEs_regexp_exec();
  3993. var call = requireFunctionCall();
  3994. var defineBuiltIn = requireDefineBuiltIn();
  3995. var regexpExec = requireRegexpExec();
  3996. var fails = requireFails();
  3997. var wellKnownSymbol = requireWellKnownSymbol();
  3998. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  3999. var SPECIES = wellKnownSymbol('species');
  4000. var RegExpPrototype = RegExp.prototype;
  4001. fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  4002. var SYMBOL = wellKnownSymbol(KEY);
  4003. var DELEGATES_TO_SYMBOL = !fails(function () {
  4004. // String methods call symbol-named RegExp methods
  4005. var O = {};
  4006. O[SYMBOL] = function () { return 7; };
  4007. return ''[KEY](O) !== 7;
  4008. });
  4009. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  4010. // Symbol-named RegExp methods call .exec
  4011. var execCalled = false;
  4012. var re = /a/;
  4013. if (KEY === 'split') {
  4014. // We can't use real regex here since it causes deoptimization
  4015. // and serious performance degradation in V8
  4016. // https://github.com/zloirock/core-js/issues/306
  4017. re = {};
  4018. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  4019. // a new one. We need to return the patched regex when creating the new one.
  4020. re.constructor = {};
  4021. re.constructor[SPECIES] = function () { return re; };
  4022. re.flags = '';
  4023. re[SYMBOL] = /./[SYMBOL];
  4024. }
  4025. re.exec = function () {
  4026. execCalled = true;
  4027. return null;
  4028. };
  4029. re[SYMBOL]('');
  4030. return !execCalled;
  4031. });
  4032. if (
  4033. !DELEGATES_TO_SYMBOL ||
  4034. !DELEGATES_TO_EXEC ||
  4035. FORCED
  4036. ) {
  4037. var nativeRegExpMethod = /./[SYMBOL];
  4038. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  4039. var $exec = regexp.exec;
  4040. if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
  4041. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  4042. // The native String method already delegates to @@method (this
  4043. // polyfilled function), leasing to infinite recursion.
  4044. // We avoid it by directly calling the native @@method method.
  4045. return { done: true, value: call(nativeRegExpMethod, regexp, str, arg2) };
  4046. }
  4047. return { done: true, value: call(nativeMethod, str, regexp, arg2) };
  4048. }
  4049. return { done: false };
  4050. });
  4051. defineBuiltIn(String.prototype, KEY, methods[0]);
  4052. defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  4053. }
  4054. if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
  4055. };
  4056. return fixRegexpWellKnownSymbolLogic;
  4057. }
  4058. var stringMultibyte;
  4059. var hasRequiredStringMultibyte;
  4060. function requireStringMultibyte () {
  4061. if (hasRequiredStringMultibyte) return stringMultibyte;
  4062. hasRequiredStringMultibyte = 1;
  4063. var uncurryThis = requireFunctionUncurryThis();
  4064. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  4065. var toString = requireToString();
  4066. var requireObjectCoercible = requireRequireObjectCoercible();
  4067. var charAt = uncurryThis(''.charAt);
  4068. var charCodeAt = uncurryThis(''.charCodeAt);
  4069. var stringSlice = uncurryThis(''.slice);
  4070. var createMethod = function (CONVERT_TO_STRING) {
  4071. return function ($this, pos) {
  4072. var S = toString(requireObjectCoercible($this));
  4073. var position = toIntegerOrInfinity(pos);
  4074. var size = S.length;
  4075. var first, second;
  4076. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  4077. first = charCodeAt(S, position);
  4078. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  4079. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  4080. ? CONVERT_TO_STRING
  4081. ? charAt(S, position)
  4082. : first
  4083. : CONVERT_TO_STRING
  4084. ? stringSlice(S, position, position + 2)
  4085. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  4086. };
  4087. };
  4088. stringMultibyte = {
  4089. // `String.prototype.codePointAt` method
  4090. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  4091. codeAt: createMethod(false),
  4092. // `String.prototype.at` method
  4093. // https://github.com/mathiasbynens/String.prototype.at
  4094. charAt: createMethod(true)
  4095. };
  4096. return stringMultibyte;
  4097. }
  4098. var advanceStringIndex;
  4099. var hasRequiredAdvanceStringIndex;
  4100. function requireAdvanceStringIndex () {
  4101. if (hasRequiredAdvanceStringIndex) return advanceStringIndex;
  4102. hasRequiredAdvanceStringIndex = 1;
  4103. var charAt = requireStringMultibyte().charAt;
  4104. // `AdvanceStringIndex` abstract operation
  4105. // https://tc39.es/ecma262/#sec-advancestringindex
  4106. advanceStringIndex = function (S, index, unicode) {
  4107. return index + (unicode ? charAt(S, index).length : 1);
  4108. };
  4109. return advanceStringIndex;
  4110. }
  4111. var regexpExecAbstract;
  4112. var hasRequiredRegexpExecAbstract;
  4113. function requireRegexpExecAbstract () {
  4114. if (hasRequiredRegexpExecAbstract) return regexpExecAbstract;
  4115. hasRequiredRegexpExecAbstract = 1;
  4116. var call = requireFunctionCall();
  4117. var anObject = requireAnObject();
  4118. var isCallable = requireIsCallable();
  4119. var classof = requireClassofRaw();
  4120. var regexpExec = requireRegexpExec();
  4121. var $TypeError = TypeError;
  4122. // `RegExpExec` abstract operation
  4123. // https://tc39.es/ecma262/#sec-regexpexec
  4124. regexpExecAbstract = function (R, S) {
  4125. var exec = R.exec;
  4126. if (isCallable(exec)) {
  4127. var result = call(exec, R, S);
  4128. if (result !== null) anObject(result);
  4129. return result;
  4130. }
  4131. if (classof(R) === 'RegExp') return call(regexpExec, R, S);
  4132. throw new $TypeError('RegExp#exec called on incompatible receiver');
  4133. };
  4134. return regexpExecAbstract;
  4135. }
  4136. var hasRequiredEs_string_split;
  4137. function requireEs_string_split () {
  4138. if (hasRequiredEs_string_split) return es_string_split;
  4139. hasRequiredEs_string_split = 1;
  4140. var call = requireFunctionCall();
  4141. var uncurryThis = requireFunctionUncurryThis();
  4142. var fixRegExpWellKnownSymbolLogic = requireFixRegexpWellKnownSymbolLogic();
  4143. var anObject = requireAnObject();
  4144. var isNullOrUndefined = requireIsNullOrUndefined();
  4145. var requireObjectCoercible = requireRequireObjectCoercible();
  4146. var speciesConstructor = requireSpeciesConstructor();
  4147. var advanceStringIndex = requireAdvanceStringIndex();
  4148. var toLength = requireToLength();
  4149. var toString = requireToString();
  4150. var getMethod = requireGetMethod();
  4151. var regExpExec = requireRegexpExecAbstract();
  4152. var stickyHelpers = requireRegexpStickyHelpers();
  4153. var fails = requireFails();
  4154. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  4155. var MAX_UINT32 = 0xFFFFFFFF;
  4156. var min = Math.min;
  4157. var push = uncurryThis([].push);
  4158. var stringSlice = uncurryThis(''.slice);
  4159. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  4160. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  4161. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  4162. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  4163. var re = /(?:)/;
  4164. var originalExec = re.exec;
  4165. re.exec = function () { return originalExec.apply(this, arguments); };
  4166. var result = 'ab'.split(re);
  4167. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  4168. });
  4169. var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||
  4170. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  4171. 'test'.split(/(?:)/, -1).length !== 4 ||
  4172. 'ab'.split(/(?:ab)*/).length !== 2 ||
  4173. '.'.split(/(.?)(.?)/).length !== 4 ||
  4174. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  4175. '.'.split(/()()/).length > 1 ||
  4176. ''.split(/.?/).length;
  4177. // @@split logic
  4178. fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
  4179. var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {
  4180. return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
  4181. } : nativeSplit;
  4182. return [
  4183. // `String.prototype.split` method
  4184. // https://tc39.es/ecma262/#sec-string.prototype.split
  4185. function split(separator, limit) {
  4186. var O = requireObjectCoercible(this);
  4187. var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);
  4188. return splitter
  4189. ? call(splitter, separator, O, limit)
  4190. : call(internalSplit, toString(O), separator, limit);
  4191. },
  4192. // `RegExp.prototype[@@split]` method
  4193. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  4194. //
  4195. // NOTE: This cannot be properly polyfilled in engines that don't support
  4196. // the 'y' flag.
  4197. function (string, limit) {
  4198. var rx = anObject(this);
  4199. var S = toString(string);
  4200. if (!BUGGY) {
  4201. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  4202. if (res.done) return res.value;
  4203. }
  4204. var C = speciesConstructor(rx, RegExp);
  4205. var unicodeMatching = rx.unicode;
  4206. var flags = (rx.ignoreCase ? 'i' : '') +
  4207. (rx.multiline ? 'm' : '') +
  4208. (rx.unicode ? 'u' : '') +
  4209. (UNSUPPORTED_Y ? 'g' : 'y');
  4210. // ^(? + rx + ) is needed, in combination with some S slicing, to
  4211. // simulate the 'y' flag.
  4212. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  4213. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  4214. if (lim === 0) return [];
  4215. if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];
  4216. var p = 0;
  4217. var q = 0;
  4218. var A = [];
  4219. while (q < S.length) {
  4220. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  4221. var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
  4222. var e;
  4223. if (
  4224. z === null ||
  4225. (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  4226. ) {
  4227. q = advanceStringIndex(S, q, unicodeMatching);
  4228. } else {
  4229. push(A, stringSlice(S, p, q));
  4230. if (A.length === lim) return A;
  4231. for (var i = 1; i <= z.length - 1; i++) {
  4232. push(A, z[i]);
  4233. if (A.length === lim) return A;
  4234. }
  4235. q = p = e;
  4236. }
  4237. }
  4238. push(A, stringSlice(S, p));
  4239. return A;
  4240. }
  4241. ];
  4242. }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  4243. return es_string_split;
  4244. }
  4245. requireEs_string_split();
  4246. var es_string_trim = {};
  4247. var stringTrimForced;
  4248. var hasRequiredStringTrimForced;
  4249. function requireStringTrimForced () {
  4250. if (hasRequiredStringTrimForced) return stringTrimForced;
  4251. hasRequiredStringTrimForced = 1;
  4252. var PROPER_FUNCTION_NAME = requireFunctionName().PROPER;
  4253. var fails = requireFails();
  4254. var whitespaces = requireWhitespaces();
  4255. var non = '\u200B\u0085\u180E';
  4256. // check that a method works with the correct list
  4257. // of whitespaces and has a correct name
  4258. stringTrimForced = function (METHOD_NAME) {
  4259. return fails(function () {
  4260. return !!whitespaces[METHOD_NAME]()
  4261. || non[METHOD_NAME]() !== non
  4262. || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
  4263. });
  4264. };
  4265. return stringTrimForced;
  4266. }
  4267. var hasRequiredEs_string_trim;
  4268. function requireEs_string_trim () {
  4269. if (hasRequiredEs_string_trim) return es_string_trim;
  4270. hasRequiredEs_string_trim = 1;
  4271. var $ = require_export();
  4272. var $trim = requireStringTrim().trim;
  4273. var forcedStringTrimMethod = requireStringTrimForced();
  4274. // `String.prototype.trim` method
  4275. // https://tc39.es/ecma262/#sec-string.prototype.trim
  4276. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  4277. trim: function trim() {
  4278. return $trim(this);
  4279. }
  4280. });
  4281. return es_string_trim;
  4282. }
  4283. requireEs_string_trim();
  4284. var web_domCollections_forEach = {};
  4285. var domIterables;
  4286. var hasRequiredDomIterables;
  4287. function requireDomIterables () {
  4288. if (hasRequiredDomIterables) return domIterables;
  4289. hasRequiredDomIterables = 1;
  4290. // iterable DOM collections
  4291. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  4292. domIterables = {
  4293. CSSRuleList: 0,
  4294. CSSStyleDeclaration: 0,
  4295. CSSValueList: 0,
  4296. ClientRectList: 0,
  4297. DOMRectList: 0,
  4298. DOMStringList: 0,
  4299. DOMTokenList: 1,
  4300. DataTransferItemList: 0,
  4301. FileList: 0,
  4302. HTMLAllCollection: 0,
  4303. HTMLCollection: 0,
  4304. HTMLFormElement: 0,
  4305. HTMLSelectElement: 0,
  4306. MediaList: 0,
  4307. MimeTypeArray: 0,
  4308. NamedNodeMap: 0,
  4309. NodeList: 1,
  4310. PaintRequestList: 0,
  4311. Plugin: 0,
  4312. PluginArray: 0,
  4313. SVGLengthList: 0,
  4314. SVGNumberList: 0,
  4315. SVGPathSegList: 0,
  4316. SVGPointList: 0,
  4317. SVGStringList: 0,
  4318. SVGTransformList: 0,
  4319. SourceBufferList: 0,
  4320. StyleSheetList: 0,
  4321. TextTrackCueList: 0,
  4322. TextTrackList: 0,
  4323. TouchList: 0
  4324. };
  4325. return domIterables;
  4326. }
  4327. var domTokenListPrototype;
  4328. var hasRequiredDomTokenListPrototype;
  4329. function requireDomTokenListPrototype () {
  4330. if (hasRequiredDomTokenListPrototype) return domTokenListPrototype;
  4331. hasRequiredDomTokenListPrototype = 1;
  4332. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  4333. var documentCreateElement = requireDocumentCreateElement();
  4334. var classList = documentCreateElement('span').classList;
  4335. var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
  4336. domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
  4337. return domTokenListPrototype;
  4338. }
  4339. var arrayForEach;
  4340. var hasRequiredArrayForEach;
  4341. function requireArrayForEach () {
  4342. if (hasRequiredArrayForEach) return arrayForEach;
  4343. hasRequiredArrayForEach = 1;
  4344. var $forEach = requireArrayIteration().forEach;
  4345. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  4346. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  4347. // `Array.prototype.forEach` method implementation
  4348. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  4349. arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  4350. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  4351. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  4352. } : [].forEach;
  4353. return arrayForEach;
  4354. }
  4355. var hasRequiredWeb_domCollections_forEach;
  4356. function requireWeb_domCollections_forEach () {
  4357. if (hasRequiredWeb_domCollections_forEach) return web_domCollections_forEach;
  4358. hasRequiredWeb_domCollections_forEach = 1;
  4359. var globalThis = requireGlobalThis();
  4360. var DOMIterables = requireDomIterables();
  4361. var DOMTokenListPrototype = requireDomTokenListPrototype();
  4362. var forEach = requireArrayForEach();
  4363. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  4364. var handlePrototype = function (CollectionPrototype) {
  4365. // some Chrome versions have non-configurable methods on DOMTokenList
  4366. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  4367. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  4368. } catch (error) {
  4369. CollectionPrototype.forEach = forEach;
  4370. }
  4371. };
  4372. for (var COLLECTION_NAME in DOMIterables) {
  4373. if (DOMIterables[COLLECTION_NAME]) {
  4374. handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype);
  4375. }
  4376. }
  4377. handlePrototype(DOMTokenListPrototype);
  4378. return web_domCollections_forEach;
  4379. }
  4380. requireWeb_domCollections_forEach();
  4381. var es_array_join = {};
  4382. var hasRequiredEs_array_join;
  4383. function requireEs_array_join () {
  4384. if (hasRequiredEs_array_join) return es_array_join;
  4385. hasRequiredEs_array_join = 1;
  4386. var $ = require_export();
  4387. var uncurryThis = requireFunctionUncurryThis();
  4388. var IndexedObject = requireIndexedObject();
  4389. var toIndexedObject = requireToIndexedObject();
  4390. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  4391. var nativeJoin = uncurryThis([].join);
  4392. var ES3_STRINGS = IndexedObject !== Object;
  4393. var FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');
  4394. // `Array.prototype.join` method
  4395. // https://tc39.es/ecma262/#sec-array.prototype.join
  4396. $({ target: 'Array', proto: true, forced: FORCED }, {
  4397. join: function join(separator) {
  4398. return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  4399. }
  4400. });
  4401. return es_array_join;
  4402. }
  4403. requireEs_array_join();
  4404. var es_array_sort = {};
  4405. var deletePropertyOrThrow;
  4406. var hasRequiredDeletePropertyOrThrow;
  4407. function requireDeletePropertyOrThrow () {
  4408. if (hasRequiredDeletePropertyOrThrow) return deletePropertyOrThrow;
  4409. hasRequiredDeletePropertyOrThrow = 1;
  4410. var tryToString = requireTryToString();
  4411. var $TypeError = TypeError;
  4412. deletePropertyOrThrow = function (O, P) {
  4413. if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  4414. };
  4415. return deletePropertyOrThrow;
  4416. }
  4417. var arraySort;
  4418. var hasRequiredArraySort;
  4419. function requireArraySort () {
  4420. if (hasRequiredArraySort) return arraySort;
  4421. hasRequiredArraySort = 1;
  4422. var arraySlice = requireArraySlice();
  4423. var floor = Math.floor;
  4424. var sort = function (array, comparefn) {
  4425. var length = array.length;
  4426. if (length < 8) {
  4427. // insertion sort
  4428. var i = 1;
  4429. var element, j;
  4430. while (i < length) {
  4431. j = i;
  4432. element = array[i];
  4433. while (j && comparefn(array[j - 1], element) > 0) {
  4434. array[j] = array[--j];
  4435. }
  4436. if (j !== i++) array[j] = element;
  4437. }
  4438. } else {
  4439. // merge sort
  4440. var middle = floor(length / 2);
  4441. var left = sort(arraySlice(array, 0, middle), comparefn);
  4442. var right = sort(arraySlice(array, middle), comparefn);
  4443. var llength = left.length;
  4444. var rlength = right.length;
  4445. var lindex = 0;
  4446. var rindex = 0;
  4447. while (lindex < llength || rindex < rlength) {
  4448. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  4449. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  4450. : lindex < llength ? left[lindex++] : right[rindex++];
  4451. }
  4452. }
  4453. return array;
  4454. };
  4455. arraySort = sort;
  4456. return arraySort;
  4457. }
  4458. var environmentFfVersion;
  4459. var hasRequiredEnvironmentFfVersion;
  4460. function requireEnvironmentFfVersion () {
  4461. if (hasRequiredEnvironmentFfVersion) return environmentFfVersion;
  4462. hasRequiredEnvironmentFfVersion = 1;
  4463. var userAgent = requireEnvironmentUserAgent();
  4464. var firefox = userAgent.match(/firefox\/(\d+)/i);
  4465. environmentFfVersion = !!firefox && +firefox[1];
  4466. return environmentFfVersion;
  4467. }
  4468. var environmentIsIeOrEdge;
  4469. var hasRequiredEnvironmentIsIeOrEdge;
  4470. function requireEnvironmentIsIeOrEdge () {
  4471. if (hasRequiredEnvironmentIsIeOrEdge) return environmentIsIeOrEdge;
  4472. hasRequiredEnvironmentIsIeOrEdge = 1;
  4473. var UA = requireEnvironmentUserAgent();
  4474. environmentIsIeOrEdge = /MSIE|Trident/.test(UA);
  4475. return environmentIsIeOrEdge;
  4476. }
  4477. var environmentWebkitVersion;
  4478. var hasRequiredEnvironmentWebkitVersion;
  4479. function requireEnvironmentWebkitVersion () {
  4480. if (hasRequiredEnvironmentWebkitVersion) return environmentWebkitVersion;
  4481. hasRequiredEnvironmentWebkitVersion = 1;
  4482. var userAgent = requireEnvironmentUserAgent();
  4483. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  4484. environmentWebkitVersion = !!webkit && +webkit[1];
  4485. return environmentWebkitVersion;
  4486. }
  4487. var hasRequiredEs_array_sort;
  4488. function requireEs_array_sort () {
  4489. if (hasRequiredEs_array_sort) return es_array_sort;
  4490. hasRequiredEs_array_sort = 1;
  4491. var $ = require_export();
  4492. var uncurryThis = requireFunctionUncurryThis();
  4493. var aCallable = requireACallable();
  4494. var toObject = requireToObject();
  4495. var lengthOfArrayLike = requireLengthOfArrayLike();
  4496. var deletePropertyOrThrow = requireDeletePropertyOrThrow();
  4497. var toString = requireToString();
  4498. var fails = requireFails();
  4499. var internalSort = requireArraySort();
  4500. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  4501. var FF = requireEnvironmentFfVersion();
  4502. var IE_OR_EDGE = requireEnvironmentIsIeOrEdge();
  4503. var V8 = requireEnvironmentV8Version();
  4504. var WEBKIT = requireEnvironmentWebkitVersion();
  4505. var test = [];
  4506. var nativeSort = uncurryThis(test.sort);
  4507. var push = uncurryThis(test.push);
  4508. // IE8-
  4509. var FAILS_ON_UNDEFINED = fails(function () {
  4510. test.sort(undefined);
  4511. });
  4512. // V8 bug
  4513. var FAILS_ON_NULL = fails(function () {
  4514. test.sort(null);
  4515. });
  4516. // Old WebKit
  4517. var STRICT_METHOD = arrayMethodIsStrict('sort');
  4518. var STABLE_SORT = !fails(function () {
  4519. // feature detection can be too slow, so check engines versions
  4520. if (V8) return V8 < 70;
  4521. if (FF && FF > 3) return;
  4522. if (IE_OR_EDGE) return true;
  4523. if (WEBKIT) return WEBKIT < 603;
  4524. var result = '';
  4525. var code, chr, value, index;
  4526. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  4527. for (code = 65; code < 76; code++) {
  4528. chr = String.fromCharCode(code);
  4529. switch (code) {
  4530. case 66: case 69: case 70: case 72: value = 3; break;
  4531. case 68: case 71: value = 4; break;
  4532. default: value = 2;
  4533. }
  4534. for (index = 0; index < 47; index++) {
  4535. test.push({ k: chr + index, v: value });
  4536. }
  4537. }
  4538. test.sort(function (a, b) { return b.v - a.v; });
  4539. for (index = 0; index < test.length; index++) {
  4540. chr = test[index].k.charAt(0);
  4541. if (result.charAt(result.length - 1) !== chr) result += chr;
  4542. }
  4543. return result !== 'DGBEFHACIJK';
  4544. });
  4545. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  4546. var getSortCompare = function (comparefn) {
  4547. return function (x, y) {
  4548. if (y === undefined) return -1;
  4549. if (x === undefined) return 1;
  4550. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  4551. return toString(x) > toString(y) ? 1 : -1;
  4552. };
  4553. };
  4554. // `Array.prototype.sort` method
  4555. // https://tc39.es/ecma262/#sec-array.prototype.sort
  4556. $({ target: 'Array', proto: true, forced: FORCED }, {
  4557. sort: function sort(comparefn) {
  4558. if (comparefn !== undefined) aCallable(comparefn);
  4559. var array = toObject(this);
  4560. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  4561. var items = [];
  4562. var arrayLength = lengthOfArrayLike(array);
  4563. var itemsLength, index;
  4564. for (index = 0; index < arrayLength; index++) {
  4565. if (index in array) push(items, array[index]);
  4566. }
  4567. internalSort(items, getSortCompare(comparefn));
  4568. itemsLength = lengthOfArrayLike(items);
  4569. index = 0;
  4570. while (index < itemsLength) array[index] = items[index++];
  4571. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  4572. return array;
  4573. }
  4574. });
  4575. return es_array_sort;
  4576. }
  4577. requireEs_array_sort();
  4578. var es_string_match = {};
  4579. var hasRequiredEs_string_match;
  4580. function requireEs_string_match () {
  4581. if (hasRequiredEs_string_match) return es_string_match;
  4582. hasRequiredEs_string_match = 1;
  4583. var call = requireFunctionCall();
  4584. var fixRegExpWellKnownSymbolLogic = requireFixRegexpWellKnownSymbolLogic();
  4585. var anObject = requireAnObject();
  4586. var isNullOrUndefined = requireIsNullOrUndefined();
  4587. var toLength = requireToLength();
  4588. var toString = requireToString();
  4589. var requireObjectCoercible = requireRequireObjectCoercible();
  4590. var getMethod = requireGetMethod();
  4591. var advanceStringIndex = requireAdvanceStringIndex();
  4592. var regExpExec = requireRegexpExecAbstract();
  4593. // @@match logic
  4594. fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
  4595. return [
  4596. // `String.prototype.match` method
  4597. // https://tc39.es/ecma262/#sec-string.prototype.match
  4598. function match(regexp) {
  4599. var O = requireObjectCoercible(this);
  4600. var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
  4601. return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
  4602. },
  4603. // `RegExp.prototype[@@match]` method
  4604. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  4605. function (string) {
  4606. var rx = anObject(this);
  4607. var S = toString(string);
  4608. var res = maybeCallNative(nativeMatch, rx, S);
  4609. if (res.done) return res.value;
  4610. if (!rx.global) return regExpExec(rx, S);
  4611. var fullUnicode = rx.unicode;
  4612. rx.lastIndex = 0;
  4613. var A = [];
  4614. var n = 0;
  4615. var result;
  4616. while ((result = regExpExec(rx, S)) !== null) {
  4617. var matchStr = toString(result[0]);
  4618. A[n] = matchStr;
  4619. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  4620. n++;
  4621. }
  4622. return n === 0 ? null : A;
  4623. }
  4624. ];
  4625. });
  4626. return es_string_match;
  4627. }
  4628. requireEs_string_match();
  4629. var es_string_replace = {};
  4630. var getSubstitution;
  4631. var hasRequiredGetSubstitution;
  4632. function requireGetSubstitution () {
  4633. if (hasRequiredGetSubstitution) return getSubstitution;
  4634. hasRequiredGetSubstitution = 1;
  4635. var uncurryThis = requireFunctionUncurryThis();
  4636. var toObject = requireToObject();
  4637. var floor = Math.floor;
  4638. var charAt = uncurryThis(''.charAt);
  4639. var replace = uncurryThis(''.replace);
  4640. var stringSlice = uncurryThis(''.slice);
  4641. // eslint-disable-next-line redos/no-vulnerable -- safe
  4642. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  4643. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  4644. // `GetSubstitution` abstract operation
  4645. // https://tc39.es/ecma262/#sec-getsubstitution
  4646. getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
  4647. var tailPos = position + matched.length;
  4648. var m = captures.length;
  4649. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  4650. if (namedCaptures !== undefined) {
  4651. namedCaptures = toObject(namedCaptures);
  4652. symbols = SUBSTITUTION_SYMBOLS;
  4653. }
  4654. return replace(replacement, symbols, function (match, ch) {
  4655. var capture;
  4656. switch (charAt(ch, 0)) {
  4657. case '$': return '$';
  4658. case '&': return matched;
  4659. case '`': return stringSlice(str, 0, position);
  4660. case "'": return stringSlice(str, tailPos);
  4661. case '<':
  4662. capture = namedCaptures[stringSlice(ch, 1, -1)];
  4663. break;
  4664. default: // \d\d?
  4665. var n = +ch;
  4666. if (n === 0) return match;
  4667. if (n > m) {
  4668. var f = floor(n / 10);
  4669. if (f === 0) return match;
  4670. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  4671. return match;
  4672. }
  4673. capture = captures[n - 1];
  4674. }
  4675. return capture === undefined ? '' : capture;
  4676. });
  4677. };
  4678. return getSubstitution;
  4679. }
  4680. var hasRequiredEs_string_replace;
  4681. function requireEs_string_replace () {
  4682. if (hasRequiredEs_string_replace) return es_string_replace;
  4683. hasRequiredEs_string_replace = 1;
  4684. var apply = requireFunctionApply();
  4685. var call = requireFunctionCall();
  4686. var uncurryThis = requireFunctionUncurryThis();
  4687. var fixRegExpWellKnownSymbolLogic = requireFixRegexpWellKnownSymbolLogic();
  4688. var fails = requireFails();
  4689. var anObject = requireAnObject();
  4690. var isCallable = requireIsCallable();
  4691. var isNullOrUndefined = requireIsNullOrUndefined();
  4692. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  4693. var toLength = requireToLength();
  4694. var toString = requireToString();
  4695. var requireObjectCoercible = requireRequireObjectCoercible();
  4696. var advanceStringIndex = requireAdvanceStringIndex();
  4697. var getMethod = requireGetMethod();
  4698. var getSubstitution = requireGetSubstitution();
  4699. var regExpExec = requireRegexpExecAbstract();
  4700. var wellKnownSymbol = requireWellKnownSymbol();
  4701. var REPLACE = wellKnownSymbol('replace');
  4702. var max = Math.max;
  4703. var min = Math.min;
  4704. var concat = uncurryThis([].concat);
  4705. var push = uncurryThis([].push);
  4706. var stringIndexOf = uncurryThis(''.indexOf);
  4707. var stringSlice = uncurryThis(''.slice);
  4708. var maybeToString = function (it) {
  4709. return it === undefined ? it : String(it);
  4710. };
  4711. // IE <= 11 replaces $0 with the whole match, as if it was $&
  4712. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  4713. var REPLACE_KEEPS_$0 = (function () {
  4714. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  4715. return 'a'.replace(/./, '$0') === '$0';
  4716. })();
  4717. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  4718. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  4719. if (/./[REPLACE]) {
  4720. return /./[REPLACE]('a', '$0') === '';
  4721. }
  4722. return false;
  4723. })();
  4724. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  4725. var re = /./;
  4726. re.exec = function () {
  4727. var result = [];
  4728. result.groups = { a: '7' };
  4729. return result;
  4730. };
  4731. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  4732. return ''.replace(re, '$<a>') !== '7';
  4733. });
  4734. // @@replace logic
  4735. fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  4736. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  4737. return [
  4738. // `String.prototype.replace` method
  4739. // https://tc39.es/ecma262/#sec-string.prototype.replace
  4740. function replace(searchValue, replaceValue) {
  4741. var O = requireObjectCoercible(this);
  4742. var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
  4743. return replacer
  4744. ? call(replacer, searchValue, O, replaceValue)
  4745. : call(nativeReplace, toString(O), searchValue, replaceValue);
  4746. },
  4747. // `RegExp.prototype[@@replace]` method
  4748. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  4749. function (string, replaceValue) {
  4750. var rx = anObject(this);
  4751. var S = toString(string);
  4752. if (
  4753. typeof replaceValue == 'string' &&
  4754. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  4755. stringIndexOf(replaceValue, '$<') === -1
  4756. ) {
  4757. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  4758. if (res.done) return res.value;
  4759. }
  4760. var functionalReplace = isCallable(replaceValue);
  4761. if (!functionalReplace) replaceValue = toString(replaceValue);
  4762. var global = rx.global;
  4763. var fullUnicode;
  4764. if (global) {
  4765. fullUnicode = rx.unicode;
  4766. rx.lastIndex = 0;
  4767. }
  4768. var results = [];
  4769. var result;
  4770. while (true) {
  4771. result = regExpExec(rx, S);
  4772. if (result === null) break;
  4773. push(results, result);
  4774. if (!global) break;
  4775. var matchStr = toString(result[0]);
  4776. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  4777. }
  4778. var accumulatedResult = '';
  4779. var nextSourcePosition = 0;
  4780. for (var i = 0; i < results.length; i++) {
  4781. result = results[i];
  4782. var matched = toString(result[0]);
  4783. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  4784. var captures = [];
  4785. var replacement;
  4786. // NOTE: This is equivalent to
  4787. // captures = result.slice(1).map(maybeToString)
  4788. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  4789. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  4790. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  4791. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  4792. var namedCaptures = result.groups;
  4793. if (functionalReplace) {
  4794. var replacerArgs = concat([matched], captures, position, S);
  4795. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  4796. replacement = toString(apply(replaceValue, undefined, replacerArgs));
  4797. } else {
  4798. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  4799. }
  4800. if (position >= nextSourcePosition) {
  4801. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  4802. nextSourcePosition = position + matched.length;
  4803. }
  4804. }
  4805. return accumulatedResult + stringSlice(S, nextSourcePosition);
  4806. }
  4807. ];
  4808. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  4809. return es_string_replace;
  4810. }
  4811. requireEs_string_replace();
  4812. var es_string_startsWith = {};
  4813. var hasRequiredEs_string_startsWith;
  4814. function requireEs_string_startsWith () {
  4815. if (hasRequiredEs_string_startsWith) return es_string_startsWith;
  4816. hasRequiredEs_string_startsWith = 1;
  4817. var $ = require_export();
  4818. var uncurryThis = requireFunctionUncurryThisClause();
  4819. var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
  4820. var toLength = requireToLength();
  4821. var toString = requireToString();
  4822. var notARegExp = requireNotARegexp();
  4823. var requireObjectCoercible = requireRequireObjectCoercible();
  4824. var correctIsRegExpLogic = requireCorrectIsRegexpLogic();
  4825. var IS_PURE = requireIsPure();
  4826. var stringSlice = uncurryThis(''.slice);
  4827. var min = Math.min;
  4828. var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
  4829. // https://github.com/zloirock/core-js/pull/702
  4830. var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
  4831. var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
  4832. return descriptor && !descriptor.writable;
  4833. }();
  4834. // `String.prototype.startsWith` method
  4835. // https://tc39.es/ecma262/#sec-string.prototype.startswith
  4836. $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  4837. startsWith: function startsWith(searchString /* , position = 0 */) {
  4838. var that = toString(requireObjectCoercible(this));
  4839. notARegExp(searchString);
  4840. var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  4841. var search = toString(searchString);
  4842. return stringSlice(that, index, index + search.length) === search;
  4843. }
  4844. });
  4845. return es_string_startsWith;
  4846. }
  4847. requireEs_string_startsWith();
  4848. /* eslint-disable no-use-before-define */
  4849. var Utils$1 = $.fn.bootstrapTable.utils;
  4850. var searchControls = 'select, input:not([type="checkbox"]):not([type="radio"])';
  4851. function getInputClass(that) {
  4852. var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  4853. var formControlClass = isSelect ? that.constants.classes.select : that.constants.classes.input;
  4854. return that.options.iconSize ? Utils$1.sprintf('%s %s-%s', formControlClass, formControlClass, that.options.iconSize) : formControlClass;
  4855. }
  4856. function getOptionsFromSelectControl(selectControl) {
  4857. return selectControl[0].options;
  4858. }
  4859. function getControlContainer(that) {
  4860. if (that.options.filterControlContainer) {
  4861. return $("".concat(that.options.filterControlContainer));
  4862. }
  4863. if (that.options.height && that._initialized) {
  4864. return that.$tableContainer.find('.fixed-table-header table thead');
  4865. }
  4866. return that.$header;
  4867. }
  4868. function isKeyAllowed(keyCode) {
  4869. return $.inArray(keyCode, [37, 38, 39, 40]) > -1;
  4870. }
  4871. function getSearchControls(that) {
  4872. return getControlContainer(that).find(searchControls);
  4873. }
  4874. function existOptionInSelectControl(selectControl, value) {
  4875. var options = getOptionsFromSelectControl(selectControl);
  4876. for (var i = 0; i < options.length; i++) {
  4877. if (options[i].value === Utils$1.unescapeHTML(value)) {
  4878. // The value is not valid to add
  4879. return true;
  4880. }
  4881. }
  4882. // If we get here, the value is valid to add
  4883. return false;
  4884. }
  4885. function addOptionToSelectControl(selectControl, _value, text, selected, shouldCompareText) {
  4886. var value = _value === undefined || _value === null ? '' : _value.toString().trim();
  4887. value = Utils$1.removeHTML(Utils$1.unescapeHTML(value));
  4888. text = Utils$1.removeHTML(Utils$1.unescapeHTML(text));
  4889. if (existOptionInSelectControl(selectControl, value)) {
  4890. return;
  4891. }
  4892. var isSelected = shouldCompareText ? value === selected || text === selected : value === selected;
  4893. var option = new Option(text, value, false, isSelected);
  4894. selectControl.get(0).add(option);
  4895. }
  4896. function sortSelectControl(selectControl, orderBy, options) {
  4897. var $selectControl = selectControl.get(0);
  4898. if (orderBy === 'server') {
  4899. return;
  4900. }
  4901. var tmpAry = new Array();
  4902. for (var i = 0; i < $selectControl.options.length; i++) {
  4903. tmpAry[i] = new Array();
  4904. tmpAry[i][0] = $selectControl.options[i].text;
  4905. tmpAry[i][1] = $selectControl.options[i].value;
  4906. tmpAry[i][2] = $selectControl.options[i].selected;
  4907. }
  4908. tmpAry.sort(function (a, b) {
  4909. return Utils$1.sort(a[0], b[0], orderBy === 'desc' ? -1 : 1, options);
  4910. });
  4911. while ($selectControl.options.length > 0) {
  4912. $selectControl.options[0] = null;
  4913. }
  4914. for (var _i = 0; _i < tmpAry.length; _i++) {
  4915. var op = new Option(tmpAry[_i][0], tmpAry[_i][1], false, tmpAry[_i][2]);
  4916. $selectControl.add(op);
  4917. }
  4918. }
  4919. function fixHeaderCSS(_ref) {
  4920. var $tableHeader = _ref.$tableHeader;
  4921. $tableHeader.css('height', $tableHeader.find('table').outerHeight(true));
  4922. }
  4923. function getElementClass($element) {
  4924. return $element.attr('class').split(' ').filter(function (className) {
  4925. return className.startsWith('bootstrap-table-filter-control-');
  4926. });
  4927. }
  4928. function getCursorPosition(el) {
  4929. if ($(el).is('input[type=search]')) {
  4930. var pos = 0;
  4931. if ('selectionStart' in el) {
  4932. pos = el.selectionStart;
  4933. } else if ('selection' in document) {
  4934. el.focus();
  4935. var Sel = document.selection.createRange();
  4936. var SelLength = document.selection.createRange().text.length;
  4937. Sel.moveStart('character', -el.value.length);
  4938. pos = Sel.text.length - SelLength;
  4939. }
  4940. return pos;
  4941. }
  4942. return -1;
  4943. }
  4944. function cacheValues(that) {
  4945. var searchControls = getSearchControls(that);
  4946. that._valuesFilterControl = [];
  4947. searchControls.each(function () {
  4948. var $field = $(this);
  4949. var fieldClass = escapeID(getElementClass($field));
  4950. if (that.options.height && !that.options.filterControlContainer) {
  4951. $field = that.$el.find(".fixed-table-header .".concat(fieldClass));
  4952. } else if (that.options.filterControlContainer) {
  4953. $field = $("".concat(that.options.filterControlContainer, " .").concat(fieldClass));
  4954. } else {
  4955. $field = that.$el.find(".".concat(fieldClass));
  4956. }
  4957. that._valuesFilterControl.push({
  4958. field: $field.closest('[data-field]').data('field'),
  4959. value: $field.val(),
  4960. position: getCursorPosition($field.get(0)),
  4961. hasFocus: $field.is(':focus')
  4962. });
  4963. });
  4964. }
  4965. function setCaretPosition(elem, caretPos) {
  4966. try {
  4967. if (elem) {
  4968. if (elem.createTextRange) {
  4969. var range = elem.createTextRange();
  4970. range.move('character', caretPos);
  4971. range.select();
  4972. } else {
  4973. elem.setSelectionRange(caretPos, caretPos);
  4974. }
  4975. }
  4976. } catch (ex) {
  4977. // ignored
  4978. }
  4979. }
  4980. function setValues(that) {
  4981. var field = null;
  4982. var result = [];
  4983. var searchControls = getSearchControls(that);
  4984. if (that._valuesFilterControl.length > 0) {
  4985. // Callback to apply after settings fields values
  4986. var callbacks = [];
  4987. searchControls.each(function (i, el) {
  4988. var $this = $(el);
  4989. field = $this.closest('[data-field]').data('field');
  4990. result = that._valuesFilterControl.filter(function (valueObj) {
  4991. return valueObj.field === field;
  4992. });
  4993. if (result.length > 0) {
  4994. if (result[0].hasFocus || result[0].value) {
  4995. var fieldToFocusCallback = function (element, cacheElementInfo) {
  4996. // Closure here to capture the field information
  4997. var closedCallback = function closedCallback() {
  4998. if (cacheElementInfo.hasFocus) {
  4999. element.focus();
  5000. }
  5001. if (Array.isArray(cacheElementInfo.value)) {
  5002. var $element = $(element);
  5003. $.each(cacheElementInfo.value, function (i, e) {
  5004. $element.find(Utils$1.sprintf('option[value=\'%s\']', e)).prop('selected', true);
  5005. });
  5006. } else {
  5007. element.value = cacheElementInfo.value;
  5008. }
  5009. setCaretPosition(element, cacheElementInfo.position);
  5010. };
  5011. return closedCallback;
  5012. }($this.get(0), result[0]);
  5013. callbacks.push(fieldToFocusCallback);
  5014. }
  5015. }
  5016. });
  5017. // Callback call.
  5018. if (callbacks.length > 0) {
  5019. callbacks.forEach(function (callback) {
  5020. return callback();
  5021. });
  5022. }
  5023. }
  5024. }
  5025. function collectBootstrapTableFilterCookies() {
  5026. var cookies = [];
  5027. var cookieRegex = /bs\.table\.(filterControl|searchText)/g;
  5028. var foundCookies = document.cookie.match(cookieRegex);
  5029. var foundLocalStorage = localStorage;
  5030. if (foundCookies) {
  5031. $.each(foundCookies, function (i, _cookie) {
  5032. var cookie = _cookie;
  5033. if (/./.test(cookie)) {
  5034. cookie = cookie.split('.').pop();
  5035. }
  5036. if ($.inArray(cookie, cookies) === -1) {
  5037. cookies.push(cookie);
  5038. }
  5039. });
  5040. }
  5041. if (!foundLocalStorage) {
  5042. return cookies;
  5043. }
  5044. Object.keys(localStorage).forEach(function (cookie) {
  5045. if (!cookieRegex.test(cookie)) {
  5046. return;
  5047. }
  5048. cookie = cookie.split('.').pop();
  5049. if (!cookies.includes(cookie)) {
  5050. cookies.push(cookie);
  5051. }
  5052. });
  5053. return cookies;
  5054. }
  5055. function escapeID(id) {
  5056. // eslint-disable-next-line no-useless-escape
  5057. return String(id).replace(/([:.\[\],])/g, '\\$1');
  5058. }
  5059. function isColumnSearchableViaSelect(_ref2) {
  5060. var filterControl = _ref2.filterControl,
  5061. searchable = _ref2.searchable;
  5062. return filterControl && filterControl.toLowerCase() === 'select' && searchable;
  5063. }
  5064. function isFilterDataNotGiven(_ref3) {
  5065. var filterData = _ref3.filterData;
  5066. return filterData === undefined || filterData.toLowerCase() === 'column';
  5067. }
  5068. function hasSelectControlElement(selectControl) {
  5069. return selectControl && selectControl.length > 0;
  5070. }
  5071. function initFilterSelectControls(that) {
  5072. var data = that.options.data;
  5073. $.each(that.header.fields, function (j, field) {
  5074. var column = that.columns[that.fieldsColumnsIndex[field]];
  5075. var selectControl = getControlContainer(that).find("select.bootstrap-table-filter-control-".concat(escapeID(column.field)));
  5076. if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
  5077. if (!selectControl[0].multiple && selectControl.get(selectControl.length - 1).options.length === 0) {
  5078. // Added the default option, must use a non-breaking space(&nbsp;) to pass the W3C validator
  5079. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder || ' ', column.filterDefault);
  5080. }
  5081. var uniqueValues = {};
  5082. for (var i = 0; i < data.length; i++) {
  5083. // Added a new value
  5084. var fieldValue = Utils$1.getItemField(data[i], field, false);
  5085. var formatter = that.options.editable && column.editable ? column._formatter : that.header.formatters[j];
  5086. var formattedValue = Utils$1.calculateObjectValue(that.header, formatter, [fieldValue, data[i], i], fieldValue);
  5087. if (fieldValue === undefined || fieldValue === null) {
  5088. fieldValue = formattedValue;
  5089. column._forceFormatter = true;
  5090. }
  5091. if (column.filterDataCollector) {
  5092. formattedValue = Utils$1.calculateObjectValue(that.header, column.filterDataCollector, [fieldValue, data[i], formattedValue], formattedValue);
  5093. }
  5094. if (column.searchFormatter) {
  5095. fieldValue = formattedValue;
  5096. }
  5097. uniqueValues[formattedValue] = fieldValue;
  5098. if (_typeof(formattedValue) === 'object' && formattedValue !== null) {
  5099. formattedValue.forEach(function (value) {
  5100. addOptionToSelectControl(selectControl, value, value, column.filterDefault);
  5101. });
  5102. continue;
  5103. }
  5104. }
  5105. // eslint-disable-next-line guard-for-in
  5106. for (var key in uniqueValues) {
  5107. addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
  5108. }
  5109. if (that.options.sortSelectOptions) {
  5110. sortSelectControl(selectControl, column.filterOrderBy, that.options);
  5111. }
  5112. }
  5113. });
  5114. }
  5115. function getFilterDataMethod(objFilterDataMethod, searchTerm) {
  5116. var keys = Object.keys(objFilterDataMethod);
  5117. for (var i = 0; i < keys.length; i++) {
  5118. if (keys[i] === searchTerm) {
  5119. return objFilterDataMethod[searchTerm];
  5120. }
  5121. }
  5122. return null;
  5123. }
  5124. function createControls(that, header) {
  5125. var addedFilterControl = false;
  5126. var html;
  5127. $.each(that.columns, function (_, column) {
  5128. html = [];
  5129. if (!column.visible && !(that.options.filterControlContainer && $(".bootstrap-table-filter-control-".concat(escapeID(column.field))).length >= 1)) {
  5130. return;
  5131. }
  5132. if (!column.filterControl && !that.options.filterControlContainer) {
  5133. html.push('<div class="no-filter-control"></div>');
  5134. } else if (that.options.filterControlContainer) {
  5135. // Use a filter control container instead of th
  5136. var $filterControls = $(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  5137. $.each($filterControls, function (_, filterControl) {
  5138. var $filterControl = $(filterControl);
  5139. if (!$filterControl.is('[type=radio]')) {
  5140. var placeholder = column.filterControlPlaceholder || '';
  5141. $filterControl.attr('placeholder', placeholder).val(column.filterDefault);
  5142. }
  5143. $filterControl.attr('data-field', column.field);
  5144. });
  5145. addedFilterControl = true;
  5146. } else {
  5147. // Create the control based on the html defined in the filterTemplate array.
  5148. var nameControl = column.filterControl.toLowerCase();
  5149. html.push('<div class="filter-control">');
  5150. addedFilterControl = true;
  5151. if (column.searchable && that.options.filterTemplate[nameControl]) {
  5152. html.push(that.options.filterTemplate[nameControl](that, column, column.filterControlPlaceholder ? column.filterControlPlaceholder : '', column.filterDefault));
  5153. }
  5154. }
  5155. // Filtering by default when it is set.
  5156. if (column.filterControl && '' !== column.filterDefault && 'undefined' !== typeof column.filterDefault) {
  5157. if (Utils$1.isEmptyObject(that.filterColumnsPartial)) {
  5158. that.filterColumnsPartial = {};
  5159. }
  5160. if (!(column.field in that.filterColumnsPartial)) {
  5161. that.filterColumnsPartial[column.field] = column.filterDefault;
  5162. }
  5163. }
  5164. $.each(header.find('th'), function (_, th) {
  5165. var $th = $(th);
  5166. if ($th.data('field') === column.field) {
  5167. $th.find('.filter-control').remove();
  5168. $th.find('.fht-cell').html(html.join(''));
  5169. return false;
  5170. }
  5171. });
  5172. if (column.filterData && column.filterData.toLowerCase() !== 'column') {
  5173. var filterDataType = getFilterDataMethod(filterDataMethods, column.filterData.substring(0, column.filterData.indexOf(':')));
  5174. var filterDataSource;
  5175. var selectControl;
  5176. if (filterDataType) {
  5177. filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
  5178. selectControl = header.find(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  5179. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault, true);
  5180. filterDataType(that, filterDataSource, selectControl, that.options.filterOrderBy, column.filterDefault);
  5181. } else {
  5182. 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"}');
  5183. }
  5184. }
  5185. });
  5186. if (addedFilterControl) {
  5187. header.off('keyup', 'input').on('keyup', 'input', function (_ref4, obj) {
  5188. var currentTarget = _ref4.currentTarget,
  5189. keyCode = _ref4.keyCode;
  5190. keyCode = obj ? obj.keyCode : keyCode;
  5191. if (that.options.searchOnEnterKey && keyCode !== 13) {
  5192. return;
  5193. }
  5194. if (isKeyAllowed(keyCode)) {
  5195. return;
  5196. }
  5197. var $currentTarget = $(currentTarget);
  5198. if ($currentTarget.is(':checkbox') || $currentTarget.is(':radio')) {
  5199. return;
  5200. }
  5201. clearTimeout(currentTarget.timeoutId || 0);
  5202. currentTarget.timeoutId = setTimeout(function () {
  5203. that.onColumnSearch({
  5204. currentTarget: currentTarget,
  5205. keyCode: keyCode
  5206. });
  5207. }, that.options.searchTimeOut);
  5208. });
  5209. header.off('change', 'select', '.fc-multipleselect').on('change', 'select', '.fc-multipleselect', function (_ref5) {
  5210. var currentTarget = _ref5.currentTarget,
  5211. keyCode = _ref5.keyCode;
  5212. var $selectControl = $(currentTarget);
  5213. var value = $selectControl.val();
  5214. if (Array.isArray(value)) {
  5215. for (var i = 0; i < value.length; i++) {
  5216. if (value[i] && value[i].length > 0 && value[i].trim()) {
  5217. $selectControl.find("option[value=\"".concat(value[i], "\"]")).attr('selected', true);
  5218. }
  5219. }
  5220. } else if (value && value.length > 0 && value.trim()) {
  5221. $selectControl.find('option[selected]').removeAttr('selected');
  5222. $selectControl.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  5223. } else {
  5224. $selectControl.find('option[selected]').removeAttr('selected');
  5225. }
  5226. clearTimeout(currentTarget.timeoutId || 0);
  5227. currentTarget.timeoutId = setTimeout(function () {
  5228. that.onColumnSearch({
  5229. currentTarget: currentTarget,
  5230. keyCode: keyCode
  5231. });
  5232. }, that.options.searchTimeOut);
  5233. });
  5234. header.off('mouseup', 'input:not([type=radio])').on('mouseup', 'input:not([type=radio])', function (_ref6) {
  5235. var currentTarget = _ref6.currentTarget,
  5236. keyCode = _ref6.keyCode;
  5237. var $input = $(currentTarget);
  5238. var oldValue = $input.val();
  5239. if (oldValue === '') {
  5240. return;
  5241. }
  5242. setTimeout(function () {
  5243. var newValue = $input.val();
  5244. if (newValue === '') {
  5245. clearTimeout(currentTarget.timeoutId || 0);
  5246. currentTarget.timeoutId = setTimeout(function () {
  5247. that.onColumnSearch({
  5248. currentTarget: currentTarget,
  5249. keyCode: keyCode
  5250. });
  5251. }, that.options.searchTimeOut);
  5252. }
  5253. }, 1);
  5254. });
  5255. header.off('change', 'input[type=radio]').on('change', 'input[type=radio]', function (_ref7) {
  5256. var currentTarget = _ref7.currentTarget,
  5257. keyCode = _ref7.keyCode;
  5258. clearTimeout(currentTarget.timeoutId || 0);
  5259. currentTarget.timeoutId = setTimeout(function () {
  5260. that.onColumnSearch({
  5261. currentTarget: currentTarget,
  5262. keyCode: keyCode
  5263. });
  5264. }, that.options.searchTimeOut);
  5265. });
  5266. // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  5267. if (header.find('.date-filter-control').length > 0) {
  5268. $.each(that.columns, function (i, _ref8) {
  5269. var filterDefault = _ref8.filterDefault,
  5270. filterControl = _ref8.filterControl,
  5271. field = _ref8.field,
  5272. filterDatepickerOptions = _ref8.filterDatepickerOptions;
  5273. if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
  5274. var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(escapeID(field)));
  5275. if (filterDefault) {
  5276. $datepicker.value(filterDefault);
  5277. }
  5278. if (filterDatepickerOptions.min) {
  5279. $datepicker.attr('min', filterDatepickerOptions.min);
  5280. }
  5281. if (filterDatepickerOptions.max) {
  5282. $datepicker.attr('max', filterDatepickerOptions.max);
  5283. }
  5284. if (filterDatepickerOptions.step) {
  5285. $datepicker.attr('step', filterDatepickerOptions.step);
  5286. }
  5287. if (filterDatepickerOptions.pattern) {
  5288. $datepicker.attr('pattern', filterDatepickerOptions.pattern);
  5289. }
  5290. $datepicker.on('change', function (_ref9) {
  5291. var currentTarget = _ref9.currentTarget;
  5292. clearTimeout(currentTarget.timeoutId || 0);
  5293. currentTarget.timeoutId = setTimeout(function () {
  5294. that.onColumnSearch({
  5295. currentTarget: currentTarget
  5296. });
  5297. }, that.options.searchTimeOut);
  5298. });
  5299. }
  5300. });
  5301. }
  5302. if (that.options.sidePagination !== 'server') {
  5303. that.triggerSearch();
  5304. }
  5305. if (!that.options.filterControlVisible) {
  5306. header.find('.filter-control, .no-filter-control').hide();
  5307. }
  5308. } else {
  5309. header.find('.filter-control, .no-filter-control').hide();
  5310. }
  5311. that.trigger('created-controls');
  5312. }
  5313. function getDirectionOfSelectOptions(_alignment) {
  5314. var alignment = _alignment === undefined ? 'left' : _alignment.toLowerCase();
  5315. switch (alignment) {
  5316. case 'left':
  5317. return 'ltr';
  5318. case 'right':
  5319. return 'rtl';
  5320. case 'auto':
  5321. return 'auto';
  5322. default:
  5323. return 'ltr';
  5324. }
  5325. }
  5326. function syncHeaders(that) {
  5327. if (!that.options.height) {
  5328. return;
  5329. }
  5330. var fixedHeader = that.$tableContainer.find('.fixed-table-header table thead');
  5331. if (fixedHeader.length === 0) {
  5332. return;
  5333. }
  5334. that.$header.children().find('th[data-field]').each(function (_, element) {
  5335. if (element.classList[0] !== 'bs-checkbox') {
  5336. var $element = $(element);
  5337. var $field = $element.data('field');
  5338. var $fixedField = that.$tableContainer.find("th[data-field='".concat($field, "']")).not($element);
  5339. var input = $element.find('input');
  5340. var fixedInput = $fixedField.find('input');
  5341. if (input.length > 0 && fixedInput.length > 0) {
  5342. if (input.val() !== fixedInput.val()) {
  5343. input.val(fixedInput.val());
  5344. }
  5345. }
  5346. }
  5347. });
  5348. }
  5349. var filterDataMethods = {
  5350. func: function func(that, filterDataSource, selectControl, filterOrderBy, selected) {
  5351. var variableValues = window[filterDataSource].apply();
  5352. // eslint-disable-next-line guard-for-in
  5353. for (var key in variableValues) {
  5354. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  5355. }
  5356. if (that.options.sortSelectOptions) {
  5357. sortSelectControl(selectControl, filterOrderBy, that.options);
  5358. }
  5359. setValues(that);
  5360. },
  5361. obj: function obj(that, filterDataSource, selectControl, filterOrderBy, selected) {
  5362. var objectKeys = filterDataSource.split('.');
  5363. var variableName = objectKeys.shift();
  5364. var variableValues = window[variableName];
  5365. if (objectKeys.length > 0) {
  5366. objectKeys.forEach(function (key) {
  5367. variableValues = variableValues[key];
  5368. });
  5369. }
  5370. // eslint-disable-next-line guard-for-in
  5371. for (var key in variableValues) {
  5372. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  5373. }
  5374. if (that.options.sortSelectOptions) {
  5375. sortSelectControl(selectControl, filterOrderBy, that.options);
  5376. }
  5377. setValues(that);
  5378. },
  5379. var: function _var(that, filterDataSource, selectControl, filterOrderBy, selected) {
  5380. var variableValues = window[filterDataSource];
  5381. var isArray = Array.isArray(variableValues);
  5382. for (var key in variableValues) {
  5383. if (isArray) {
  5384. addOptionToSelectControl(selectControl, variableValues[key], variableValues[key], selected, true);
  5385. } else {
  5386. addOptionToSelectControl(selectControl, key, variableValues[key], selected, true);
  5387. }
  5388. }
  5389. if (that.options.sortSelectOptions) {
  5390. sortSelectControl(selectControl, filterOrderBy, that.options);
  5391. }
  5392. setValues(that);
  5393. },
  5394. url: function url(that, filterDataSource, selectControl, filterOrderBy, selected) {
  5395. $.ajax({
  5396. url: filterDataSource,
  5397. dataType: 'json',
  5398. success: function success(data) {
  5399. // eslint-disable-next-line guard-for-in
  5400. for (var key in data) {
  5401. addOptionToSelectControl(selectControl, key, data[key], selected);
  5402. }
  5403. if (that.options.sortSelectOptions) {
  5404. sortSelectControl(selectControl, filterOrderBy, that.options);
  5405. }
  5406. setValues(that);
  5407. }
  5408. });
  5409. },
  5410. json: function json(that, filterDataSource, selectControl, filterOrderBy, selected) {
  5411. var variableValues = JSON.parse(filterDataSource);
  5412. // eslint-disable-next-line guard-for-in
  5413. for (var key in variableValues) {
  5414. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  5415. }
  5416. if (that.options.sortSelectOptions) {
  5417. sortSelectControl(selectControl, filterOrderBy, that.options);
  5418. }
  5419. setValues(that);
  5420. }
  5421. };
  5422. var Utils = $.fn.bootstrapTable.utils;
  5423. Object.assign($.fn.bootstrapTable.defaults, {
  5424. filterControl: false,
  5425. filterControlVisible: true,
  5426. filterControlMultipleSearch: false,
  5427. filterControlMultipleSearchDelimiter: ',',
  5428. filterControlSearchClear: true,
  5429. // eslint-disable-next-line no-unused-vars
  5430. onColumnSearch: function onColumnSearch(field, text) {
  5431. return false;
  5432. },
  5433. onCreatedControls: function onCreatedControls() {
  5434. return false;
  5435. },
  5436. alignmentSelectControlOptions: undefined,
  5437. filterTemplate: {
  5438. input: function input(that, column, placeholder, value) {
  5439. 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);
  5440. },
  5441. select: function select(that, column) {
  5442. 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));
  5443. },
  5444. datepicker: function datepicker(that, column, value) {
  5445. 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);
  5446. }
  5447. },
  5448. searchOnEnterKey: false,
  5449. showFilterControlSwitch: false,
  5450. sortSelectOptions: false,
  5451. // internal variables
  5452. _valuesFilterControl: [],
  5453. _initialized: false,
  5454. _isRendering: false,
  5455. _usingMultipleSelect: false
  5456. });
  5457. Object.assign($.fn.bootstrapTable.columnDefaults, {
  5458. filterControl: undefined,
  5459. // input, select, datepicker
  5460. filterControlMultipleSelect: false,
  5461. filterControlMultipleSelectOptions: {},
  5462. filterDataCollector: undefined,
  5463. filterData: undefined,
  5464. filterDatepickerOptions: {},
  5465. filterStrictSearch: false,
  5466. filterStartsWithSearch: false,
  5467. filterControlPlaceholder: '',
  5468. filterDefault: '',
  5469. filterOrderBy: 'asc',
  5470. // asc || desc
  5471. filterCustomSearch: undefined
  5472. });
  5473. Object.assign($.fn.bootstrapTable.events, {
  5474. 'column-search.bs.table': 'onColumnSearch',
  5475. 'created-controls.bs.table': 'onCreatedControls'
  5476. });
  5477. Object.assign($.fn.bootstrapTable.defaults.icons, {
  5478. filterControlSwitchHide: {
  5479. bootstrap3: 'glyphicon-zoom-out icon-zoom-out',
  5480. bootstrap5: 'bi-zoom-out',
  5481. materialize: 'zoom_out'
  5482. }[$.fn.bootstrapTable.theme] || 'fa-search-minus',
  5483. filterControlSwitchShow: {
  5484. bootstrap3: 'glyphicon-zoom-in icon-zoom-in',
  5485. bootstrap5: 'bi-zoom-in',
  5486. materialize: 'zoom_in'
  5487. }[$.fn.bootstrapTable.theme] || 'fa-search-plus'
  5488. });
  5489. Object.assign($.fn.bootstrapTable.locales, {
  5490. formatFilterControlSwitch: function formatFilterControlSwitch() {
  5491. return 'Hide/Show controls';
  5492. },
  5493. formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
  5494. return 'Hide controls';
  5495. },
  5496. formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
  5497. return 'Show controls';
  5498. },
  5499. formatClearSearch: function formatClearSearch() {
  5500. return 'Clear filters';
  5501. }
  5502. });
  5503. Object.assign($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
  5504. $.fn.bootstrapTable.methods.push('triggerSearch');
  5505. $.fn.bootstrapTable.methods.push('clearFilterControl');
  5506. $.fn.bootstrapTable.methods.push('toggleFilterControl');
  5507. $.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  5508. function _class() {
  5509. _classCallCheck(this, _class);
  5510. return _callSuper(this, _class, arguments);
  5511. }
  5512. _inherits(_class, _$$BootstrapTable);
  5513. return _createClass(_class, [{
  5514. key: "init",
  5515. value: function init() {
  5516. var _this = this;
  5517. // Make sure that the filterControl option is set
  5518. if (this.options.filterControl) {
  5519. // Make sure that the internal variables are set correctly
  5520. this._valuesFilterControl = [];
  5521. this._initialized = false;
  5522. this._usingMultipleSelect = false;
  5523. this._isRendering = false;
  5524. this.$el.on('reset-view.bs.table', Utils.debounce(function () {
  5525. initFilterSelectControls(_this);
  5526. setValues(_this);
  5527. }, 3)).on('toggle.bs.table', Utils.debounce(function (_, cardView) {
  5528. _this._initialized = false;
  5529. if (!cardView) {
  5530. initFilterSelectControls(_this);
  5531. setValues(_this);
  5532. _this._initialized = true;
  5533. }
  5534. }, 1)).on('post-header.bs.table', Utils.debounce(function () {
  5535. initFilterSelectControls(_this);
  5536. setValues(_this);
  5537. }, 3)).on('column-switch.bs.table', Utils.debounce(function () {
  5538. setValues(_this);
  5539. if (_this.options.height) {
  5540. _this.fitHeader();
  5541. }
  5542. }, 1)).on('post-body.bs.table', Utils.debounce(function () {
  5543. if (_this.options.height && !_this.options.filterControlContainer && _this.options.filterControlVisible) {
  5544. fixHeaderCSS(_this);
  5545. }
  5546. _this.$tableLoading.css('top', _this.$header.outerHeight() + 1);
  5547. }, 1)).on('all.bs.table', function () {
  5548. syncHeaders(_this);
  5549. });
  5550. }
  5551. _superPropGet(_class, "init", this)([]);
  5552. }
  5553. }, {
  5554. key: "initBody",
  5555. value: function initBody() {
  5556. var _this2 = this;
  5557. _superPropGet(_class, "initBody", this)([]);
  5558. if (!this.options.filterControl) {
  5559. return;
  5560. }
  5561. setTimeout(function () {
  5562. initFilterSelectControls(_this2);
  5563. setValues(_this2);
  5564. }, 3);
  5565. }
  5566. }, {
  5567. key: "load",
  5568. value: function load(data) {
  5569. _superPropGet(_class, "load", this)([data]);
  5570. if (!this.options.filterControl) {
  5571. return;
  5572. }
  5573. createControls(this, getControlContainer(this));
  5574. setValues(this);
  5575. }
  5576. }, {
  5577. key: "initHeader",
  5578. value: function initHeader() {
  5579. _superPropGet(_class, "initHeader", this)([]);
  5580. if (!this.options.filterControl) {
  5581. return;
  5582. }
  5583. createControls(this, getControlContainer(this));
  5584. this._initialized = true;
  5585. }
  5586. }, {
  5587. key: "initSearch",
  5588. value: function initSearch() {
  5589. var _this3 = this;
  5590. var that = this;
  5591. var filterPartial = Utils.isEmptyObject(that.filterColumnsPartial) ? null : that.filterColumnsPartial;
  5592. _superPropGet(_class, "initSearch", this)([]);
  5593. if (this.options.sidePagination === 'server' || filterPartial === null) {
  5594. return;
  5595. }
  5596. // Check partial column filter
  5597. that.data = filterPartial ? that.data.filter(function (item, i) {
  5598. var itemIsExpected = [];
  5599. var keys1 = Object.keys(item);
  5600. var keys2 = Object.keys(filterPartial);
  5601. var keys = keys1.concat(keys2.filter(function (item) {
  5602. return !keys1.includes(item);
  5603. }));
  5604. keys.forEach(function (key) {
  5605. var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
  5606. var rawFilterValue = filterPartial[key] || '';
  5607. var filterValue = rawFilterValue.toLowerCase();
  5608. var value = Utils.unescapeHTML(Utils.getItemField(item, key, false));
  5609. var tmpItemIsExpected;
  5610. if (_this3.options.searchAccentNeutralise) {
  5611. filterValue = Utils.normalizeAccent(filterValue);
  5612. }
  5613. var filterValues = [filterValue];
  5614. if (_this3.options.filterControlMultipleSearch) {
  5615. filterValues = filterValue.split(_this3.options.filterControlMultipleSearchDelimiter);
  5616. }
  5617. filterValues.forEach(function (filterValue) {
  5618. if (tmpItemIsExpected === true) {
  5619. return;
  5620. }
  5621. filterValue = filterValue.trim();
  5622. if (filterValue === '') {
  5623. tmpItemIsExpected = true;
  5624. } else {
  5625. // Fix #142: search use formatted data
  5626. if (thisColumn) {
  5627. if (thisColumn.searchFormatter || thisColumn._forceFormatter) {
  5628. value = $.fn.bootstrapTable.utils.calculateObjectValue(thisColumn, that.header.formatters[$.inArray(key, that.header.fields)], [value, item, i], value);
  5629. }
  5630. }
  5631. if ($.inArray(key, that.header.fields) !== -1) {
  5632. if (value === undefined || value === null) {
  5633. tmpItemIsExpected = false;
  5634. } else if (_typeof(value) === 'object' && thisColumn.filterCustomSearch) {
  5635. itemIsExpected.push(that.isValueExpected(rawFilterValue, value, thisColumn, key));
  5636. } else if (_typeof(value) === 'object' && Array.isArray(value)) {
  5637. value.forEach(function (objectValue) {
  5638. if (tmpItemIsExpected) {
  5639. return;
  5640. }
  5641. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  5642. });
  5643. } else if (_typeof(value) === 'object' && !Array.isArray(value)) {
  5644. Object.values(value).forEach(function (objectValue) {
  5645. if (tmpItemIsExpected) {
  5646. return;
  5647. }
  5648. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  5649. });
  5650. } else if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
  5651. tmpItemIsExpected = that.isValueExpected(filterValue, value, thisColumn, key);
  5652. }
  5653. }
  5654. }
  5655. });
  5656. itemIsExpected.push(tmpItemIsExpected);
  5657. });
  5658. return !itemIsExpected.includes(false);
  5659. }) : that.data;
  5660. that.unsortedData = _toConsumableArray(that.data);
  5661. }
  5662. }, {
  5663. key: "isValueExpected",
  5664. value: function isValueExpected(searchValue, value, column, key) {
  5665. var tmpItemIsExpected;
  5666. if (column.filterControl === 'select') {
  5667. value = Utils.removeHTML(value.toString().toLowerCase());
  5668. }
  5669. if (this.options.searchAccentNeutralise) {
  5670. value = Utils.normalizeAccent(value);
  5671. }
  5672. if (column.filterStrictSearch || column.filterControl === 'select' && column.passed.filterStrictSearch !== false) {
  5673. tmpItemIsExpected = value.toString().toLowerCase() === searchValue.toString().toLowerCase();
  5674. } else if (column.filterStartsWithSearch) {
  5675. tmpItemIsExpected = "".concat(value).toLowerCase().indexOf(searchValue) === 0;
  5676. } else if (column.filterControl === 'datepicker') {
  5677. tmpItemIsExpected = new Date(value).getTime() === new Date(searchValue).getTime();
  5678. } else if (this.options.regexSearch) {
  5679. tmpItemIsExpected = Utils.regexCompare(value, searchValue);
  5680. } else {
  5681. tmpItemIsExpected = "".concat(value).toLowerCase().includes(searchValue);
  5682. }
  5683. var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(\d+)?|(\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm;
  5684. var matches = largerSmallerEqualsRegex.exec(searchValue);
  5685. if (matches) {
  5686. var operator = matches[1] || "".concat(matches[5], "l");
  5687. var comparisonValue = matches[2] || matches[3];
  5688. var int = parseInt(value, 10);
  5689. var comparisonInt = parseInt(comparisonValue, 10);
  5690. switch (operator) {
  5691. case '>':
  5692. case '<l':
  5693. tmpItemIsExpected = int > comparisonInt;
  5694. break;
  5695. case '<':
  5696. case '>l':
  5697. tmpItemIsExpected = int < comparisonInt;
  5698. break;
  5699. case '<=':
  5700. case '=<':
  5701. case '>=l':
  5702. case '=>l':
  5703. tmpItemIsExpected = int <= comparisonInt;
  5704. break;
  5705. case '>=':
  5706. case '=>':
  5707. case '<=l':
  5708. case '=<l':
  5709. tmpItemIsExpected = int >= comparisonInt;
  5710. break;
  5711. }
  5712. }
  5713. if (column.filterCustomSearch) {
  5714. var customSearchResult = Utils.calculateObjectValue(column, column.filterCustomSearch, [searchValue, value, key, this.options.data], true);
  5715. if (customSearchResult !== null) {
  5716. tmpItemIsExpected = customSearchResult;
  5717. }
  5718. }
  5719. return tmpItemIsExpected;
  5720. }
  5721. }, {
  5722. key: "initColumnSearch",
  5723. value: function initColumnSearch(filterColumnsDefaults) {
  5724. cacheValues(this);
  5725. if (filterColumnsDefaults) {
  5726. this.filterColumnsPartial = filterColumnsDefaults;
  5727. this.updatePagination();
  5728. // eslint-disable-next-line guard-for-in
  5729. for (var filter in filterColumnsDefaults) {
  5730. this.trigger('column-search', filter, filterColumnsDefaults[filter]);
  5731. }
  5732. }
  5733. }
  5734. }, {
  5735. key: "initToolbar",
  5736. value: function initToolbar() {
  5737. this.showToolbar = this.showToolbar || this.options.showFilterControlSwitch;
  5738. this.showSearchClearButton = this.options.filterControl && this.options.showSearchClearButton;
  5739. if (this.options.showFilterControlSwitch) {
  5740. this.buttons = Object.assign(this.buttons, {
  5741. filterControlSwitch: {
  5742. text: this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
  5743. icon: this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
  5744. event: this.toggleFilterControl,
  5745. attributes: {
  5746. 'aria-label': this.options.formatFilterControlSwitch(),
  5747. title: this.options.formatFilterControlSwitch()
  5748. }
  5749. }
  5750. });
  5751. }
  5752. _superPropGet(_class, "initToolbar", this)([]);
  5753. }
  5754. }, {
  5755. key: "resetSearch",
  5756. value: function resetSearch(text) {
  5757. if (this.options.filterControl && this.options.filterControlSearchClear && this.options.showSearchClearButton) {
  5758. this.clearFilterControl();
  5759. }
  5760. _superPropGet(_class, "resetSearch", this)([text]);
  5761. }
  5762. }, {
  5763. key: "clearFilterControl",
  5764. value: function clearFilterControl() {
  5765. if (!this.options.filterControl) {
  5766. return;
  5767. }
  5768. var that = this;
  5769. var table = this.$el.closest('table');
  5770. var cookies = collectBootstrapTableFilterCookies();
  5771. var controls = getSearchControls(that);
  5772. // const search = Utils.getSearchInput(this)
  5773. var hasValues = false;
  5774. var timeoutId = 0;
  5775. // Clear cache values
  5776. $.each(that._valuesFilterControl, function (i, item) {
  5777. hasValues = hasValues ? true : item.value !== '';
  5778. item.value = '';
  5779. });
  5780. // Clear controls in UI
  5781. $.each(controls, function (i, item) {
  5782. item.value = '';
  5783. });
  5784. // Cache controls again
  5785. setValues(that);
  5786. // clear cookies once the filters are clean
  5787. clearTimeout(timeoutId);
  5788. timeoutId = setTimeout(function () {
  5789. if (cookies && cookies.length > 0) {
  5790. $.each(cookies, function (i, item) {
  5791. if (that.deleteCookie !== undefined) {
  5792. that.deleteCookie(item);
  5793. }
  5794. });
  5795. }
  5796. }, that.options.searchTimeOut);
  5797. // If there is not any value in the controls exit this method
  5798. if (!hasValues) {
  5799. return;
  5800. }
  5801. // Clear each type of filter if it exists.
  5802. // Requires the body to reload each time a type of filter is found because we never know
  5803. // which ones are going to be present.
  5804. if (controls.length > 0) {
  5805. this.filterColumnsPartial = {};
  5806. controls.eq(0).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', {
  5807. keyCode: 13
  5808. });
  5809. /* controls.each(function () {
  5810. $(this).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', { keyCode: 13 })
  5811. })*/
  5812. } else {
  5813. return;
  5814. }
  5815. /* if (search.length > 0) {
  5816. that.resetSearch('fc')
  5817. }*/
  5818. // use the default sort order if it exists. do nothing if it does not
  5819. if (that.options.sortName !== table.data('sortName') || that.options.sortOrder !== table.data('sortOrder')) {
  5820. var sorter = this.$header.find(Utils.sprintf('[data-field="%s"]', $(controls[0]).closest('table').data('sortName')));
  5821. if (sorter.length > 0) {
  5822. that.onSort({
  5823. type: 'keypress',
  5824. currentTarget: sorter
  5825. });
  5826. $(sorter).find('.sortable').trigger('click');
  5827. }
  5828. }
  5829. }
  5830. // EVENTS
  5831. }, {
  5832. key: "onColumnSearch",
  5833. value: function onColumnSearch(_ref) {
  5834. var _this4 = this;
  5835. var currentTarget = _ref.currentTarget,
  5836. keyCode = _ref.keyCode;
  5837. if (isKeyAllowed(keyCode)) {
  5838. return;
  5839. }
  5840. cacheValues(this);
  5841. // Cookie extension support
  5842. if (!this.options.cookie) {
  5843. this.options.pageNumber = 1;
  5844. } else {
  5845. // Force call the initServer method in Cookie extension
  5846. this._filterControlValuesLoaded = true;
  5847. }
  5848. if (Utils.isEmptyObject(this.filterColumnsPartial)) {
  5849. this.filterColumnsPartial = {};
  5850. }
  5851. // If searchOnEnterKey is set to true, then we need to iterate over all controls and grab their values.
  5852. var controls = this.options.searchOnEnterKey ? getSearchControls(this).toArray() : [currentTarget];
  5853. controls.forEach(function (element) {
  5854. var $element = $(element);
  5855. var elementValue = $element.val();
  5856. var text = elementValue ? elementValue.trim() : '';
  5857. var $field = $element.closest('[data-field]').data('field');
  5858. _this4.trigger('column-search', $field, text);
  5859. if (text) {
  5860. _this4.filterColumnsPartial[$field] = text;
  5861. } else {
  5862. delete _this4.filterColumnsPartial[$field];
  5863. }
  5864. });
  5865. this.onSearch({
  5866. currentTarget: currentTarget
  5867. }, false);
  5868. }
  5869. }, {
  5870. key: "toggleFilterControl",
  5871. value: function toggleFilterControl() {
  5872. this.options.filterControlVisible = !this.options.filterControlVisible;
  5873. // Controls in original header or container.
  5874. var $filterControls = getControlContainer(this).find('.filter-control, .no-filter-control');
  5875. if (this.options.filterControlVisible) {
  5876. $filterControls.show();
  5877. } else {
  5878. $filterControls.hide();
  5879. this.clearFilterControl();
  5880. }
  5881. // Controls in fixed header
  5882. if (this.options.height) {
  5883. var $fixedControls = this.$tableContainer.find('.fixed-table-header table thead').find('.filter-control, .no-filter-control');
  5884. $fixedControls.toggle(this.options.filterControlVisible);
  5885. fixHeaderCSS(this);
  5886. }
  5887. var icon = this.options.showButtonIcons ? this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow : '';
  5888. var text = this.options.showButtonText ? this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow() : '';
  5889. this.$toolbar.find('>.columns').find('.filter-control-switch').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
  5890. }
  5891. }, {
  5892. key: "triggerSearch",
  5893. value: function triggerSearch() {
  5894. var searchControls = getSearchControls(this);
  5895. searchControls.each(function () {
  5896. var $element = $(this);
  5897. if ($element.is('select')) {
  5898. $element.trigger('change');
  5899. } else {
  5900. $element.trigger('keyup');
  5901. }
  5902. });
  5903. }
  5904. }, {
  5905. key: "_toggleColumn",
  5906. value: function _toggleColumn(index, checked, needUpdate) {
  5907. this._initialized = false;
  5908. _superPropGet(_class, "_toggleColumn", this)([index, checked, needUpdate]);
  5909. syncHeaders(this);
  5910. }
  5911. }]);
  5912. }($.BootstrapTable);
  5913. }));